ekg2  GIT master
icq.h
Idź do dokumentacji tego pliku.
1 #ifndef __ICQ_ICQ_H
2 #define __ICQ_ICQ_H
3 
4 #define SNAC_HANDLER(x) int x(session_t *s, guint16 cmd, unsigned char *buf, int len, private_data_t *data)
5 typedef int (*snac_handler_t) (session_t *, guint16 cmd, unsigned char *, int, private_data_t * );
6 
7 #define SNAC_SUBHANDLER(x) int x(session_t *s, unsigned char *buf, int len, private_data_t *data)
8 typedef int (*snac_subhandler_t) (session_t *s, unsigned char *, int, private_data_t * );
9 
10 typedef struct {
11  int win_size; // Window size
12  int clear_lvl; // Clear level
13  int alert_lvl; // Alert level
14  int limit_lvl; // Limit level
15  int discn_lvl; // Disconnect level
16  int curr_lvl; // Current level
17  int max_lvl; // Max level
18  time_t last_time; // Last time
19  int n_groups;
20  guint32 *groups;
21 } icq_rate_t;
22 
23 typedef struct icq_snac_reference_list_s {
25  int ref;
26  time_t timestamp;
30 
31 typedef struct {
32  GCancellable *connect_cancellable;
33  GDataOutputStream *send_stream;
34 
35  int flap_seq; /* FLAP seq id */
36  guint16 snac_seq; /* SNAC seq id */
37  int snacmeta_seq; /* META SNAC seq id */
38  int cookie_seq; /* Cookie seq id */
39 
40  int ssi; /* server-side-userlist? */
41  int migrate; /* client migration sequence */
42  int aim; /* aim-ok? */
43  int default_group_id; /* XXX ?wo? TEMP! We should support list of groups */
45  int xstatus; /* XXX ?wo? set it! */
48  GString *cookie; /* connection login cookie */
49  GString *stream_buf;
51  int n_rates;
54 
55 int icq_send_pkt(session_t *s, GString *buf);
56 
59 void icq_handle_disconnect(session_t *s, const char *reason, int type);
60 
61 void icq_connect(session_t *session, const char *server, int port);
62 
63 #define icq_uid(target) protocol_uid("icq", target)
64 
65 #define MIRANDAOK 1
66 #define MIRANDA_COMPILANT_CLIENT 1
67 
68 #define ICQ_DEBUG_UNUSED_INFORMATIONS 1
69 
70 #endif
int ref
Definition: icq.h:25
private_data_t * list
Definition: icq.h:28
struct icq_snac_reference_list_s * next
Definition: icq.h:24
int icq_write_status(session_t *s)
Definition: icq.c:118
Definition: sessions.h:127
int xstatus
Definition: icq.h:45
Definition: icq.h:10
GString * stream_buf
Definition: icq.h:49
int migrate
Definition: icq.h:41
int icq_send_pkt(session_t *s, GString *buf)
Definition: icq.c:56
GString * cookie
Definition: icq.h:48
Definition: icq.h:23
Definition: icq.h:31
int curr_lvl
Definition: icq.h:16
int default_group_id
Definition: icq.h:43
guint16 snac_seq
Definition: icq.h:36
int max_lvl
Definition: icq.h:17
void icq_handle_disconnect(session_t *s, const char *reason, int type)
Definition: icq.c:550
icq_snac_reference_list_t * snac_ref_list
Definition: icq.h:50
int aim
Definition: icq.h:42
int(* snac_subhandler_t)(session_t *s, unsigned char *, int, private_data_t *)
Definition: icq.h:8
int(* snac_handler_t)(session_t *, guint16 cmd, unsigned char *, int, private_data_t *)
Definition: icq.h:5
time_t timestamp
Definition: icq.h:26
int n_groups
Definition: icq.h:19
private_data_t * whoami
Definition: icq.h:46
icq_rate_t ** rates
Definition: icq.h:52
int limit_lvl
Definition: icq.h:14
int alert_lvl
Definition: icq.h:13
GDataOutputStream * send_stream
Definition: icq.h:33
snac_subhandler_t subhandler
Definition: icq.h:27
int win_size
Definition: icq.h:11
int status_flags
Definition: icq.h:44
time_t last_time
Definition: icq.h:18
int snacmeta_seq
Definition: icq.h:37
GCancellable * connect_cancellable
Definition: icq.h:32
char * default_group_name
Definition: icq.h:47
guint32 * groups
Definition: icq.h:20
void icq_connect(session_t *session, const char *server, int port)
Definition: icq.c:681
int flap_seq
Definition: icq.h:35
int clear_lvl
Definition: icq.h:12
Definition: dynstuff.h:183
struct icq_snac_reference_list_s icq_snac_reference_list_t
int cookie_seq
Definition: icq.h:38
#define s
int discn_lvl
Definition: icq.h:15
int ssi
Definition: icq.h:40
void icq_session_connected(session_t *s)
Definition: icq.c:234
int n_rates
Definition: icq.h:51