Mercurial > pidgin
annotate src/protocols/msn/user.c @ 19830:3b971c87279d
[gaim-migrate @ 17056]
fix the bug to send Yahoo User offline Message
committed by MaYuan<mayuan2006@gmail.com>
committer: Ethan Blanton <elb@pidgin.im>
author | Ma Yuan <mayuan2006@gmail.com> |
---|---|
date | Sun, 27 Aug 2006 10:34:17 +0000 |
parents | c590e780b3a0 |
children | 5568b3ac6fce |
rev | line source |
---|---|
5309 | 1 /** |
2 * @file user.c User functions | |
3 * | |
4 * gaim | |
5 * | |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
6 * Gaim is the legal property of its developers, whose names are too numerous |
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
8 * source distribution. |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
9 * |
5309 | 10 * This program is free software; you can redistribute it and/or modify |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
23 */ | |
24 #include "msn.h" | |
25 #include "user.h" | |
9860 | 26 #include "slp.h" |
5309 | 27 |
19785 | 28 /*new a user object*/ |
5309 | 29 MsnUser * |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
30 msn_user_new(MsnUserList *userlist, const char *passport, |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
31 const char *store_name) |
5309 | 32 { |
33 MsnUser *user; | |
34 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
35 user = g_new0(MsnUser, 1); |
5309 | 36 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
37 user->userlist = userlist; |
5309 | 38 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
39 msn_user_set_passport(user, passport); |
9209
4c94e3f9f91c
[gaim-migrate @ 10004]
Christian Hammond <chipx86@chipx86.com>
parents:
9198
diff
changeset
|
40 msn_user_set_store_name(user, store_name); |
5309 | 41 |
6858
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
42 /* |
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
43 * XXX This seems to reset the friendly name from what it should be |
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
44 * to the passport when moving users. So, screw it :) |
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
45 */ |
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
46 #if 0 |
5309 | 47 if (name != NULL) |
48 msn_user_set_name(user, name); | |
6858
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
49 #endif |
5309 | 50 |
51 return user; | |
52 } | |
53 | |
19785 | 54 /*destroy a user object*/ |
5309 | 55 void |
56 msn_user_destroy(MsnUser *user) | |
57 { | |
58 g_return_if_fail(user != NULL); | |
59 | |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
60 if (user->clientcaps != NULL) |
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
61 g_hash_table_destroy(user->clientcaps); |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
62 |
19829 | 63 if (user->group_ids != NULL){ |
64 GList *l; | |
65 for (l = user->group_ids; l != NULL; l = l->next){ | |
66 g_free(l->data); | |
67 } | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
68 g_list_free(user->group_ids); |
19829 | 69 } |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
70 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
71 if (user->msnobj != NULL) |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
72 msn_object_destroy(user->msnobj); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
73 |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
74 g_free(user->passport); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
75 g_free(user->friendly_name); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
76 g_free(user->store_name); |
19785 | 77 g_free(user->uid); |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
78 g_free(user->phone.home); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
79 g_free(user->phone.work); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
80 g_free(user->phone.mobile); |
5309 | 81 |
82 g_free(user); | |
83 } | |
84 | |
85 void | |
10451 | 86 msn_user_update(MsnUser *user) |
87 { | |
88 GaimAccount *account; | |
89 | |
90 account = user->userlist->session->account; | |
91 | |
19818 | 92 if (user->statusline != NULL) { |
93 char *status = g_strdup_printf("%s - %s", user->status, user->statusline); | |
94 gaim_prpl_got_user_status(account, user->passport, user->status, "message", user->statusline, NULL); | |
95 } | |
96 else if (user->status != NULL) { | |
11624 | 97 gaim_prpl_got_user_status(account, user->passport, user->status, NULL); |
19818 | 98 } |
10451 | 99 |
19818 | 100 if (user->idle){ |
10451 | 101 gaim_prpl_got_user_idle(account, user->passport, TRUE, -1); |
19818 | 102 }else{ |
10451 | 103 gaim_prpl_got_user_idle(account, user->passport, FALSE, 0); |
19818 | 104 } |
10451 | 105 } |
106 | |
107 void | |
108 msn_user_set_state(MsnUser *user, const char *state) | |
109 { | |
110 const char *status; | |
111 | |
112 if (!g_ascii_strcasecmp(state, "BSY")) | |
113 status = "busy"; | |
114 else if (!g_ascii_strcasecmp(state, "BRB")) | |
115 status = "brb"; | |
116 else if (!g_ascii_strcasecmp(state, "AWY")) | |
117 status = "away"; | |
118 else if (!g_ascii_strcasecmp(state, "PHN")) | |
119 status = "phone"; | |
120 else if (!g_ascii_strcasecmp(state, "LUN")) | |
121 status = "lunch"; | |
122 else | |
123 status = "available"; | |
124 | |
125 if (!g_ascii_strcasecmp(state, "IDL")) | |
126 user->idle = TRUE; | |
127 else | |
128 user->idle = FALSE; | |
129 | |
130 user->status = status; | |
131 } | |
132 | |
133 void | |
5309 | 134 msn_user_set_passport(MsnUser *user, const char *passport) |
135 { | |
136 g_return_if_fail(user != NULL); | |
137 | |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
138 g_free(user->passport); |
5309 | 139 user->passport = g_strdup(passport); |
140 } | |
141 | |
142 void | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
143 msn_user_set_friendly_name(MsnUser *user, const char *name) |
5309 | 144 { |
145 g_return_if_fail(user != NULL); | |
146 | |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
147 g_free(user->friendly_name); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
148 user->friendly_name = g_strdup(name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
149 } |
5309 | 150 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
151 void |
19818 | 152 msn_user_set_statusline(MsnUser *user, const char *statusline) |
153 { | |
154 g_return_if_fail(user != NULL); | |
155 | |
156 g_free(user->statusline); | |
157 user->statusline = g_strdup(statusline); | |
158 } | |
159 | |
160 void | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
161 msn_user_set_store_name(MsnUser *user, const char *name) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
162 { |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
163 g_return_if_fail(user != NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
164 |
19800 | 165 if (name != NULL){ |
166 g_free(user->store_name); | |
167 user->store_name = g_strdup(name); | |
168 } | |
5309 | 169 } |
170 | |
171 void | |
19785 | 172 msn_user_set_uid(MsnUser *user, const char *uid) |
173 { | |
174 g_return_if_fail(user != NULL); | |
175 | |
176 g_free(user->uid); | |
177 user->uid = g_strdup(uid); | |
178 } | |
179 | |
180 void | |
181 msn_user_set_type(MsnUser *user,int type) | |
182 { | |
183 g_return_if_fail(user != NULL); | |
184 | |
185 user->type = type; | |
186 } | |
187 | |
188 void | |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
189 msn_user_set_buddy_icon(MsnUser *user, const char *filename) |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
190 { |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
191 struct stat st; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
192 FILE *fp; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
193 MsnObject *msnobj = msn_user_get_object(user); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
194 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
195 g_return_if_fail(user != NULL); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
196 |
19785 | 197 if (filename == NULL || g_stat(filename, &st) == -1){ |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
198 msn_user_set_object(user, NULL); |
19785 | 199 }else if ((fp = g_fopen(filename, "rb")) != NULL){ |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
200 GaimCipherContext *ctx; |
11164 | 201 char *buf; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
202 gsize len; |
11164 | 203 char *base64; |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
204 unsigned char digest[20]; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
205 |
19785 | 206 if (msnobj == NULL) { |
12315
5a444a92c923
[gaim-migrate @ 14619]
Richard Laager <rlaager@wiktel.com>
parents:
11624
diff
changeset
|
207 msnobj = msn_object_new(); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
208 msn_object_set_local(msnobj); |
7591
24b9b6405f36
[gaim-migrate @ 8209]
Christian Hammond <chipx86@chipx86.com>
parents:
7590
diff
changeset
|
209 msn_object_set_type(msnobj, MSN_OBJECT_USERTILE); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
210 msn_object_set_location(msnobj, "TFR2C2.tmp"); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
211 msn_object_set_creator(msnobj, msn_user_get_passport(user)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
212 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
213 msn_user_set_object(user, msnobj); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
214 } |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
215 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
216 msn_object_set_real_location(msnobj, filename); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
217 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
218 buf = g_malloc(st.st_size); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
219 len = fread(buf, 1, st.st_size, fp); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
220 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
221 fclose(fp); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
222 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
223 /* Compute the SHA1D field. */ |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
224 memset(digest, 0, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
225 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
226 ctx = gaim_cipher_context_new_by_name("sha1", NULL); |
11183 | 227 gaim_cipher_context_append(ctx, (const guchar *)buf, st.st_size); |
10687
b256ce6b85b8
[gaim-migrate @ 12235]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10684
diff
changeset
|
228 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
229 g_free(buf); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
230 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
231 base64 = gaim_base64_encode(digest, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
232 msn_object_set_sha1d(msnobj, base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
233 g_free(base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
234 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
235 msn_object_set_size(msnobj, st.st_size); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
236 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
237 /* Compute the SHA1C field. */ |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
238 buf = g_strdup_printf( |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
239 "Creator%sSize%dType%dLocation%sFriendly%sSHA1D%s", |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
240 msn_object_get_creator(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
241 msn_object_get_size(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
242 msn_object_get_type(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
243 msn_object_get_location(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
244 msn_object_get_friendly(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
245 msn_object_get_sha1d(msnobj)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
246 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
247 memset(digest, 0, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
248 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
249 gaim_cipher_context_reset(ctx, NULL); |
11183 | 250 gaim_cipher_context_append(ctx, (const guchar *)buf, strlen(buf)); |
10687
b256ce6b85b8
[gaim-migrate @ 12235]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10684
diff
changeset
|
251 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
252 gaim_cipher_context_destroy(ctx); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
253 g_free(buf); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
254 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
255 base64 = gaim_base64_encode(digest, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
256 msn_object_set_sha1c(msnobj, base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
257 g_free(base64); |
19785 | 258 }else{ |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
259 gaim_debug_error("msn", "Unable to open buddy icon %s!\n", filename); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
260 msn_user_set_object(user, NULL); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
261 } |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
262 } |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
263 |
19785 | 264 /*add group id to User object*/ |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
265 void |
19785 | 266 msn_user_add_group_id(MsnUser *user, const char* id) |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
267 { |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
268 MsnUserList *userlist; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
269 GaimAccount *account; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
270 GaimBuddy *b; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
271 GaimGroup *g; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
272 const char *passport; |
19829 | 273 const char *group_id; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
274 const char *group_name; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
275 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
276 g_return_if_fail(user != NULL); |
19785 | 277 g_return_if_fail(id != NULL); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
278 |
19829 | 279 group_id = g_strdup(id); |
280 user->group_ids = g_list_append(user->group_ids,group_id); | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
281 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
282 userlist = user->userlist; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
283 account = userlist->session->account; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
284 passport = msn_user_get_passport(user); |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
285 |
19829 | 286 group_name = msn_userlist_find_group_name(userlist, group_id); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
287 |
19829 | 288 gaim_debug_info("User","group id:%s,name:%s,user:%s\n",group_id,group_name,passport); |
19787 | 289 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
290 g = gaim_find_group(group_name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
291 |
19787 | 292 if ((id == NULL) && (g == NULL)){ |
10451 | 293 g = gaim_group_new(group_name); |
294 gaim_blist_add_group(g, NULL); | |
295 } | |
296 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
297 b = gaim_find_buddy_in_group(account, passport, g); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
298 |
19785 | 299 if (b == NULL){ |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
300 b = gaim_buddy_new(account, passport, NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
301 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
302 gaim_blist_add_buddy(b, NULL, g, NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
303 } |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
304 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
305 b->proto_data = user; |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
306 } |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
307 |
19823 | 308 /*check if the msn user is online*/ |
309 gboolean | |
310 msn_user_is_online(GaimAccount *account, const char *name) | |
311 { | |
312 GaimBuddy *buddy; | |
313 | |
314 buddy =gaim_find_buddy(account,name); | |
315 return GAIM_BUDDY_IS_ONLINE(buddy); | |
316 } | |
317 | |
19830 | 318 /*check to see if user is yahoo user? |
319 * TODO: we need to identify it via contact parse | |
320 */ | |
321 gboolean | |
322 msn_user_is_yahoo(GaimAccount *account ,const char *name) | |
323 { | |
324 return (strstr(name,"yahoo") != NULL); | |
325 } | |
326 | |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
327 void |
19785 | 328 msn_user_remove_group_id(MsnUser *user, const char * id) |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
329 { |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
330 g_return_if_fail(user != NULL); |
19785 | 331 g_return_if_fail(id != NULL); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
332 |
19785 | 333 user->group_ids = g_list_remove(user->group_ids, id); |
19829 | 334 g_free(id); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
335 } |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
336 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
337 void |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
338 msn_user_set_home_phone(MsnUser *user, const char *number) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
339 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
340 g_return_if_fail(user != NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
341 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
342 if (user->phone.home != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
343 g_free(user->phone.home); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
344 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
345 user->phone.home = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
346 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
347 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
348 void |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
349 msn_user_set_work_phone(MsnUser *user, const char *number) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
350 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
351 g_return_if_fail(user != NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
352 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
353 if (user->phone.work != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
354 g_free(user->phone.work); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
355 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
356 user->phone.work = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
357 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
358 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
359 void |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
360 msn_user_set_mobile_phone(MsnUser *user, const char *number) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
361 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
362 g_return_if_fail(user != NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
363 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
364 if (user->phone.mobile != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
365 g_free(user->phone.mobile); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
366 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
367 user->phone.mobile = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
368 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
369 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
370 void |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
371 msn_user_set_object(MsnUser *user, MsnObject *obj) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
372 { |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
373 g_return_if_fail(user != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
374 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
375 if (user->msnobj != NULL) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
376 msn_object_destroy(user->msnobj); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
377 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
378 user->msnobj = obj; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
379 |
9860 | 380 if (user->list_op & MSN_LIST_FL_OP) |
381 msn_queue_buddy_icon_request(user); | |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
382 } |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
383 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
384 void |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
385 msn_user_set_client_caps(MsnUser *user, GHashTable *info) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
386 { |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
387 g_return_if_fail(user != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
388 g_return_if_fail(info != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
389 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
390 if (user->clientcaps != NULL) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
391 g_hash_table_destroy(user->clientcaps); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
392 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
393 user->clientcaps = info; |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
394 } |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
395 |
5309 | 396 const char * |
397 msn_user_get_passport(const MsnUser *user) | |
398 { | |
399 g_return_val_if_fail(user != NULL, NULL); | |
400 | |
401 return user->passport; | |
402 } | |
403 | |
404 const char * | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
405 msn_user_get_friendly_name(const MsnUser *user) |
5309 | 406 { |
407 g_return_val_if_fail(user != NULL, NULL); | |
408 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
409 return user->friendly_name; |
5309 | 410 } |
411 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
412 const char * |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
413 msn_user_get_store_name(const MsnUser *user) |
5309 | 414 { |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
415 g_return_val_if_fail(user != NULL, NULL); |
5309 | 416 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
417 return user->store_name; |
5309 | 418 } |
419 | |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
420 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
421 msn_user_get_home_phone(const MsnUser *user) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
422 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
423 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
424 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
425 return user->phone.home; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
426 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
427 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
428 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
429 msn_user_get_work_phone(const MsnUser *user) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
430 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
431 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
432 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
433 return user->phone.work; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
434 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
435 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
436 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
437 msn_user_get_mobile_phone(const MsnUser *user) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
438 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
439 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
440 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
441 return user->phone.mobile; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
442 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
443 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
444 MsnObject * |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
445 msn_user_get_object(const MsnUser *user) |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
446 { |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
447 g_return_val_if_fail(user != NULL, NULL); |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
448 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
449 return user->msnobj; |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
450 } |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
451 |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
452 GHashTable * |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
453 msn_user_get_client_caps(const MsnUser *user) |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
454 { |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
455 g_return_val_if_fail(user != NULL, NULL); |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
456 |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
457 return user->clientcaps; |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
458 } |