sslconn.h File Reference

SSL API

gaim. More...

#include "proxy.h"

Include dependency graph for sslconn.h:

Go to the source code of this file.

Data Structures

struct  _GaimSslConnection
struct  GaimSslOps
 SSL implementation operations structure. More...

SSL API

gboolean gaim_ssl_is_supported (void)
 Returns whether or not SSL is currently supported.
GaimSslConnection * gaim_ssl_connect (GaimAccount *account, const char *host, int port, GaimSslInputFunction func, GaimSslErrorFunction error_func, void *data)
 Makes a SSL connection to the specified host and port.
GaimSslConnection * gaim_ssl_connect_fd (GaimAccount *account, int fd, GaimSslInputFunction func, GaimSslErrorFunction error_func, void *data)
 Makes a SSL connection using an already open file descriptor.
void gaim_ssl_input_add (GaimSslConnection *gsc, GaimSslInputFunction func, void *data)
 Adds an input watcher for the specified SSL connection.
void gaim_ssl_close (GaimSslConnection *gsc)
 Closes a SSL connection.
size_t gaim_ssl_read (GaimSslConnection *gsc, void *buffer, size_t len)
 Reads data from an SSL connection.
size_t gaim_ssl_write (GaimSslConnection *gsc, const void *buffer, size_t len)
 Writes data to an SSL connection.

Subsystem API

void gaim_ssl_set_ops (GaimSslOps *ops)
 Sets the current SSL operations structure.
GaimSslOpsgaim_ssl_get_ops (void)
 Returns the current SSL operations structure.
void gaim_ssl_init (void)
 Initializes the SSL subsystem.
void gaim_ssl_uninit (void)
 Uninitializes the SSL subsystem.

Defines

#define GAIM_SSL_DEFAULT_PORT   443

Typedefs

typedef _GaimSslConnection GaimSslConnection
typedef void(*) GaimSslInputFunction (gpointer, GaimSslConnection *, GaimInputCondition)
typedef void(*) GaimSslErrorFunction (GaimSslConnection *, GaimSslErrorType, gpointer)

Enumerations

enum  GaimSslErrorType { GAIM_SSL_HANDSHAKE_FAILED = 1, GAIM_SSL_CONNECT_FAILED = 2 }


Detailed Description

SSL 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


Function Documentation

void gaim_ssl_close ( GaimSslConnection *  gsc  ) 

Closes a SSL connection.

Parameters:
gsc The SSL connection to close.

GaimSslConnection* gaim_ssl_connect ( GaimAccount *  account,
const char *  host,
int  port,
GaimSslInputFunction  func,
GaimSslErrorFunction  error_func,
void *  data 
)

Makes a SSL connection to the specified host and port.

Parameters:
account The account making the connection.
host The destination host.
port The destination port.
func The SSL input handler function.
error_func The SSL error handler function.
data User-defined data.
Returns:
The SSL connection handle.

GaimSslConnection* gaim_ssl_connect_fd ( GaimAccount *  account,
int  fd,
GaimSslInputFunction  func,
GaimSslErrorFunction  error_func,
void *  data 
)

Makes a SSL connection using an already open file descriptor.

Parameters:
account The account making the connection.
fd The file descriptor.
func The SSL input handler function.
error_func The SSL error handler function.
data User-defined data.
Returns:
The SSL connection handle.

GaimSslOps* gaim_ssl_get_ops ( void   ) 

Returns the current SSL operations structure.

Returns:
The SSL operations structure.

void gaim_ssl_input_add ( GaimSslConnection *  gsc,
GaimSslInputFunction  func,
void *  data 
)

Adds an input watcher for the specified SSL connection.

Parameters:
gsc The SSL connection handle.
func The callback function.
data User-defined data.

gboolean gaim_ssl_is_supported ( void   ) 

Returns whether or not SSL is currently supported.

Returns:
TRUE if SSL is supported, or FALSE otherwise.

size_t gaim_ssl_read ( GaimSslConnection *  gsc,
void *  buffer,
size_t  len 
)

Reads data from an SSL connection.

Parameters:
gsc The SSL connection handle.
buffer The destination buffer.
len The maximum number of bytes to read.
Returns:
The number of bytes read.

void gaim_ssl_set_ops ( GaimSslOps ops  ) 

Sets the current SSL operations structure.

Parameters:
ops The SSL operations structure to assign.

size_t gaim_ssl_write ( GaimSslConnection *  gsc,
const void *  buffer,
size_t  len 
)

Writes data to an SSL connection.

Parameters:
gsc The SSL connection handle.
buffer The buffer to write.
len The length of the data to write.
Returns:
The number of bytes written.


Generated on Wed Aug 9 23:40:52 2006 for gaim by  doxygen 1.4.7