| Top |
| void | galago_account_set_connected () |
| GalagoService * | galago_account_get_service () |
| GalagoPerson * | galago_account_get_person () |
| const char * | galago_account_get_username () |
| gboolean | galago_account_is_connected () |
| void | galago_account_set_display_name () |
| const char * | galago_account_get_display_name () |
| gboolean | galago_account_is_display_name_set () |
| void | galago_account_add_contact () |
| void | galago_account_remove_contact () |
| GalagoAccount * | galago_account_get_contact () |
| GList * | galago_account_get_contacts () |
| GalagoPresence * | galago_account_create_presence () |
| GalagoPresence * | galago_account_get_presence () |
| void | galago_account_set_avatar () |
| GalagoImage * | galago_account_get_avatar () |
| GalagoImage * | avatar | Read / Write |
| gboolean | connected | Read / Write |
| gchar * | display-name | Read / Write |
| GalagoPerson * | person | Read / Write / Construct Only |
| GalagoPresence * | presence | Read |
| GalagoService * | service | Read / Write / Construct Only |
| gchar * | username | Read / Write / Construct Only |
| void | avatar-set | Action |
| void | connection-state-changed | Action |
| void | contact-added | Action |
| void | contact-removed | Action |
| void | display-name-changed | Action |
| void | presence-created | Action |
| void | presence-deleted | Action |
The GalagoAccount object represents an account on a messaging or VoIP service, The account may belong to the local user, or someone on the user's contact list.
Each GalagoAccount is owned and managed by a GalagoService, and has
an associated GalagoPerson. To create a GalagoAccount, use
galago_service_create_account().
void galago_account_set_connected (GalagoAccount *account,gboolean connected);
Sets whether or not the account is connected.
GalagoService *
galago_account_get_service (const GalagoAccount *account);
Returns an account's service.
GalagoPerson *
galago_account_get_person (const GalagoAccount *account);
Returns the person that owns an account.
const char *
galago_account_get_username (const GalagoAccount *account);
Returns an account's username.
gboolean
galago_account_is_connected (const GalagoAccount *account);
Returns whether or not an account is connected.
void galago_account_set_display_name (GalagoAccount *account,const char *display_name);
Sets the account's displayed name.
This is the alias that the account may be shown as on another client. It's purely optional.
const char *
galago_account_get_display_name (const GalagoAccount *account);
Returns the account's displayed name. If the displayed name is not explicitly set, this will return the screen name.
gboolean
galago_account_is_display_name_set (const GalagoAccount *account);
Returns whether or not a custom displayed name is set.
void galago_account_add_contact (GalagoAccount *account,GalagoAccount *contact);
Adds a contact to an account.
void galago_account_remove_contact (GalagoAccount *account,GalagoAccount *contact);
Removes a contact from an account.
GalagoAccount * galago_account_get_contact (const GalagoAccount *account,const char *username,gboolean query);
Returns the contact with the specified username in an account.
GList * galago_account_get_contacts (const GalagoAccount *account,gboolean query);
Returns a list of accounts of users seen from this account.
This may emit a contact-added signal for every object that returns. If
your code connects to this signal and calls galago_account_get_contacts()
as a result, you will want to add a lock so that you don't end up with
unwanted side-effects.
GalagoPresence *
galago_account_create_presence (GalagoAccount *account);
Creates an account's presence.
The account should be a local account. If the account already has a presence, this will return the existing one.
GalagoPresence * galago_account_get_presence (const GalagoAccount *account,gboolean query);
Returns the account's presence.
void galago_account_set_avatar (GalagoAccount *account,GalagoImage *avatar);
Sets the account's avatar. The account should be a local account.
GalagoImage * galago_account_get_avatar (const GalagoAccount *account,gboolean query);
Returns the account's avatar.
struct GalagoAccount;
This is an opaque structure representing an account. This should not be used directly. Use the accessor functions below.
#define GALAGO_DBUS_ACCOUNT_INTERFACE "org.freedesktop.Galago.Account"
The D-BUS interface that GalagoAccount maps to.
“connected” property “connected” gboolean
The account's connected state.
Flags: Read / Write
Default value: FALSE
“display-name” property “display-name” gchar *
The account's username intended for display.
Flags: Read / Write
Default value: NULL
“person” property“person” GalagoPerson *
The person the account belongs to.
Flags: Read / Write / Construct Only
“service” property“service” GalagoService *
The service the account is on.
Flags: Read / Write / Construct Only
“avatar-set” signalvoid user_function (GalagoAccount *account, gpointer avatar, gpointer user_data)
Emitted whenever an avatar is set for this account.
account |
The object which received the signal. |
|
avatar |
The avatar set. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“connection-state-changed” signalvoid user_function (GalagoAccount *account, gpointer user_data)
Emitted when the state of the connection changes, when the account goes online or offline.
account |
The object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“contact-added” signalvoid user_function (GalagoAccount *account, gpointer contact, gpointer user_data)
Emitted whenever a contact has been added to this account.
account |
The object which received the signal. |
|
contact |
The contact added to this account. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“contact-removed” signalvoid user_function (GalagoAccount *account, gpointer contact, gpointer user_data)
Emitted whenever a contact has been removed from this account.
account |
The object which received the signal. |
|
contact |
The contact removed from this account. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“display-name-changed” signalvoid user_function (GalagoAccount *account, gpointer user_data)
Emitted whenever the display name of the account changes.
account |
The object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“presence-created” signalvoid user_function (GalagoAccount *account, gpointer presence, gpointer user_data)
Emitted whenever a new GalagoPresence object is created for this account.
account |
The object which received the signal. |
|
presence |
The new presence object. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“presence-deleted” signalvoid user_function (GalagoAccount *account, gpointer user_data)
Emitted whenever a GalagoPresence object associated with this account is destroyed.
account |
The object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action