Loading...
Searching...
No Matches
_cpl_plugin_ Struct Reference
Plugin Interface

The type representation of the generic plugin interface. More...

`#include <cpl_plugin.h>`

## Public Attributes

unsigned int | api
| The API version the Plugin complies to.
const char * | author
| Name of the plugin's author.
const char * | copyright
| Plugin's copyright.
cpl_plugin_func | deinitialize
| Deinitialization a plugin instance.
const char * | description
| Plugin's detailed description.
const char * | email
| Author's email address.
cpl_plugin_func | execute
| Executes a plugin instance.
cpl_plugin_func | initialize
| Initializes a plugin instance.
const char * | name
| Plugin's unique name.
const char * | synopsis
| Plugin's short help string.
unsigned long | type
| The Plugin type.
unsigned long | version
| The Plugin version.

## Detailed Description

The type representation of the generic plugin interface.

## Member Data Documentation

## api

unsigned int _cpl_plugin_::api

The API version the Plugin complies to.

The API version number identifies the internal layout of the plugin interface structure. It may be used by an application calling a plugin to setup the correct interface to communicate with the plugin or, in the simplest case, to ignore any plugin which does not match the plugin API an application has been buid for.

## author

const char* _cpl_plugin_::author

Name of the plugin's author.

Variable contains the null-terminated identifier string of the plugins author. If the plugin does not specify an author this pointer should be set to a `NULL` pointer.

## copyright

const char* _cpl_plugin_::copyright

Plugin's copyright.

Variable contains the copyright and license string applying to the plugin. The returned string must be null-terminated. If no copyright applies this pointer should be set to a `NULL` pointer.

## deinitialize

cpl_plugin_func _cpl_plugin_::deinitialize

Deinitialization a plugin instance.

Returns
  The function must return 0 on success, and a non-zero value if the plugin deinitalization failed.

The function to deinitialize the plugin instance plugin. If this is `NULL` no deinitialization of the plugin instance is needed.

## description

const char* _cpl_plugin_::description

Plugin's detailed description.

Variable contains the plugin's null-terminated detailed description string. The description is the detailed help for the plugin. For formatting the output the C special characters `'\n'`, `'\t'` maybe embedded in the returned string. If the plugin does not provide a detailed description the pointer should be set to a `NULL` pointer.

## email

const char* _cpl_plugin_::email

Author's email address.

Variable contains the null-terminated string of the author's email address. If the plugin does not specify an email address this pointer should be set to a `NULL` pointer.

## execute

cpl_plugin_func _cpl_plugin_::execute

Executes a plugin instance.

Parameters

  plugin | The plugin to execute.

Returns
  The function must return 0 on success, and a non-zero value if the plugin execution failed.

The function executes the plugin instance plugin.

## initialize

cpl_plugin_func _cpl_plugin_::initialize

Initializes a plugin instance.

Parameters

  plugin | The plugin to instantiate.

Returns
  The function must return 0 on success, and a non-zero value if the plugin instantiation failed.

The function to initialize a plugin instance. This maybe NULL if the initialization of the plugin is not needed. Otherwise it has to be called before plugin type specific members are accessed.

## name

const char* _cpl_plugin_::name

Plugin's unique name.

Variable contains the unique name of the Plugin. To ensure uniqueness across all possible Plugins one should follow the hierarchical naming convention mentioned in the CPL documentation.

## synopsis

const char* _cpl_plugin_::synopsis

Plugin's short help string.

Variable contains the plugin's null-terminated short help string. The short help string should summarize the plugin's purpose in not more than a few lines. It may contain new line characters. If the plugin does not provide a short help the pointer should be set to a `NULL` pointer.

## type

unsigned long _cpl_plugin_::type

The Plugin type.

The Plugin type identifies the type of plugin. The data type is not a cpl_plugin_type in order to keep this interface as generic as possible.

## version

unsigned long _cpl_plugin_::version

The Plugin version.

The Plugin version number defines the version number for the plugin. The Plugin version number is an encoded version of the usual MAJOR.MINOR.MICRO form for version numbers.