ApApplicationPlugin

ApApplicationPlugin — Base class for application plugins.

Synopsis

#include <libaccount-plugin/application-plugin.h>

                    ApApplicationPlugin;
GtkWidget *         ap_application_plugin_build_widget  (ApApplicationPlugin *self);
AgAccount *         ap_application_plugin_get_account   (ApApplicationPlugin *self);
AgApplication *     ap_application_plugin_get_application
                                                        (ApApplicationPlugin *self);
const GError *      ap_application_plugin_get_error     (ApApplicationPlugin *self);
void                ap_application_plugin_set_error     (ApApplicationPlugin *self,
                                                         const GError *error);
void                ap_application_plugin_emit_finished (ApApplicationPlugin *self);

Object Hierarchy

  GObject
   +----ApApplicationPlugin

Properties

  "account"                  AgAccount*            : Read / Write / Construct Only
  "application"              AgApplication*        : Read / Write / Construct Only

Signals

  "finished"                                       : Run Last

Description

Application plugins for the credentials panel of the GNOME control center need to subclass ApApplicationPlugin and implement its build_widget() virtual method. This method will be called by the credentials panel when it needs to show a UI to edit the application-specific settings of the account.

Details

ApApplicationPlugin

typedef struct _ApApplicationPlugin ApApplicationPlugin;

Use the accessor functions below.


ap_application_plugin_build_widget ()

GtkWidget *         ap_application_plugin_build_widget  (ApApplicationPlugin *self);

Build a UI widget to edit the application-specific account settings on the AgAccount associated with this plugin. The plugin must emit the "finished" signal once the widget has completed its tasks and can be destroyed.

self :

the ApApplicationPlugin.

Returns :

a GtkWidget which till take care of performing the needed tasks, or NULL. [transfer floating]

ap_application_plugin_get_account ()

AgAccount *         ap_application_plugin_get_account   (ApApplicationPlugin *self);

Get the AgAccount associated with this application_plugin instance.

self :

the ApApplicationPlugin.

Returns :

the AgAccount, or NULL. [transfer none]

ap_application_plugin_get_application ()

AgApplication *     ap_application_plugin_get_application
                                                        (ApApplicationPlugin *self);

Get the AgApplication associated with this plugin instance.

self :

the ApApplicationPlugin.

Returns :

the AgApplication, or NULL. [transfer none]

ap_application_plugin_get_error ()

const GError *      ap_application_plugin_get_error     (ApApplicationPlugin *self);

Get whether the requested operation ended in an error.

self :

the ApApplicationPlugin.

Returns :

a GError if an error occurred, NULL otherwise. [transfer none]

ap_application_plugin_set_error ()

void                ap_application_plugin_set_error     (ApApplicationPlugin *self,
                                                         const GError *error);

Tell the application plugin that the requested operation ended in an error. This method should be called by ApApplicationPlugin subclasses only.

self :

the ApApplicationPlugin.

error :

the GError to set on the plugin.

ap_application_plugin_emit_finished ()

void                ap_application_plugin_emit_finished (ApApplicationPlugin *self);

Emits the "finished" signal. This method is useful for subclasses only.

self :

the ApApplicationPlugin.

Property Details

The "account" property

  "account"                  AgAccount*            : Read / Write / Construct Only

The AgAccount associated with the plugin.


The "application" property

  "application"              AgApplication*        : Read / Write / Construct Only

The AgApplication associated with the plugin.

Signal Details

The "finished" signal

void                user_function                      (ApApplicationPlugin *self,
                                                        gpointer             user_data)      : Run Last

Emitted when the plugin UI has completed its task and can be dismissed.

self :

the ApApplicationPlugin.

user_data :

user data set when the signal handler was connected.