LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
Classes | Macros | Typedefs | Functions
mapping.h File Reference
#include "cppu/cppudllapi.h"
#include "rtl/ustring.h"

Go to the source code of this file.

Classes

struct  _uno_Mapping
 This is the binary specification of a mapping. More...
 

Macros

#define UNO_EXT_GETMAPPING   "uno_ext_getMapping"
 

Typedefs

typedef void(* uno_AcquireMappingFunc) (struct _uno_Mapping *)
 Function pointer declaration to acquire a UNO mapping. More...
 
typedef void(* uno_ReleaseMappingFunc) (struct _uno_Mapping *)
 Function pointer declaration to release a UNO mapping. More...
 
typedef 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. More...
 
typedef struct SAL_DLLPUBLIC_RTTI _uno_Mapping uno_Mapping
 This is the binary specification of a mapping. More...
 
typedef 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. More...
 
typedef void(* uno_freeMappingFunc) (struct _uno_Mapping *pMapping)
 Function pointer declaration to free a mapping. More...
 
typedef 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. More...
 

Functions

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. More...
 
CPPU_DLLPUBLIC void uno_registerMappingCallback (uno_getMappingFunc pCallback) SAL_THROW_EXTERN_C()
 Registers a callback being called each time a mapping is demanded. More...
 
CPPU_DLLPUBLIC void uno_revokeMappingCallback (uno_getMappingFunc pCallback) SAL_THROW_EXTERN_C()
 Revokes a mapping callback registration. More...
 
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. More...
 
CPPU_DLLPUBLIC void uno_revokeMapping (struct _uno_Mapping *pMapping) SAL_THROW_EXTERN_C()
 Revokes a mapping. More...
 
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 names. More...
 

Macro Definition Documentation

◆ UNO_EXT_GETMAPPING

#define UNO_EXT_GETMAPPING   "uno_ext_getMapping"

Typedef Documentation

◆ uno_AcquireMappingFunc

typedef void( * uno_AcquireMappingFunc) (struct _uno_Mapping *)

Function pointer declaration to acquire a UNO mapping.

◆ uno_ext_getMappingFunc

typedef 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.

Bridges export a function called uno_ext_getMapping() of this signature.

Parameters
[in,out]ppMappingmapping; existing mapping will be released
[in]pFromsource environment
[in]pTodestination environment

◆ uno_freeMappingFunc

typedef void( * uno_freeMappingFunc) (struct _uno_Mapping *pMapping)

Function pointer declaration to free a mapping.

Parameters
pMappingmapping to be freed

◆ uno_getMappingFunc

typedef 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.

Parameters
ppMappinginout mapping
pFromsource environment
pTodestination environment
pAddPurposeadditional purpose

◆ uno_MapInterfaceFunc

typedef 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.

Parameters
pMappingmapping
ppOut[inout] destination interface; existing interfaces are released
pInterfacesource interface
pInterfaceTypeDescrtype description of the interface

◆ uno_Mapping

typedef struct SAL_DLLPUBLIC_RTTI _uno_Mapping uno_Mapping

This is the binary specification of a mapping.

◆ uno_ReleaseMappingFunc

typedef void( * uno_ReleaseMappingFunc) (struct _uno_Mapping *)

Function pointer declaration to release a UNO mapping.

Function Documentation

◆ uno_getMapping()

CPPU_DLLPUBLIC void uno_getMapping ( struct _uno_Mapping **  ppMapping,
struct _uno_Environment pFrom,
struct _uno_Environment pTo,
rtl_uString *  pAddPurpose 
)

Gets an interface mapping from one environment to another.

Parameters
ppMapping[inout] mapping; existing mapping will be released
pFromsource environment
pTodestination environment (interfaces resulting in mapInterface() call can be used in this language environment)
pAddPurposeadditional purpose of mapping (e.g., protocolling); defaults to 0 (none)

◆ uno_getMappingByName()

CPPU_DLLPUBLIC void uno_getMappingByName ( struct _uno_Mapping **  ppMapping,
rtl_uString *  pFrom,
rtl_uString *  pTo,
rtl_uString *  pAddPurpose 
)

Gets an interface mapping from one language environment to another by corresponding environment type names.

Parameters
ppMapping[inout] mapping; existing mapping will be released
pFromsource environment type name
pTodestination environment type name (interfaces resulting in mapInterface() call can be used in this language environment)
pAddPurposeadditional purpose of mapping (e.g., protocolling); defaults to 0 (none)

◆ 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 
)

Registers a mapping.

A mapping registers itself on first acquire and revokes itself on last release. The given freeMapping function is called by the runtime to cleanup any resources.

Parameters
ppMappinginout mapping to be registered
freeMappingcalled by runtime to delete mapping
pFromsource environment
pTodestination environment
pAddPurposeadditional purpose string; defaults to 0

◆ uno_registerMappingCallback()

CPPU_DLLPUBLIC void uno_registerMappingCallback ( uno_getMappingFunc  pCallback)

Registers a callback being called each time a mapping is demanded.

Parameters
pCallbackcallback function

◆ uno_revokeMapping()

CPPU_DLLPUBLIC void uno_revokeMapping ( struct _uno_Mapping pMapping)

Revokes a mapping.

A mapping registers itself on first acquire and revokes itself on last release.

Parameters
pMappingmapping to be revoked

◆ uno_revokeMappingCallback()

CPPU_DLLPUBLIC void uno_revokeMappingCallback ( uno_getMappingFunc  pCallback)

Revokes a mapping callback registration.

Parameters
pCallbackcallback function