ApApplicationPlugin

ApApplicationPlugin — Base class for application plugins.

Functions

Properties

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

Signals

void finished Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── ApApplicationPlugin

Includes

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

Description

Application plugins for the credentials panel of the Unity 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.

Functions

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

self

the ApApplicationPlugin.

 

Types and Values

ApApplicationPlugin

typedef struct _ApApplicationPlugin ApApplicationPlugin;

Use the accessor functions below.

Property Details

The “account” property

  “account”                  AgAccount *

The AgAccount associated with the plugin.

Flags: Read / Write / Construct Only


The “application” property

  “application”              AgApplication *

The AgApplication associated with the plugin.

Flags: Read / Write / Construct Only

Signal Details

The “finished” signal

void
user_function (ApApplicationPlugin *self,
               gpointer             user_data)

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

Parameters

self

the ApApplicationPlugin.

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last