home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Linux
/
Divers
/
yagirc-0.51.tar.gz
/
yagirc-0.51.tar
/
yagirc-0.51
/
data.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-05-06
|
2KB
|
110 lines
#ifndef __DATA_H
#define __DATA_H
#include <sys/time.h>
typedef struct _CHAN_REC CHAN_REC;
typedef struct _WINDOW_REC WINDOW_REC;
typedef struct _SERVER_REC SERVER_REC;
typedef struct _SCRIPT_REC SCRIPT_REC;
typedef struct _DCC_REC DCC_REC;
#include "gui.h"
typedef void (*DRAW_FUNC)(char *, void *);
struct _WINDOW_REC
{
int num; /* window number */
GList *chanlist; /* list of channels in this window */
CHAN_REC *curchan; /* current active channel */
SERVER_REC *defserv;
DRAW_FUNC drawfunc;
void *drawfuncdata;
int new_data; /* set on when text is written to this window */
char textbuf[1024];
int textbuflen;
GUI_WINDOW_REC *gui;
};
struct _CHAN_REC
{
char *name; /* channel name */
char *topic; /* channel topic */
GList *nicks; /* list of nicks in this channel */
WINDOW_REC *window; /* channel window */
SERVER_REC *server; /* channel server */
int new_data; /* set on when text is written to this channel */
GUI_CHAN_REC *gui;
};
struct _SERVER_REC
{
char *name; /* server name */
char *nick; /* your nick */
int connected; /* connected to server */
int handle; /* socket handle */
int readtag; /* gui input tag */
int timetag; /* gui timeout tag */
int ison_reqs; /* number of /ISON requests sent to server for now */
WINDOW_REC *defwin; /* default window where to send server messages */
char buf[512]; /* receive buffer */
int bufpos;
};
struct _SCRIPT_REC
{
char *name;
int readfd;
int writefd;
int pid;
int tag;
char buf[512]; /* receive buffer */
int bufpos;
};
enum
{
DCC_TYPE_CHAT = 1,
DCC_TYPE_SEND,
DCC_TYPE_GET,
} DCCType;
struct _DCC_REC
{
int type;
char *arg;
char *nick;
char *addr; /* address we're connected in */
int port; /* port we're connected in */
long size, transfd; /* file size / bytes transferred */
int handle, tag; /* socket handle / gui tag */
int fhandle; /* file handle */
time_t starttime; /* transfer start time */
char *buf; /* read buffer */
int bufpos;
GUI_DCC_REC *gui;
};
typedef struct
{
char *alias;
char *cmd;
}
ALIAS_REC;
#endif