Mercurial > pidgin
annotate src/protocols/msn/user.h @ 7935:11cef36ba006
[gaim-migrate @ 8606]
Fix unblocking of users.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 27 Dec 2003 01:02:44 +0000 |
parents | 3a48ade4f510 |
children | 06f57183e29f |
rev | line source |
---|---|
5309 | 1 /** |
2 * @file user.h User functions | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
7 * |
5309 | 8 * This program is free software; you can redistribute it and/or modify |
9 * it under the terms of the GNU General Public License as published by | |
10 * the Free Software Foundation; either version 2 of the License, or | |
11 * (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, | |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 * GNU General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program; if not, write to the Free Software | |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 #ifndef _MSN_USER_H_ | |
23 #define _MSN_USER_H_ | |
24 | |
25 typedef struct _MsnUser MsnUser; | |
26 typedef struct _MsnUsers MsnUsers; | |
27 | |
28 #include "session.h" | |
6787
faa491042c66
[gaim-migrate @ 7326]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
29 #include "msnobject.h" |
5309 | 30 |
31 /** | |
32 * A user. | |
33 */ | |
34 struct _MsnUser | |
35 { | |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
36 MsnSession *session; /**< The MSN session. */ |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
37 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
38 char *passport; /**< The passport account. */ |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
39 char *name; /**< The friendly name. */ |
5309 | 40 |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
41 struct |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
42 { |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
43 char *home; /**< Home phone number. */ |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
44 char *work; /**< Work phone number. */ |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
45 char *mobile; /**< Mobile phone number. */ |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
46 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
47 } phone; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
48 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
49 gboolean authorized; /**< Authorized to add this user. */ |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
50 gboolean mobile; /**< Signed up with MSN Mobile. */ |
5309 | 51 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
52 GList *group_ids; /**< The group IDs. */ |
5309 | 53 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
54 size_t ref_count; /**< The reference count. */ |
5372
fa0217bec87e
[gaim-migrate @ 5748]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
55 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
56 MsnObject *msnobj; /**< The user's MSN Object. */ |
6787
faa491042c66
[gaim-migrate @ 7326]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
57 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
58 GHashTable *clientcaps; /**< The client's capabilities. */ |
5309 | 59 }; |
60 | |
61 /** | |
62 * A collection of users. | |
63 */ | |
64 struct _MsnUsers | |
65 { | |
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
66 size_t count; /**< The number of users. */ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
67 |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
68 GList *users; /**< The list of users. */ |
5309 | 69 }; |
70 | |
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
71 /**************************************************************************/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
72 /** @name User API */ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
73 /**************************************************************************/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
74 /*@{*/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
75 |
5309 | 76 /** |
77 * Creates a new user structure. | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
78 * |
5309 | 79 * @param session The MSN session. |
80 * @param passport The initial passport. | |
81 * @param name The initial friendly name. | |
82 * | |
83 * @return A new user structure. | |
84 */ | |
85 MsnUser *msn_user_new(MsnSession *session, const char *passport, | |
86 const char *name); | |
87 | |
88 /** | |
89 * Destroys a user structure. | |
90 * | |
91 * @param user The user to destroy. | |
92 */ | |
93 void msn_user_destroy(MsnUser *user); | |
94 | |
95 /** | |
96 * Increments the reference count on a user. | |
97 * | |
98 * @param user The user. | |
99 * | |
100 * @return @a user | |
101 */ | |
102 MsnUser *msn_user_ref(MsnUser *user); | |
103 | |
104 /** | |
105 * Decrements the reference count on a user. | |
106 * | |
107 * This will destroy the structure if the count hits 0. | |
108 * | |
109 * @param user The user. | |
110 * | |
111 * @return @a user, or @c NULL if the new count is 0. | |
112 */ | |
113 MsnUser *msn_user_unref(MsnUser *user); | |
114 | |
115 /** | |
116 * Sets the passport account for a user. | |
117 * | |
118 * @param user The user. | |
119 * @param passport The passport account. | |
120 */ | |
121 void msn_user_set_passport(MsnUser *user, const char *passport); | |
122 | |
123 /** | |
124 * Sets the friendly name for a user. | |
125 * | |
126 * @param user The user. | |
127 * @param name The friendly name. | |
128 */ | |
129 void msn_user_set_name(MsnUser *user, const char *name); | |
130 | |
131 /** | |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
132 * Sets the buddy icon for a local user. |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
133 * |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
134 * @param user The user. |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
135 * @param filename The path to the buddy icon. |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
136 */ |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
137 void msn_user_set_buddy_icon(MsnUser *user, const char *filename); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
138 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
139 /** |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
140 * Sets the group ID list for a user. |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
141 * |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
142 * @param user The user. |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
143 * @param ids The group ID list. |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
144 */ |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
145 void msn_user_set_group_ids(MsnUser *user, GList *ids); |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
146 |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
147 /** |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
148 * Adds the group ID for a user. |
5309 | 149 * |
150 * @param user The user. | |
151 * @param id The group ID. | |
152 */ | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
153 void msn_user_add_group_id(MsnUser *user, int id); |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
154 |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
155 /** |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
156 * Removes the group ID from a user. |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
157 * |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
158 * @param user The user. |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
159 * @param id The group ID. |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
160 */ |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
161 void msn_user_remove_group_id(MsnUser *user, int id); |
5309 | 162 |
163 /** | |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
164 * Sets the home phone number for a user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
165 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
166 * @param user The user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
167 * @param number The home phone number. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
168 */ |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
169 void msn_user_set_home_phone(MsnUser *user, const char *number); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
170 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
171 /** |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
172 * Sets the work phone number for a user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
173 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
174 * @param user The user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
175 * @param number The work phone number. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
176 */ |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
177 void msn_user_set_work_phone(MsnUser *user, const char *number); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
178 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
179 /** |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
180 * Sets the mobile phone number for a user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
181 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
182 * @param user The user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
183 * @param number The mobile phone number. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
184 */ |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
185 void msn_user_set_mobile_phone(MsnUser *user, const char *number); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
186 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
187 /** |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
188 * Sets the MSNObject for a user. |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
189 * |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
190 * @param user The user. |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
191 * @param obj The MSNObject. |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
192 */ |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
193 void msn_user_set_object(MsnUser *user, MsnObject *obj); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
194 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
195 /** |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
196 * Sets the client information for a user. |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
197 * |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
198 * @param user The user. |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
199 * @param info The client information. |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
200 */ |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
201 void msn_user_set_client_caps(MsnUser *user, GHashTable *info); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
202 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
203 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
204 /** |
5309 | 205 * Returns the passport account for a user. |
206 * | |
207 * @param user The user. | |
208 * | |
209 * @return The passport account. | |
210 */ | |
211 const char *msn_user_get_passport(const MsnUser *user); | |
212 | |
213 /** | |
214 * Returns the friendly name for a user. | |
215 * | |
216 * @param user The user. | |
217 * | |
218 * @return The friendly name. | |
219 */ | |
220 const char *msn_user_get_name(const MsnUser *user); | |
221 | |
222 /** | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
223 * Returns the group IDs for a user. |
5309 | 224 * |
225 * @param user The user. | |
226 * | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
227 * @return The group IDs. |
5309 | 228 */ |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
229 GList *msn_user_get_group_ids(const MsnUser *user); |
5309 | 230 |
231 /** | |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
232 * Returns the home phone number for a user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
233 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
234 * @param user The user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
235 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
236 * @return The user's home phone number. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
237 */ |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
238 const char *msn_user_get_home_phone(const MsnUser *user); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
239 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
240 /** |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
241 * Returns the work phone number for a user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
242 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
243 * @param user The user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
244 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
245 * @return The user's work phone number. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
246 */ |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
247 const char *msn_user_get_work_phone(const MsnUser *user); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
248 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
249 /** |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
250 * Returns the mobile phone number for a user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
251 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
252 * @param user The user. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
253 * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
254 * @return The user's mobile phone number. |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
255 */ |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
256 const char *msn_user_get_mobile_phone(const MsnUser *user); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
257 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
258 /** |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
259 * Returns the MSNObject for a user. |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
260 * |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
261 * @param user The user. |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
262 * |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
263 * @return The MSNObject. |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
264 */ |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6787
diff
changeset
|
265 MsnObject *msn_user_get_object(const MsnUser *user); |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
266 |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
267 /** |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
268 * Returns the client information for a user. |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
269 * |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
270 * @param user The user. |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
271 * |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
272 * @return The client information. |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
273 */ |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5373
diff
changeset
|
274 GHashTable *msn_user_get_client_caps(const MsnUser *user); |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
275 |
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
276 /*@}*/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
277 |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
278 /**************************************************************************/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
279 /** @name User List API */ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
280 /**************************************************************************/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
281 /*@{*/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
282 |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
283 /** |
5309 | 284 * Creates a new MsnUsers structure. |
285 * | |
286 * @return A new MsnUsers structure. | |
287 */ | |
288 MsnUsers *msn_users_new(void); | |
289 | |
290 /** | |
291 * Destroys a users list. | |
292 * | |
293 * @param users The users list. | |
294 */ | |
295 void msn_users_destroy(MsnUsers *users); | |
296 | |
297 /** | |
298 * Adds a user to a users list. | |
299 * | |
300 * @param users The users list. | |
301 * @param user The user. | |
302 */ | |
303 void msn_users_add(MsnUsers *users, MsnUser *user); | |
304 | |
305 /** | |
306 * Removes a user from a users list. | |
307 * | |
308 * @param users The users list. | |
309 * @param user The user. | |
310 */ | |
311 void msn_users_remove(MsnUsers *users, MsnUser *user); | |
312 | |
313 /** | |
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
314 * Returns the number of users in a users list. |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
315 * |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
316 * @param users The users list. |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
317 * |
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
318 * @return The number of users. |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
319 */ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
320 size_t msn_users_get_count(const MsnUsers *users); |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
321 |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
322 /** |
5309 | 323 * Finds a user with the specified passport. |
324 * | |
325 * @param users A list of users. | |
326 * @param passport The passport. | |
327 * | |
328 * @return The user if found, or @c NULL otherwise. | |
329 */ | |
330 MsnUser *msn_users_find_with_passport(MsnUsers *users, const char *passport); | |
331 | |
5518
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
332 /*@}*/ |
bf2a7a7b739d
[gaim-migrate @ 5918]
Christian Hammond <chipx86@chipx86.com>
parents:
5475
diff
changeset
|
333 |
5309 | 334 #endif /* _MSN_USER_H_ */ |