1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
/*
* libtoc
*
* Copyright (C) 1999, Torrey Searle <tsearle@uci.edu>
*
* 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
*
*/
#ifndef __LIB_TOC__
#define __LIB_TOC__
#include <gtk/gtk.h>
#include <stdio.h>
typedef struct _toc_conn
{
int fd;
int seq_num;
void * account;
char server[255];
short port;
} toc_conn;
typedef struct _toc_file_conn
{
char header1[7];
char header2[2048];
int fd;
unsigned long amount;
FILE * file;
int handle;
} toc_file_conn;
extern void (*toc_new_user)(char * group, char * handle);
extern void (*toc_begin_file_recieve)( char * filename, unsigned long size );
extern void (*toc_update_file_status)( unsigned long progress );
extern void (*toc_complete_file_recieve)();
extern void (*toc_im_in)(toc_conn * conn, gchar * user, gchar * message );
extern void (*toc_chat_im_in)(toc_conn * conn, gchar * id, gchar * user, gchar * message );
extern void (*update_user_status)(gchar * user, gboolean online, time_t idle, gint evil, gboolean unavailable );
extern void (*toc_error_message)(gchar * message);
extern void (*toc_disconnect)(toc_conn * conn);
extern void (*toc_chat_invite)(toc_conn * conn, gchar * id, gchar * name,
gchar * sender, gchar * message );
extern void (*toc_join_ack)(toc_conn * conn, gchar * id, gchar * name);
extern void (*toc_chat_update_buddy)(toc_conn * conn, gchar * id,
gchar * user, gboolean online );
extern void (*toc_file_offer)( toc_conn * conn, char * nick, char * ip, short port,
char * cookie, char * filename );
extern void (*toc_user_info)(toc_conn * conn, gchar * user, gchar * message );
void toc_callback( toc_conn * conn );
toc_conn * toc_signon( char * username, char * password,
char * server, short port );
void toc_send_keep_alive( toc_conn * conn );
void toc_signoff( toc_conn * conn );
void toc_send_im( toc_conn * conn, gchar * username, gchar * message );
void toc_get_info( toc_conn * conn, gchar * user );
void toc_add_buddies( toc_conn * conn, GList * list );
void toc_add_buddy( toc_conn * conn, gchar * user );
void toc_set_idle( toc_conn * conn, int idle );
void toc_set_away( toc_conn * conn, gchar * message);
void toc_invite( toc_conn * conn, gchar * id, gchar * buddy, char * message );
void toc_remove_buddy( toc_conn * conn, gchar * user );
void toc_chat_join( toc_conn * conn, gchar * chat_room_name );
void toc_chat_send( toc_conn * conn, gchar * id, gchar * message);
void toc_chat_leave( toc_conn * conn, gchar * id );
void toc_chat_accept( toc_conn * conn, gchar * id);
void toc_file_accept( toc_conn * conn, char * nick, char * ip, short port,
char * cookie, char * filename );
void toc_file_cancel( toc_conn * conn, char * nick, char * cookie );
void toc_talk_accept( toc_conn * conn, char * nick, char * ip, short port,
char * cookie );
void toc_aim_buddies_pointer(GList * list);
void toc_set_config( toc_conn * conn, gchar * config );
#endif
|