1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNI_BRIDGE_H
21 #define INCLUDED_BRIDGES_SOURCE_JNI_UNO_JNI_BRIDGE_H
24 #include "jni_helper.h"
26 #include "osl/diagnose.h"
27 #include "osl/interlck.h"
29 #include "uno/mapping.h"
30 #include "uno/dispatcher.h"
32 #include "com/sun/star/uno/XInterface.hpp"
41 struct Mapping
: public uno_Mapping
46 // Holds environments and mappings:
49 mutable oslInterlockedCount m_ref
;
51 uno_ExtEnvironment
* m_uno_env
;
52 uno_Environment
* m_java_env
;
56 bool m_registered_java2uno
;
60 uno_Environment
* java_env
, uno_ExtEnvironment
* uno_env
,
61 bool registered_java2uno
);
68 JNI_context
const & jni
,
69 void * uno_data
, jvalue java_data
,
70 typelib_TypeDescriptionReference
* type
,
71 JNI_type_info
const * info
/* maybe 0 */,
72 bool assign
, bool out_param
,
73 bool special_wrapped_integral_types
= false ) const;
75 JNI_context
const & jni
,
76 jvalue
* java_data
, void const * uno_data
,
77 typelib_TypeDescriptionReference
* type
,
78 JNI_type_info
const * info
/* maybe 0 */,
79 bool in_param
, bool out_param
,
80 bool special_wrapped_integral_types
= false ) const;
84 JNI_context
const & jni
, uno_Any
* uno_exc
) const;
87 typelib_InterfaceTypeDescription
* iface_td
,
88 sal_Int32 local_member_index
, sal_Int32 function_pos_offset
,
89 typelib_TypeDescriptionReference
* return_type
,
90 typelib_MethodParameter
* params
, sal_Int32 nParams
,
91 void * uno_ret
, void * uno_args
[], uno_Any
** uno_exc
) const;
93 JNI_context
const & jni
,
94 uno_Interface
* pUnoI
, JNI_interface_type_info
const * info
) const;
98 JNI_context
const & jni
,
99 JLocalAutoRef
const & jo_exc
, uno_Any
* uno_exc
) const;
101 JNI_context
const & jni
,
102 uno_Interface
* pUnoI
, typelib_TypeDescription
* member_td
,
103 typelib_TypeDescriptionReference
* return_tdref
,
104 sal_Int32 nParams
, typelib_MethodParameter
const * pParams
,
105 jobjectArray jo_args
) const;
106 uno_Interface
* map_to_uno(
107 JNI_context
const & jni
,
108 jobject javaI
, JNI_interface_type_info
const * info
) const;
110 JNI_info
const * getJniInfo() const;
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */