LibreOffice
LibreOffice 7.1 SDK C/C++ API Reference
mapping.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#ifndef INCLUDED_UNO_MAPPING_H
20#define INCLUDED_UNO_MAPPING_H
21
22#include "cppu/cppudllapi.h"
23#include "rtl/ustring.h"
24
25
26#ifdef __cplusplus
27extern "C"
28{
29#endif
30
32struct _uno_Mapping;
33struct _uno_Environment;
34
38typedef void (SAL_CALL * uno_AcquireMappingFunc)(struct _uno_Mapping *);
39
43typedef void (SAL_CALL * uno_ReleaseMappingFunc)(struct _uno_Mapping *);
44
52typedef void (SAL_CALL * uno_MapInterfaceFunc)(
53 struct _uno_Mapping * pMapping,
54 void ** ppOut, void * pInterface,
55 struct _typelib_InterfaceTypeDescription * pInterfaceTypeDescr );
56
57
58#if defined( _WIN32)
59#pragma pack(push, 8)
60#endif
61
64typedef struct SAL_DLLPUBLIC_RTTI _uno_Mapping
65{
69
73
78
79#if defined( _WIN32)
80#pragma pack(pop)
81#endif
82
93 struct _uno_Mapping ** ppMapping,
94 struct _uno_Environment * pFrom,
95 struct _uno_Environment * pTo,
96 rtl_uString * pAddPurpose )
98
106typedef void (SAL_CALL * uno_getMappingFunc)(
107 struct _uno_Mapping ** ppMapping,
108 struct _uno_Environment * pFrom,
109 struct _uno_Environment * pTo,
110 rtl_uString * pAddPurpose );
111
117 uno_getMappingFunc pCallback )
119
125 uno_getMappingFunc pCallback )
127
132typedef void (SAL_CALL * uno_freeMappingFunc)( struct _uno_Mapping * pMapping );
133
144 struct _uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping,
145 struct _uno_Environment * pFrom, struct _uno_Environment * pTo, rtl_uString * pAddPurpose )
147
154 struct _uno_Mapping * pMapping )
156
168 struct _uno_Mapping ** ppMapping,
169 rtl_uString * pFrom,
170 rtl_uString * pTo,
171 rtl_uString * pAddPurpose )
173
174/* symbol exported by each language binding library */
175#define UNO_EXT_GETMAPPING "uno_ext_getMapping"
176
184typedef void (SAL_CALL * uno_ext_getMappingFunc)(
185 struct _uno_Mapping ** ppMapping,
186 struct _uno_Environment * pFrom,
187 struct _uno_Environment * pTo );
188
189#ifdef DISABLE_DYNLOADING
190/* Static linking, this is the uno_ext_getMapping function in the C++/UNO bridge */
191void SAL_CALL CPPU_ENV_uno_ext_getMapping(
192 struct _uno_Mapping ** ppMapping,
193 struct _uno_Environment * pFrom,
194 struct _uno_Environment * pTo )
196
197/* This is the uno_ext_getMapping function in the Java/UNO bridge */
198void SAL_CALL java_uno_ext_getMapping(
199 struct _uno_Mapping ** ppMapping,
200 struct _uno_Environment * pFrom,
201 struct _uno_Environment * pTo )
203
204#endif
205
206#ifdef __cplusplus
207}
208#endif
209
210#endif
211
212/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:324
CPPU_DLLPUBLIC void uno_getMapping(struct _uno_Mapping **ppMapping, struct _uno_Environment *pFrom, struct _uno_Environment *pTo, rtl_uString *pAddPurpose) SAL_THROW_EXTERN_C()
Gets an interface mapping from one environment to another.
CPPU_DLLPUBLIC void uno_getMappingByName(struct _uno_Mapping **ppMapping, rtl_uString *pFrom, rtl_uString *pTo, rtl_uString *pAddPurpose) SAL_THROW_EXTERN_C()
Gets an interface mapping from one language environment to another by corresponding environment type ...
void(* uno_ReleaseMappingFunc)(struct _uno_Mapping *)
Function pointer declaration to release a UNO mapping.
Definition: mapping.h:43
CPPU_DLLPUBLIC void uno_revokeMappingCallback(uno_getMappingFunc pCallback) SAL_THROW_EXTERN_C()
Revokes a mapping callback registration.
CPPU_DLLPUBLIC void uno_revokeMapping(struct _uno_Mapping *pMapping) SAL_THROW_EXTERN_C()
Revokes a mapping.
void(* uno_MapInterfaceFunc)(struct _uno_Mapping *pMapping, void **ppOut, void *pInterface, struct _typelib_InterfaceTypeDescription *pInterfaceTypeDescr)
Function pointer declaration to map an interface from one environment to another.
Definition: mapping.h:52
struct SAL_DLLPUBLIC_RTTI _uno_Mapping uno_Mapping
This is the binary specification of a mapping.
void(* uno_AcquireMappingFunc)(struct _uno_Mapping *)
Function pointer declaration to acquire a UNO mapping.
Definition: mapping.h:38
void(* uno_ext_getMappingFunc)(struct _uno_Mapping **ppMapping, struct _uno_Environment *pFrom, struct _uno_Environment *pTo)
Function pointer declaration to get a mapping from a loaded bridge.
Definition: mapping.h:184
CPPU_DLLPUBLIC void uno_registerMapping(struct _uno_Mapping **ppMapping, uno_freeMappingFunc freeMapping, struct _uno_Environment *pFrom, struct _uno_Environment *pTo, rtl_uString *pAddPurpose) SAL_THROW_EXTERN_C()
Registers a mapping.
void(* uno_freeMappingFunc)(struct _uno_Mapping *pMapping)
Function pointer declaration to free a mapping.
Definition: mapping.h:132
CPPU_DLLPUBLIC void uno_registerMappingCallback(uno_getMappingFunc pCallback) SAL_THROW_EXTERN_C()
Registers a callback being called each time a mapping is demanded.
void(* uno_getMappingFunc)(struct _uno_Mapping **ppMapping, struct _uno_Environment *pFrom, struct _uno_Environment *pTo, rtl_uString *pAddPurpose)
Callback function pointer declaration to get a mapping.
Definition: mapping.h:106
#define CPPU_DLLPUBLIC
Definition: cppudllapi.h:10
Type description of an interface.
Definition: typedescription.h:371
The binary specification of a UNO environment.
Definition: environment.h:42
This is the binary specification of a mapping.
Definition: mapping.h:65
uno_ReleaseMappingFunc release
Releases mapping.
Definition: mapping.h:72
uno_MapInterfaceFunc mapInterface
mapping function
Definition: mapping.h:76
uno_AcquireMappingFunc acquire
Acquires mapping.
Definition: mapping.h:68