uno/environment.h File Reference

#include <cppu/cppudllapi.h>
#include <rtl/ustring.h>
#include <stdarg.h>

Go to the source code of this file.

Classes

struct  _uno_Environment
 The binary specification of an UNO environment. More...
struct  _uno_ExtEnvironment
 The binary specification of an UNO environment supporting interface registration. More...

Defines

#define UNO_INIT_ENVIRONMENT   "uno_initEnvironment"

Typedefs

typedef struct _uno_Environment uno_Environment
 The binary specification of an UNO environment.
typedef void(* uno_freeProxyFunc )(struct _uno_ExtEnvironment *pEnv, void *pProxy)
 Generic function pointer declaration to free a proxy object if it is not needed by the environment anymore.
typedef void *(* uno_memAlloc )(sal_Size nBytes)
 Generic function pointer declaration to allocate memory.
typedef struct _uno_ExtEnvironment uno_ExtEnvironment
 The binary specification of an UNO environment supporting interface registration.
typedef void(* uno_initEnvironmentFunc )(uno_Environment *pEnv)
 Function exported by some bridge library providing acquireInterface(), releaseInterface(); may set a disposing callback.
typedef void uno_EnvCallee (va_list *pParam)
 Typedef for variable argument function.

Functions

CPPU_DLLPUBLIC void uno_getEnvironment (uno_Environment **ppEnv, rtl_uString *pEnvDcp, void *pContext) SAL_THROW_EXTERN_C()
 Gets a specific environment.
CPPU_DLLPUBLIC void uno_getRegisteredEnvironments (uno_Environment ***pppEnvs, sal_Int32 *pnLen, uno_memAlloc memAlloc, rtl_uString *pEnvDcp) SAL_THROW_EXTERN_C()
 Gets all specified environments.
CPPU_DLLPUBLIC void uno_createEnvironment (uno_Environment **ppEnv, rtl_uString *pEnvDcp, void *pContext) SAL_THROW_EXTERN_C()
 Creates an environment.
CPPU_DLLPUBLIC void uno_dumpEnvironment (void *stream, uno_Environment *pEnv, const sal_Char *pFilter) SAL_THROW_EXTERN_C()
 Dumps out environment information, i.e.
CPPU_DLLPUBLIC void uno_dumpEnvironmentByName (void *stream, rtl_uString *pEnvDcp, const sal_Char *pFilter) SAL_THROW_EXTERN_C()
 Dumps out environment information, i.e.
CPPU_DLLPUBLIC void uno_getCurrentEnvironment (uno_Environment **ppEnv, rtl_uString *pTypeName) SAL_THROW_EXTERN_C()
 Returns the current Environment.
CPPU_DLLPUBLIC void uno_Environment_invoke_v (uno_Environment *pEnv, uno_EnvCallee *pCallee, va_list *pParam) SAL_THROW_EXTERN_C()
 Invoke the passed function in the given environment.
CPPU_DLLPUBLIC void uno_Environment_invoke (uno_Environment *pEnv, uno_EnvCallee *pCallee,...) SAL_THROW_EXTERN_C()
 Invoke the passed function in the given environment.
CPPU_DLLPUBLIC void uno_Environment_enter (uno_Environment *pEnv) SAL_THROW_EXTERN_C()
 Enter an environment explicitly.
CPPU_DLLPUBLIC int uno_Environment_isValid (uno_Environment *pEnv, rtl_uString **pReason) SAL_THROW_EXTERN_C()
 Check if a particular environment is currently valid, so that objects of that environment might be called.

Define Documentation

#define UNO_INIT_ENVIRONMENT   "uno_initEnvironment"

Typedef Documentation

typedef void uno_EnvCallee(va_list *pParam)

Typedef for variable argument function.

The binary specification of an UNO environment.

The binary specification of an UNO environment supporting interface registration.

typedef void( * uno_freeProxyFunc)(struct _uno_ExtEnvironment *pEnv, void *pProxy)

Generic function pointer declaration to free a proxy object if it is not needed by the environment anymore.

Any proxy object must register itself on first acquire() call and revoke itself on last release() call. This can happen several times because the environment caches proxy objects until the environment explicitly frees the proxy object calling this function.

Parameters:
pEnv environment
pProxy proxy pointer
typedef void( * uno_initEnvironmentFunc)(uno_Environment *pEnv)

