LibreOffice
LibreOffice 7.1 SDK C/C++ API Reference
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#ifndef INCLUDED_OSL_MODULE_H
21#define INCLUDED_OSL_MODULE_H
22
23#include "sal/config.h"
24
25#include "rtl/ustring.h"
26#include "sal/saldllapi.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#ifdef SAL_DLLPREFIX
33#define SAL_MODULENAME(name) SAL_DLLPREFIX name SAL_DLLEXTENSION
34#else
35#define SAL_MODULENAME(name) name SAL_DLLEXTENSION
36#endif
37
38#if defined(_WIN32)
39#define SAL_MODULENAME_WITH_VERSION(name, version) name version SAL_DLLEXTENSION
40
41#elif defined(SAL_UNX)
42#if defined(MACOSX)
43#define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name ".dylib." version
44#else
45#define SAL_MODULENAME_WITH_VERSION(name, version) SAL_DLLPREFIX name SAL_DLLEXTENSION "." version
46#endif
47
48#endif
49
50#define SAL_LOADMODULE_DEFAULT 0x00000
51#define SAL_LOADMODULE_LAZY 0x00001
52#define SAL_LOADMODULE_NOW 0x00002
53#define SAL_LOADMODULE_GLOBAL 0x00100
54
55typedef void* oslModule;
56
62typedef void ( SAL_CALL *oslGenericFunction )( void );
63
64#ifndef DISABLE_DYNLOADING
65
73SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode);
74
84SAL_DLLPUBLIC oslModule SAL_CALL osl_loadModuleAscii(const char *pModuleName, sal_Int32 nRtldMode);
85
98 oslGenericFunction baseModule, rtl_uString * relativePath, sal_Int32 mode);
99
113 oslGenericFunction baseModule, char const * relativePath, sal_Int32 mode);
114 /* This function is guaranteed not to call into
115 FullTextEncodingDataSingleton in sal/textenc/textenc.cxx, so can be used
116 in its implementation without running into circles. */
117
118#endif
119
137SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult);
138
139#ifndef DISABLE_DYNLOADING
140
144
145#endif
146
156SAL_DLLPUBLIC void* SAL_CALL osl_getSymbol( oslModule Module, rtl_uString *strSymbolName);
157
173 oslModule Module, rtl_uString *ustrFunctionSymbolName );
174
193 oslModule Module, const char *pSymbol );
194
202 void *pv, rtl_uString **pustrURL );
203
218 oslGenericFunction pf, rtl_uString **pustrFunctionURL );
219
220#ifdef __cplusplus
221}
222#endif
223
224#endif // INCLUDED_OSL_MODULE_H
225
226/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
unsigned char sal_Bool
Definition: types.h:34
SAL_DLLPUBLIC oslGenericFunction osl_getAsciiFunctionSymbol(oslModule Module, const char *pSymbol)
Lookup the specified function symbol name.
SAL_DLLPUBLIC void osl_unloadModule(oslModule Module)
Release the module.
SAL_DLLPUBLIC sal_Bool osl_getModuleURLFromAddress(void *pv, rtl_uString **pustrURL)
Lookup URL of module which is mapped at the specified address.
SAL_DLLPUBLIC oslModule osl_loadModuleAscii(const char *pModuleName, sal_Int32 nRtldMode)
Load a shared library or module.
SAL_DLLPUBLIC sal_Bool osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
Retrieve the handle of an already loaded module.
SAL_DLLPUBLIC oslModule osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMode)
Load a shared library or module.
SAL_DLLPUBLIC void * osl_getSymbol(oslModule Module, rtl_uString *strSymbolName)
lookup the specified symbol name.
SAL_DLLPUBLIC oslModule osl_loadModuleRelative(oslGenericFunction baseModule, rtl_uString *relativePath, sal_Int32 mode)
Load a module located relative to some other module.
SAL_DLLPUBLIC oslGenericFunction osl_getFunctionSymbol(oslModule Module, rtl_uString *ustrFunctionSymbolName)
Lookup the specified function symbol name.
void(* oslGenericFunction)(void)
Generic Function pointer type that will be used as symbol address.
Definition: module.h:62
SAL_DLLPUBLIC oslModule osl_loadModuleRelativeAscii(oslGenericFunction baseModule, char const *relativePath, sal_Int32 mode)
Load a module located relative to some other module.
void * oslModule
Definition: module.h:55
SAL_DLLPUBLIC sal_Bool osl_getModuleURLFromFunctionAddress(oslGenericFunction pf, rtl_uString **pustrFunctionURL)
Lookup URL of module which is mapped at the specified function address.