natives_support.h File Reference


Classes

struct  NativeLibInfo
 Native library information declaration. More...

Typedefs

typedef apr_dso_handle_t * NativeLibraryHandle
 Native library handle typedef declaration.
typedef apr_status_t NativeLoadStatus
 Native library status typedef declaration.
typedef NativeLibInfoNativeLibraryList
 Native libraries list typedef declaration.

Functions

jint natives_init ()
 Initializes natives_support module.
void natives_cleanup ()
 Cleanups natives_support module.
NativeLibraryHandle natives_load_library (const char *library_name, bool *just_loaded, NativeLoadStatus *pstatus)
 Function loads native library with a given name.
void natives_unload_library (NativeLibraryHandle library_handle)
 Function unloads native library.
bool natives_is_library_loaded (const char *library_name)
 Function looks for loaded native library with a given name.
GenericFunctionPointer natives_lookup_method (NativeLibraryList libraries, const char *class_name, const char *method_name, const char *method_desc)
 Function looks for method with a given name and descriptor in a given native library.
void natives_describe_error (NativeLoadStatus error, char *buf, size_t buflen)
 Function returns detailed error description.
bool natives_is_library_loaded_slow (const char *libname)
 Function detects if module is JNI library.


Typedef Documentation

typedef struct apr_dso_handle_t* NativeLibraryHandle

Native library handle typedef declaration.

typedef apr_status_t NativeLoadStatus

Native library status typedef declaration.

typedef NativeLibInfo* NativeLibraryList

Native libraries list typedef declaration.


Function Documentation

jint natives_init (  ) 

Initializes natives_support module.

Caller must provide thread safety.

Returns:
Returns JNI_OK if initialized successfully.

void natives_cleanup (  ) 

Cleanups natives_support module.

Cleans all remaining libraries.

NativeLibraryHandle natives_load_library ( const char *  library_name,
bool *  just_loaded,
NativeLoadStatus pstatus 
)

Function loads native library with a given name.

Parameters:
library_name - name of library
just_loaded - is set when this library was not loaded before this call
pstatus - pointer to status variable
Returns:
Loaded native library handle.

void natives_unload_library ( NativeLibraryHandle  library_handle  ) 

Function unloads native library.

Parameters:
library_handle - native library to be unloaded

bool natives_is_library_loaded ( const char *  library_name  ) 

Function looks for loaded native library with a given name.

Parameters:
library_name - searching native library name
Returns:
TRUE if search is success, otherwise - FALSE.

GenericFunctionPointer natives_lookup_method ( NativeLibraryList  libraries,
const char *  class_name,
const char *  method_name,
const char *  method_desc 
)

Function looks for method with a given name and descriptor in a given native library.

Parameters:
library_handle - native library handle
class_name - name of class
method_name - name of method
method_desc - descriptor of method
Returns:
Found native function pointer.

void natives_describe_error ( NativeLoadStatus  error,
char *  buf,
size_t  buflen 
)

Function returns detailed error description.

Parameters:
error - error code
buf - string buffer
buflen - buffer size
Returns:
Found native function pointer.

bool natives_is_library_loaded_slow ( const char *  libname  ) 

Function detects if module is JNI library.

Parameters:
libname - library name (full or relative)
Returns:
true if specified library was loaded already by natives support


Genereated on Tue Mar 11 19:25:57 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.