Plugin Info Objects

Plugin Info Objects — information about plugins

Functions

Properties

guint abi-version Read / Write / Construct Only
GStrv authors Read / Write / Construct Only
gboolean bind-local Read / Write / Construct Only
gchar * category Read / Write / Construct Only
GStrv dependencies Read / Write / Construct Only
gchar * description Read / Write / Construct Only
gchar * help Read / Write / Construct Only
gchar * icon Read / Write / Construct Only
gchar * id Read / Write / Construct Only
gboolean internal Read / Write / Construct Only
gchar * license-id Read / Write / Construct Only
gchar * license-text Read / Write / Construct Only
gchar * license-url Read / Write / Construct Only
gboolean load-on-query Read / Write / Construct Only
gchar * name Read / Write / Construct Only
gchar * summary Read / Write / Construct Only
gchar * version Read / Write / Construct Only
gpointer version-func Read / Write / Construct Only
gchar * website Read / Write / Construct Only

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GPluginPluginInfo

Description

GPluginPluginInfo holds metadata for plugins.

Functions

gplugin_plugin_info_new()

#define             gplugin_plugin_info_new(id, abi_version, ...)

Creates a new GPluginPluginInfo instance.

Parameters

id

The id of the plugin

 

abi_version

The GPlugin ABI version that the plugin uses

 

...

name/value pairs of properties to set, followed by NULL.

 

Returns

The new GPluginPluginInfo instance.


gplugin_plugin_info_get_id ()

const gchar *
gplugin_plugin_info_get_id (GPluginPluginInfo *info);

Returns the id that the plugin identifies itself as.

Parameters

info

GPluginPluginInfo instance

 

Returns

The id from info .


gplugin_plugin_info_get_abi_version ()

guint32
gplugin_plugin_info_get_abi_version (GPluginPluginInfo *info);

Returns the ABI or Application Binary Interface version that the plugin is supposed to work against.

Parameters

info

GPluginPluginInfo instance

 

Returns

The abi_version from info .


gplugin_plugin_info_get_internal ()

gboolean
gplugin_plugin_info_get_internal (GPluginPluginInfo *info);

Returns where or not this plugin is is considered an internal plugin. An internal plugin would be something like a plugin loader or another plugin that should not be shown to users.

Parameters

info

GPluginPluginInfo instance

 

Returns

TRUE if the plugin is internal, FALSE otherwise.


gplugin_plugin_info_get_load_on_query ()

gboolean
gplugin_plugin_info_get_load_on_query (GPluginPluginInfo *info);

Returns whether or not this plugin should be loaded when queried. This is useful for internal plugins that are adding functionality and should always be turned on. The plugin loaders use this to make sure all plugins can always be loaded.

Parameters

info

GPluginPluginInfo instance

 

Returns

TRUE if the plugin should be loaded on query, FALSE otherwise.


gplugin_plugin_info_get_name ()

const gchar *
gplugin_plugin_info_get_name (GPluginPluginInfo *info);

Returns the name of the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The name from info .


gplugin_plugin_info_get_version ()

const gchar *
gplugin_plugin_info_get_version (GPluginPluginInfo *info);

Returns the version of the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The version from info .


gplugin_plugin_info_get_license_id ()

const gchar *
gplugin_plugin_info_get_license_id (GPluginPluginInfo *info);

Returns the liences id for the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The license-id from info .


gplugin_plugin_info_get_license_text ()

const gchar *
gplugin_plugin_info_get_license_text (GPluginPluginInfo *info);

Returns the license text for the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The text of the license from info .


gplugin_plugin_info_get_license_url ()

const gchar *
gplugin_plugin_info_get_license_url (GPluginPluginInfo *info);

Returns the url of the license for the plugin as specified in info

Parameters

info

GPluginPluginInfo instance

 

Returns

The url of the license from info .


gplugin_plugin_info_get_icon ()

const gchar *
gplugin_plugin_info_get_icon (GPluginPluginInfo *info);

Returns the name of the icon for the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The icon from info .


gplugin_plugin_info_get_summary ()

const gchar *
gplugin_plugin_info_get_summary (GPluginPluginInfo *info);

Returns the summery for the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The summary from info .


gplugin_plugin_info_get_description ()

const gchar *
gplugin_plugin_info_get_description (GPluginPluginInfo *info);

Returns the description for the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The description from info .


gplugin_plugin_info_get_category ()

const gchar *
gplugin_plugin_info_get_category (GPluginPluginInfo *info);

Returns the category of the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The category from info .


gplugin_plugin_info_get_authors ()

const gchar * const *
gplugin_plugin_info_get_authors (GPluginPluginInfo *info);

Returns the authors of the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The authors from info .

[array zero-terminated=1][transfer none]


gplugin_plugin_info_get_website ()

const gchar *
gplugin_plugin_info_get_website (GPluginPluginInfo *info);

Returns the website for the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The website from info .


gplugin_plugin_info_get_dependencies ()

const gchar * const *
gplugin_plugin_info_get_dependencies (GPluginPluginInfo *info);

