1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
4 * $Id: icqlib.h 2096 2001-07-31 01:00:39Z warmenhoven $
6 * Copyright (C) 1998-2001, Denis V. Dmitrienko <denis@null.net> and
7 * Bill Soudan <soudan@kde.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32 /* for strdup(), bzero() and snprintf() declarations */
35 #define __need_bsd_undef 1
39 #ifdef __need_bsd_undef
46 BOOL
icq_GetServMess(icq_Link
*icqlink
, WORD num
);
47 void icq_SetServMess(icq_Link
*icqlink
, WORD num
);
48 void icq_RusConv(const char to
[4], char *t_in
);
49 void icq_RusConv_n(const char to
[4], char *t_in
, int len
);
53 extern unsigned long inet_addr(const char *cp
);
54 #endif /* inet_addr */
56 extern int inet_aton(const char *cp
, struct in_addr
*inp
);
57 #endif /* inet_aton */
59 extern char *inet_ntoa(struct in_addr in
);
60 #endif /* inet_ntoa */
62 extern char *strdup(const char *s
);
66 /** Private ICQLINK data. These are members that are internal to
67 * icqlib, but must be contained in the per-connection ICQLINK
70 struct icq_LinkPrivate_s
72 icq_List
*icq_ContactList
;
74 /* 65536 seqs max, 1 bit per seq -> 65536/8 = 8192 */
75 unsigned char icq_UDPServMess
[8192];
77 unsigned short icq_UDPSeqNum1
, icq_UDPSeqNum2
;
78 unsigned long icq_UDPSession
;
80 icq_List
*icq_UDPQueue
;
83 icq_List
*icq_TCPLinks
;
84 icq_List
*icq_ChatSessions
;
85 icq_List
*icq_FileSessions
;
88 #define invoke_callback(plink, callback) \
89 if (plink->callback) (*(plink->callback))
91 #endif /* _ICQLIB_H_ */