Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

connection.h File Reference

Connection API. More...

#include <stdlib.h>
#include <time.h>
#include "account.h"
#include "plugin.h"

Include dependency graph for connection.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  _GaimConnection
struct  GaimConnectionUiOps

Connection API

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

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
}
 Flags to change behavior of the client for a given connection. More...

enum  GaimConnectionState { GAIM_DISCONNECTED = 0, GAIM_CONNECTED, GAIM_CONNECTING }


Detailed Description

Connection 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:
Connection Signals

Enumeration Type Documentation

enum GaimConnectionFlags
 

Flags to change behavior of the client for a given connection.

Enumeration values:
GAIM_CONNECTION_HTML  Connection sends/receives in 'HTML'.
GAIM_CONNECTION_NO_BGCOLOR  Connection does not send/receive background colors.
GAIM_CONNECTION_AUTO_RESP  Send auto responses when away.
GAIM_CONNECTION_FORMATTING_WBFO  The text buffer must be formatted as a whole.
GAIM_CONNECTION_NO_NEWLINES  No new lines are allowed in outgoing messages.
GAIM_CONNECTION_NO_FONTSIZE  Connection does not send/receive font sizes.

enum GaimConnectionState
 

Enumeration values:
GAIM_DISCONNECTED  Disconnected.
GAIM_CONNECTED  Connected.
GAIM_CONNECTING  Connecting.


Function Documentation

void gaim_connection_connect GaimConnection *  gc  ) 
 

Signs a connection on.

Parameters:
gc The connection to sign on.
See also:
gaim_connection_disconnect()

void gaim_connection_destroy GaimConnection *  gc  ) 
 

Destroys and closes a gaim connection.

Parameters:
gc The gaim connection to destroy.

void gaim_connection_disconnect GaimConnection *  gc  ) 
 

Signs a connection off.

Parameters:
gc The connection to sign off.
See also:
gaim_connection_connect()

void gaim_connection_error GaimConnection *  gc,
const char *  reason
 

Closes a connection with an error.

Parameters:
gc The connection.
reason The error text.

GaimAccount* gaim_connection_get_account const GaimConnection *  gc  ) 
 

Returns the connection's account.

Parameters:
gc The connection.
Returns:
The connection's account.

const char* gaim_connection_get_display_name const GaimConnection *  gc  ) 
 

Returns the connection's displayed name.

Parameters:
gc The connection.
Returns:
The connection's displayed name.

GaimConnectionState gaim_connection_get_state const GaimConnection *  gc  ) 
 

Returns the connection state.

Parameters:
gc The connection.
Returns:
The connection state.

GaimConnection* gaim_connection_new GaimAccount *  account  ) 
 

Creates a connection to the specified account.

Parameters:
account The account the connection should be connecting to.
Returns:
The gaim connection.

void gaim_connection_notice GaimConnection *  gc,
const char *  text
 

Displays a connection-specific notice.

Parameters:
gc The connection.
text The notice text.

void gaim_connection_register GaimConnection *  gc  ) 
 

Registers a connection.

Parameters:
gc The connection to register.

void gaim_connection_set_account GaimConnection *  gc,
GaimAccount *  account
 

Sets the connection's account.

Parameters:
gc The connection.
account The account.

void gaim_connection_set_display_name GaimConnection *  gc,
const char *  name
 

Sets the connection's displayed name.

Parameters:
gc The connection.
name The displayed name.

void gaim_connection_set_state GaimConnection *  gc,
GaimConnectionState  state
 

Sets the connection state.

Parameters:
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.

Parameters:
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.

Returns:
A list of all active connections.

GList* gaim_connections_get_connecting void   ) 
 

Returns a list of all connections in the process of connecting.

Returns:
A list of connecting connections.

void* gaim_connections_get_handle void   ) 
 

Returns the handle to the connections subsystem.

Returns:
The connections subsystem handle.

GaimConnectionUiOps* gaim_connections_get_ui_ops void   ) 
 

Returns the UI operations structure used for connections.

Returns:
The UI operations structure in use.

void gaim_connections_set_ui_ops GaimConnectionUiOps *  ops  ) 
 

Sets the UI operations structure to be used for connections.

Parameters:
ops The UI operations structure.


Generated on Sun Aug 29 03:45:07 2004 for gaim by doxygen 1.3.4