My Project
UDK 3.2.7 C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
environment.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * Copyright 2000, 2010 Oracle and/or its affiliates.
7  *
8  * OpenOffice.org - a multi-platform office productivity suite
9  *
10  * This file is part of OpenOffice.org.
11  *
12  * OpenOffice.org is free software: you can redistribute it and/or modify
13  * it under the terms of the GNU Lesser General Public License version 3
14  * only, as published by the Free Software Foundation.
15  *
16  * OpenOffice.org is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License version 3 for more details
20  * (a copy is included in the LICENSE file that accompanied this code).
21  *
22  * You should have received a copy of the GNU Lesser General Public License
23  * version 3 along with OpenOffice.org. If not, see
24  * <http://www.openoffice.org/license.html>
25  * for a copy of the LGPLv3 License.
26  *
27  ************************************************************************/
28 #ifndef _UNO_ENVIRONMENT_H_
29 #define _UNO_ENVIRONMENT_H_
30 
31 #include <cppu/cppudllapi.h>
32 #include <rtl/ustring.h>
33 
34 #include <stdarg.h>
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
41 struct _uno_ExtEnvironment;
43 
44 #if defined( SAL_W32)
45 #pragma pack(push, 8)
46 #endif
47 
50 typedef struct _uno_Environment
51 {
54  void * pReserved;
55 
58  rtl_uString * pTypeName;
59 
62  void * pContext;
63 
67 
72  void (SAL_CALL * acquire)( struct _uno_Environment * pEnv );
73 
79  void (SAL_CALL * release)( struct _uno_Environment * pEnv );
80 
86  void (SAL_CALL * acquireWeak)( struct _uno_Environment * pEnv );
87 
92  void (SAL_CALL * releaseWeak)( struct _uno_Environment * pEnv );
93 
100  void (SAL_CALL * harden)(
101  struct _uno_Environment ** ppHardEnv,
102  struct _uno_Environment * pEnv );
103 
109  void (SAL_CALL * dispose)( struct _uno_Environment * pEnv );
110 
111  /* ===== the following part will be late initialized by a matching bridge ===== *
112  * ===== and is NOT for public use. ===== */
113 
119  void (SAL_CALL * environmentDisposing)( struct _uno_Environment * pEnv );
121 
131 typedef void (SAL_CALL * uno_freeProxyFunc)( struct _uno_ExtEnvironment * pEnv, void * pProxy );
132 
138 typedef void * (SAL_CALL * uno_memAlloc)( sal_Size nBytes );
139 
142 typedef struct _uno_ExtEnvironment
143 {
147 
155  void (SAL_CALL * registerInterface)(
156  struct _uno_ExtEnvironment * pEnv,
157  void ** ppInterface,
158  rtl_uString * pOId,
159  struct _typelib_InterfaceTypeDescription * pTypeDescr );
160 
170  void (SAL_CALL * registerProxyInterface)(
171  struct _uno_ExtEnvironment * pEnv,
172  void ** ppProxy,
173  uno_freeProxyFunc freeProxy,
174  rtl_uString * pOId,
175  struct _typelib_InterfaceTypeDescription * pTypeDescr );
176 
183  void (SAL_CALL * revokeInterface)(
184  struct _uno_ExtEnvironment * pEnv,
185  void * pInterface );
186 
192  void (SAL_CALL * getObjectIdentifier)(
193  struct _uno_ExtEnvironment * pEnv,
194  rtl_uString ** ppOId,
195  void * pInterface );
196 
205  void (SAL_CALL * getRegisteredInterface)(
206  struct _uno_ExtEnvironment * pEnv,
207  void ** ppInterface,
208  rtl_uString * pOId,
209  struct _typelib_InterfaceTypeDescription * pTypeDescr );
210 
219  void (SAL_CALL * getRegisteredInterfaces)(
220  struct _uno_ExtEnvironment * pEnv,
221  void *** pppInterfaces,
222  sal_Int32 * pnLen,
223  uno_memAlloc memAlloc );
224 
225  /* ===== the following part will be late initialized by a matching bridge ===== */
226 
233  void (SAL_CALL * computeObjectIdentifier)(
234  struct _uno_ExtEnvironment * pEnv,
235  rtl_uString ** ppOId, void * pInterface );
236 
242  void (SAL_CALL * acquireInterface)(
243  struct _uno_ExtEnvironment * pEnv,
244  void * pInterface );
245 
251  void (SAL_CALL * releaseInterface)(
252  struct _uno_ExtEnvironment * pEnv,
253  void * pInterface );
254 
256 
257 #if defined( SAL_W32)
258 #pragma pack(pop)
259 #endif
260 
266 typedef void (SAL_CALL * uno_initEnvironmentFunc)( uno_Environment * pEnv );
267 #define UNO_INIT_ENVIRONMENT "uno_initEnvironment"
268 
269 #ifdef DISABLE_DYNLOADING
270 /* We link statically and have just one kind of environment */
271 void SAL_CALL CPPU_ENV_uno_initEnvironment( uno_Environment * Env )
273 #endif
274 
282 CPPU_DLLPUBLIC void SAL_CALL uno_getEnvironment(
283  uno_Environment ** ppEnv, rtl_uString * pEnvDcp, void * pContext )
285 
295  uno_Environment *** pppEnvs, sal_Int32 * pnLen, uno_memAlloc memAlloc,
296  rtl_uString * pEnvDcp )
298 
306  uno_Environment ** ppEnv, rtl_uString * pEnvDcp, void * pContext )
308 
315 CPPU_DLLPUBLIC void SAL_CALL uno_dumpEnvironment(
316  void * stream, uno_Environment * pEnv, const sal_Char * pFilter )
325  void * stream, rtl_uString * pEnvDcp, const sal_Char * pFilter )
327 
328 
329 
338 CPPU_DLLPUBLIC void SAL_CALL uno_getCurrentEnvironment(uno_Environment ** ppEnv, rtl_uString * pTypeName)
340 
343 typedef void SAL_CALL uno_EnvCallee(va_list * pParam);
344 
352 CPPU_DLLPUBLIC void SAL_CALL uno_Environment_invoke_v(uno_Environment * pEnv, uno_EnvCallee * pCallee, va_list * pParam)
354 
362 CPPU_DLLPUBLIC void SAL_CALL uno_Environment_invoke (uno_Environment * pEnv, uno_EnvCallee * pCallee, ...)
364 
372 
381 CPPU_DLLPUBLIC int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pReason)
382  SAL_THROW_EXTERN_C();
383 
384 #ifdef __cplusplus
385 }
386 #endif
387 
388 #endif
389 
390 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */