Initialization and threading


Description

Functions that control the APIs startup, shutdown and threading behavior

Defines

#define BFSTARTUPFEATURE_DEBUG   0x00000001
#define BFSTARTUPFEATURE_LOGINFO   0x00000002

Functions

BFEXPORT_FUNCDEC int BFStartup (int features)
BFEXPORT_FUNCDEC int BFStartupEx (int features, char *jarPath, char *jrePath, char *jreOptions[], int jreOptionsLen, int jreOptionsIgnoreUnknown)
BFEXPORT_FUNCDEC void BFShutdown ()
BFEXPORT_FUNCDEC void BFAttachThread (void)
BFEXPORT_FUNCDEC void BFDetachThread (void)

Define Documentation

#define BFSTARTUPFEATURE_DEBUG   0x00000001

Sets the startup debug feature in a call to BFStartup(). Detailed startup/shutdown information will be printed to STDOUT

#define BFSTARTUPFEATURE_LOGINFO   0x00000002

Sets the log info feature in a call to BFStartup(). Detailed startup/shutdown information, calls to API functions and other interesting information will be logged to STDOUT


Function Documentation

BFEXPORT_FUNCDEC int BFStartup ( int  features  ) 

Initialize the API. Must be called before calling any other API functions. Must only be called once per process. Call either BFStartup OR BFStartupEx but not both.

Parameters:
features Any of the BFSTARTUPFEATURE #defines ORed together
Returns:
One of the BFRESULT codes
BFEXPORT_FUNCDEC int BFStartupEx ( int  features,
char *  jarPath,
char *  jrePath,
char *  jreOptions[],
int  jreOptionsLen,
int  jreOptionsIgnoreUnknown 
)

Initialize the API. Must be called before calling any other API functions. Must only be called once per process. Call either BFStartup OR BFStartupEx but not both.

Parameters:
features Any of the BFSTARTUPFEATURE #defines ORed together
jarPath Full path to the directory containing CleanContent.jar. If this paramter is not NULL, it overrides both the standard jar search and the BITFORM_JARPATH environment variable.
jrePath Full path to the Java Runtime Environment. If this paramter is not NULL, it overrides both the standard JRE search and the BITFORM_JREPATH environment variable.
jreOptions An array of option strings to pass to the JVM on startup. If this parameter is not NULL it overrides Clean Content's default JVM options. The strings are in the form of full arguments to the JVM, for example "-Xmx1024M", "-Xrs", etc. If this parameter is NULL, Clean Content will use its (very conservative) defaults of -Xmx400M and -XX:MaxPermSize=128M. If this parameter is an empty array, and jreOptionsLen is set to 0, the JVM will use it's own defaults.
jreOptionsLen The count of strings in the options array. 40 is the maximum number allowed.
jreOptionsIgnoreUnknown If not equal to 0, the JRE will ignore options it doesn't understand. If equal to 0, JRE loading will fail if it doesn't understand all the options.
Returns:
One of the BFRESULT codes
BFEXPORT_FUNCDEC void BFShutdown (  ) 

Clean up the API. Must be called after all use of this API is complete. Must be called from the same thread that called BFStartup().

BFEXPORT_FUNCDEC void BFAttachThread ( void   ) 

Start using this API in a new thread. Must be called for each new thread that will use this API, not including the thread in which BFStartup() is called. Threads that call this function must call BFDetachThread() before BFShutdown() is called.

BFEXPORT_FUNCDEC void BFDetachThread ( void   ) 

Finish using this API in a thread. Must be called for each thread that called BFAttachThread() after the thread has finished using this API.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Clean Content C/C++ API 8.5.6.01.211123 documentation generated on Tue Nov 23 02:25:22 2021 by Doxygen 1.6.3