![]() |
![]() |
![]() |
libdexterplugin Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites |
#include <dexterplugin.h> #define DEXTER_VERSION_MAJOR #define DEXTER_VERSION_MINOR #define DEXTER_VERSION_MICRO #define DEXTER_CHECK_VERSION_EXACT #define DEXTER_CHECK_VERSION_COMPATIBLE DexterPluginIVersion; struct DexterPluginIVersionInterface; guint dexterplugin_iversion_get_version_major (DexterPluginIVersion *iversion
); guint dexterplugin_iversion_get_version_minor (DexterPluginIVersion *iversion
); guint dexterplugin_iversion_get_version_micro (DexterPluginIVersion *iversion
); void dexterplugin_iversion_check_version_exact (DexterPluginIVersion *iversion
,guint major
,guint minor
,guint micro
); void dexterplugin_iversion_check_version_compatible (DexterPluginIVersion *iversion
,guint major
,guint minor
,guint micro
);
Plugins can access version information using this interface.
The plugin should use this interface during initialization to verify that it is being loaded by a version of Libdexter that is compatible with the version with which the plugin was compiled.
#include <dexterplugin.h> void dexter_plugin_init (GTypeModule *module) { ... /* check for version compatibility with main library */ dexterplugin_iversion_check_version_compatible (dexterplugin_main_imain_get ()->iversion, DEXTER_VERSION_MAJOR, DEXTER_VERSION_MINOR, DEXTER_VERSION_MICRO); /* or you can use the following shortcut macro */ DEXTER_CHECK_VERSION_COMPATIBLE; ... }
#define DEXTER_CHECK_VERSION_EXACT
Shortcut macro for calling dexterplugin_iversion_check_version_exact()
with required paramaters.
#define DEXTER_CHECK_VERSION_COMPATIBLE
Shortcut macro for calling dexterplugin_iversion_check_version_compatible()
with required parameters.
typedef struct _DexterPluginIVersion DexterPluginIVersion;
The version information interface.
struct DexterPluginIVersionInterface { /* virtual methods */ guint (*get_version_major) (DexterPluginIVersion *iversion); guint (*get_version_minor) (DexterPluginIVersion *iversion); guint (*get_version_micro) (DexterPluginIVersion *iversion); void (*check_version_exact) (DexterPluginIVersion *iversion, guint major, guint minor, guint micro); void (*check_version_compatible) (DexterPluginIVersion *iversion, guint major, guint minor, guint micro); };
Definition of the version information interface.
guint dexterplugin_iversion_get_version_major
(DexterPluginIVersion *iversion
);
Returns the major version number of Libdexter.
|
a DexterPluginIVersion. |
Returns : |
gint major version number. |
guint dexterplugin_iversion_get_version_minor
(DexterPluginIVersion *iversion
);
Returns the minor version number of Libdexter.
|
a DexterPluginIVersion. |
Returns : |
gint minor version number. |
guint dexterplugin_iversion_get_version_micro
(DexterPluginIVersion *iversion
);
Returns the micro version number of Libdexter.
|
a DexterPluginIVersion. |
Returns : |
gint micro version number. |
void dexterplugin_iversion_check_version_exact (DexterPluginIVersion *iversion
,guint major
,guint minor
,guint micro
);
Verifies that the specified (major
, minor
, micro
) version number exactly matches
that of the Libdexter library.
Used by plugins that require a specific library version.
|
a DexterPluginIVersion. |
|
guint major version number. |
|
guint minor version number. |
|
guint micro version number. |
void dexterplugin_iversion_check_version_compatible (DexterPluginIVersion *iversion
,guint major
,guint minor
,guint micro
);
Verifies that the specified (major
, minor
, micro
) version number is compatible
with the Libdexter library.
It is generally sufficient to use this function to verify compatibility when loading plugins.
|
a DexterPluginIVersion. |
|
guint major version number. |
|
guint minor version number. |
|
guint micro version number. |