Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/user.h @ 23523:31b5a1334e7e
Modifications to the MSN code for some stuff I'll be doing in later
commits.
* Rename MsnUserType to MsnNetwork, because it's a really a Network
ID. Updated the list of networks based on msnpiki.
* Updated list of Client capabilities based on ZoRoNaX' blog:
http://zoronax.spaces.live.com/blog/cns!4A0B813054895814!156.entry
* Save the clientid of contacts.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 15 Jun 2008 08:08:22 +0000 |
parents | 5a6cf27ead31 |
children | a0e957b7b923 |
comparison
equal
deleted
inserted
replaced
23522:fd124c21ebb7 | 23523:31b5a1334e7e |
---|---|
31 | 31 |
32 #include "userlist.h" | 32 #include "userlist.h" |
33 | 33 |
34 typedef enum | 34 typedef enum |
35 { | 35 { |
36 MSN_USER_TYPE_UNKNOWN = 0x00, | 36 MSN_NETWORK_UNKNOWN = 0x00, |
37 MSN_USER_TYPE_PASSPORT = 0x01, | 37 MSN_NETWORK_PASSPORT = 0x01, |
38 MSN_USER_TYPE_UNKNOWN1 = 0x02, | 38 MSN_NETWORK_COMMUNICATOR = 0x02, |
39 MSN_USER_TYPE_MOBILE = 0x04, | 39 MSN_NETWORK_MOBILE = 0x04, |
40 MSN_USER_TYPE_UNKNOWN2 = 0x08, | 40 MSN_NETWORK_MNI = 0x08, |
41 MSN_USER_TYPE_UNKNOWN3 = 0x10, | 41 MSN_NETWORK_SMTP = 0x10, |
42 MSN_USER_TYPE_YAHOO = 0x20 | 42 MSN_NETWORK_YAHOO = 0x20 |
43 } MsnUserType; | 43 } MsnNetwork; |
44 | 44 |
45 /** | 45 /** |
46 * Current media. | 46 * Current media. |
47 */ | 47 */ |
48 typedef struct _CurrentMedia | 48 typedef struct _CurrentMedia |
85 | 85 |
86 MsnObject *msnobj; /**< The user's MSN Object. */ | 86 MsnObject *msnobj; /**< The user's MSN Object. */ |
87 | 87 |
88 GHashTable *clientcaps; /**< The client's capabilities. */ | 88 GHashTable *clientcaps; /**< The client's capabilities. */ |
89 | 89 |
90 MsnUserType type; /**< The user type */ | 90 guint clientid; /**< The client's ID */ |
91 | |
92 MsnNetwork networkid; /**< The user's network */ | |
91 | 93 |
92 int list_op; /**< Which lists the user is in */ | 94 int list_op; /**< Which lists the user is in */ |
93 | 95 |
94 guint membership_id[5]; /**< The membershipId sent by the contacts server, | 96 guint membership_id[5]; /**< The membershipId sent by the contacts server, |
95 indexed by the list it belongs to */ | 97 indexed by the list it belongs to */ |
216 * @param number The work phone number. | 218 * @param number The work phone number. |
217 */ | 219 */ |
218 void msn_user_set_work_phone(MsnUser *user, const char *number); | 220 void msn_user_set_work_phone(MsnUser *user, const char *number); |
219 | 221 |
220 void msn_user_set_uid(MsnUser *user, const char *uid); | 222 void msn_user_set_uid(MsnUser *user, const char *uid); |
221 void msn_user_set_type(MsnUser *user, MsnUserType type); | 223 |
224 /** | |
225 * Sets the client id for a user. | |
226 * | |
227 * @param user The user. | |
228 * @param clientid The client id. | |
229 */ | |
230 void msn_user_set_clientid(MsnUser *user, guint clientid); | |
231 | |
232 /** | |
233 * Sets the network id for a user. | |
234 * | |
235 * @param user The user. | |
236 * @param network The network id. | |
237 */ | |
238 void msn_user_set_network(MsnUser *user, MsnNetwork network); | |
222 | 239 |
223 /** | 240 /** |
224 * Sets the mobile phone number for a user. | 241 * Sets the mobile phone number for a user. |
225 * | 242 * |
226 * @param user The user. | 243 * @param user The user. |
289 * @return The user's mobile phone number. | 306 * @return The user's mobile phone number. |
290 */ | 307 */ |
291 const char *msn_user_get_mobile_phone(const MsnUser *user); | 308 const char *msn_user_get_mobile_phone(const MsnUser *user); |
292 | 309 |
293 /** | 310 /** |
311 * Returns the client id for a user. | |
312 * | |
313 * @param user The user. | |
314 * | |
315 * @return The user's client id. | |
316 */ | |
317 guint msn_user_get_clientid(const MsnUser *user); | |
318 | |
319 /** | |
320 * Returns the network id for a user. | |
321 * | |
322 * @param user The user. | |
323 * | |
324 * @return The user's network id. | |
325 */ | |
326 MsnNetwork msn_user_get_network(const MsnUser *user); | |
327 | |
328 /** | |
294 * Returns the MSNObject for a user. | 329 * Returns the MSNObject for a user. |
295 * | 330 * |
296 * @param user The user. | 331 * @param user The user. |
297 * | 332 * |
298 * @return The MSNObject. | 333 * @return The MSNObject. |