Function exported by some bridge library providing acquireInterface(), releaseInterface(); may set a disposing callback.

Parameters:
pEnv environment to be initialized
typedef void*( * uno_memAlloc)(sal_Size nBytes)

Generic function pointer declaration to allocate memory.

Used with getRegisteredInterfaces().

Parameters:
nBytes amount of memory in bytes
Returns:
pointer to allocated memory

Function Documentation

CPPU_DLLPUBLIC void uno_createEnvironment ( uno_Environment **  ppEnv,
rtl_uString *  pEnvDcp,
void *  pContext 
)

Creates an environment.

The new environment is anonymous (NOT publicly registered/ accessible).

Parameters:
ppEnv out parameter of environment; given environment will be released
pEnvDcp descriptor of environment
pContext context pointer (e.g., to distinguish java vm); set 0 if not needed
CPPU_DLLPUBLIC void uno_dumpEnvironment ( void *  stream,
uno_Environment pEnv,
const sal_Char pFilter 
)

Dumps out environment information, i.e.

registered interfaces.

Parameters:
stream output stream (FILE *)
pEnv environment to be dumped
pFilter if not null, filters output
CPPU_DLLPUBLIC void uno_dumpEnvironmentByName ( void *  stream,
rtl_uString *  pEnvDcp,
const sal_Char pFilter 
)

Dumps out environment information, i.e.

registered interfaces.

Parameters:
stream output stream (FILE *)
pEnvDcp descritpro of environment to be dumped
pFilter if not null, filters output
CPPU_DLLPUBLIC void uno_Environment_enter ( uno_Environment pEnv  ) 

Enter an environment explicitly.

Parameters:
pEnv the environment to enter; NULL leaves all environments
Since:
UDK 3.2.7
CPPU_DLLPUBLIC void uno_Environment_invoke ( uno_Environment pEnv,
uno_EnvCallee pCallee,
  ... 
)

Invoke the passed function in the given environment.

Parameters:
pEnv the target environment
pCallee the function to call
... the parameters passed to the function
Since:
UDK 3.2.7
CPPU_DLLPUBLIC void uno_Environment_invoke_v ( uno_Environment pEnv,
uno_EnvCallee pCallee,
va_list *  pParam 
)

Invoke the passed function in the given environment.

Parameters:
pEnv the target environment
pCallee the function to call
pParam the parameter pointer passed to the function
Since:
UDK 3.2.7
CPPU_DLLPUBLIC int uno_Environment_isValid ( uno_Environment pEnv,
rtl_uString **  pReason 
)

Check if a particular environment is currently valid, so that objects of that environment might be called.

Parameters:
pEnv the environment
pReason the reason, if it is not valid
Returns:
1 == valid, 0 == invalid
Since:
UDK 3.2.7
CPPU_DLLPUBLIC void uno_getCurrentEnvironment ( uno_Environment **  ppEnv,
rtl_uString *  pTypeName 
)

Returns the current Environment.

In case no Environment has explicitly been entered, a purpose free default environment gets returned (e.g. the "uno" or "gcc3" Environment).

Parameters:
ppEnv inout parameter; a given environment will be released
pTypeName the optional type of the environment, falls back to "uno"
Since:
UDK 3.2.7
CPPU_DLLPUBLIC void uno_getEnvironment ( uno_Environment **  ppEnv,
rtl_uString *  pEnvDcp,
void *  pContext 
)

Gets a specific environment.

If the specified environment does not exist, then a default one is created and registered. The environment revokes itself on last release() call.

Parameters:
ppEnv inout parameter of environment; given environment will be released
pEnvDcp descriptor of environment
pContext some context pointer (e.g., to distinguish java vm; set 0 if not needed)
CPPU_DLLPUBLIC void uno_getRegisteredEnvironments ( uno_Environment ***  pppEnvs,
sal_Int32 *  pnLen,
uno_memAlloc  memAlloc,
rtl_uString *  pEnvDcp 
)

Gets all specified environments.

Caller has to release returned environments and free allocated memory.

Parameters:
pppEnvs out param; pointer to array of environments
pnLen out param; length of array
memAlloc function for allocating memory that is passed back
pEnvDcp descriptor of environments; 0 defaults to all
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Dec 2013 by  doxygen 1.6.1