LibreOffice LibreOffice 7.2 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
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_UNO_MAPPING_H
24#define INCLUDED_UNO_MAPPING_H
25
26#include "cppu/cppudllapi.h"
27#include "rtl/ustring.h"
28
29
30#ifdef __cplusplus
31 extern "C"
32{
33#endif
34
35 struct _typelib_InterfaceTypeDescription;
36 struct _uno_Mapping;
37 struct _uno_Environment;
38
42 typedef void (SAL_CALL * uno_AcquireMappingFunc)(struct _uno_Mapping *);
43
47 typedef void (SAL_CALL * uno_ReleaseMappingFunc)(struct _uno_Mapping *);
48
56 typedef void (SAL_CALL * uno_MapInterfaceFunc)(
57 struct _uno_Mapping * pMapping,
58 void ** ppOut, void * pInterface,
59 struct _typelib_InterfaceTypeDescription * pInterfaceTypeDescr );
60
61
62#if defined( _WIN32)
63#pragma pack(push, 8)
64#endif
65
68 typedef struct SAL_DLLPUBLIC_RTTI _uno_Mapping
69{
72 uno_AcquireMappingFunc acquire;
73
76 uno_ReleaseMappingFunc release;
77
80 uno_MapInterfaceFunc mapInterface;
81} uno_Mapping;
82
83#if defined( _WIN32)
84#pragma pack(pop)
85#endif
86
96 CPPU_DLLPUBLIC void SAL_CALL uno_getMapping(
97 struct _uno_Mapping ** ppMapping,
98 struct _uno_Environment * pFrom,
99 struct _uno_Environment * pTo,
100 rtl_uString * pAddPurpose )
101 SAL_THROW_EXTERN_C();
102
110 typedef void (SAL_CALL * uno_getMappingFunc)(
111 struct _uno_Mapping ** ppMapping,
112 struct _uno_Environment * pFrom,
113 struct _uno_Environment * pTo,
114 rtl_uString * pAddPurpose );
115
120 CPPU_DLLPUBLIC void SAL_CALL uno_registerMappingCallback(
121 uno_getMappingFunc pCallback )
122 SAL_THROW_EXTERN_C();
123
128 CPPU_DLLPUBLIC void SAL_CALL uno_revokeMappingCallback(
129 uno_getMappingFunc pCallback )
130 SAL_THROW_EXTERN_C();
131
136 typedef void (SAL_CALL * uno_freeMappingFunc)( struct _uno_Mapping * pMapping );
137
147 CPPU_DLLPUBLIC void SAL_CALL uno_registerMapping(
148 struct _uno_Mapping ** ppMapping, uno_freeMappingFunc freeMapping,
149 struct _uno_Environment * pFrom, struct _uno_Environment * pTo, rtl_uString * pAddPurpose )
150 SAL_THROW_EXTERN_C();
151
157 CPPU_DLLPUBLIC void SAL_CALL uno_revokeMapping(
158 struct _uno_Mapping * pMapping )
159 SAL_THROW_EXTERN_C();
160
171 CPPU_DLLPUBLIC void SAL_CALL uno_getMappingByName(
172 struct _uno_Mapping ** ppMapping,
173 rtl_uString * pFrom,
174 rtl_uString * pTo,
175 rtl_uString * pAddPurpose )
176 SAL_THROW_EXTERN_C();
177
178/* symbol exported by each language binding library */
179#define UNO_EXT_GETMAPPING "uno_ext_getMapping"
180
188 typedef void (SAL_CALL * uno_ext_getMappingFunc)(
189 struct _uno_Mapping ** ppMapping,
190 struct _uno_Environment * pFrom,
191 struct _uno_Environment * pTo );
192
193#ifdef DISABLE_DYNLOADING
194/* Static linking, this is the uno_ext_getMapping function in the C++/UNO bridge */
195 void SAL_CALL CPPU_ENV_uno_ext_getMapping(
196 struct _uno_Mapping ** ppMapping,
197 struct _uno_Environment * pFrom,
198 struct _uno_Environment * pTo )
199 SAL_THROW_EXTERN_C();
200
201/* This is the uno_ext_getMapping function in the Java/UNO bridge */
202 void SAL_CALL java_uno_ext_getMapping(
203 struct _uno_Mapping ** ppMapping,
204 struct _uno_Environment * pFrom,
205 struct _uno_Environment * pTo )
206 SAL_THROW_EXTERN_C();
207
208#endif
209
210#ifdef __cplusplus
211}
212#endif
213
214#endif
215
216/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_THROW_EXTERN_C
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:334
ustring.h
uno_getMapping
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.
uno_getMappingByName
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 ...
uno_ReleaseMappingFunc
void(* uno_ReleaseMappingFunc)(struct _uno_Mapping *)
Function pointer declaration to release a UNO mapping.
Definition: mapping.h:47
uno_revokeMappingCallback
CPPU_DLLPUBLIC void uno_revokeMappingCallback(uno_getMappingFunc pCallback) SAL_THROW_EXTERN_C()
Revokes a mapping callback registration.
uno_revokeMapping
CPPU_DLLPUBLIC void uno_revokeMapping(struct _uno_Mapping *pMapping) SAL_THROW_EXTERN_C()
Revokes a mapping.
uno_MapInterfaceFunc
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:56
uno_Mapping
struct SAL_DLLPUBLIC_RTTI _uno_Mapping uno_Mapping
This is the binary specification of a mapping.
uno_AcquireMappingFunc
void(* uno_AcquireMappingFunc)(struct _uno_Mapping *)
Function pointer declaration to acquire a UNO mapping.
Definition: mapping.h:42
uno_ext_getMappingFunc
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:188
uno_registerMapping
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.
uno_freeMappingFunc
void(* uno_freeMappingFunc)(struct _uno_Mapping *pMapping)
Function pointer declaration to free a mapping.
Definition: mapping.h:136
uno_registerMappingCallback
CPPU_DLLPUBLIC void uno_registerMappingCallback(uno_getMappingFunc pCallback) SAL_THROW_EXTERN_C()
Registers a callback being called each time a mapping is demanded.
uno_getMappingFunc
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:110
cppudllapi.h
CPPU_DLLPUBLIC
#define CPPU_DLLPUBLIC
Definition: cppudllapi.h:13
_typelib_InterfaceTypeDescription
Type description of an interface.
Definition: typedescription.h:375
_uno_Environment
The binary specification of a UNO environment.
Definition: environment.h:46
_uno_Mapping
This is the binary specification of a mapping.
Definition: mapping.h:69
_uno_Mapping::release
uno_ReleaseMappingFunc release
Releases mapping.
Definition: mapping.h:76
_uno_Mapping::mapInterface
uno_MapInterfaceFunc mapInterface
mapping function
Definition: mapping.h:80
_uno_Mapping::acquire
uno_AcquireMappingFunc acquire
Acquires mapping.
Definition: mapping.h:72