Returns the dependencies of the plugins as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The list of dependencies from info .

[array zero-terminated=1][transfer none]


gplugin_plugin_info_get_version_func ()

GPluginVersionCompareFunc
gplugin_plugin_info_get_version_func (GPluginPluginInfo *info);

Returns the GPluginVersionCompareFunc used to compare versions of the plugin.

[skip]

Parameters

info

GPluginPluginInfo instance

 

Returns

The GPluginVersionCompareFunc that can compare versions of this plugins.


gplugin_plugin_info_get_help ()

const gchar *
gplugin_plugin_info_get_help (GPluginPluginInfo *info);

Returns the help text for the plugin as specified in info .

Parameters

info

GPluginPluginInfo instance

 

Returns

The help from info .

Types and Values

Property Details

The “abi-version” property

  “abi-version”              guint

The GPlugin ABI version that the plugin was compiled against.

GPlugin only uses the first byte (0xff000000) of this value. The remaining 3 bytes are available for the application to use.

Take the following example from an application:

#define ABI_VERSION (GPLUGIN_NATIVE_ABI_VERSION | (APPLICATION_MAJOR_VERSION << 8) | (APPLICATION_MINOR_VERSION))

The application here uses the thrid and fourth bytes, but could use the second as well.

Flags: Read / Write / Construct Only

Default value: 0


The “authors” property

  “authors”                  GStrv

A gchar ** of the names and email addresses of the authors.

It is recommended to use the RFC 822, 2822 format of: "First Last user@domain.com" with additional authors separated by a comma.

Flags: Read / Write / Construct Only


The “bind-local” property

  “bind-local”               gboolean

Determines whether the plugin should be have it's symbols bound locally.

Note: This should only be used by the native plugin loader.

Flags: Read / Write / Construct Only

Default value: FALSE


The “category” property

  “category”                 gchar *

The category of this plugin.

This property is used to organize plugins into categories in a user interface. It is recommended that an application has a well defined set of categories that plugin authors should use, and put all plugins that don't match this category into an "Other" category.

Flags: Read / Write / Construct Only

Default value: NULL


The “dependencies” property

  “dependencies”             GStrv

A comma separated list of plugin id's that this plugin depends on.

Flags: Read / Write / Construct Only


The “description” property

  “description”              gchar *

The full description of the plugin that will be used in a "more information" section in a user interface.

Flags: Read / Write / Construct Only

Default value: NULL


The “help” property

  “help”                     gchar *

The url of the plugin that can be represented in a user interface.

Flags: Read / Write / Construct Only

Default value: NULL


The “icon” property

  “icon”                     gchar *

A string representing an icon for the plugin. The actual use of this is determined by the application/library using GPlugin.

Flags: Read / Write / Construct Only

Default value: NULL


The “id” property

  “id”                       gchar *

The id of the plugin.

While not required, the recommended convention is to use the following format: <application or library>/<name of the plugin>.

For example, the python loader in GPlugin has an id of "gplugin/python-plugin-loader".

Flags: Read / Write / Construct Only

Default value: NULL


The “internal” property

  “internal”                 gboolean

Whether or not the plugin is considered an "internal" plugin.

Defaults to FALSE.

Flags: Read / Write / Construct Only

Default value: FALSE


The “license-id” property

  “license-id”               gchar *

The short name of the license.

It is recommended to use the identifier of the license from http://dep.debian.net/deps/dep5/license-specification and should be "Other" for licenses that are not mentioned in DEP5.

If a plugin has multiple license, they should be separated by a pipe (|). In the odd case that you have multiple licenses that are used at the same time, they should be separated by an ampersand (&).

Flags: Read / Write / Construct Only

Default value: NULL


The “license-text” property

  “license-text”             gchar *

The text of the license for this plugin. This should only be used when the plugin is licensed under a license that is not listed in DEP5.

Flags: Read / Write / Construct Only

Default value: NULL


The “license-url” property

  “license-url”              gchar *

The url to the text of the license. This should primarily only be used for licenses not listed in DEP5.

Flags: Read / Write / Construct Only

Default value: NULL


The “load-on-query” property

  “load-on-query”            gboolean

Whether or not the plugin should be loaded when it's queried.

This is used by the loaders and may be useful to your application as well.

Defaults to FALSE.

Flags: Read / Write / Construct Only

Default value: FALSE


The “name” property

  “name”                     gchar *

The display name of the plugin. This should be a translated string.

Flags: Read / Write / Construct Only

Default value: NULL


The “summary” property

  “summary”                  gchar *

A short description of the plugin that can be listed with the name in a user interface.

Flags: Read / Write / Construct Only

Default value: NULL


The “version” property

  “version”                  gchar *

The version of the plugin.

Flags: Read / Write / Construct Only

Default value: NULL


The “version-func” property

  “version-func”             gpointer

The function to use to compare versions of this plugin.

Flags: Read / Write / Construct Only


The “website” property

  “website”                  gchar *

The url of the plugin that can be represented in a user interface.

Flags: Read / Write / Construct Only

Default value: NULL