diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-11 11:23:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-11 13:09:01 +0100 |
commit | c8314441109548ab6ed12a3cc3cdbee6d1fd8eaf (patch) | |
tree | 66b1a093d3d95ae0c254702da9376a34f322a7dd /bridges/source | |
parent | f53bc68922dd15a53f6128b130d78d4239008d81 (diff) |
Move JniUnoEnvironmentData into its own include file
Change-Id: I8e6fb1fc0acff781dd6e6b62018c7ccd5d0e2307
Diffstat (limited to 'bridges/source')
-rw-r--r-- | bridges/source/jni_uno/jni_bridge.cxx | 1 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_bridge.h | 11 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_java2uno.cxx | 1 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_uno2java.cxx | 1 | ||||
-rw-r--r-- | bridges/source/jni_uno/jniunoenvironmentdata.hxx | 50 |
5 files changed, 53 insertions, 11 deletions
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx index a3ffe01afde6..9f0648a331c9 100644 --- a/bridges/source/jni_uno/jni_bridge.cxx +++ b/bridges/source/jni_uno/jni_bridge.cxx @@ -23,6 +23,7 @@ #include <memory> #include "jni_bridge.h" +#include "jniunoenvironmentdata.hxx" #include <boost/static_assert.hpp> #include "jvmaccess/unovirtualmachine.hxx" diff --git a/bridges/source/jni_uno/jni_bridge.h b/bridges/source/jni_uno/jni_bridge.h index 9328c6723862..e1a2aadecbb6 100644 --- a/bridges/source/jni_uno/jni_bridge.h +++ b/bridges/source/jni_uno/jni_bridge.h @@ -36,17 +36,6 @@ namespace jni_uno { -struct JniUnoEnvironmentData: boost::noncopyable { - explicit JniUnoEnvironmentData( - rtl::Reference<jvmaccess::UnoVirtualMachine> const & theMachine): - machine(theMachine), asynchronousFinalizer(nullptr) - {} - - rtl::Reference<jvmaccess::UnoVirtualMachine> machine; - osl::Mutex mutex; - jobject asynchronousFinalizer; -}; - //==== holds environments and mappings ========================================= struct Bridge; struct Mapping : public uno_Mapping diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx index 62098798cc48..4c19043b19d4 100644 --- a/bridges/source/jni_uno/jni_java2uno.cxx +++ b/bridges/source/jni_uno/jni_java2uno.cxx @@ -25,6 +25,7 @@ #include <sal/alloca.h> #include "jni_bridge.h" +#include "jniunoenvironmentdata.hxx" namespace jni_uno { diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx index 8058550ec2eb..578c3d0cece0 100644 --- a/bridges/source/jni_uno/jni_uno2java.cxx +++ b/bridges/source/jni_uno/jni_uno2java.cxx @@ -29,6 +29,7 @@ #include "rtl/ustrbuf.hxx" #include "jni_bridge.h" +#include "jniunoenvironmentdata.hxx" namespace { diff --git a/bridges/source/jni_uno/jniunoenvironmentdata.hxx b/bridges/source/jni_uno/jniunoenvironmentdata.hxx new file mode 100644 index 000000000000..843d29e9abc5 --- /dev/null +++ b/bridges/source/jni_uno/jniunoenvironmentdata.hxx @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNIUNOENVIRONMENTDATA_HXX +#define INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNIUNOENVIRONMENTDATA_HXX + +#include <sal/config.h> + +#include <jni.h> + +#include <boost/noncopyable.hpp> +#include <jvmaccess/unovirtualmachine.hxx> +#include <osl/mutex.hxx> +#include <rtl/ref.hxx> + +namespace jni_uno { + +// The pContext payload of a JNI uno_Environment: +struct JniUnoEnvironmentData: boost::noncopyable { + explicit JniUnoEnvironmentData( + rtl::Reference<jvmaccess::UnoVirtualMachine> const & theMachine): + machine(theMachine), asynchronousFinalizer(nullptr) + {} + + rtl::Reference<jvmaccess::UnoVirtualMachine> machine; + osl::Mutex mutex; + jobject asynchronousFinalizer; +}; + +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |