proxy.h File Reference

Proxy API. More...

#include <glib.h>
#include "eventloop.h"
#include "account.h"

Include dependency graph for proxy.h:

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

Go to the source code of this file.

Data Structures

struct  GaimProxyInfo
 Information on proxy settings. More...

Enumerations

enum  GaimProxyType {
  GAIM_PROXY_USE_GLOBAL = -1, GAIM_PROXY_NONE = 0, GAIM_PROXY_HTTP, GAIM_PROXY_SOCKS4,
  GAIM_PROXY_SOCKS5, GAIM_PROXY_USE_ENVVAR
}
 A type of proxy connection. More...

Functions

Proxy structure API
GaimProxyInfogaim_proxy_info_new (void)
 Creates a proxy information structure.
void gaim_proxy_info_destroy (GaimProxyInfo *info)
 Destroys a proxy information structure.
void gaim_proxy_info_set_type (GaimProxyInfo *info, GaimProxyType type)
 Sets the type of proxy.
void gaim_proxy_info_set_host (GaimProxyInfo *info, const char *host)
 Sets the proxy host.
void gaim_proxy_info_set_port (GaimProxyInfo *info, int port)
 Sets the proxy port.
void gaim_proxy_info_set_username (GaimProxyInfo *info, const char *username)
 Sets the proxy username.
void gaim_proxy_info_set_password (GaimProxyInfo *info, const char *password)
 Sets the proxy password.
GaimProxyType gaim_proxy_info_get_type (const GaimProxyInfo *info)
 Returns the proxy's type.
const char * gaim_proxy_info_get_host (const GaimProxyInfo *info)
 Returns the proxy's host.
int gaim_proxy_info_get_port (const GaimProxyInfo *info)
 Returns the proxy's port.
const char * gaim_proxy_info_get_username (const GaimProxyInfo *info)
 Returns the proxy's username.
const char * gaim_proxy_info_get_password (const GaimProxyInfo *info)
 Returns the proxy's password.
Global Proxy API
GaimProxyInfogaim_global_proxy_get_info (void)
 Returns gaim's global proxy information.
Proxy API
void gaim_proxy_init (void)
 Initializes the proxy subsystem.
int gaim_proxy_connect (GaimAccount *account, const char *host, int port, GaimInputFunction func, gpointer data)
 Makes a connection to the specified host and port.
int gaim_proxy_connect_socks5 (GaimProxyInfo *gpi, const char *host, int port, GaimInputFunction func, gpointer data)
 Makes a connection through a SOCKS5 proxy.


Detailed Description

Proxy 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


Enumeration Type Documentation

enum GaimProxyType

A type of proxy connection.

Enumerator:
GAIM_PROXY_USE_GLOBAL  Use the global proxy information.
GAIM_PROXY_NONE  No proxy.
GAIM_PROXY_HTTP  HTTP proxy.
GAIM_PROXY_SOCKS4  SOCKS 4 proxy.
GAIM_PROXY_SOCKS5  SOCKS 5 proxy.
GAIM_PROXY_USE_ENVVAR  Use environmental settings.


Function Documentation

GaimProxyInfo* gaim_global_proxy_get_info ( void   ) 

Returns gaim's global proxy information.

Returns:
The global proxy information.

int gaim_proxy_connect ( GaimAccount *  account,
const char *  host,
int  port,
GaimInputFunction  func,
gpointer  data 
)

Makes a connection to the specified host and port.

Parameters:
account The account making the connection.
host The destination host.
port The destination port.
func The input handler function.
data User-defined data.
Returns:
0 for success, -1 for failure

int gaim_proxy_connect_socks5 ( GaimProxyInfo gpi,
const char *  host,
int  port,
GaimInputFunction  func,
gpointer  data 
)

Makes a connection through a SOCKS5 proxy.

Parameters:
gpi The GaimProxyInfo specifying the proxy settings
host The destination host.
port The destination port.
func The input handler function.
data User-defined data.
Returns:
The socket handle.

void gaim_proxy_info_destroy ( GaimProxyInfo info  ) 

Destroys a proxy information structure.

Parameters:
info The proxy information structure to destroy.

const char* gaim_proxy_info_get_host ( const GaimProxyInfo info  ) 

Returns the proxy's host.

Parameters:
info The proxy information.
Returns:
The host.

const char* gaim_proxy_info_get_password ( const GaimProxyInfo info  ) 

Returns the proxy's password.

Parameters:
info The proxy information.
Returns:
The password.

int gaim_proxy_info_get_port ( const GaimProxyInfo info  ) 

Returns the proxy's port.

Parameters:
info The proxy information.
Returns:
The port.

GaimProxyType gaim_proxy_info_get_type ( const GaimProxyInfo info  ) 

Returns the proxy's type.

Parameters:
info The proxy information.
Returns:
The type.

const char* gaim_proxy_info_get_username ( const GaimProxyInfo info  ) 

Returns the proxy's username.

Parameters:
info The proxy information.
Returns:
The username.

GaimProxyInfo* gaim_proxy_info_new ( void   ) 

Creates a proxy information structure.

Returns:
The proxy information structure.

void gaim_proxy_info_set_host ( GaimProxyInfo info,
const char *  host 
)

Sets the proxy host.

Parameters:
info The proxy information.
host The host.

void gaim_proxy_info_set_password ( GaimProxyInfo info,
const char *  password 
)

Sets the proxy password.

Parameters:
info The proxy information.
password The password.

void gaim_proxy_info_set_port ( GaimProxyInfo info,
int  port 
)

Sets the proxy port.

Parameters:
info The proxy information.
port The port.

void gaim_proxy_info_set_type ( GaimProxyInfo info,
GaimProxyType  type 
)

Sets the type of proxy.

Parameters:
info The proxy information.
type The proxy type.

void gaim_proxy_info_set_username ( GaimProxyInfo info,
const char *  username 
)

Sets the proxy username.

Parameters:
info The proxy information.
username The username.


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