* Copyright (C) 2011-2021 Gary Kramlich <grim@reaperworld.com> * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, see <https://www.gnu.org/licenses/>. #include <gplugin/gplugin-core.h> #include <gplugin/gplugin-enums.h> #include <gplugin/gplugin-plugin-info.h> #include <gplugin/gplugin-private.h> * SECTION:gplugin-plugin-info * @Title: Plugin Info Objects * @Short_description: information about plugins. * #GPluginPluginInfo holds metadata for plugins. * GPLUGIN_TYPE_PLUGIN_INFO: * The standard _get_type macro for #GPluginPluginInfo. * #GPluginPluginInfo holds all of the data about a plugin. It is created when * GPluginPluginInfoClass: * The class structure for #GPluginPluginInfo. /****************************************************************************** *****************************************************************************/ } GPluginPluginInfoPrivate; /****************************************************************************** *****************************************************************************/ static GParamSpec *properties[N_PROPERTIES] = { G_DEFINE_TYPE_WITH_PRIVATE( /****************************************************************************** *****************************************************************************/ gplugin_plugin_info_set_id(GPluginPluginInfo *info, const gchar *id) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); gplugin_plugin_info_set_provides( const gchar *const *provides) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); g_strfreev(priv->provides); priv->provides = g_strdupv((gchar **)provides); g_object_notify_by_pspec(G_OBJECT(info), properties[PROP_PROVIDES]); gplugin_plugin_info_set_priority(GPluginPluginInfo *info, gint priority) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); if(priority != priv->priority) { priv->priority = priority; g_object_notify_by_pspec(G_OBJECT(info), properties[PROP_PRIORITY]); gplugin_plugin_info_set_abi_version( GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->abi_version = abi_version; gplugin_plugin_info_set_internal(GPluginPluginInfo *info, gboolean internal) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->internal = internal; gplugin_plugin_info_set_load_on_query(GPluginPluginInfo *info, gboolean loq) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->load_on_query = loq; gplugin_plugin_info_set_bind_global( GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->bind_global = bind_global; gplugin_plugin_info_set_name(GPluginPluginInfo *info, const gchar *name) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->name = g_strdup(name); gplugin_plugin_info_set_version(GPluginPluginInfo *info, const gchar *version) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->version = g_strdup(version); gplugin_plugin_info_set_license_id( GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); g_free(priv->license_id); priv->license_id = g_strdup(license_id); gplugin_plugin_info_set_license_text( const gchar *license_text) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); g_free(priv->license_text); priv->license_text = g_strdup(license_text); gplugin_plugin_info_set_license_url( const gchar *license_url) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); g_free(priv->license_url); priv->license_url = g_strdup(license_url); gplugin_plugin_info_set_icon_name( GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->icon_name = g_strdup(icon_name); gplugin_plugin_info_set_summary(GPluginPluginInfo *info, const gchar *summary) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->summary = g_strdup(summary); gplugin_plugin_info_set_description( const gchar *description) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); g_free(priv->description); priv->description = g_strdup(description); gplugin_plugin_info_set_category(GPluginPluginInfo *info, const gchar *category) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->category = g_strdup(category); gplugin_plugin_info_set_authors( const gchar *const *authors) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); g_strfreev(priv->authors); priv->authors = g_strdupv((gchar **)authors); gplugin_plugin_info_set_website(GPluginPluginInfo *info, const gchar *website) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); priv->website = g_strdup(website); gplugin_plugin_info_set_dependencies( const gchar *const *dependencies) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(info); g_strfreev(priv->dependencies); priv->dependencies = g_strdupv((gchar **)dependencies); /****************************************************************************** *****************************************************************************/ gplugin_plugin_info_get_property( GPluginPluginInfo *info = GPLUGIN_PLUGIN_INFO(obj); g_value_set_string(value, gplugin_plugin_info_get_id(info)); g_value_set_boxed(value, gplugin_plugin_info_get_provides(info)); g_value_set_int(value, gplugin_plugin_info_get_priority(info)); g_value_set_uint(value, gplugin_plugin_info_get_abi_version(info)); g_value_set_boolean(value, gplugin_plugin_info_get_internal(info)); gplugin_plugin_info_get_load_on_query(info)); gplugin_plugin_info_get_bind_global(info)); g_value_set_string(value, gplugin_plugin_info_get_name(info)); g_value_set_string(value, gplugin_plugin_info_get_version(info)); g_value_set_string(value, gplugin_plugin_info_get_license_id(info)); gplugin_plugin_info_get_license_text(info)); gplugin_plugin_info_get_license_url(info)); g_value_set_string(value, gplugin_plugin_info_get_icon_name(info)); g_value_set_string(value, gplugin_plugin_info_get_summary(info)); gplugin_plugin_info_get_description(info)); g_value_set_string(value, gplugin_plugin_info_get_category(info)); g_value_set_boxed(value, gplugin_plugin_info_get_authors(info)); g_value_set_string(value, gplugin_plugin_info_get_website(info)); gplugin_plugin_info_get_dependencies(info)); G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); gplugin_plugin_info_set_property( GPluginPluginInfo *info = GPLUGIN_PLUGIN_INFO(obj); gplugin_plugin_info_set_id(info, g_value_get_string(value)); gplugin_plugin_info_set_provides(info, g_value_get_boxed(value)); gplugin_plugin_info_set_priority(info, g_value_get_int(value)); gplugin_plugin_info_set_abi_version(info, g_value_get_uint(value)); gplugin_plugin_info_set_internal(info, g_value_get_boolean(value)); gplugin_plugin_info_set_load_on_query( g_value_get_boolean(value)); gplugin_plugin_info_set_bind_global( g_value_get_boolean(value)); gplugin_plugin_info_set_name(info, g_value_get_string(value)); gplugin_plugin_info_set_version(info, g_value_get_string(value)); gplugin_plugin_info_set_license_id(info, g_value_get_string(value)); gplugin_plugin_info_set_license_text( g_value_get_string(value)); gplugin_plugin_info_set_license_url( g_value_get_string(value)); gplugin_plugin_info_set_icon_name(info, g_value_get_string(value)); gplugin_plugin_info_set_summary(info, g_value_get_string(value)); gplugin_plugin_info_set_description( g_value_get_string(value)); gplugin_plugin_info_set_category(info, g_value_get_string(value)); gplugin_plugin_info_set_authors(info, g_value_get_boxed(value)); gplugin_plugin_info_set_website(info, g_value_get_string(value)); gplugin_plugin_info_set_dependencies( g_value_get_boxed(value)); G_OBJECT_WARN_INVALID_PROPERTY_ID(obj, param_id, pspec); gplugin_plugin_info_finalize(GObject *obj) GPluginPluginInfoPrivate *priv = gplugin_plugin_info_get_instance_private(GPLUGIN_PLUGIN_INFO(obj)); g_clear_pointer(&priv->id, g_free); g_clear_pointer(&priv->provides, g_strfreev); g_clear_pointer(&priv->name, g_free); g_clear_pointer(&priv->version, g_free); g_clear_pointer(&priv->license_id, g_free); g_clear_pointer(&priv->license_text, g_free); g_clear_pointer(&priv->license_url, g_free); g_clear_pointer(&priv->icon_name, g_free); g_clear_pointer(&priv->summary, g_free); g_clear_pointer(&priv->description, g_free); g_clear_pointer(&priv->authors, g_strfreev); g_clear_pointer(&priv->website, g_free); g_clear_pointer(&priv->dependencies, g_strfreev); g_clear_pointer(&priv->category, g_free); G_OBJECT_CLASS(gplugin_plugin_info_parent_class)->finalize(obj); gplugin_plugin_info_init(G_GNUC_UNUSED GPluginPluginInfo *info) gplugin_plugin_info_class_init(GPluginPluginInfoClass *klass) GObjectClass *obj_class = G_OBJECT_CLASS(klass); obj_class->get_property = gplugin_plugin_info_get_property; obj_class->set_property = gplugin_plugin_info_set_property; obj_class->finalize = gplugin_plugin_info_finalize; * While not required, the recommended convention is to use the following * format: <application or library>/<name of the plugin>. * For example, the Python3 loader in GPlugin has an id of * "gplugin/python3-loader". properties[PROP_ID] = g_param_spec_string( G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:provides: * A list of additional plugin ids and versions that this plugin can * provide. This mechanism is used so that plugins can replace and extend * the behavior of other plugins. * The format fields should either be <literal><plugin-id></literal> * or <literal><plugin-id>=<plugin-version></literal>. The * optional version is used to help resolve dependencies that are based properties[PROP_PROVIDES] = g_param_spec_boxed( "The additional ids that this plugin provides.", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:priority: * The priority that this plugin should have when determining which plugin * to use when multiple plugins have the same id or provides. Higher values * take precedence over lower values. If two plugins have the same id and * priority, the first one found will be used. properties[PROP_PRIORITY] = g_param_spec_int( "The priority of the plugin", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); * GPluginPluginInfo:abi-version: * 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: * |[<!-- language="C" --> * #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 properties[PROP_ABI_VERSION] = g_param_spec_uint( "The ABI version of the plugin", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:internal: * Whether or not the plugin is considered an "internal" plugin. properties[PROP_INTERNAL] = g_param_spec_boolean( "Whether or not the plugin is an internal plugin", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); * GPluginPluginInfo:load-on-query: * 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 properties[PROP_LOQ] = g_param_spec_boolean( "Whether or not the plugin should be loaded when queried", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); * GPluginPluginInfo:bind-global: * Determines whether the plugin should be have its symbols bound globally. * Note: This should only be used by the native plugin loader. properties[PROP_BIND_GLOBAL] = g_param_spec_boolean( "Whether symbols should be bound globally", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); * GPluginPluginInfo:name: * The display name of the plugin. This should be a translated string. properties[PROP_NAME] = g_param_spec_string( "The name of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:version: * The version of the plugin. Preferably a semantic version. properties[PROP_VERSION] = g_param_spec_string( "The version of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:license-id: * The short name of the license. * It is recommended to use the identifier of the license from * https://spdx.org/licenses/ and should be "Other" for licenses that are * 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 (&). properties[PROP_LICENSE_ID] = g_param_spec_string( "The license id of the plugin according to SPDX", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:license-text: * 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 at spdx.org. properties[PROP_LICENSE_TEXT] = g_param_spec_string( "The text of the license for the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:license-url: * The url to the text of the license. This should primarily only be used * for licenses not listed at spdx.org. properties[PROP_LICENSE_URL] = g_param_spec_string( "The url to the license of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:icon-name: * A XDG icon name for the plugin. The actual use of this is determined by * the application/library using GPlugin. properties[PROP_ICON_NAME] = g_param_spec_string( "The XDG icon name for the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:summary: * A short description of the plugin that can be listed with the name in a properties[PROP_SUMMARY] = g_param_spec_string( "The summary of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:description: * The full description of the plugin that will be used in a "more * information" section in a user interface. properties[PROP_DESCRIPTION] = g_param_spec_string( "The description of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:category: * 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. properties[PROP_CATEGORY] = g_param_spec_string( "The category of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:authors: * A list 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>"`. properties[PROP_AUTHORS] = g_param_spec_boxed( "The authors of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:website: * The url of the plugin that can be represented in a user interface. properties[PROP_WEBSITE] = g_param_spec_string( "The website of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); * GPluginPluginInfo:dependencies: * A comma separated list of plugin id's that this plugin depends on. properties[PROP_DEPENDENCIES] = g_param_spec_boxed( "The dependencies of the plugin", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_properties(obj_class, N_PROPERTIES, properties); /****************************************************************************** *****************************************************************************/ * gplugin_plugin_info_new: (skip) * @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. * Creates a new #GPluginPluginInfo instance. * Returns: (transfer full): The new #GPluginPluginInfo instance. * gplugin_plugin_info_get_id: * @info: The #GPluginPluginInfo instance. * Returns the id that the plugin identifies itself as. * Returns: The id from @info. gplugin_plugin_info_get_id(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_info_get_id_normalized: * @info: The #GPluginPluginInfo instance. * Gets the normalized version of the id from @info. That is, a version where * only alpha-numeric and -'s are in the id. * Returns: (transfer full): The normalized id of @info. gplugin_info_get_id_normalized(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); /* this only happens if an id wasn't passed, but that should be caught by * loader and then the manager, but that doesn't stop someone from just * creating a GPluginPluginInfo and doing dumb shit with it. copy = g_strdup(priv->id); return g_strcanon(copy, G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "-", '-'); * gplugin_plugin_info_get_provides: * @info: The #GPluginPluginInfo instance. * Gets the provides of the plugin as specified in @info. * Returns: (array zero-terminated=1) (transfer none): The list of * dependencies from @info. gplugin_plugin_info_get_provides(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); return (const gchar *const *)priv->provides; * gplugin_plugin_info_get_priority: * @info: The #GPluginPluginInfo instance. * Gets the priority of the plugin as specified in @info. * Returns: The priority from @info. gplugin_plugin_info_get_priority(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), 0); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_abi_version: * @info: The #GPluginPluginInfo instance. * Returns the ABI or Application Binary Interface version that the plugin * is supposed to work against. * Returns: The abi_version from @info. gplugin_plugin_info_get_abi_version(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), 0); priv = gplugin_plugin_info_get_instance_private(info); return priv->abi_version; * gplugin_plugin_info_get_internal: * @info: The #GPluginPluginInfo instance. * 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. * Returns: %TRUE if the plugin is internal, %FALSE otherwise. gplugin_plugin_info_get_internal(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), FALSE); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_load_on_query: * @info: The #GPluginPluginInfo instance. * 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 * Returns: %TRUE if the plugin should be loaded on query, %FALSE otherwise. gplugin_plugin_info_get_load_on_query(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), FALSE); priv = gplugin_plugin_info_get_instance_private(info); return priv->load_on_query; * gplugin_plugin_info_get_name: * @info: The #GPluginPluginInfo instance. * Returns the name of the plugin as specified in @info. * Returns: The name from @info. gplugin_plugin_info_get_name(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_version: * @info: The #GPluginPluginInfo instance. * Returns the version of the plugin as specified in @info. * Returns: The version from @info. gplugin_plugin_info_get_version(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_license_id: * @info: The #GPluginPluginInfo instance. * Returns the liences id for the plugin as specified in @info. * Returns: The license-id from @info. gplugin_plugin_info_get_license_id(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_license_text: * @info: The #GPluginPluginInfo instance. * Returns the license text for the plugin as specified in @info. * Returns: The text of the license from @info. gplugin_plugin_info_get_license_text(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); return priv->license_text; * gplugin_plugin_info_get_license_url: * @info: The #GPluginPluginInfo instance. * Returns the url of the license for the plugin as specified in @info * Returns: The url of the license from @info. gplugin_plugin_info_get_license_url(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); return priv->license_url; * gplugin_plugin_info_get_icon_name: * @info: The #GPluginPluginInfo instance. * Returns the name of the icon for the plugin as specified in @info. * Returns: The icon name from @info. gplugin_plugin_info_get_icon_name(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_summary: * @info: The #GPluginPluginInfo instance. * Returns the summery for the plugin as specified in @info. * Returns: The summary from @info. gplugin_plugin_info_get_summary(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_description: * @info: The #GPluginPluginInfo instance. * Returns the description for the plugin as specified in @info. * Returns: The description from @info. gplugin_plugin_info_get_description(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); return priv->description; * gplugin_plugin_info_get_category: * @info: The #GPluginPluginInfo instance. * Returns the category of the plugin as specified in @info. * Returns: The category from @info. gplugin_plugin_info_get_category(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_authors: * @info: The #GPluginPluginInfo instance. * Returns the authors of the plugin as specified in @info. * Returns: (array zero-terminated=1) (transfer none): The authors from @info. gplugin_plugin_info_get_authors(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); return (const gchar *const *)priv->authors; * gplugin_plugin_info_get_website: * @info: The #GPluginPluginInfo instance. * Returns the website for the plugin as specified in @info. * Returns: The website from @info. gplugin_plugin_info_get_website(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); * gplugin_plugin_info_get_dependencies: * @info: The #GPluginPluginInfo instance. * Returns the dependencies of the plugins as specified in @info. * Returns: (array zero-terminated=1) (transfer none): The list of * dependencies from @info. gplugin_plugin_info_get_dependencies(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), NULL); priv = gplugin_plugin_info_get_instance_private(info); return (const gchar *const *)priv->dependencies; * gplugin_plugin_info_get_bind_global: * @info: The #GPluginPluginInfo instance. * This propoerty and therefore function is only used by the native plugin * Returns: %TRUE if the plugin has requested to be loaded with its symbols * bound global, %FALSE if they should be bound locally. gplugin_plugin_info_get_bind_global(GPluginPluginInfo *info) GPluginPluginInfoPrivate *priv = NULL; g_return_val_if_fail(GPLUGIN_IS_PLUGIN_INFO(info), FALSE); priv = gplugin_plugin_info_get_instance_private(info); return priv->bind_global;