account.h File Reference

Account API. More...

#include <glib.h>
#include "connection.h"
#include "log.h"
#include "proxy.h"
#include "prpl.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  _GaimAccountUiOps
struct  _GaimAccount

Typedefs

typedef _GaimAccountUiOps GaimAccountUiOps
typedef _GaimAccount GaimAccount
typedef gboolean(*) GaimFilterAccountFunc (GaimAccount *account)

Functions

Account API
GaimAccount * gaim_account_new (const char *username, const char *protocol_id)
 Creates a new account.
void gaim_account_destroy (GaimAccount *account)
 Destroys an account.
GaimConnection * gaim_account_connect (GaimAccount *account)
 Connects to an account.
GaimConnection * gaim_account_register (GaimAccount *account)
 Registers an account.
void gaim_account_disconnect (GaimAccount *account)
 Disconnects from an account.
void gaim_account_notify_added (GaimAccount *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 gaim_account_request_add (GaimAccount *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 and asks the user if they want to add the remote user to their buddy list.
void gaim_account_request_change_password (GaimAccount *account)
 Requests information from the user to change the account's password.
void gaim_account_request_change_user_info (GaimAccount *account)
 Requests information from the user to change the account's user information.
void gaim_account_set_username (GaimAccount *account, const char *username)
 Sets the account's username.
void gaim_account_set_password (GaimAccount *account, const char *password)
 Sets the account's password.
void gaim_account_set_alias (GaimAccount *account, const char *alias)
 Sets the account's alias.
void gaim_account_set_user_info (GaimAccount *account, const char *user_info)
 Sets the account's user information.
void gaim_account_set_buddy_icon (GaimAccount *account, const char *icon)
 Sets the account's buddy icon.
void gaim_account_set_protocol_id (GaimAccount *account, const char *protocol_id)
 Sets the account's protocol ID.
void gaim_account_set_connection (GaimAccount *account, GaimConnection *gc)
 Sets the account's connection.
void gaim_account_set_remember_password (GaimAccount *account, gboolean value)
 Sets whether or not this account should save its password.
void gaim_account_set_check_mail (GaimAccount *account, gboolean value)
 Sets whether or not this account should check for mail.
void gaim_account_set_auto_login (GaimAccount *account, const char *ui, gboolean value)
 Sets whether or not this account should auto-login for the specified UI.
void gaim_account_set_proxy_info (GaimAccount *account, GaimProxyInfo *info)
 Sets the account's proxy information.
void gaim_account_clear_settings (GaimAccount *account)
 Clears all protocol-specific settings on an account.
void gaim_account_set_int (GaimAccount *account, const char *name, int value)
 Sets a protocol-specific integer setting for an account.
void gaim_account_set_string (GaimAccount *account, const char *name, const char *value)
 Sets a protocol-specific string setting for an account.
void gaim_account_set_bool (GaimAccount *account, const char *name, gboolean value)
 Sets a protocol-specific boolean setting for an account.
void gaim_account_set_ui_int (GaimAccount *account, const char *ui, const char *name, int value)
 Sets a UI-specific integer setting for an account.
void gaim_account_set_ui_string (GaimAccount *account, const char *ui, const char *name, const char *value)
 Sets a UI-specific string setting for an account.
void gaim_account_set_ui_bool (GaimAccount *account, const char *ui, const char *name, gboolean value)
 Sets a UI-specific boolean setting for an account.
gboolean gaim_account_is_connected (const GaimAccount *account)
 Returns whether or not the account is connected.
const char * gaim_account_get_username (const GaimAccount *account)
 Returns the account's username.
const char * gaim_account_get_password (const GaimAccount *account)
 Returns the account's password.
const char * gaim_account_get_alias (const GaimAccount *account)
 Returns the account's alias.
const char * gaim_account_get_user_info (const GaimAccount *account)
 Returns the account's user information.
const char * gaim_account_get_buddy_icon (const GaimAccount *account)
 Returns the account's buddy icon filename.
const char * gaim_account_get_protocol_id (const GaimAccount *account)
 Returns the account's protocol ID.
const char * gaim_account_get_protocol_name (const GaimAccount *account)
 Returns the account's protocol name.
GaimConnection * gaim_account_get_connection (const GaimAccount *account)
 Returns the account's connection.
gboolean gaim_account_get_remember_password (const GaimAccount *account)
 Returns whether or not this account should save its password.
gboolean gaim_account_get_check_mail (const GaimAccount *account)
 Returns whether or not this account should check for mail.
gboolean gaim_account_get_auto_login (const GaimAccount *account, const char *ui)
 Returns whether or not this account should auto-login for the specified UI.
GaimProxyInfogaim_account_get_proxy_info (const GaimAccount *account)
 Returns the account's proxy information.
int gaim_account_get_int (const GaimAccount *account, const char *name, int default_value)
 Returns a protocol-specific integer setting for an account.
const char * gaim_account_get_string (const GaimAccount *account, const char *name, const char *default_value)
 Returns a protocol-specific string setting for an account.
gboolean gaim_account_get_bool (const GaimAccount *account, const char *name, gboolean default_value)
 Returns a protocol-specific boolean setting for an account.
int gaim_account_get_ui_int (const GaimAccount *account, const char *ui, const char *name, int default_value)
 Returns a UI-specific integer setting for an account.
const char * gaim_account_get_ui_string (const GaimAccount *account, const char *ui, const char *name, const char *default_value)
 Returns a UI-specific string setting for an account.
gboolean gaim_account_get_ui_bool (const GaimAccount *account, const char *ui, const char *name, gboolean default_value)
 Returns a UI-specific boolean setting for an account.
GaimLoggaim_account_get_log (GaimAccount *account)
 Returns the system log for an account.
void gaim_account_destroy_log (GaimAccount *account)
 Frees the system log of an account.
Accounts API
gboolean gaim_accounts_load ()
 Loads the accounts.
void gaim_accounts_sync ()
 Force an immediate write of accounts.
void gaim_accounts_add (GaimAccount *account)
 Adds an account to the list of accounts.
void gaim_accounts_remove (GaimAccount *account)
 Removes an account from the list of accounts.
void gaim_accounts_delete (GaimAccount *account)
 Deletes an account.
void gaim_accounts_auto_login (const char *ui)
 Auto-logins to all accounts set to auto-login under the specified UI.
void gaim_accounts_reorder (GaimAccount *account, size_t new_index)
 Reorders an account.
GList * gaim_accounts_get_all (void)
 Returns a list of all accounts.
GaimAccount * gaim_accounts_find (const char *name, const char *protocol)
 Finds an account with the specified name and protocol id.
UI Registration Functions
void gaim_accounts_set_ui_ops (GaimAccountUiOps *ops)
 Sets the UI operations structure to be used for accounts.
GaimAccountUiOps * gaim_accounts_get_ui_ops (void)
 Returns the UI operations structure used for accounts.
Accounts Subsystem
void * gaim_accounts_get_handle (void)
 Returns the accounts subsystem handle.
void gaim_accounts_init (void)
 Initializes the accounts subsystem.
void gaim_accounts_uninit (void)
 Uninitializes the accounts subsystem.


Detailed Description

Account API.

gaim

Gaim 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

See also:
Account Signals

Function Documentation

void gaim_account_clear_settings ( GaimAccount *  account  ) 

Clears all protocol-specific settings on an account.

Parameters:
account The account.

GaimConnection* gaim_account_connect ( GaimAccount *  account  ) 

Connects to an account.

Parameters:
account The account to connect to.
Returns:
The gaim connection.

void gaim_account_destroy ( GaimAccount *  account  ) 

Destroys an account.

Parameters:
account The account to destroy.

void gaim_account_destroy_log ( GaimAccount *  account  ) 

Frees the system log of an account.

Parameters:
account The account.

void gaim_account_disconnect ( GaimAccount *  account  ) 

Disconnects from an account.

Parameters:
account The account to disconnect from.
Returns:
The gaim connection.

const char* gaim_account_get_alias ( const GaimAccount *  account  ) 

Returns the account's alias.

Parameters:
account The account.
Returns:
The alias.

gboolean gaim_account_get_auto_login ( const GaimAccount *  account,
const char *  ui 
)

Returns whether or not this account should auto-login for the specified UI.

Parameters:
account The account.
ui The UI.
Returns:
TRUE if it should auto-login on this UI.

gboolean gaim_account_get_bool ( const GaimAccount *  account,
const char *  name,
gboolean  default_value 
)

Returns a protocol-specific boolean setting for an account.

Parameters:
account The account.
name The name of the setting.
default_value The default value.
Returns:
The value.

const char* gaim_account_get_buddy_icon ( const GaimAccount *  account  ) 

Returns the account's buddy icon filename.

Parameters:
account The account.
Returns:
The buddy icon filename.

gboolean gaim_account_get_check_mail ( const GaimAccount *  account  ) 

Returns whether or not this account should check for mail.

Parameters:
account The account.
Returns:
TRUE if it should check for mail.

GaimConnection* gaim_account_get_connection ( const GaimAccount *  account  ) 

Returns the account's connection.

Parameters:
account The account.
Returns:
The connection.

int gaim_account_get_int ( const GaimAccount *  account,
const char *  name,
int  default_value 
)

Returns a protocol-specific integer setting for an account.

Parameters:
account The account.
name The name of the setting.
default_value The default value.
Returns:
The value.

GaimLog* gaim_account_get_log ( GaimAccount *  account  ) 

Returns the system log for an account.

Create it if it doesn't already exist.

Parameters:
account The account.
Returns:
The log.

const char* gaim_account_get_password ( const GaimAccount *  account  ) 

Returns the account's password.

Parameters:
account The account.
Returns:
The password.

const char* gaim_account_get_protocol_id ( const GaimAccount *  account  ) 

Returns the account's protocol ID.

Parameters:
account The account.
Returns:
The protocol ID.

const char* gaim_account_get_protocol_name ( const GaimAccount *  account  ) 

Returns the account's protocol name.

Parameters:
account The account.
Returns:
The protocol name.

GaimProxyInfo* gaim_account_get_proxy_info ( const GaimAccount *  account  ) 

Returns the account's proxy information.

Parameters:
account The account.
Returns:
The proxy information.

gboolean gaim_account_get_remember_password ( const GaimAccount *  account  ) 

Returns whether or not this account should save its password.

Parameters:
account The account.
Returns:
TRUE if it should remember the password.

const char* gaim_account_get_string ( const GaimAccount *  account,
const char *  name,
const char *  default_value 
)

Returns a protocol-specific string setting for an account.

Parameters:
account The account.
name The name of the setting.
default_value The default value.
Returns:
The value.

gboolean gaim_account_get_ui_bool ( const GaimAccount *  account,
const char *  ui,
const char *  name,
gboolean  default_value 
)

Returns a UI-specific boolean setting for an account.

Parameters:
account The account.
ui The UI name.
name The name of the setting.
default_value The default value.
Returns:
The value.

int gaim_account_get_ui_int ( const GaimAccount *  account,
const char *  ui,
const char *  name,
int  default_value 
)

Returns a UI-specific integer setting for an account.

Parameters:
account The account.
ui The UI name.
name The name of the setting.
default_value The default value.
Returns:
The value.

const char* gaim_account_get_ui_string ( const GaimAccount *  account,
const char *  ui,
const char *  name,
const char *  default_value 
)

Returns a UI-specific string setting for an account.

Parameters:
account The account.
ui The UI name.
name The name of the setting.
default_value The default value.
Returns:
The value.

const char* gaim_account_get_user_info ( const GaimAccount *  account  ) 

Returns the account's user information.

Parameters:
account The account.
Returns:
The user information.

const char* gaim_account_get_username ( const GaimAccount *  account  ) 

Returns the account's username.

Parameters:
account The account.
Returns:
The username.

gboolean gaim_account_is_connected ( const GaimAccount *  account  ) 

Returns whether or not the account is connected.

Parameters:
account The account.
Returns:
TRUE if connected, or FALSE otherwise.

GaimAccount* gaim_account_new ( const char *  username,
const char *  protocol_id 
)

Creates a new account.

Parameters:
username The username.
protocol_id The protocol ID.

void gaim_account_notify_added ( GaimAccount *  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.

This will present a dialog so that the local user can add the buddy, if not already added.

Parameters:
account The account that was added.
remote_user The name of the user that added this account.
id The optional ID of the local account. Rarely used.
alias The optional alias of the user.
message The optional message sent from the user adding you.

GaimConnection* gaim_account_register ( GaimAccount *  account  ) 

Registers an account.

Parameters:
account The account to register.
Returns:
The gaim connection.

void gaim_account_request_add ( GaimAccount *  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 and asks the 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 users buddy list and will ask if they want to add the remote user to the local buddy list.

Parameters:
account The account that was added.
remote_user The name of the user that added this account.
id The optional ID of the local account. Rarely used.
alias The optional alias of the user.
message The optional message sent from the user adding you.

void gaim_account_request_change_password ( GaimAccount *  account  ) 

Requests information from the user to change the account's password.

Parameters:
account The account to change the password on.

void gaim_account_request_change_user_info ( GaimAccount *  account  ) 

Requests information from the user to change the account's user information.

Parameters:
account The account to change the user information on.

void gaim_account_set_alias ( GaimAccount *  account,
const char *  alias 
)

Sets the account's alias.

Parameters:
account The account.
alias The alias.

void gaim_account_set_auto_login ( GaimAccount *  account,
const char *  ui,
gboolean  value 
)

Sets whether or not this account should auto-login for the specified UI.

Parameters:
account The account.
ui The UI.
value TRUE if it should check for mail.

void gaim_account_set_bool ( GaimAccount *  account,
const char *  name,
gboolean  value 
)

Sets a protocol-specific boolean setting for an account.

Parameters:
account The account.
name The name of the setting.
value The setting's value.

void gaim_account_set_buddy_icon ( GaimAccount *  account,
const char *  icon 
)

Sets the account's buddy icon.

Parameters:
account The account.
icon The buddy icon file.

void gaim_account_set_check_mail ( GaimAccount *  account,
gboolean  value 
)

Sets whether or not this account should check for mail.

Parameters:
account The account.
value TRUE if it should check for mail.

void gaim_account_set_connection ( GaimAccount *  account,
GaimConnection *  gc 
)

Sets the account's connection.

Parameters:
account The account.
gc The connection.

void gaim_account_set_int ( GaimAccount *  account,
const char *  name,
int  value 
)

Sets a protocol-specific integer setting for an account.

Parameters:
account The account.
name The name of the setting.
value The setting's value.

void gaim_account_set_password ( GaimAccount *  account,
const char *  password 
)

Sets the account's password.

Parameters:
account The account.
password The password.

void gaim_account_set_protocol_id ( GaimAccount *  account,
const char *  protocol_id 
)

Sets the account's protocol ID.

Parameters:
account The account.
protocol_id The protocol ID.

void gaim_account_set_proxy_info ( GaimAccount *  account,
GaimProxyInfo info 
)

Sets the account's proxy information.

Parameters:
account The account.
info The proxy information.

void gaim_account_set_remember_password ( GaimAccount *  account,
gboolean  value 
)

Sets whether or not this account should save its password.

Parameters:
account The account.
value TRUE if it should remember the password.

void gaim_account_set_string ( GaimAccount *  account,
const char *  name,
const char *  value 
)

Sets a protocol-specific string setting for an account.

Parameters:
account The account.
name The name of the setting.
value The setting's value.

void gaim_account_set_ui_bool ( GaimAccount *  account,
const char *  ui,
const char *  name,
gboolean  value 
)

Sets a UI-specific boolean setting for an account.

Parameters:
account The account.
ui The UI name.
name The name of the setting.
value The setting's value.

void gaim_account_set_ui_int ( GaimAccount *  account,
const char *  ui,
const char *  name,
int  value 
)

Sets a UI-specific integer setting for an account.

Parameters:
account The account.
ui The UI name.
name The name of the setting.
value The setting's value.

void gaim_account_set_ui_string ( GaimAccount *  account,
const char *  ui,
const char *  name,
const char *  value 
)

Sets a UI-specific string setting for an account.

Parameters:
account The account.
ui The UI name.
name The name of the setting.
value The setting's value.

void gaim_account_set_user_info ( GaimAccount *  account,
const char *  user_info 
)

Sets the account's user information.

Parameters:
account The account.
user_info The user information.

void gaim_account_set_username ( GaimAccount *  account,
const char *  username 
)

Sets the account's username.

Parameters:
account The account.
username The username.

void gaim_accounts_add ( GaimAccount *  account  ) 

Adds an account to the list of accounts.

Parameters:
account The account.

void gaim_accounts_auto_login ( const char *  ui  ) 

Auto-logins to all accounts set to auto-login under the specified UI.

Parameters:
ui The UI.

void gaim_accounts_delete ( GaimAccount *  account  ) 

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.

Parameters:
account The account.

GaimAccount* gaim_accounts_find ( const char *  name,
const char *  protocol 
)

Finds an account with the specified name and protocol id.

Parameters:
name The account username.
protocol The account protocol ID.
Returns:
The account, if found, or FALSE otherwise.

GList* gaim_accounts_get_all ( void   ) 

Returns a list of all accounts.

Returns:
A list of all accounts.

void* gaim_accounts_get_handle ( void   ) 

Returns the accounts subsystem handle.

Returns:
The accounts subsystem handle.

GaimAccountUiOps* gaim_accounts_get_ui_ops ( void   ) 

Returns the UI operations structure used for accounts.

Returns:
The UI operations structure in use.

gboolean gaim_accounts_load (  ) 

Loads the accounts.

Returns:
TRUE if accounts.xml was loaded successfully. Otherwise FALSE is returned.

void gaim_accounts_remove ( GaimAccount *  account  ) 

Removes an account from the list of accounts.

Parameters:
account The account.

void gaim_accounts_reorder ( GaimAccount *  account,
size_t  new_index 
)

Reorders an account.

Parameters:
account The account to reorder.
new_index The new index for the account.

void gaim_accounts_set_ui_ops ( GaimAccountUiOps *  ops  ) 

Sets the UI operations structure to be used for accounts.

Parameters:
ops The UI operations structure.


Generated on Sun Feb 18 07:52:09 2007 for gaim by  doxygen 1.5.1