Fri, 07 Jan 2011 21:51:05 +0000
The initial protocol infrastructure for MXit Voice/Video support.
(Currently disabled with compile-time flag)
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
1 | /* |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
2 | * MXit Protocol libPurple Plugin |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
3 | * |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
4 | * -- user roster management (mxit contacts) -- |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
5 | * |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
6 | * Pieter Loubser <libpurple@mxit.com> |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
7 | * |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
8 | * (C) Copyright 2009 MXit Lifestyle (Pty) Ltd. |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
9 | * <http://www.mxitlifestyle.com> |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
10 | * |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
11 | * This program is free software; you can redistribute it and/or modify |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
12 | * it under the terms of the GNU General Public License as published by |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
13 | * the Free Software Foundation; either version 2 of the License, or |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
14 | * (at your option) any later version. |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
15 | * |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
16 | * This program is distributed in the hope that it will be useful, |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
19 | * GNU General Public License for more details. |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
20 | * |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
21 | * You should have received a copy of the GNU General Public License |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
22 | * along with this program; if not, write to the Free Software |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
24 | */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
25 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
26 | #ifndef _MXIT_ROSTER_H_ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
27 | #define _MXIT_ROSTER_H_ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
28 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
29 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
30 | /* MXit contact presence states */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
31 | #define MXIT_PRESENCE_OFFLINE 0x00 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
32 | #define MXIT_PRESENCE_ONLINE 0x01 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
33 | #define MXIT_PRESENCE_AWAY 0x02 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
34 | #define MXIT_PRESENCE_AVAILABLE 0x03 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
35 | #define MXIT_PRESENCE_DND 0x04 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
36 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
37 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
38 | /* MXit contact types */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
39 | #define MXIT_TYPE_MXIT 0x00 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
40 | #define MXIT_TYPE_JABBER 0x01 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
41 | #define MXIT_TYPE_MSN 0x02 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
42 | #define MXIT_TYPE_YAHOO 0x03 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
43 | #define MXIT_TYPE_ICQ 0x04 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
44 | #define MXIT_TYPE_AIM 0x05 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
45 | #define MXIT_TYPE_QQ 0x06 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
46 | #define MXIT_TYPE_WV 0x07 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
47 | #define MXIT_TYPE_BOT 0x08 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
48 | #define MXIT_TYPE_CHATROOM 0x09 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
49 | #define MXIT_TYPE_SMS 0x0A |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
50 | #define MXIT_TYPE_GROUP 0x0B |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
51 | #define MXIT_TYPE_GALLERY 0x0C |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
52 | #define MXIT_TYPE_INFO 0x0D |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
53 | #define MXIT_TYPE_MULTIMX 0x0E |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
54 | #define MXIT_TYPE_HYBRID 0x0F |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
55 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
56 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
57 | /* MXit contact moods */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
58 | #define MXIT_MOOD_NONE 0x00 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
59 | #define MXIT_MOOD_ANGRY 0x01 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
60 | #define MXIT_MOOD_EXCITED 0x02 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
61 | #define MXIT_MOOD_GRUMPY 0x03 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
62 | #define MXIT_MOOD_HAPPY 0x04 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
63 | #define MXIT_MOOD_INLOVE 0x05 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
64 | #define MXIT_MOOD_INVINCIBLE 0x06 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
65 | #define MXIT_MOOD_SAD 0x07 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
66 | #define MXIT_MOOD_HOT 0x08 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
67 | #define MXIT_MOOD_SICK 0x09 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
68 | #define MXIT_MOOD_SLEEPY 0x0A |
|
30570
b9eca5b5a10d
Add the new Moods.
Andrew Victor <andrew.victor@mxit.com>
parents:
30522
diff
changeset
|
69 | #define MXIT_MOOD_BORED 0x0B |
|
b9eca5b5a10d
Add the new Moods.
Andrew Victor <andrew.victor@mxit.com>
parents:
30522
diff
changeset
|
70 | #define MXIT_MOOD_COLD 0x0C |
|
b9eca5b5a10d
Add the new Moods.
Andrew Victor <andrew.victor@mxit.com>
parents:
30522
diff
changeset
|
71 | #define MXIT_MOOD_CONFUSED 0x0D |
|
b9eca5b5a10d
Add the new Moods.
Andrew Victor <andrew.victor@mxit.com>
parents:
30522
diff
changeset
|
72 | #define MXIT_MOOD_HUNGRY 0x0E |
|
b9eca5b5a10d
Add the new Moods.
Andrew Victor <andrew.victor@mxit.com>
parents:
30522
diff
changeset
|
73 | #define MXIT_MOOD_STRESSED 0x0F |
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
74 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
75 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
76 | /* MXit contact flags */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
77 | #define MXIT_CFLAG_HIDDEN 0x02 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
78 | #define MXIT_CFLAG_GATEWAY 0x04 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
79 | #define MXIT_CFLAG_FOCUS_SEND_BLANK 0x20000 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
80 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
81 | |
|
31491
cf74b88370ea
The initial protocol infrastructure for MXit Voice/Video support.
Andrew Victor <andrew.victor@mxit.com>
parents:
30570
diff
changeset
|
82 | /* MXit presence flags */ |
|
cf74b88370ea
The initial protocol infrastructure for MXit Voice/Video support.
Andrew Victor <andrew.victor@mxit.com>
parents:
30570
diff
changeset
|
83 | #define MXIT_PFLAG_VOICE 0x1 |
|
cf74b88370ea
The initial protocol infrastructure for MXit Voice/Video support.
Andrew Victor <andrew.victor@mxit.com>
parents:
30570
diff
changeset
|
84 | #define MXIT_PFLAG_VIDEO 0x2 |
|
cf74b88370ea
The initial protocol infrastructure for MXit Voice/Video support.
Andrew Victor <andrew.victor@mxit.com>
parents:
30570
diff
changeset
|
85 | |
|
cf74b88370ea
The initial protocol infrastructure for MXit Voice/Video support.
Andrew Victor <andrew.victor@mxit.com>
parents:
30570
diff
changeset
|
86 | |
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
87 | /* Subscription types */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
88 | #define MXIT_SUBTYPE_BOTH 'B' |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
89 | #define MXIT_SUBTYPE_PENDING 'P' |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
90 | #define MXIT_SUBTYPE_ASK 'A' |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
91 | #define MXIT_SUBTYPE_REJECTED 'R' |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
92 | #define MXIT_SUBTYPE_DELETED 'D' |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
93 | #define MXIT_SUBTYPE_NONE 'N' |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
94 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
95 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
96 | /* client protocol constants */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
97 | #define MXIT_CP_MAX_JID_LEN 64 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
98 | #define MXIT_CP_MAX_GROUP_LEN 32 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
99 | #define MXIT_CP_MAX_ALIAS_LEN 48 |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
100 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
101 | #define MXIT_DEFAULT_GROUP "MXit" |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
102 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
103 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
104 | /* |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
105 | * a MXit contact |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
106 | */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
107 | struct contact { |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
108 | char username[MXIT_CP_MAX_JID_LEN+1]; /* unique contact name (with domain) */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
109 | char alias[MXIT_CP_MAX_GROUP_LEN+1]; /* contact alias (what will be seen) */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
110 | char groupname[MXIT_CP_MAX_ALIAS_LEN+1]; /* contact group name */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
111 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
112 | short type; /* contact type */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
113 | short mood; /* contact current mood */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
114 | int flags; /* contact flags */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
115 | short presence; /* presence state */ |
|
31491
cf74b88370ea
The initial protocol infrastructure for MXit Voice/Video support.
Andrew Victor <andrew.victor@mxit.com>
parents:
30570
diff
changeset
|
116 | int capabilities; /* contact capabilities */ |
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
117 | short subtype; /* subscription type */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
118 | |
|
30211
6c81374b615e
* Show the buddy's registration country in their profile.
Andrew Victor <andrew.victor@mxit.com>
parents:
30176
diff
changeset
|
119 | char* msg; /* invite/rejection message */ |
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
120 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
121 | char customMood[16]; /* custom mood */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
122 | char* statusMsg; /* status message */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
123 | char* avatarId; /* avatarId */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
124 | }; |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
125 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
126 | /* Presence / Status */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
127 | GList* mxit_status_types( PurpleAccount* account ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
128 | int mxit_convert_presence( const char* id ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
129 | const char* mxit_convert_presence_to_name( short no ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
130 | const char* mxit_convert_subtype_to_name( short subtype ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
131 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
132 | /* Moods */ |
|
30176
b380932e86ea
Add support for the standard Mood API.
Andrew Victor <andrew.victor@mxit.com>
parents:
28841
diff
changeset
|
133 | int mxit_convert_mood( const char* id ); |
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
134 | const char* mxit_convert_mood_to_name( short id ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
135 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
136 | /* MXit Protocol callbacks */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
137 | void mxit_update_contact( struct MXitSession* session, struct contact* contact ); |
|
31491
cf74b88370ea
The initial protocol infrastructure for MXit Voice/Video support.
Andrew Victor <andrew.victor@mxit.com>
parents:
30570
diff
changeset
|
138 | void mxit_update_buddy_presence( struct MXitSession* session, const char* username, short presence, short mood, const char* customMood, const char* statusMsg, int flags ); |
|
30522
5b84b44ed654
Since a buddy's avatar information is distributed as part of their online
Andrew Victor <andrew.victor@mxit.com>
parents:
30211
diff
changeset
|
139 | void mxit_update_buddy_avatar( struct MXitSession* session, const char* username, const char* avatarId ); |
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
140 | void mxit_new_subscription( struct MXitSession* session, struct contact* contact ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
141 | void mxit_update_blist( struct MXitSession* session ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
142 | gboolean is_mxit_chatroom_contact( struct MXitSession* session, const char* username ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
143 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
144 | /* libPurple callbacks */ |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
145 | void mxit_add_buddy( PurpleConnection* gc, PurpleBuddy* buddy, PurpleGroup* group ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
146 | void mxit_remove_buddy( PurpleConnection* gc, PurpleBuddy* buddy, PurpleGroup* group ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
147 | void mxit_buddy_alias( PurpleConnection* gc, const char* who, const char* alias ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
148 | void mxit_buddy_group( PurpleConnection* gc, const char* who, const char* old_group, const char* new_group ); |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
149 | void mxit_rename_group( PurpleConnection* gc, const char* old_name, PurpleGroup* group, GList* moved_buddies ); |
|
30176
b380932e86ea
Add support for the standard Mood API.
Andrew Victor <andrew.victor@mxit.com>
parents:
28841
diff
changeset
|
150 | PurpleMood* mxit_get_moods(PurpleAccount *account); |
|
28841
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
151 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
152 | |
|
6b9568572bcb
Initial addition of the MXit protocol plugin, provided by the MXit folks
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
diff
changeset
|
153 | #endif /* _MXIT_ROSTER_H_ */ |