![]() |
![]() |
![]() |
Capuchin GLib Reference Manual | ![]() |
---|---|---|---|---|
enum CapuchinGAppObjectActionType; CapuchinGAppObject; CapuchinGAppObject* capuchin_g_app_object_new (DBusGProxy *proxy); void capuchin_g_app_object_update (CapuchinGAppObject *appobject, gboolean force_update, GError **error); void capuchin_g_app_object_update_async (CapuchinGAppObject *appobject, gboolean force_update); void capuchin_g_app_object_install (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error); gchar* capuchin_g_app_object_get_application_name (CapuchinGAppObject *appobject, GError **error); gchar** capuchin_g_app_object_get_available_plugins (CapuchinGAppObject *appobject, GError **error); gchar** capuchin_g_app_object_get_available_updates (CapuchinGAppObject *appobject, CapuchinGPluginInfo **plugins, GError **error); gchar** capuchin_g_app_object_get_plugins_with_tag (CapuchinGAppObject *appobject, const gchar *tag, GError **error); gchar* capuchin_g_app_object_get_plugin_name (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error); gchar* capuchin_g_app_object_get_plugin_description (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error); gchar* capuchin_g_app_object_get_plugin_changes (CapuchinGAppObject *appobject, const gchar *plugin_id, const gchar *version, GError **error); gchar** capuchin_g_app_object_get_plugin_tags (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error); CapuchinGPluginAuthor* capuchin_g_app_object_get_plugin_author (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error); gchar* capuchin_g_app_object_get_plugin_version (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error); gchar** capuchin_g_app_object_get_tags (CapuchinGAppObject *appobject, GError **error); void capuchin_g_app_object_close (CapuchinGAppObject *appobject, GError **error);
typedef enum /*< underscore_name=capuchin_g_app_object_action >*/ { CAPUCHIN_G_APP_OBJECT_ACTION_UPDATING_REPO, CAPUCHIN_G_APP_OBJECT_ACTION_DOWNLOADING_PLUGIN, CAPUCHIN_G_APP_OBJECT_ACTION_EXTRACTING_PLUGIN } CapuchinGAppObjectActionType;
CapuchinGAppObject* capuchin_g_app_object_new (DBusGProxy *proxy);
Usually, you don't have to use this method,
because capuchin_g_app_object_manager_get_appobject()
is more convenient
|
A DBusGProxy object that represents the AppObject for the repository |
Returns : |
A new CapuchinGAppObject object |
void capuchin_g_app_object_update (CapuchinGAppObject *appobject, gboolean force_update, GError **error);
Load the repository. This method returns when the update process completed.
|
CapuchinGAppObject of the repository |
|
Whether to force to download the XML file from the server or use the cached one, if no newer version is available |
|
a GError location to store the error occuring, or NULL to ignore. |
void capuchin_g_app_object_update_async (CapuchinGAppObject *appobject, gboolean force_update);
Load the repository. The repository has been initialized when the CapuchinGAppObject::update-finished signal has been emitted.
|
CapuchinGAppObject of the repository |
|
Whether to force to download the XML file from the server or use the cached one, if no newer version is available |
void capuchin_g_app_object_install (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error);
Update the plugin given ID. During the installation progess the CapuchinGAppObject::status signal will be emitted. When the process is complete the CapuchinGAppObject::install-finished signal will be emitted.
|
CapuchinGAppObject of the repository |
|
Plugin's ID |
|
a GError location to store the error occuring, or NULL to ignore. |
gchar* capuchin_g_app_object_get_application_name (CapuchinGAppObject *appobject, GError **error);
Get the name of the application the repository belongs to.
You have to free it with g_free()
.
|
CapuchinGAppObject of the repository |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
The name of the application the repository belongs to or NULL if an error occured |
gchar** capuchin_g_app_object_get_available_plugins (CapuchinGAppObject *appobject, GError **error);
Get all plugins from the repository.
You have to free it with g_strfreev()
.
|
CapuchinGAppObject of the repository |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
An array of plugin IDs or NULL if an error occured |
gchar** capuchin_g_app_object_get_available_updates (CapuchinGAppObject *appobject, CapuchinGPluginInfo **plugins, GError **error);
Get all available updates.
You have to free it with g_strfreev()
.
|
CapuchinGAppObject of the repository |
|
A null terminated array of CapuchinGPluginInfo objects |
|
a GError location to store the error occuring, or NULL to ignore. representing the plugins that should be checked for updates |
Returns : |
An array of plugin IDs or NULL if an error occured |
gchar** capuchin_g_app_object_get_plugins_with_tag (CapuchinGAppObject *appobject, const gchar *tag, GError **error);
Get all plugins that are tagged with the given tag.
You have to free it with g_strfreev()
.
|
CapuchinGAppObject of the repository |
|
A tag |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
A list of plugin IDs or NULL if an error occured |
gchar* capuchin_g_app_object_get_plugin_name (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error);
Get name of plugin with given ID.
You have to free it with g_free()
.
|
CapuchinGAppObject of the repository |
|
Plugin's ID |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
Plugin's name or NULL if an error occured |
gchar* capuchin_g_app_object_get_plugin_description (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error);
Get description of plugin with given ID.
You have to free it with g_free()
.
|
CapuchinGAppObject of the repository |
|
Plugin's ID |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
Plugin's descriptio |
gchar* capuchin_g_app_object_get_plugin_changes (CapuchinGAppObject *appobject, const gchar *plugin_id, const gchar *version, GError **error);
Get changes for plugin with given ID made in given version.
You have to free it with g_free()
.
|
CapuchinGAppObject of the repository |
|
Plugin's ID |
|
Plugin's version that you want to get the changes from |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
Changes or NULL if an error occured |
gchar** capuchin_g_app_object_get_plugin_tags (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error);
Get tags for the plugin given ID.
You have to free it with g_strfreev()
.
|
CapuchinGAppObject of the repository |
|
Plugin's ID |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
Array of tags for the plugin or NULL if an error occured |
CapuchinGPluginAuthor* capuchin_g_app_object_get_plugin_author (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error);
Get the author's name and e-mail address for the plugin given ID
|
CapuchinGAppObject of the repository |
|
Plugin's ID |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
CapuchinGPluginAuthor or NULL if an error occured |
gchar* capuchin_g_app_object_get_plugin_version (CapuchinGAppObject *appobject, const gchar *plugin_id, GError **error);
Get the version of the plugin with given ID.
You have to free it with g_free()
.
|
CapuchinGAppObject of the repository |
|
Plugin's ID |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
Plugin's version or NULL if an error occured |
gchar** capuchin_g_app_object_get_tags (CapuchinGAppObject *appobject, GError **error);
Get all available tags available in this repository.
You have to free it with g_strfreev()
.
|
CapuchinGAppObject of the repository |
|
a GError location to store the error occuring, or NULL to ignore. |
Returns : |
A list of tags or NULL when an error occured |
void capuchin_g_app_object_close (CapuchinGAppObject *appobject, GError **error);
Tell the object that it isn't needed anymore
|
CapuchinGAppObject of the repository |
|
a GError location to store the error occuring, or NULL to ignore. |
"install-finished"
signalvoid user_function (CapuchinGAppObject *appobject, gchar *plugin_id, gpointer user_data) : Run Last
Emitted when the plugin has been downloaded and unpacked and is ready to be (re-)loaded by the application
|
The object on which the signal is emitted |
|
Plugin's ID |
|
user data set when the signal handler was connected. |
"status"
signalvoid user_function (CapuchinGAppObject *appobject, CapuchinGAppObjectActionType action, gchar *plugin_id, gdouble progress, gint speed, gpointer user_data) : Run Last
Emitted when the plugin is getting downloaded and extracted after
calling capuchin_g_app_object_install()
|
The object on which the signal is emitted |
|
Current action |
|
The ID of the plugin that the status is related to |
|
The fraction of the progress that's complete (from 0 to 1), or -1.0 if no information is available on how long it will take |
|
Download speed |
|
user data set when the signal handler was connected. |
"update-finished"
signalvoid user_function (CapuchinGAppObject *appobject, gpointer user_data) : Run Last
Emitted when the repository has been updated
after calling capuchin_g_app_object_update()
|
The object on which the signal is emitted |
|
user data set when the signal handler was connected. |