Mercurial > pidgin
comparison plugins/icq/socketmanager.h @ 1432:4c510ca3563f
[gaim-migrate @ 1442]
icqlib 1.1.5
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Sun, 28 Jan 2001 01:52:27 +0000 |
| parents | |
| children | e2f256502345 |
comparison
equal
deleted
inserted
replaced
| 1431:0137bacd63c8 | 1432:4c510ca3563f |
|---|---|
| 1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | |
| 2 #ifndef _SOCKETMANAGER_H | |
| 3 #define _SOCKETMANAGER_H | |
| 4 | |
| 5 #ifdef HAVE_CONFIG_H | |
| 6 #include <config.h> | |
| 7 #endif | |
| 8 | |
| 9 #include <sys/types.h> | |
| 10 #include <sys/socket.h> | |
| 11 | |
| 12 #include "icq.h" | |
| 13 #include "list.h" | |
| 14 | |
| 15 typedef struct icq_Socket_s icq_Socket; | |
| 16 typedef void (*icq_SocketHandler)(void *data); | |
| 17 | |
| 18 struct icq_Socket_s | |
| 19 { | |
| 20 int socket; | |
| 21 | |
| 22 icq_SocketHandler handlers[ICQ_SOCKET_MAX]; | |
| 23 void *data[ICQ_SOCKET_MAX]; | |
| 24 }; | |
| 25 | |
| 26 int icq_SocketNew(int domain, int type, int protocol); | |
| 27 int icq_SocketAccept(int listens, struct sockaddr *addr, socklen_t *addrlen); | |
| 28 void icq_SocketAlloc(int s); | |
| 29 int icq_SocketDelete(int socket); | |
| 30 void icq_SocketSetHandler(int socket, int type, icq_SocketHandler handler, | |
| 31 void *data); | |
| 32 void icq_SocketReady(icq_Socket *s, int type); | |
| 33 void icq_SocketBuildFdSets(void); | |
| 34 void icq_SocketPoll(); | |
| 35 icq_Socket *icq_FindSocket(int socket); | |
| 36 | |
| 37 extern list *icq_SocketList; | |
| 38 | |
| 39 #endif /* _SOCKETMANAGER_H */ |
