Top |
Functions
int | pskc_global_init () |
void | pskc_global_done () |
void | (*pskc_log_func) () |
void | pskc_global_log () |
void | pskc_free () |
Description
The library is initialized using pskc_global_init()
which is a
thread-unsafe function that should be called when the code that
needs the PSKC library functionality is initialized. When the
application no longer needs to use the PSKC Library, it can call
pskc_global_done()
to release resources.
The pskc_free()
function is used to de-allocate memory that was
allocated by the library earlier and returned to the caller.
For debugging, you can implement a function of the pskc_log_func
signature and call pskc_global_log()
to make the library output
some messages that may provide additional information.
Functions
pskc_global_init ()
int
pskc_global_init (void
);
This function initializes the PSKC library. Every user of this
library needs to call this function before using other functions.
You should call pskc_global_done()
when use of the PSKC library is
no longer needed.
pskc_global_done ()
void
pskc_global_done (void
);
This function deinitializes the PSKC library, which were
initialized using pskc_global_init()
. After calling this function,
no other PSKC library function may be called except for to
re-initialize the library using pskc_global_init()
.
pskc_log_func ()
void
(*pskc_log_func) (const char *msg
);
Function prototype for the application to be able to log PSKC
messages, see pskc_global_log()
.
pskc_global_log ()
void
pskc_global_log (pskc_log_func log_func
);
Enable global debug logging function. The function will be invoked by the library when it wishes to print various debug information.
pskc_log_func
is of the form,
void (*pskc_log_func) (const char *msg);
The application may use this to provide a debug mode with trace information for the user.