gaim. More...
#include <stdlib.h>
#include <time.h>
#include "account.h"
#include "plugin.h"
Include dependency graph for connection.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | GaimConnectionUiOps |
struct | _GaimConnection |
Connection API | |
#define | GAIM_CONNECTION_IS_CONNECTED(gc) (gc->state == GAIM_CONNECTED) |
Returns TRUE if the account is connected, otherwise returns FALSE. | |
GaimConnection * | gaim_connection_new (GaimAccount *account) |
Creates a connection to the specified account. | |
void | gaim_connection_destroy (GaimConnection *gc) |
Destroys and closes a gaim connection. | |
void | gaim_connection_connect (GaimConnection *gc) |
Signs a connection on. | |
void | gaim_connection_register (GaimConnection *gc) |
Registers a connection. | |
void | gaim_connection_disconnect (GaimConnection *gc) |
Signs a connection off. | |
void | gaim_connection_set_state (GaimConnection *gc, GaimConnectionState state) |
Sets the connection state. | |
void | gaim_connection_set_account (GaimConnection *gc, GaimAccount *account) |
Sets the connection's account. | |
void | gaim_connection_set_display_name (GaimConnection *gc, const char *name) |
Sets the connection's displayed name. | |
GaimConnectionState | gaim_connection_get_state (const GaimConnection *gc) |
Returns the connection state. | |
GaimAccount * | gaim_connection_get_account (const GaimConnection *gc) |
Returns the connection's account. | |
const char * | gaim_connection_get_display_name (const GaimConnection *gc) |
Returns the connection's displayed name. | |
void | gaim_connection_update_progress (GaimConnection *gc, const char *text, size_t step, size_t count) |
Updates the connection progress. | |
void | gaim_connection_notice (GaimConnection *gc, const char *text) |
Displays a connection-specific notice. | |
void | gaim_connection_error (GaimConnection *gc, const char *reason) |
Closes a connection with an error. | |
Connections API | |
#define | GAIM_CONNECTION_IS_VALID(gc) (g_list_find(gaim_connections_get_all(), (gc)) || g_list_find(gaim_connections_get_connecting(), (gc))) |
Checks if gc is still a valid pointer to a gc. | |
void | gaim_connections_disconnect_all (void) |
Disconnects from all connections. | |
GList * | gaim_connections_get_all (void) |
Returns a list of all active connections. | |
GList * | gaim_connections_get_connecting (void) |
Returns a list of all connections in the process of connecting. | |
UI Registration Functions | |
void | gaim_connections_set_ui_ops (GaimConnectionUiOps *ops) |
Sets the UI operations structure to be used for connections. | |
GaimConnectionUiOps * | gaim_connections_get_ui_ops (void) |
Returns the UI operations structure used for connections. | |
Connections Subsystem | |
void | gaim_connections_init (void) |
Initializes the connections subsystem. | |
void | gaim_connections_uninit (void) |
Uninitializes the connections subsystem. | |
void * | gaim_connections_get_handle (void) |
Returns the handle to the connections subsystem. | |
Typedefs | |
typedef _GaimConnection | GaimConnection |
Enumerations | |
enum | GaimConnectionFlags { GAIM_CONNECTION_HTML = 0x0001, GAIM_CONNECTION_NO_BGCOLOR = 0x0002, GAIM_CONNECTION_AUTO_RESP = 0x0004, GAIM_CONNECTION_FORMATTING_WBFO = 0x0008, GAIM_CONNECTION_NO_NEWLINES = 0x0010, GAIM_CONNECTION_NO_FONTSIZE = 0x0020, GAIM_CONNECTION_NO_URLDESC = 0x0040, GAIM_CONNECTION_NO_IMAGES = 0x0080 } |
Flags to change behavior of the client for a given connection. More... | |
enum | GaimConnectionState { GAIM_DISCONNECTED = 0, GAIM_CONNECTED, GAIM_CONNECTING } |
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
#define GAIM_CONNECTION_IS_CONNECTED | ( | gc | ) | (gc->state == GAIM_CONNECTED) |
Returns TRUE if the account is connected, otherwise returns FALSE.
#define GAIM_CONNECTION_IS_VALID | ( | gc | ) | (g_list_find(gaim_connections_get_all(), (gc)) || g_list_find(gaim_connections_get_connecting(), (gc))) |
Checks if gc is still a valid pointer to a gc.
TRUE
if gc is valid.
enum GaimConnectionFlags |
Flags to change behavior of the client for a given connection.
enum GaimConnectionState |
void gaim_connection_connect | ( | GaimConnection * | gc | ) |
Signs a connection on.
gc | The connection to sign on. |
void gaim_connection_destroy | ( | GaimConnection * | gc | ) |
Destroys and closes a gaim connection.
gc | The gaim connection to destroy. |
void gaim_connection_disconnect | ( | GaimConnection * | gc | ) |
Signs a connection off.
gc | The connection to sign off. |
void gaim_connection_error | ( | GaimConnection * | gc, | |
const char * | reason | |||
) |
Closes a connection with an error.
gc | The connection. | |
reason | The error text. |
GaimAccount* gaim_connection_get_account | ( | const GaimConnection * | gc | ) |
Returns the connection's account.
gc | The connection. |
const char* gaim_connection_get_display_name | ( | const GaimConnection * | gc | ) |
Returns the connection's displayed name.
gc | The connection. |
GaimConnectionState gaim_connection_get_state | ( | const GaimConnection * | gc | ) |
Returns the connection state.
gc | The connection. |
GaimConnection* gaim_connection_new | ( | GaimAccount * | account | ) |
Creates a connection to the specified account.
account | The account the connection should be connecting to. |
void gaim_connection_notice | ( | GaimConnection * | gc, | |
const char * | text | |||
) |
Displays a connection-specific notice.
gc | The connection. | |
text | The notice text. |
void gaim_connection_register | ( | GaimConnection * | gc | ) |
Registers a connection.
gc | The connection to register. |
void gaim_connection_set_account | ( | GaimConnection * | gc, | |
GaimAccount * | account | |||
) |
Sets the connection's account.
gc | The connection. | |
account | The account. |
void gaim_connection_set_display_name | ( | GaimConnection * | gc, | |
const char * | name | |||
) |
Sets the connection's displayed name.
gc | The connection. | |
name | The displayed name. |
void gaim_connection_set_state | ( | GaimConnection * | gc, | |
GaimConnectionState | state | |||
) |
Sets the connection state.
gc | The connection. | |
state | The connection state. |
void gaim_connection_update_progress | ( | GaimConnection * | gc, | |
const char * | text, | |||
size_t | step, | |||
size_t | count | |||
) |
Updates the connection progress.
gc | The connection. | |
text | Information on the current step. | |
step | The current step. | |
count | The total number of steps. |
GList* gaim_connections_get_all | ( | void | ) |
Returns a list of all active connections.
GList* gaim_connections_get_connecting | ( | void | ) |
Returns a list of all connections in the process of connecting.
void* gaim_connections_get_handle | ( | void | ) |
Returns the handle to the connections subsystem.
GaimConnectionUiOps* gaim_connections_get_ui_ops | ( | void | ) |
Returns the UI operations structure used for connections.
void gaim_connections_set_ui_ops | ( | GaimConnectionUiOps * | ops | ) |
Sets the UI operations structure to be used for connections.
ops | The UI operations structure. |