KDE PIM / Developers / API Docs / certmanager

Loading and Unloading the Plugin, General Functionality

Enumerations

Functions


Detailed Description

The functions in this section are used for loading and unloading plugins. Note that the actual locating of the plugin and the loading and unloading of the dynamic library is not covered here; this is MUA-specific code for which support code might already exist in the programming environments.

Enumeration Type Documentation

enum CryptPlugWrapper::InitStatus [inherited]
 

Current initialization state.

This flag holding status of previous call of initialize function. If initialize was not called before return value will be CryptPlugInit_undef.

See also:
initStatus, initialize

Function Documentation

const char* CryptPlug::libVersion void   )  [inherited]
 

This function returns the version string of this cryptography plug-in.

If the plugins initialization fails the calling process might want to display the library version number to the user for checking if there is an old version of the library installed...

Note:
This function must be implemented by each plug-in using this API specification.

const char* CryptPlug::bugURL void   )  [inherited]
 

This function returns a URL to be used for reporting a bug that you found (or suspect, resp.) in this cryptography plug-in.

If the plugins for some reason cannot specify an appropriate URL you should at least be provided with a text giving you some advise on how to report a bug.

Note:
This function must be implemented by each plug-in using this API specification.

int CryptPlug::interfaceVersion int *  min_version  )  [inherited]
 

Return the current interface version of the plugin.

Return the current interface version. This is a simple way for a user to check whether all required fucntions are available. If MIN_VERSION is not NULL the lowest supported version of the interface is returned in addition.

The version is a positive integer. A user should check for the existance of this function before using it; if the fucntion does not exist, a interface version of 0 should be assumed.

This function may be called prior to initialize().

bool CryptPlug::initialize void   )  [inherited]
 

This function sets up all internal structures.

Plugins that need no initialization should provide an empty implementation. The method returns true if the initialization was successful and false otherwise. Before this function is called, no other plugin functions should be called; the behavior is undefined in this case.

Note:
This function must be implemented by each plug-in using this API specification.

bool CryptPlug::hasFeature Feature   )  [inherited]
 

This function frees all internal structures. This function returns true if the specified feature is available in the plugin, and false otherwise.

Not all plugins will support all features; a complete Sphinx implementation will support all features contained in the enum, however.

Note:
This function must be implemented by each plug-in using this API specification.

void CryptPlugWrapper::deinitialize  )  [inherited]
 

This function unloads the lib and frees all internal structures.

After this function has been called, no other plugin functions should be called; the behavior is undefined in this case.

Note:
Deinitializing sets the internal initStatus value back to InitStatus_undef.
See also:
initStatus, initialize, CryptPlugWrapper, ~CryptPlugWrapper

setActive, active

CryptPlugWrapper::InitStatus CryptPlugWrapper::initStatus QString *  errorMsg  )  const [inherited]
 

Returns this CRYPTPLUG wrapper's initialization state.

Parameters:
errorMsg receives the last system error message, this value should be ignored if InitStatus value equals InitStatus_Ok.
Returns:
whether the relative library was loaded and initialized correctly
See also:
initialize, deinitialize, CryptPlugWrapper(), ~CryptPlugWrapper

setActive, active

bool CryptPlugWrapper::hasFeature Feature   )  [inherited]
 

This function returns true if the specified feature is available in the plugin, and false otherwise.

Not all plugins will support all features; a complete Sphinx implementation will support all features contained in the enum, however.

Note:
In case this function cannot be executed the system's error message may be retrieved by calling initStatus( QString* ).
Returns:
whether the relative feature is implemented or not

const char * CryptPlugWrapper::bugURL  )  [inherited]
 

This function returns a URL to be used for reporting a bug that you found (or suspect, resp.) in this cryptography plug-in.

If the plugins for some reason cannot specify an appropriate URL you should at least be provided with a text giving you some advise on how to report a bug.

Note:
This function must be implemented by each plug-in using this API specification.