Mercurial > pidgin
annotate src/protocols/msn/user.c @ 19785:852b32710df0
[gaim-migrate @ 16507]
add the contact list retrieve and dump contact list to server
currently can do chanllenge successfully
But can't get the buddy list done
by MaYuan<mayuan2006@gmail.com>
committer: Ethan Blanton <elb@pidgin.im>
author | Ma Yuan <mayuan2006@gmail.com> |
---|---|
date | Mon, 17 Jul 2006 12:22:37 +0000 |
parents | 967ef719cb62 |
children | b99512bd6d85 |
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 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
63 if (user->group_ids != NULL) |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
64 g_list_free(user->group_ids); |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
65 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
66 if (user->msnobj != NULL) |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
67 msn_object_destroy(user->msnobj); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
68 |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
69 g_free(user->passport); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
70 g_free(user->friendly_name); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
71 g_free(user->store_name); |
19785 | 72 g_free(user->uid); |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
73 g_free(user->phone.home); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
74 g_free(user->phone.work); |
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
75 g_free(user->phone.mobile); |
5309 | 76 |
77 g_free(user); | |
78 } | |
79 | |
80 void | |
10451 | 81 msn_user_update(MsnUser *user) |
82 { | |
83 GaimAccount *account; | |
84 | |
85 account = user->userlist->session->account; | |
86 | |
11624 | 87 if (user->status != NULL) |
88 gaim_prpl_got_user_status(account, user->passport, user->status, NULL); | |
10451 | 89 |
90 if (user->idle) | |
91 gaim_prpl_got_user_idle(account, user->passport, TRUE, -1); | |
92 else | |
93 gaim_prpl_got_user_idle(account, user->passport, FALSE, 0); | |
94 } | |
95 | |
96 void | |
97 msn_user_set_state(MsnUser *user, const char *state) | |
98 { | |
99 const char *status; | |
100 | |
101 if (!g_ascii_strcasecmp(state, "BSY")) | |
102 status = "busy"; | |
103 else if (!g_ascii_strcasecmp(state, "BRB")) | |
104 status = "brb"; | |
105 else if (!g_ascii_strcasecmp(state, "AWY")) | |
106 status = "away"; | |
107 else if (!g_ascii_strcasecmp(state, "PHN")) | |
108 status = "phone"; | |
109 else if (!g_ascii_strcasecmp(state, "LUN")) | |
110 status = "lunch"; | |
111 else | |
112 status = "available"; | |
113 | |
114 if (!g_ascii_strcasecmp(state, "IDL")) | |
115 user->idle = TRUE; | |
116 else | |
117 user->idle = FALSE; | |
118 | |
119 user->status = status; | |
120 } | |
121 | |
122 void | |
5309 | 123 msn_user_set_passport(MsnUser *user, const char *passport) |
124 { | |
125 g_return_if_fail(user != NULL); | |
126 | |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
127 g_free(user->passport); |
5309 | 128 user->passport = g_strdup(passport); |
129 } | |
130 | |
131 void | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
132 msn_user_set_friendly_name(MsnUser *user, const char *name) |
5309 | 133 { |
134 g_return_if_fail(user != NULL); | |
135 | |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
136 g_free(user->friendly_name); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
137 user->friendly_name = g_strdup(name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
138 } |
5309 | 139 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
140 void |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
141 msn_user_set_store_name(MsnUser *user, const char *name) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
142 { |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
143 g_return_if_fail(user != NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
144 |
13693
510b7b7dd645
[gaim-migrate @ 16096]
Richard Laager <rlaager@wiktel.com>
parents:
12315
diff
changeset
|
145 g_free(user->store_name); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
146 user->store_name = g_strdup(name); |
5309 | 147 } |
148 | |
149 void | |
19785 | 150 msn_user_set_uid(MsnUser *user, const char *uid) |
151 { | |
152 g_return_if_fail(user != NULL); | |
153 | |
154 g_free(user->uid); | |
155 user->uid = g_strdup(uid); | |
156 } | |
157 | |
158 void | |
159 msn_user_set_type(MsnUser *user,int type) | |
160 { | |
161 g_return_if_fail(user != NULL); | |
162 | |
163 user->type = type; | |
164 } | |
165 | |
166 void | |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
167 msn_user_set_buddy_icon(MsnUser *user, const char *filename) |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
168 { |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
169 struct stat st; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
170 FILE *fp; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
171 MsnObject *msnobj = msn_user_get_object(user); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
172 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
173 g_return_if_fail(user != NULL); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
174 |
19785 | 175 if (filename == NULL || g_stat(filename, &st) == -1){ |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
176 msn_user_set_object(user, NULL); |
19785 | 177 }else if ((fp = g_fopen(filename, "rb")) != NULL){ |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
178 GaimCipherContext *ctx; |
11164 | 179 char *buf; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
180 gsize len; |
11164 | 181 char *base64; |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
182 unsigned char digest[20]; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
183 |
19785 | 184 if (msnobj == NULL) { |
12315
5a444a92c923
[gaim-migrate @ 14619]
Richard Laager <rlaager@wiktel.com>
parents:
11624
diff
changeset
|
185 msnobj = msn_object_new(); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
186 msn_object_set_local(msnobj); |
7591
24b9b6405f36
[gaim-migrate @ 8209]
Christian Hammond <chipx86@chipx86.com>
parents:
7590
diff
changeset
|
187 msn_object_set_type(msnobj, MSN_OBJECT_USERTILE); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
188 msn_object_set_location(msnobj, "TFR2C2.tmp"); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
189 msn_object_set_creator(msnobj, msn_user_get_passport(user)); |
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 msn_user_set_object(user, msnobj); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
192 } |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
193 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
194 msn_object_set_real_location(msnobj, filename); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
195 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
196 buf = g_malloc(st.st_size); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
197 len = fread(buf, 1, st.st_size, fp); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
198 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
199 fclose(fp); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
200 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
201 /* Compute the SHA1D field. */ |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
202 memset(digest, 0, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
203 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
204 ctx = gaim_cipher_context_new_by_name("sha1", NULL); |
11183 | 205 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
|
206 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
207 g_free(buf); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
208 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
209 base64 = gaim_base64_encode(digest, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
210 msn_object_set_sha1d(msnobj, base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
211 g_free(base64); |
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_object_set_size(msnobj, st.st_size); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
214 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
215 /* Compute the SHA1C field. */ |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
216 buf = g_strdup_printf( |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
217 "Creator%sSize%dType%dLocation%sFriendly%sSHA1D%s", |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
218 msn_object_get_creator(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
219 msn_object_get_size(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
220 msn_object_get_type(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
221 msn_object_get_location(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
222 msn_object_get_friendly(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
223 msn_object_get_sha1d(msnobj)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
224 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
225 memset(digest, 0, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
226 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
227 gaim_cipher_context_reset(ctx, NULL); |
11183 | 228 gaim_cipher_context_append(ctx, (const guchar *)buf, strlen(buf)); |
10687
b256ce6b85b8
[gaim-migrate @ 12235]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10684
diff
changeset
|
229 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
230 gaim_cipher_context_destroy(ctx); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
231 g_free(buf); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
232 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
233 base64 = gaim_base64_encode(digest, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
234 msn_object_set_sha1c(msnobj, base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
235 g_free(base64); |
19785 | 236 }else{ |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
237 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
|
238 msn_user_set_object(user, NULL); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
239 } |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
240 } |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
241 |
19785 | 242 /*add group id to User object*/ |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
243 void |
19785 | 244 msn_user_add_group_id(MsnUser *user, const char* id) |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
245 { |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
246 MsnUserList *userlist; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
247 GaimAccount *account; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
248 GaimBuddy *b; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
249 GaimGroup *g; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
250 const char *passport; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
251 const char *group_name; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
252 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
253 g_return_if_fail(user != NULL); |
19785 | 254 g_return_if_fail(id != NULL); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
255 |
19785 | 256 user->group_ids = g_list_append(user->group_ids,id); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
257 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
258 userlist = user->userlist; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
259 account = userlist->session->account; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
260 passport = msn_user_get_passport(user); |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
261 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
262 group_name = msn_userlist_find_group_name(userlist, id); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
263 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
264 g = gaim_find_group(group_name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
265 |
19785 | 266 if ((id == 0) && (g == NULL)){ |
10451 | 267 g = gaim_group_new(group_name); |
268 gaim_blist_add_group(g, NULL); | |
269 } | |
270 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
271 b = gaim_find_buddy_in_group(account, passport, g); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
272 |
19785 | 273 if (b == NULL){ |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
274 b = gaim_buddy_new(account, passport, NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
275 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
276 gaim_blist_add_buddy(b, NULL, g, NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
277 } |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
278 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
279 b->proto_data = user; |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
280 } |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
281 |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
282 void |
19785 | 283 msn_user_remove_group_id(MsnUser *user, const char * id) |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
284 { |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
285 g_return_if_fail(user != NULL); |
19785 | 286 g_return_if_fail(id != NULL); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
287 |
19785 | 288 user->group_ids = g_list_remove(user->group_ids, id); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
289 } |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
290 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
291 void |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
292 msn_user_set_home_phone(MsnUser *user, const char *number) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
293 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
294 g_return_if_fail(user != NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
295 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
296 if (user->phone.home != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
297 g_free(user->phone.home); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
298 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
299 user->phone.home = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
300 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
301 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
302 void |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
303 msn_user_set_work_phone(MsnUser *user, const char *number) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
304 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
305 g_return_if_fail(user != NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
306 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
307 if (user->phone.work != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
308 g_free(user->phone.work); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
309 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
310 user->phone.work = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
311 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
312 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
313 void |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
314 msn_user_set_mobile_phone(MsnUser *user, const char *number) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
315 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
316 g_return_if_fail(user != NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
317 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
318 if (user->phone.mobile != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
319 g_free(user->phone.mobile); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
320 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
321 user->phone.mobile = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
322 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
323 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
324 void |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
325 msn_user_set_object(MsnUser *user, MsnObject *obj) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
326 { |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
327 g_return_if_fail(user != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
328 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
329 if (user->msnobj != NULL) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
330 msn_object_destroy(user->msnobj); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
331 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
332 user->msnobj = obj; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
333 |
9860 | 334 if (user->list_op & MSN_LIST_FL_OP) |
335 msn_queue_buddy_icon_request(user); | |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
336 } |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
337 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
338 void |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
339 msn_user_set_client_caps(MsnUser *user, GHashTable *info) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
340 { |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
341 g_return_if_fail(user != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
342 g_return_if_fail(info != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
343 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
344 if (user->clientcaps != NULL) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
345 g_hash_table_destroy(user->clientcaps); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
346 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
347 user->clientcaps = info; |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
348 } |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
349 |
5309 | 350 const char * |
351 msn_user_get_passport(const MsnUser *user) | |
352 { | |
353 g_return_val_if_fail(user != NULL, NULL); | |
354 | |
355 return user->passport; | |
356 } | |
357 | |
358 const char * | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
359 msn_user_get_friendly_name(const MsnUser *user) |
5309 | 360 { |
361 g_return_val_if_fail(user != NULL, NULL); | |
362 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
363 return user->friendly_name; |
5309 | 364 } |
365 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
366 const char * |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
367 msn_user_get_store_name(const MsnUser *user) |
5309 | 368 { |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
369 g_return_val_if_fail(user != NULL, NULL); |
5309 | 370 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
371 return user->store_name; |
5309 | 372 } |
373 | |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
374 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
375 msn_user_get_home_phone(const MsnUser *user) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
376 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
377 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
378 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
379 return user->phone.home; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
380 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
381 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
382 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
383 msn_user_get_work_phone(const MsnUser *user) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
384 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
385 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
386 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
387 return user->phone.work; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
388 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
389 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
390 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
391 msn_user_get_mobile_phone(const MsnUser *user) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
392 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
393 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
394 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
395 return user->phone.mobile; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
396 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
397 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
398 MsnObject * |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
399 msn_user_get_object(const MsnUser *user) |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
400 { |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
401 g_return_val_if_fail(user != NULL, NULL); |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
402 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
403 return user->msnobj; |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
404 } |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
405 |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
406 GHashTable * |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
407 msn_user_get_client_caps(const MsnUser *user) |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
408 { |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
409 g_return_val_if_fail(user != NULL, NULL); |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
410 |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
411 return user->clientcaps; |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
412 } |