Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/user.h @ 20442:a1c6206f0205
Make the MsnUser type an enum so we have fewer magic numbers
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sun, 27 May 2007 21:13:37 +0000 |
parents | 7c0a2ef88018 |
children | ff4ae9dde291 |
comparison
equal
deleted
inserted
replaced
20441:9053156d016a | 20442:a1c6206f0205 |
---|---|
28 | 28 |
29 #include "session.h" | 29 #include "session.h" |
30 #include "object.h" | 30 #include "object.h" |
31 | 31 |
32 #include "userlist.h" | 32 #include "userlist.h" |
33 | |
34 typedef enum | |
35 { | |
36 MSN_USER_TYPE_UNKNOWN = 0x00, | |
37 MSN_USER_TYPE_PASSPORT = 0x01, | |
38 MSN_USER_TYPE_UNKNOWN1 = 0x02, | |
39 MSN_USER_TYPE_MOBILE = 0x04, | |
40 MSN_USER_TYPE_UNKNOWN2 = 0x08, | |
41 MSN_USER_TYPE_UNKNOWN3 = 0x10, | |
42 MSN_USER_TYPE_YAHOO = 0x20 | |
43 } MsnUserType; | |
33 | 44 |
34 /** | 45 /** |
35 * A user. | 46 * A user. |
36 */ | 47 */ |
37 struct _MsnUser | 48 struct _MsnUser |
68 | 79 |
69 MsnObject *msnobj; /**< The user's MSN Object. */ | 80 MsnObject *msnobj; /**< The user's MSN Object. */ |
70 | 81 |
71 GHashTable *clientcaps; /**< The client's capabilities. */ | 82 GHashTable *clientcaps; /**< The client's capabilities. */ |
72 | 83 |
73 int type; | 84 MsnUserType type; /**< The user type */ |
74 int list_op; | 85 int list_op; /**< Which lists the user is in */ |
75 }; | 86 }; |
76 | 87 |
77 /**************************************************************************/ | 88 /**************************************************************************/ |
78 /** @name User API */ | 89 /** @name User API */ |
79 /**************************************************************************/ | 90 /**************************************************************************/ |
203 * @param number The work phone number. | 214 * @param number The work phone number. |
204 */ | 215 */ |
205 void msn_user_set_work_phone(MsnUser *user, const char *number); | 216 void msn_user_set_work_phone(MsnUser *user, const char *number); |
206 | 217 |
207 void msn_user_set_uid(MsnUser *user, const char *uid); | 218 void msn_user_set_uid(MsnUser *user, const char *uid); |
208 void msn_user_set_type(MsnUser *user,int type); | 219 void msn_user_set_type(MsnUser *user, MsnUserType type); |
209 | 220 |
210 /** | 221 /** |
211 * Sets the mobile phone number for a user. | 222 * Sets the mobile phone number for a user. |
212 * | 223 * |
213 * @param user The user. | 224 * @param user The user. |