LibreOffice: uno/mapping.h File Reference

LibreOffice LibreOffice 24.8 SDK C/C++ API Reference

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

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

## 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] | ppMapping | mapping; existing mapping will be released
  [in] | pFrom | source environment
  [in] | pTo | destination environment

## ◆ uno_freeMappingFunc

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

Function pointer declaration to free a mapping.

Parameters

  pMapping | mapping 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

  ppMapping | inout mapping
  pFrom | source environment
  pTo | destination environment
  pAddPurpose | additional 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

  pMapping | mapping
  ppOut | [inout] destination interface; existing interfaces are released
  pInterface | source interface
  pInterfaceTypeDescr | type 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
  pFrom | source environment
  pTo | destination environment (interfaces resulting in mapInterface() call can be used in this language environment)
  pAddPurpose | additional 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
  pFrom | source environment type name
  pTo | destination environment type name (interfaces resulting in mapInterface() call can be used in this language environment)
  pAddPurpose | additional 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

  ppMapping | inout mapping to be registered
  freeMapping | called by runtime to delete mapping
  pFrom | source environment
  pTo | destination environment
  pAddPurpose | additional 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

  pCallback | callback 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

  pMapping | mapping to be revoked

## ◆ uno_revokeMappingCallback()

CPPU_DLLPUBLIC void uno_revokeMappingCallback | ( | uno_getMappingFunc | pCallback | ) |

Revokes a mapping callback registration.

Parameters

  pCallback | callback function