LibreOffice: osl/module.h Source File

LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
module.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
24#ifndef INCLUDED_OSL_MODULE_H
25#define INCLUDED_OSL_MODULE_H
26
27#include "sal/config.h"
28
29#include "rtl/ustring.h"
30#include "sal/saldllapi.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36#ifdef SAL_DLLPREFIX
37#define SAL_MODULENAME(name) SAL_DLLPREFIX name SAL_DLLEXTENSION
38#else
39#define SAL_MODULENAME(name) name SAL_DLLEXTENSION
40#endif
41
42#if defined(_WIN32)
43#define SAL_MODULENAME_WITH_VERSION(name, version) name version SAL_DLLEXTENSION
44
45#elif defined(SAL_UNX)
46#if defined(MACOSX)
47#define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name ".dylib." version
48#else
49#define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name SAL_DLLEXTENSION "." version
50#endif
51
52#endif
53
54#define SAL_LOADMODULE_DEFAULT 0x00000
55#define SAL_LOADMODULE_LAZY 0x00001
56#define SAL_LOADMODULE_NOW 0x00002
57#define SAL_LOADMODULE_GLOBAL 0x00100
58
59 typedef void* oslModule;
60
66 typedef void ( SAL_CALL *oslGenericFunction )( void );
67
68#ifndef DISABLE_DYNLOADING
69
77 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode);
78
88 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleAscii(const char *pModuleName, sal_Int32 nRtldMode);
89
101 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleRelative(
102 oslGenericFunction baseModule, rtl_uString * relativePath, sal_Int32 mode);
103
116 SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleRelativeAscii(
117 oslGenericFunction baseModule, char const * relativePath, sal_Int32 mode);
118 /* This function is guaranteed not to call into
119 FullTextEncodingDataSingleton in sal/textenc/textenc.cxx, so can be used
120 in its implementation without running into circles. */
121
122#endif
123
141 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult);
142
143#ifndef DISABLE_DYNLOADING
144
147 SAL_DLLPUBLIC void SAL_CALL osl_unloadModule(oslModule Module);
148
149#endif
150
160 SAL_DLLPUBLIC void* SAL_CALL osl_getSymbol( oslModule Module, rtl_uString *strSymbolName);
161
176 SAL_DLLPUBLIC oslGenericFunction SAL_CALL osl_getFunctionSymbol(
177 oslModule Module, rtl_uString *ustrFunctionSymbolName );
178
196 SAL_DLLPUBLIC oslGenericFunction SAL_CALL osl_getAsciiFunctionSymbol(
197 oslModule Module, const char *pSymbol );
198
205 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleURLFromAddress(
206 void *pv, rtl_uString **pustrURL );
207
221 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleURLFromFunctionAddress(
222 oslGenericFunction pf, rtl_uString **pustrFunctionURL );
223
224#ifdef __cplusplus
225}
226#endif
227
228#endif // INCLUDED_OSL_MODULE_H
229
230/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
saldllapi.h
SAL_DLLPUBLIC
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
sal_Bool
unsigned char sal_Bool
Definition types.h:38
config.h
ustring.h
osl_getAsciiFunctionSymbol
SAL_DLLPUBLIC oslGenericFunction osl_getAsciiFunctionSymbol(oslModule Module, const char *pSymbol)
Lookup the specified function symbol name.
osl_unloadModule
SAL_DLLPUBLIC void osl_unloadModule(oslModule Module)
Release the module.
osl_getModuleURLFromAddress
SAL_DLLPUBLIC sal_Bool osl_getModuleURLFromAddress(void *pv, rtl_uString **pustrURL)
Lookup URL of module which is mapped at the specified address.
osl_loadModuleAscii
SAL_DLLPUBLIC oslModule osl_loadModuleAscii(const char *pModuleName, sal_Int32 nRtldMode)
Load a shared library or module.
osl_getModuleHandle
SAL_DLLPUBLIC sal_Bool osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
Retrieve the handle of an already loaded module.
osl_loadModule
SAL_DLLPUBLIC oslModule osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode)
Load a shared library or module.
osl_getSymbol
SAL_DLLPUBLIC void * osl_getSymbol(oslModule Module, rtl_uString *strSymbolName)
lookup the specified symbol name.
osl_loadModuleRelative
SAL_DLLPUBLIC oslModule osl_loadModuleRelative(oslGenericFunction baseModule, rtl_uString *relativePath, sal_Int32 mode)
Load a module located relative to some other module.
osl_getFunctionSymbol
SAL_DLLPUBLIC oslGenericFunction osl_getFunctionSymbol(oslModule Module, rtl_uString *ustrFunctionSymbolName)
Lookup the specified function symbol name.
oslGenericFunction
void(* oslGenericFunction)(void)
Generic Function pointer type that will be used as symbol address.
Definition module.h:66
osl_loadModuleRelativeAscii
SAL_DLLPUBLIC oslModule osl_loadModuleRelativeAscii(oslGenericFunction baseModule, char const *relativePath, sal_Int32 mode)
Load a module located relative to some other module.
oslModule
void * oslModule
Definition module.h:59
osl_getModuleURLFromFunctionAddress
SAL_DLLPUBLIC sal_Bool osl_getModuleURLFromFunctionAddress(oslGenericFunction pf, rtl_uString **pustrFunctionURL)
Lookup URL of module which is mapped at the specified function address.