aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/oscar/icq.h
blob: 009f59137b0197d2f1acdc4e87cd0a4702df7d9c (plain)
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
93
94
95
96
97
#ifndef __OSCAR_ICQ_H__
#define __OSCAR_ICQ_H__

#define AIM_CB_FAM_ICQ 0x0015

/*
 * SNAC Family: ICQ
 *
 * Most of these are actually special.
 */
#define AIM_CB_ICQ_ERROR 0x0001
#define AIM_CB_ICQ_OFFLINEMSG 0x00f0
#define AIM_CB_ICQ_OFFLINEMSGCOMPLETE 0x00f1
#define AIM_CB_ICQ_SIMPLEINFO 0x00f2
#define AIM_CB_ICQ_INFO 0x00f2 /* just transitional */
#define AIM_CB_ICQ_DEFAULT 0xffff

struct aim_icq_offlinemsg {
	guint32 sender;
	guint16 year;
	guint8 month, day, hour, minute;
	guint16 type;
	char *msg;
};

struct aim_icq_simpleinfo {
	guint32 uin;
	char *nick;
	char *first;
	char *last;
	char *email;
};

struct aim_icq_info {
	gushort reqid;

	/* simple */
	guint32 uin;

	/* general and "home" information (0x00c8) */
	char *nick;
	char *first;
	char *last;
	char *email;
	char *homecity;
	char *homestate;
	char *homephone;
	char *homefax;
	char *homeaddr;
	char *mobile;
	char *homezip;
	gushort homecountry;
/*      guchar timezone;
        guchar hideemail; */

	/* personal (0x00dc) */
	guchar age;
	guchar unknown;
	guchar gender;
	char *personalwebpage;
	gushort birthyear;
	guchar birthmonth;
	guchar birthday;
	guchar language1;
	guchar language2;
	guchar language3;

	/* work (0x00d2) */
	char *workcity;
	char *workstate;
	char *workphone;
	char *workfax;
	char *workaddr;
	char *workzip;
	gushort workcountry;
	char *workcompany;
	char *workdivision;
	char *workposition;
	char *workwebpage;

	/* additional personal information (0x00e6) */
	char *info;

	/* email (0x00eb) */
	gushort numaddresses;
	char **email2;

	/* we keep track of these in a linked list because we're 1337 */
	struct aim_icq_info *next;
};


int aim_icq_reqofflinemsgs(aim_session_t *sess);
int aim_icq_ackofflinemsgs(aim_session_t *sess);
int aim_icq_getallinfo(aim_session_t *sess, const char *uin);

#endif /* __OSCAR_ICQ_H__ */