account.h
Go to the documentation of this file.
/* purple
*
* Purple is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef _PURPLE_ACCOUNT_H_
#define _PURPLE_ACCOUNT_H_
#include <glib.h>
#include <glib-object.h>
typedef struct _PurpleAccountUiOps PurpleAccountUiOps;
typedef struct _PurpleAccountPrefsUiOps PurpleAccountPrefsUiOps;
typedef struct _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);
typedef void (*PurpleSetPublicAliasSuccessCallback)(PurpleAccount *account, const char *new_alias);
typedef void (*PurpleSetPublicAliasFailureCallback)(PurpleAccount *account, const char *error);
typedef void (*PurpleGetPublicAliasSuccessCallback)(PurpleAccount *account, const char *alias);
typedef void (*PurpleGetPublicAliasFailureCallback)(PurpleAccount *account, const char *error);
#include "connection.h"
#include "log.h"
#include "privacy.h"
#include "proxy.h"
#include "prpl.h"
#include "status.h"
typedef enum
{
PURPLE_ACCOUNT_REQUEST_AUTHORIZATION = 0 /* Account authorization request */
} PurpleAccountRequestType;
typedef enum
{
PURPLE_ACCOUNT_RESPONSE_IGNORE = -2,
PURPLE_ACCOUNT_RESPONSE_DENY = -1,
PURPLE_ACCOUNT_RESPONSE_PASS = 0,
PURPLE_ACCOUNT_RESPONSE_ACCEPT = 1
} PurpleAccountRequestResponse;
struct _PurpleAccountUiOps
{
void (*notify_added)(PurpleAccount *account,
const char *remote_user,
const char *id,
const char *alias,
const char *message);
void (*status_changed)(PurpleAccount *account,
PurpleStatus *status);
void (*request_add)(PurpleAccount *account,
const char *remote_user,
const char *id,
const char *alias,
const char *message);
void *(*request_authorize)(PurpleAccount *account,
const char *remote_user,
const char *id,
const char *alias,
const char *message,
gboolean on_list,
PurpleAccountRequestAuthorizationCb authorize_cb,
PurpleAccountRequestAuthorizationCb deny_cb,
void *user_data);
void (*close_account_request)(void *ui_handle);
void (*_purple_reserved1)(void);
void (*_purple_reserved2)(void);
void (*_purple_reserved3)(void);
void (*_purple_reserved4)(void);
};
struct _PurpleAccountPrefsUiOps
{
void (*set_int)(PurpleAccount *account, const char *name, int value);
void (*set_string)(PurpleAccount *account, const char *name, const char *value);
void (*set_bool)(PurpleAccount *account, const char *name, gboolean value);
void (*load)(void);
void (*save)(void);
void (*schedule_save)(void);
void (*_purple_reserved1)(void);
void (*_purple_reserved2)(void);
void (*_purple_reserved3)(void);
void (*_purple_reserved4)(void);
};
struct _PurpleAccount
{
char *username;
char *alias;
char *password;
char *user_info;
char *buddy_icon_path;
gboolean remember_pass;
char *protocol_id;
PurpleConnection *gc;
gboolean disconnecting;
GHashTable *settings;
GHashTable *ui_settings;
PurpleProxyInfo *proxy_info;
/* to NULL when the account inherits */
/* proxy settings from global prefs. */
/*
* TODO: Supplementing the next two linked lists with hash tables
* should help performance a lot when these lists are long. This
* matters quite a bit for protocols, where all your
* buddies are added to your permit list. Currently we have to
* iterate through the entire list if we want to check if someone
* is permitted or denied. We should do this for 3.0.0.
* Or maybe use a GTree.
*/
GSList *permit;
GSList *deny;
PurplePrivacyType perm_deny;
GList *status_types;
PurplePresence *presence;
PurpleLog *system_log;
void *ui_data;
PurpleAccountRegistrationCb registration_cb;
void *registration_cb_user_data;
gpointer priv;
};
#ifdef __cplusplus
extern "C" {
#endif
/**************************************************************************/
/**************************************************************************/
PurpleAccount *purple_account_new(const char *username, const char *protocol_id);
void purple_account_destroy(PurpleAccount *account);
void purple_account_connect(PurpleAccount *account);
void purple_account_set_register_callback(PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data);
void purple_account_register(PurpleAccount *account);
void purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data);
void purple_account_disconnect(PurpleAccount *account);
void purple_account_notify_added(PurpleAccount *account, const char *remote_user,
const char *id, const char *alias,
const char *message);
void purple_account_request_add(PurpleAccount *account, const char *remote_user,
const char *id, const char *alias,
const char *message);
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);
void purple_account_request_close_with_account(PurpleAccount *account);
void purple_account_request_close(void *ui_handle);
void purple_account_request_password(PurpleAccount *account, GCallback ok_cb,
GCallback cancel_cb, void *user_data);
void purple_account_request_change_password(PurpleAccount *account);
void purple_account_request_change_user_info(PurpleAccount *account);
void purple_account_set_username(PurpleAccount *account, const char *username);
void purple_account_set_password(PurpleAccount *account, const char *password);
void purple_account_set_alias(PurpleAccount *account, const char *alias);
void purple_account_set_user_info(PurpleAccount *account, const char *user_info);
void purple_account_set_buddy_icon_path(PurpleAccount *account, const char *path);
void purple_account_set_protocol_id(PurpleAccount *account,
const char *protocol_id);
void purple_account_set_connection(PurpleAccount *account, PurpleConnection *gc);
void purple_account_set_remember_password(PurpleAccount *account, gboolean value);
void purple_account_set_check_mail(PurpleAccount *account, gboolean value);
void purple_account_set_enabled(PurpleAccount *account, const char *ui,
gboolean value);
void purple_account_set_proxy_info(PurpleAccount *account, PurpleProxyInfo *info);
void purple_account_set_privacy_type(PurpleAccount *account, PurplePrivacyType privacy_type);
void purple_account_set_status_types(PurpleAccount *account, GList *status_types);
void purple_account_set_status(PurpleAccount *account, const char *status_id,
gboolean active, ...) G_GNUC_NULL_TERMINATED;
void purple_account_set_status_list(PurpleAccount *account,
const char *status_id, gboolean active, GList *attrs);
void purple_account_set_public_alias(PurpleAccount *account,
const char *alias, PurpleSetPublicAliasSuccessCallback success_cb,
PurpleSetPublicAliasFailureCallback failure_cb);
void purple_account_get_public_alias(PurpleAccount *account,
PurpleGetPublicAliasSuccessCallback success_cb,
PurpleGetPublicAliasFailureCallback failure_cb);
gboolean purple_account_get_silence_suppression(const PurpleAccount *account);
void purple_account_set_silence_suppression(PurpleAccount *account,
gboolean value);
void purple_account_clear_settings(PurpleAccount *account);
void purple_account_remove_setting(PurpleAccount *account, const char *setting);
void purple_account_set_int(PurpleAccount *account, const char *name, int value);
void purple_account_set_string(PurpleAccount *account, const char *name,
const char *value);
void purple_account_set_bool(PurpleAccount *account, const char *name,
gboolean value);
void purple_account_set_ui_int(PurpleAccount *account, const char *ui,
const char *name, int value);
void purple_account_set_ui_string(PurpleAccount *account, const char *ui,
const char *name, const char *value);
void purple_account_set_ui_bool(PurpleAccount *account, const char *ui,
const char *name, gboolean value);
gboolean purple_account_is_connected(const PurpleAccount *account);
gboolean purple_account_is_connecting(const PurpleAccount *account);
gboolean purple_account_is_disconnected(const PurpleAccount *account);
const char *purple_account_get_username(const PurpleAccount *account);
const char *purple_account_get_password(const PurpleAccount *account);
const char *purple_account_get_alias(const PurpleAccount *account);
const char *purple_account_get_user_info(const PurpleAccount *account);
const char *purple_account_get_buddy_icon_path(const PurpleAccount *account);
const char *purple_account_get_protocol_id(const PurpleAccount *account);
const char *purple_account_get_protocol_name(const PurpleAccount *account);
PurpleConnection *purple_account_get_connection(const PurpleAccount *account);
const gchar *purple_account_get_name_for_display(const PurpleAccount *account);
gboolean purple_account_get_remember_password(const PurpleAccount *account);
gboolean purple_account_get_check_mail(const PurpleAccount *account);
gboolean purple_account_get_enabled(const PurpleAccount *account,
const char *ui);
PurpleProxyInfo *purple_account_get_proxy_info(const PurpleAccount *account);
PurplePrivacyType purple_account_get_privacy_type(const PurpleAccount *account);
PurpleStatus *purple_account_get_active_status(const PurpleAccount *account);
PurpleStatus *purple_account_get_status(const PurpleAccount *account,
const char *status_id);
PurpleStatusType *purple_account_get_status_type(const PurpleAccount *account,
const char *id);
PurpleStatusType *purple_account_get_status_type_with_primitive(
const PurpleAccount *account,
PurpleStatusPrimitive primitive);
PurplePresence *purple_account_get_presence(const PurpleAccount *account);
gboolean purple_account_is_status_active(const PurpleAccount *account,
const char *status_id);
GList *purple_account_get_status_types(const PurpleAccount *account);
int purple_account_get_int(const PurpleAccount *account, const char *name,
int default_value);
const char *purple_account_get_string(const PurpleAccount *account,
const char *name,
const char *default_value);
gboolean purple_account_get_bool(const PurpleAccount *account, const char *name,
gboolean default_value);
int purple_account_get_ui_int(const PurpleAccount *account, const char *ui,
const char *name, int default_value);
const char *purple_account_get_ui_string(const PurpleAccount *account,
const char *ui, const char *name,
const char *default_value);
gboolean purple_account_get_ui_bool(const PurpleAccount *account, const char *ui,
const char *name, gboolean default_value);
PurpleLog *purple_account_get_log(PurpleAccount *account, gboolean create);
void purple_account_destroy_log(PurpleAccount *account);
void purple_account_add_buddy(PurpleAccount *account, PurpleBuddy *buddy);
void purple_account_add_buddy_with_invite(PurpleAccount *account, PurpleBuddy *buddy, const char *message);
void purple_account_add_buddies(PurpleAccount *account, GList *buddies);
void purple_account_add_buddies_with_invite(PurpleAccount *account, GList *buddies, const char *message);
void purple_account_remove_buddy(PurpleAccount *account, PurpleBuddy *buddy,
PurpleGroup *group);
void purple_account_remove_buddies(PurpleAccount *account, GList *buddies,
GList *groups);
void purple_account_remove_group(PurpleAccount *account, PurpleGroup *group);
void purple_account_change_password(PurpleAccount *account, const char *orig_pw,
const char *new_pw);
gboolean purple_account_supports_offline_message(PurpleAccount *account, PurpleBuddy *buddy);
const PurpleConnectionErrorInfo *purple_account_get_current_error(PurpleAccount *account);
void purple_account_clear_current_error(PurpleAccount *account);
/**************************************************************************/
/**************************************************************************/
void purple_accounts_add(PurpleAccount *account);
void purple_accounts_remove(PurpleAccount *account);
void purple_accounts_delete(PurpleAccount *account);
void purple_accounts_reorder(PurpleAccount *account, gint new_index);
GList *purple_accounts_get_all(void);
GList *purple_accounts_get_all_active(void);
PurpleAccount *purple_accounts_find(const char *name, const char *protocol);
void purple_accounts_restore_current_statuses(void);
/**************************************************************************/
/**************************************************************************/
void purple_accounts_set_ui_ops(PurpleAccountUiOps *ops);
PurpleAccountUiOps *purple_accounts_get_ui_ops(void);
void purple_account_prefs_set_ui_ops(PurpleAccountPrefsUiOps *ops);
PurpleAccountPrefsUiOps *purple_account_prefs_get_ui_ops(void);
/**************************************************************************/
/**************************************************************************/
void *purple_accounts_get_handle(void);
void purple_accounts_init(void);
void purple_accounts_uninit(void);
#ifdef __cplusplus
}
#endif
#endif /* _PURPLE_ACCOUNT_H_ */
purple_account_set_string
void purple_account_set_string(PurpleAccount *account, const char *name, const char *value)
Sets a protocol-specific string setting for an account.
_PurpleAccount::protocol_id
char * protocol_id
The ID of the protocol.
Definition: account.h:180
purple_account_new
PurpleAccount * purple_account_new(const char *username, const char *protocol_id)
Creates a new account.
PurpleProxyInfo
Information on proxy settings.
Definition: proxy.h:50
prpl.h
purple_account_prefs_set_ui_ops
void purple_account_prefs_set_ui_ops(PurpleAccountPrefsUiOps *ops)
Sets the UI operations structure to be used for account preferences.
_PurpleAccount::status_types
GList * status_types
Status types.
Definition: account.h:205
PurpleAccountRequestType
PurpleAccountRequestType
Account request types.
Definition: account.h:59
purple_account_get_ui_bool
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.
_PurpleAccount::username
char * username
The username.
Definition: account.h:171
purple_account_set_privacy_type
void purple_account_set_privacy_type(PurpleAccount *account, PurplePrivacyType privacy_type)
Sets the account's privacy type.
purple_account_clear_settings
void purple_account_clear_settings(PurpleAccount *account)
Clears all protocol-specific settings on an account.
purple_account_remove_buddies
void purple_account_remove_buddies(PurpleAccount *account, GList *buddies, GList *groups)
Removes a list of buddies from the server-side buddy list.
purple_account_unregister
void purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data)
Unregisters an account (deleting it from the server).
_PurpleAccountUiOps::request_add
void(* request_add)(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message)
Someone we don't have on our list added us; prompt to add them.
Definition: account.h:94
purple_account_set_status
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,...
purple_account_register
void purple_account_register(PurpleAccount *account)
Registers an account.
purple_account_add_buddy_with_invite
void purple_account_add_buddy_with_invite(PurpleAccount *account, PurpleBuddy *buddy, const char *message)
Adds a buddy to the server-side buddy list for the specified account.
purple_account_get_proxy_info
PurpleProxyInfo * purple_account_get_proxy_info(const PurpleAccount *account)
Returns the account's proxy information.
PurpleStatusType
struct _PurpleStatusType PurpleStatusType
PurpleStatusType's are created by each PRPL.
Definition: status.h:85
purple_account_set_user_info
void purple_account_set_user_info(PurpleAccount *account, const char *user_info)
Sets the account's user information.
_PurpleAccount::password
char * password
The account password.
Definition: account.h:173
_PurpleLog
A log.
Definition: log.h:123
purple_account_get_public_alias
void purple_account_get_public_alias(PurpleAccount *account, PurpleGetPublicAliasSuccessCallback success_cb, PurpleGetPublicAliasFailureCallback failure_cb)
Fetch the server-side (public) alias for this account.
_PurpleAccount::disconnecting
gboolean disconnecting
The account is currently disconnecting.
Definition: account.h:183
purple_account_connect
void purple_account_connect(PurpleAccount *account)
Connects to an account.
purple_account_get_int
int purple_account_get_int(const PurpleAccount *account, const char *name, int default_value)
Returns a protocol-specific integer setting for an account.
_PurpleAccountPrefsUiOps::save
void(* save)(void)
If this is set, accounts.xml saving will be disabled and this function will be called instead.
Definition: account.h:154
_PurpleAccountUiOps::notify_added
void(* notify_added)(PurpleAccount *account, const char *remote_user, const char *id, const char *alias, const char *message)
A buddy who is already on this account's buddy list added this account to their buddy list.
Definition: account.h:83
purple_account_clear_current_error
void purple_account_clear_current_error(PurpleAccount *account)
Clear an account's current error state, resetting it to NULL.
_PurpleAccount::ui_data
void * ui_data
The UI can put data here.
Definition: account.h:210
_PurpleAccount::deny
GSList * deny
Deny list.
Definition: account.h:202
purple_account_set_proxy_info
void purple_account_set_proxy_info(PurpleAccount *account, PurpleProxyInfo *info)
Sets the account's proxy information.
purple_account_get_password
const char * purple_account_get_password(const PurpleAccount *account)
Returns the account's password.
purple_account_remove_buddy
void purple_account_remove_buddy(PurpleAccount *account, PurpleBuddy *buddy, PurpleGroup *group)
Removes a buddy from the server-side buddy list.
purple_accounts_reorder
void purple_accounts_reorder(PurpleAccount *account, gint new_index)
Reorders an account.
_PurpleAccount::remember_pass
gboolean remember_pass
Remember the password.
Definition: account.h:178
purple_account_get_log
PurpleLog * purple_account_get_log(PurpleAccount *account, gboolean create)
Returns the system log for an account.
purple_account_get_remember_password
gboolean purple_account_get_remember_password(const PurpleAccount *account)
Returns whether or not this account should save its password.
_PurpleAccount::gc
PurpleConnection * gc
The connection handle.
Definition: account.h:182
_PurpleAccount::system_log
PurpleLog * system_log
The system log
Definition: account.h:208
purple_account_get_active_status
PurpleStatus * purple_account_get_active_status(const PurpleAccount *account)
Returns the active status for this account.
purple_account_add_buddies
void purple_account_add_buddies(PurpleAccount *account, GList *buddies)
Adds a list of buddies to the server-side buddy list.
purple_account_get_protocol_name
const char * purple_account_get_protocol_name(const PurpleAccount *account)
Returns the account's protocol name.
purple_account_get_buddy_icon_path
const char * purple_account_get_buddy_icon_path(const PurpleAccount *account)
Gets the account's buddy icon path.
purple_accounts_get_handle
void * purple_accounts_get_handle(void)
Returns the accounts subsystem handle.
purple_account_notify_added
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.
_PurpleAccountPrefsUiOps
Account prefs UI operations, to allow the UI to catch account preference changes.
Definition: account.h:135
purple_account_set_check_mail
void purple_account_set_check_mail(PurpleAccount *account, gboolean value)
Sets whether or not this account should check for mail.
purple_account_set_status_types
void purple_account_set_status_types(PurpleAccount *account, GList *status_types)
Sets the account's status types.
purple_account_set_bool
void purple_account_set_bool(PurpleAccount *account, const char *name, gboolean value)
Sets a protocol-specific boolean setting for an account.
purple_account_is_connecting
gboolean purple_account_is_connecting(const PurpleAccount *account)
Returns whether or not the account is connecting.
purple_account_change_password
void purple_account_change_password(PurpleAccount *account, const char *orig_pw, const char *new_pw)
Changes the password on the specified account.
purple_accounts_init
void purple_accounts_init(void)
Initializes the accounts subsystem.
purple_account_supports_offline_message
gboolean purple_account_supports_offline_message(PurpleAccount *account, PurpleBuddy *buddy)
Whether the account supports sending offline messages to buddy.
purple_account_request_close
void purple_account_request_close(void *ui_handle)
Close the account request for the given ui handle.
_PurpleAccount::alias
char * alias
How you appear to yourself.
Definition: account.h:172
purple_account_get_user_info
const char * purple_account_get_user_info(const PurpleAccount *account)
Returns the account's user information.
purple_account_get_ui_int
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.
purple_account_get_string
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.
purple_account_set_protocol_id
void purple_account_set_protocol_id(PurpleAccount *account, const char *protocol_id)
Sets the account's protocol ID.
purple_account_destroy_log
void purple_account_destroy_log(PurpleAccount *account)
Frees the system log of an account.
_PurpleAccountUiOps::status_changed
void(* status_changed)(PurpleAccount *account, PurpleStatus *status)
This account's status changed.
Definition: account.h:90
purple_account_request_change_password
void purple_account_request_change_password(PurpleAccount *account)
Requests information from the user to change the account's password.
purple_account_set_public_alias
void purple_account_set_public_alias(PurpleAccount *account, const char *alias, PurpleSetPublicAliasSuccessCallback success_cb, PurpleSetPublicAliasFailureCallback failure_cb)
Set a server-side (public) alias for this account.
purple_account_request_add
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 the...
_PurpleAccountPrefsUiOps::schedule_save
void(* schedule_save)(void)
If this is set, the UI will handle scheduling the timer to call the save function,...
Definition: account.h:159
purple_account_remove_setting
void purple_account_remove_setting(PurpleAccount *account, const char *setting)
Removes an account-specific setting by name.
purple_account_set_enabled
void purple_account_set_enabled(PurpleAccount *account, const char *ui, gboolean value)
Sets whether or not this account is enabled for the specified UI.
purple_account_set_ui_string
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.
purple_account_get_connection
PurpleConnection * purple_account_get_connection(const PurpleAccount *account)
Returns the account's connection.
purple_account_get_status_type_with_primitive
PurpleStatusType * purple_account_get_status_type_with_primitive(const PurpleAccount *account, PurpleStatusPrimitive primitive)
Returns the account status type with the specified primitive.
purple_account_get_status_types
GList * purple_account_get_status_types(const PurpleAccount *account)
Returns the account's status types.
purple_account_set_status_list
void purple_account_set_status_list(PurpleAccount *account, const char *status_id, gboolean active, GList *attrs)
Activates or deactivates a status.
purple_account_request_change_user_info
void purple_account_request_change_user_info(PurpleAccount *account)
Requests information from the user to change the account's user information.
purple_accounts_get_all
GList * purple_accounts_get_all(void)
Returns a list of all accounts.
_PurpleAccount
Structure representing an account.
Definition: account.h:169
_PurpleAccount::proxy_info
PurpleProxyInfo * proxy_info
Proxy information.
Definition: account.h:188
_PurpleAccountPrefsUiOps::set_string
void(* set_string)(PurpleAccount *account, const char *name, const char *value)
Notifies the UI that a string account setting was set.
Definition: account.h:141
_PurpleAccountUiOps
Account UI operations, used to notify the user of status changes and when buddies add this account to...
Definition: account.h:78
purple_account_set_connection
void purple_account_set_connection(PurpleAccount *account, PurpleConnection *gc)
Sets the account's connection.
purple_account_get_privacy_type
PurplePrivacyType purple_account_get_privacy_type(const PurpleAccount *account)
Returns the account's privacy type.
PurpleStatusPrimitive
PurpleStatusPrimitive
A primitive defining the basic structure of a status type.
Definition: status.h:117
purple_account_set_password
void purple_account_set_password(PurpleAccount *account, const char *password)
Sets the account's password.
purple_account_get_name_for_display
const gchar * purple_account_get_name_for_display(const PurpleAccount *account)
Returns a name for this account appropriate for display to the user.
purple_account_get_current_error
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...
proxy.h
PurpleConnectionErrorInfo
Holds the type of an error along with its description.
Definition: connection.h:139
purple_account_request_password
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.
_PurpleGroup
A group.
Definition: blist.h:167
purple_account_set_register_callback
void purple_account_set_register_callback(PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data)
Sets the callback for successful registration.
purple_account_set_username
void purple_account_set_username(PurpleAccount *account, const char *username)
Sets the account's username.
log.h
connection.h
_PurpleAccountPrefsUiOps::set_bool
void(* set_bool)(PurpleAccount *account, const char *name, gboolean value)
Notifies the UI that a boolean account setting was set.
Definition: account.h:144
purple_account_get_ui_string
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.
_PurpleAccountUiOps::close_account_request
void(* close_account_request)(void *ui_handle)
Close a pending request for authorization.
Definition: account.h:118
purple_account_request_authorization
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 req...
purple_account_disconnect
void purple_account_disconnect(PurpleAccount *account)
Disconnects from an account.
_PurpleAccountPrefsUiOps::set_int
void(* set_int)(PurpleAccount *account, const char *name, int value)
Notifies the UI that an integer account setting was set.
Definition: account.h:138
_PurpleAccount::user_info
char * user_info
User information.
Definition: account.h:174
purple_accounts_remove
void purple_accounts_remove(PurpleAccount *account)
Removes an account from the list of accounts.
purple_account_destroy
void purple_account_destroy(PurpleAccount *account)
Destroys an account.
purple_accounts_uninit
void purple_accounts_uninit(void)
Uninitializes the accounts subsystem.
purple_account_prefs_get_ui_ops
PurpleAccountPrefsUiOps * purple_account_prefs_get_ui_ops(void)
Returns the UI operations structure used for account preferences.
_PurpleAccount::settings
GHashTable * settings
Protocol-specific settings.
Definition: account.h:185
_PurpleAccount::priv
gpointer priv
Pointer to opaque private data.
Definition: account.h:214
purple_account_get_status
PurpleStatus * purple_account_get_status(const PurpleAccount *account, const char *status_id)
Returns the account status with the specified ID.
PurpleAccountRequestResponse
PurpleAccountRequestResponse
Account request response types.
Definition: account.h:67
purple_account_set_ui_bool
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.
purple_account_set_buddy_icon_path
void purple_account_set_buddy_icon_path(PurpleAccount *account, const char *path)
Sets the account's buddy icon path.
_PurpleAccount::perm_deny
PurplePrivacyType perm_deny
The permit/deny setting.
Definition: account.h:203
purple_accounts_set_ui_ops
void purple_accounts_set_ui_ops(PurpleAccountUiOps *ops)
Sets the UI operations structure to be used for accounts.
purple_account_get_alias
const char * purple_account_get_alias(const PurpleAccount *account)
Returns the account's alias.
_PurpleAccount::presence
PurplePresence * presence
Presence.
Definition: account.h:207
privacy.h
purple_accounts_restore_current_statuses
void purple_accounts_restore_current_statuses(void)
This is called by the core after all subsystems and what not have been initialized.
purple_accounts_add
void purple_accounts_add(PurpleAccount *account)
Adds an account to the list of accounts.
purple_account_add_buddies_with_invite
void purple_account_add_buddies_with_invite(PurpleAccount *account, GList *buddies, const char *message)
Adds a list of buddies to the server-side buddy list.
PurplePrivacyType
enum _PurplePrivacyType PurplePrivacyType
Privacy data types.
purple_account_set_silence_suppression
void purple_account_set_silence_suppression(PurpleAccount *account, gboolean value)
Sets whether silence suppression is used during voice call.
purple_account_get_bool
gboolean purple_account_get_bool(const PurpleAccount *account, const char *name, gboolean default_value)
Returns a protocol-specific boolean setting for an account.
purple_account_set_alias
void purple_account_set_alias(PurpleAccount *account, const char *alias)
Sets the account's alias.
_PurpleAccount::buddy_icon_path
char * buddy_icon_path
The buddy icon's non-cached path.
Definition: account.h:176
_PurpleAccountPrefsUiOps::load
void(* load)(void)
If this is set, accounts.xml loading will be disabled and this function will be called instead.
Definition: account.h:149
purple_account_set_int
void purple_account_set_int(PurpleAccount *account, const char *name, int value)
Sets a protocol-specific integer setting for an account.
purple_account_get_enabled
gboolean purple_account_get_enabled(const PurpleAccount *account, const char *ui)
Returns whether or not this account is enabled for the specified UI.
purple_account_is_connected
gboolean purple_account_is_connected(const PurpleAccount *account)
Returns whether or not the account is connected.
purple_account_is_status_active
gboolean purple_account_is_status_active(const PurpleAccount *account, const char *status_id)
Returns whether or not an account status is active.
purple_account_set_ui_int
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.
purple_account_get_username
const char * purple_account_get_username(const PurpleAccount *account)
Returns the account's username.
_PurpleConnection
Definition: connection.h:245
purple_account_add_buddy
void purple_account_add_buddy(PurpleAccount *account, PurpleBuddy *buddy)
Adds a buddy to the server-side buddy list for the specified account.
_PurpleAccount::ui_settings
GHashTable * ui_settings
UI-specific settings.
Definition: account.h:186
_PurpleAccount::permit
GSList * permit
Permit list.
Definition: account.h:201
purple_account_get_check_mail
gboolean purple_account_get_check_mail(const PurpleAccount *account)
Returns whether or not this account should check for mail.
purple_accounts_find
PurpleAccount * purple_accounts_find(const char *name, const char *protocol)
Finds an account with the specified name and protocol id.
purple_account_get_status_type
PurpleStatusType * purple_account_get_status_type(const PurpleAccount *account, const char *id)
Returns the account status type with the specified ID.
purple_accounts_get_all_active
GList * purple_accounts_get_all_active(void)
Returns a list of all enabled accounts.
purple_account_get_protocol_id
const char * purple_account_get_protocol_id(const PurpleAccount *account)
Returns the account's protocol ID.
purple_account_get_silence_suppression
gboolean purple_account_get_silence_suppression(const PurpleAccount *account)
Return whether silence suppression is used during voice call.
purple_account_get_presence
PurplePresence * purple_account_get_presence(const PurpleAccount *account)
Returns the account's presence.
_PurpleBuddy
A buddy.
Definition: blist.h:138
purple_account_remove_group
void purple_account_remove_group(PurpleAccount *account, PurpleGroup *group)
Removes a group from the server-side buddy list.
purple_account_is_disconnected
gboolean purple_account_is_disconnected(const PurpleAccount *account)
Returns whether or not the account is disconnected.
purple_accounts_get_ui_ops
PurpleAccountUiOps * purple_accounts_get_ui_ops(void)
Returns the UI operations structure used for accounts.
status.h
purple_account_request_close_with_account
void purple_account_request_close_with_account(PurpleAccount *account)
Close account requests registered for the given PurpleAccount.
purple_accounts_delete
void purple_accounts_delete(PurpleAccount *account)
Deletes an account.
purple_account_set_remember_password
void purple_account_set_remember_password(PurpleAccount *account, gboolean value)
Sets whether or not this account should save its password.