#include <glib-object.h>
#include <glib.h>
#include "connection.h"
#include "log.h"
#include "proxy.h"
#include "prpl.h"
#include "status.h"
Include dependency graph for account.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _PurpleAccountUiOps |
Account UI operations, used to notify the user of status changes and when buddies add this account to their buddy lists. More... | |
struct | _PurpleAccount |
Structure representing an account. More... | |
Account API | |
PurpleAccount * | purple_account_new (const char *username, const char *protocol_id) |
Creates a new account. | |
void | purple_account_destroy (PurpleAccount *account) |
Destroys an account. | |
void | purple_account_connect (PurpleAccount *account) |
Connects to an account. | |
void | purple_account_set_register_callback (PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data) |
Sets the callback for successful registration. | |
void | purple_account_register (PurpleAccount *account) |
Registers an account. | |
void | purple_account_unregister (PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data) |
Unregisters an account (deleting it from the server). | |
void | purple_account_disconnect (PurpleAccount *account) |
Disconnects from an account. | |
void | purple_account_notify_added (PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message) |
Notifies the user that the account was added to a remote user's buddy list. | |
void | purple_account_request_add (PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message) |
Notifies the user that the account was addded to a remote user's buddy list and asks ther user if they want to add the remote user to their buddy list. | |
void * | purple_account_request_authorization (PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message, gboolean on_list, PurpleAccountRequestAuthorizationCb auth_cb, PurpleAccountRequestAuthorizationCb deny_cb, void *user_data) |
Notifies the user that a remote user has wants to add the local user to his or her buddy list and requires authorization to do so. | |
void | purple_account_request_close_with_account (PurpleAccount *account) |
Close account requests registered for the given PurpleAccount. | |
void | purple_account_request_close (void *ui_handle) |
Close the account request for the given ui handle. | |
void | purple_account_request_password (PurpleAccount *account, GCallback ok_cb, GCallback cancel_cb, void *user_data) |
Requests a password from the user for the account. | |
void | purple_account_request_change_password (PurpleAccount *account) |
Requests information from the user to change the account's password. | |
void | purple_account_request_change_user_info (PurpleAccount *account) |
Requests information from the user to change the account's user information. | |
void | purple_account_set_username (PurpleAccount *account, const char *username) |
Sets the account's username. | |
void | purple_account_set_password (PurpleAccount *account, const char *password) |
Sets the account's password. | |
void | purple_account_set_alias (PurpleAccount *account, const char *alias) |
Sets the account's alias. | |
void | purple_account_set_user_info (PurpleAccount *account, const char *user_info) |
Sets the account's user information. | |
void | purple_account_set_buddy_icon_path (PurpleAccount *account, const char *path) |
Sets the account's buddy icon path. | |
void | purple_account_set_protocol_id (PurpleAccount *account, const char *protocol_id) |
Sets the account's protocol ID. | |
void | purple_account_set_connection (PurpleAccount *account, PurpleConnection *gc) |
Sets the account's connection. | |
void | purple_account_set_remember_password (PurpleAccount *account, gboolean value) |
Sets whether or not this account should save its password. | |
void | purple_account_set_check_mail (PurpleAccount *account, gboolean value) |
Sets whether or not this account should check for mail. | |
void | purple_account_set_enabled (PurpleAccount *account, const char *ui, gboolean value) |
Sets whether or not this account is enabled for the specified UI. | |
void | purple_account_set_proxy_info (PurpleAccount *account, PurpleProxyInfo *info) |
Sets the account's proxy information. | |
void | purple_account_set_status_types (PurpleAccount *account, GList *status_types) |
Sets the account's status types. | |
void | purple_account_set_status (PurpleAccount *account, const char *status_id, gboolean active,...) G_GNUC_NULL_TERMINATED |
Variadic version of purple_account_set_status_list(); the variadic list replaces attrs, and should be NULL -terminated. | |
void | purple_account_set_status_list (PurpleAccount *account, const char *status_id, gboolean active, GList *attrs) |
Activates or deactivates a status. | |
void | purple_account_clear_settings (PurpleAccount *account) |
Clears all protocol-specific settings on an account. | |
void | purple_account_set_int (PurpleAccount *account, const char *name, int value) |
Sets a protocol-specific integer setting for an account. | |
void | purple_account_set_string (PurpleAccount *account, const char *name, const char *value) |
Sets a protocol-specific string setting for an account. | |
void | purple_account_set_bool (PurpleAccount *account, const char *name, gboolean value) |
Sets a protocol-specific boolean setting for an account. | |
void | purple_account_set_ui_int (PurpleAccount *account, const char *ui, const char *name, int value) |
Sets a UI-specific integer setting for an account. | |
void | purple_account_set_ui_string (PurpleAccount *account, const char *ui, const char *name, const char *value) |
Sets a UI-specific string setting for an account. | |
void | purple_account_set_ui_bool (PurpleAccount *account, const char *ui, const char *name, gboolean value) |
Sets a UI-specific boolean setting for an account. | |
gboolean | purple_account_is_connected (const PurpleAccount *account) |
Returns whether or not the account is connected. | |
gboolean | purple_account_is_connecting (const PurpleAccount *account) |
Returns whether or not the account is connecting. | |
gboolean | purple_account_is_disconnected (const PurpleAccount *account) |
Returns whether or not the account is disconnected. | |
const char * | purple_account_get_username (const PurpleAccount *account) |
Returns the account's username. | |
const char * | purple_account_get_password (const PurpleAccount *account) |
Returns the account's password. | |
const char * | purple_account_get_alias (const PurpleAccount *account) |
Returns the account's alias. | |
const char * | purple_account_get_user_info (const PurpleAccount *account) |
Returns the account's user information. | |
const char * | purple_account_get_buddy_icon_path (const PurpleAccount *account) |
Gets the account's buddy icon path. | |
const char * | purple_account_get_protocol_id (const PurpleAccount *account) |
Returns the account's protocol ID. | |
const char * | purple_account_get_protocol_name (const PurpleAccount *account) |
Returns the account's protocol name. | |
PurpleConnection * | purple_account_get_connection (const PurpleAccount *account) |
Returns the account's connection. | |
gboolean | purple_account_get_remember_password (const PurpleAccount *account) |
Returns whether or not this account should save its password. | |
gboolean | purple_account_get_check_mail (const PurpleAccount *account) |
Returns whether or not this account should check for mail. | |
gboolean | purple_account_get_enabled (const PurpleAccount *account, const char *ui) |
Returns whether or not this account is enabled for the specified UI. | |
PurpleProxyInfo * | purple_account_get_proxy_info (const PurpleAccount *account) |
Returns the account's proxy information. | |
PurpleStatus * | purple_account_get_active_status (const PurpleAccount *account) |
Returns the active status for this account. | |
PurpleStatus * | purple_account_get_status (const PurpleAccount *account, const char *status_id) |
Returns the account status with the specified ID. | |
PurpleStatusType * | purple_account_get_status_type (const PurpleAccount *account, const char *id) |
Returns the account status type with the specified ID. | |
PurpleStatusType * | purple_account_get_status_type_with_primitive (const PurpleAccount *account, PurpleStatusPrimitive primitive) |
Returns the account status type with the specified primitive. | |
PurplePresence * | purple_account_get_presence (const PurpleAccount *account) |
Returns the account's presence. | |
gboolean | purple_account_is_status_active (const PurpleAccount *account, const char *status_id) |
Returns whether or not an account status is active. | |
GList * | purple_account_get_status_types (const PurpleAccount *account) |
Returns the account's status types. | |
int | purple_account_get_int (const PurpleAccount *account, const char *name, int default_value) |
Returns a protocol-specific integer setting for an account. | |
const char * | purple_account_get_string (const PurpleAccount *account, const char *name, const char *default_value) |
Returns a protocol-specific string setting for an account. | |
gboolean | purple_account_get_bool (const PurpleAccount *account, const char *name, gboolean default_value) |
Returns a protocol-specific boolean setting for an account. | |
int | purple_account_get_ui_int (const PurpleAccount *account, const char *ui, const char *name, int default_value) |
Returns a UI-specific integer setting for an account. | |
const char * | purple_account_get_ui_string (const PurpleAccount *account, const char *ui, const char *name, const char *default_value) |
Returns a UI-specific string setting for an account. | |
gboolean | purple_account_get_ui_bool (const PurpleAccount *account, const char *ui, const char *name, gboolean default_value) |
Returns a UI-specific boolean setting for an account. | |
PurpleLog * | purple_account_get_log (PurpleAccount *account, gboolean create) |
Returns the system log for an account. | |
void | purple_account_destroy_log (PurpleAccount *account) |
Frees the system log of an account. | |
void | purple_account_add_buddy (PurpleAccount *account, PurpleBuddy *buddy) |
Adds a buddy to the server-side buddy list for the specified account. | |
void | purple_account_add_buddies (PurpleAccount *account, GList *buddies) |
Adds a list of buddies to the server-side buddy list. | |
void | purple_account_remove_buddy (PurpleAccount *account, PurpleBuddy *buddy, PurpleGroup *group) |
Removes a buddy from the server-side buddy list. | |
void | purple_account_remove_buddies (PurpleAccount *account, GList *buddies, GList *groups) |
Removes a list of buddies from the server-side buddy list. | |
void | purple_account_remove_group (PurpleAccount *account, PurpleGroup *group) |
Removes a group from the server-side buddy list. | |
void | purple_account_change_password (PurpleAccount *account, const char *orig_pw, const char *new_pw) |
Changes the password on the specified account. | |
gboolean | purple_account_supports_offline_message (PurpleAccount *account, PurpleBuddy *buddy) |
Whether the account supports sending offline messages to buddy. | |
const PurpleConnectionErrorInfo * | purple_account_get_current_error (PurpleAccount *account) |
Get the error that caused the account to be disconnected, or NULL if the account is happily connected or disconnected without an error. | |
void | purple_account_clear_current_error (PurpleAccount *account) |
Clear an account's current error state, resetting it to NULL . | |
Accounts API | |
void | purple_accounts_add (PurpleAccount *account) |
Adds an account to the list of accounts. | |
void | purple_accounts_remove (PurpleAccount *account) |
Removes an account from the list of accounts. | |
void | purple_accounts_delete (PurpleAccount *account) |
Deletes an account. | |
void | purple_accounts_reorder (PurpleAccount *account, gint new_index) |
Reorders an account. | |
GList * | purple_accounts_get_all (void) |
Returns a list of all accounts. | |
GList * | purple_accounts_get_all_active (void) |
Returns a list of all enabled accounts. | |
PurpleAccount * | purple_accounts_find (const char *name, const char *protocol) |
Finds an account with the specified name and protocol id. | |
void | purple_accounts_restore_current_statuses (void) |
This is called by the core after all subsystems and what not have been initialized. | |
UI Registration Functions | |
void | purple_accounts_set_ui_ops (PurpleAccountUiOps *ops) |
Sets the UI operations structure to be used for accounts. | |
PurpleAccountUiOps * | purple_accounts_get_ui_ops (void) |
Returns the UI operations structure used for accounts. | |
Accounts Subsystem | |
void * | purple_accounts_get_handle (void) |
Returns the accounts subsystem handle. | |
void | purple_accounts_init (void) |
Initializes the accounts subsystem. | |
void | purple_accounts_uninit (void) |
Uninitializes the accounts subsystem. | |
Typedefs | |
typedef _PurpleAccountUiOps | PurpleAccountUiOps |
| |
typedef _PurpleAccount | PurpleAccount |
| |
typedef gboolean(* | PurpleFilterAccountFunc )(PurpleAccount *account) |
typedef void(* | PurpleAccountRequestAuthorizationCb )(void *) |
typedef void(* | PurpleAccountRegistrationCb )(PurpleAccount *account, gboolean succeeded, void *user_data) |
typedef void(* | PurpleAccountUnregistrationCb )(PurpleAccount *account, gboolean succeeded, void *user_data) |
Enumerations | |
enum | PurpleAccountRequestType { PURPLE_ACCOUNT_REQUEST_AUTHORIZATION = 0 } |
Account request types. |
Definition in file account.h.
|
Adds a list of buddies to the server-side buddy list.
|
|
Adds a buddy to the server-side buddy list for the specified account.
|
|
Changes the password on the specified account.
|
|
Clear an account's current error state, resetting it to
|
|
Clears all protocol-specific settings on an account.
|
|
Connects to an account.
|
|
Destroys an account.
|
|
Frees the system log of an account.
|
|
Disconnects from an account.
|
|
Returns the active status for this account. This looks through the PurplePresence associated with this account and returns the PurpleStatus that has its active flag set to "TRUE." There can be only one active PurpleStatus in a PurplePresence.
|
|
Returns the account's alias.
|
|
Returns a protocol-specific boolean setting for an account.
|
|
Gets the account's buddy icon path.
|
|
Returns whether or not this account should check for mail.
|
|
Returns the account's connection.
|
|
Get the error that caused the account to be disconnected, or
|
|
Returns whether or not this account is enabled for the specified UI.
|
|
Returns a protocol-specific integer setting for an account.
|
|
Returns the system log for an account.
|
|
Returns the account's password.
|
|
Returns the account's presence.
|
|
Returns the account's protocol ID.
|
|
Returns the account's protocol name.
|
|
Returns the account's proxy information.
|
|
Returns whether or not this account should save its password.
|
|
Returns the account status with the specified ID. Note that this works differently than purple_buddy_get_status() in that it will only return NULL if the status was not registered.
|
|
Returns the account status type with the specified ID.
|
|
Returns the account status type with the specified primitive. Note: It is possible for an account to have more than one PurpleStatusType with the same primitive. In this case, the first PurpleStatusType is returned.
|
|
Returns the account's status types.
|
|
Returns a protocol-specific string setting for an account.
|
|
Returns a UI-specific boolean setting for an account.
|
|
Returns a UI-specific integer setting for an account.
|
|
Returns a UI-specific string setting for an account.
|
|
Returns the account's user information.
|
|
Returns the account's username.
|
|
Returns whether or not the account is connected.
|
|
Returns whether or not the account is connecting.
|
|
Returns whether or not the account is disconnected.
|
|
Returns whether or not an account status is active.
|
|
Creates a new account.
|
|
Notifies the user that the account was added to a remote user's buddy list. This will present a dialog informing the user that he was added to the remote user's buddy list.
|
|
Registers an account.
|
|
Removes a list of buddies from the server-side buddy list.
|
|
Removes a buddy from the server-side buddy list.
|
|
Removes a group from the server-side buddy list.
|
|
Notifies the user that the account was addded to a remote user's buddy list and asks ther user if they want to add the remote user to their buddy list. This will present a dialog informing the local user that the remote user added them to the remote user's buddy list and will ask if they want to add the remote user to the buddy list.
|
|
Notifies the user that a remote user has wants to add the local user to his or her buddy list and requires authorization to do so. This will present a dialog informing the user of this and ask if the user authorizes or denies the remote user from adding him.
|
|
Requests information from the user to change the account's password.
|
|
Requests information from the user to change the account's user information.
|
|
Close the account request for the given ui handle.
|
|
Close account requests registered for the given PurpleAccount.
|
|
Requests a password from the user for the account. Does not set the account password on success; do that in ok_cb if desired.
|
|
Sets the account's alias.
|
|
Sets a protocol-specific boolean setting for an account.
|
|
Sets the account's buddy icon path.
|
|
Sets whether or not this account should check for mail.
|
|
Sets the account's connection.
|
|
Sets whether or not this account is enabled for the specified UI.
|
|
Sets a protocol-specific integer setting for an account.
|
|
Sets the account's password.
|
|
Sets the account's protocol ID.
|
|
Sets the account's proxy information.
|
|
Sets the callback for successful registration.
|
|
Sets whether or not this account should save its password.
|
|
Variadic version of purple_account_set_status_list(); the variadic list replaces attrs, and should be All changes to the statuses of an account go through this function or purple_account_set_status().
You can only deactivate an exclusive status by activating another exclusive status. So, if status_id is an exclusive status and active is
|
|
Activates or deactivates a status. All changes to the statuses of an account go through this function or purple_account_set_status().
You can only deactivate an exclusive status by activating another exclusive status. So, if status_id is an exclusive status and active is
|
|
Sets the account's status types.
|
|
Sets a protocol-specific string setting for an account.
|
|
Sets a UI-specific boolean setting for an account.
|
|
Sets a UI-specific integer setting for an account.
|
|
Sets a UI-specific string setting for an account.
|
|
Sets the account's user information.
|
|
Sets the account's username.
|
|
Whether the account supports sending offline messages to buddy.
|
|
Unregisters an account (deleting it from the server).
|
|
Adds an account to the list of accounts.
|
|
Deletes an account. This will remove any buddies from the buddy list that belong to this account, buddy pounces that belong to this account, and will also destroy account.
|
|
Finds an account with the specified name and protocol id.
|
|
Returns a list of all accounts.
|
|
Returns a list of all enabled accounts.
|
|
Returns the accounts subsystem handle.
|
|
Returns the UI operations structure used for accounts.
|
|
Removes an account from the list of accounts.
|
|
Reorders an account.
|
|
This is called by the core after all subsystems and what not have been initialized. It sets all enabled accounts to their startup status by signing them on, setting them away, etc. You probably shouldn't call this unless you really know what you're doing. |
|
Sets the UI operations structure to be used for accounts.
|