Mercurial > pidgin.yaz
annotate src/protocols/msn/user.c @ 11620:fbc4eeab2227
[gaim-migrate @ 13894]
this lets you leave a highlighted tab by control-tab (forward) or
control-shift-tab (backwards). its not 100% intuitive though, because it
leaves the tab highlighed, which means that in the case of 1 highlighted
tab, the current one, you will leave the tab on the first control-tab,
then immediately return to it on the second one. For this reason, removing
the highlighting of current tabs would be a better permanent solution.
In talking with Tim however, he suggested we do both, on the off chance we
change our minds about the tab highlighting and go back to the
autoswitching.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Thu, 06 Oct 2005 15:01:08 +0000 |
parents | 8dca96cbcd64 |
children | 45d54425dc65 |
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 |
28 MsnUser * | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
29 msn_user_new(MsnUserList *userlist, const char *passport, |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
30 const char *store_name) |
5309 | 31 { |
32 MsnUser *user; | |
33 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
34 user = g_new0(MsnUser, 1); |
5309 | 35 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
36 user->userlist = userlist; |
5309 | 37 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
38 msn_user_set_passport(user, passport); |
9209
4c94e3f9f91c
[gaim-migrate @ 10004]
Christian Hammond <chipx86@chipx86.com>
parents:
9198
diff
changeset
|
39 msn_user_set_store_name(user, store_name); |
5309 | 40 |
6858
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
41 /* |
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
42 * 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
|
43 * to the passport when moving users. So, screw it :) |
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
44 */ |
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
45 #if 0 |
5309 | 46 if (name != NULL) |
47 msn_user_set_name(user, name); | |
6858
885c6528843b
[gaim-migrate @ 7403]
Christian Hammond <chipx86@chipx86.com>
parents:
6800
diff
changeset
|
48 #endif |
5309 | 49 |
50 return user; | |
51 } | |
52 | |
53 void | |
54 msn_user_destroy(MsnUser *user) | |
55 { | |
56 g_return_if_fail(user != NULL); | |
57 | |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
58 if (user->clientcaps != NULL) |
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
59 g_hash_table_destroy(user->clientcaps); |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
60 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
61 if (user->group_ids != NULL) |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
62 g_list_free(user->group_ids); |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
63 |
6800
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
64 if (user->msnobj != NULL) |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
65 msn_object_destroy(user->msnobj); |
8f228a7d5076
[gaim-migrate @ 7340]
Christian Hammond <chipx86@chipx86.com>
parents:
6788
diff
changeset
|
66 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
67 if (user->passport != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
68 g_free(user->passport); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
69 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
70 if (user->friendly_name != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
71 g_free(user->friendly_name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
72 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
73 if (user->store_name != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
74 g_free(user->store_name); |
5309 | 75 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
76 if (user->phone.home != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
77 g_free(user->phone.home); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
78 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
79 if (user->phone.work != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
80 g_free(user->phone.work); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
81 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
82 if (user->phone.mobile != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
83 g_free(user->phone.mobile); |
5309 | 84 |
85 g_free(user); | |
86 } | |
87 | |
88 void | |
10451 | 89 msn_user_update(MsnUser *user) |
90 { | |
91 GaimAccount *account; | |
92 GaimConnection *gc; | |
93 | |
94 account = user->userlist->session->account; | |
95 gc = gaim_account_get_connection(account); | |
96 | |
97 gaim_prpl_got_user_status(account, user->passport, user->status, NULL); | |
98 | |
99 if (user->idle) | |
100 gaim_prpl_got_user_idle(account, user->passport, TRUE, -1); | |
101 else | |
102 gaim_prpl_got_user_idle(account, user->passport, FALSE, 0); | |
103 } | |
104 | |
105 void | |
106 msn_user_set_state(MsnUser *user, const char *state) | |
107 { | |
108 const char *status; | |
109 | |
110 if (!g_ascii_strcasecmp(state, "BSY")) | |
111 status = "busy"; | |
112 else if (!g_ascii_strcasecmp(state, "BRB")) | |
113 status = "brb"; | |
114 else if (!g_ascii_strcasecmp(state, "AWY")) | |
115 status = "away"; | |
116 else if (!g_ascii_strcasecmp(state, "PHN")) | |
117 status = "phone"; | |
118 else if (!g_ascii_strcasecmp(state, "LUN")) | |
119 status = "lunch"; | |
120 else | |
121 status = "available"; | |
122 | |
123 if (!g_ascii_strcasecmp(state, "IDL")) | |
124 user->idle = TRUE; | |
125 else | |
126 user->idle = FALSE; | |
127 | |
128 user->status = status; | |
129 } | |
130 | |
131 void | |
5309 | 132 msn_user_set_passport(MsnUser *user, const char *passport) |
133 { | |
134 g_return_if_fail(user != NULL); | |
135 | |
136 if (user->passport != NULL) | |
137 g_free(user->passport); | |
138 | |
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 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
147 if (user->friendly_name != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
148 g_free(user->friendly_name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
149 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
150 user->friendly_name = g_strdup(name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
151 } |
5309 | 152 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
153 void |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
154 msn_user_set_store_name(MsnUser *user, const char *name) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
155 { |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
156 g_return_if_fail(user != NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
157 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
158 if (user->store_name != NULL) |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
159 g_free(user->store_name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
160 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
161 user->store_name = g_strdup(name); |
5309 | 162 } |
163 | |
164 void | |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
165 msn_user_set_buddy_icon(MsnUser *user, const char *filename) |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
166 { |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
167 struct stat st; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
168 FILE *fp; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
169 MsnObject *msnobj = msn_user_get_object(user); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
170 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
171 g_return_if_fail(user != NULL); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
172 |
10589
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10451
diff
changeset
|
173 if (filename == NULL || g_stat(filename, &st) == -1) |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
174 { |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
175 msn_user_set_object(user, NULL); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
176 } |
10589
0f7452b1f777
[gaim-migrate @ 11994]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10451
diff
changeset
|
177 else if ((fp = g_fopen(filename, "rb")) != NULL) |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
178 { |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
179 GaimCipherContext *ctx; |
11164 | 180 char *buf; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
181 gsize len; |
11164 | 182 char *base64; |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
183 unsigned char digest[20]; |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
184 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
185 if (msnobj == NULL) |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
186 { |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
187 msnobj = msn_object_new(TRUE); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
188 msn_object_set_local(msnobj); |
7591
24b9b6405f36
[gaim-migrate @ 8209]
Christian Hammond <chipx86@chipx86.com>
parents:
7590
diff
changeset
|
189 msn_object_set_type(msnobj, MSN_OBJECT_USERTILE); |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
190 msn_object_set_location(msnobj, "TFR2C2.tmp"); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
191 msn_object_set_creator(msnobj, msn_user_get_passport(user)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
192 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
193 msn_user_set_object(user, msnobj); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
194 } |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
195 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
196 msn_object_set_real_location(msnobj, filename); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
197 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
198 buf = g_malloc(st.st_size); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
199 len = fread(buf, 1, st.st_size, 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 fclose(fp); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
202 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
203 /* Compute the SHA1D field. */ |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
204 memset(digest, 0, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
205 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
206 ctx = gaim_cipher_context_new_by_name("sha1", NULL); |
11183 | 207 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
|
208 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
209 g_free(buf); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
210 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
211 base64 = gaim_base64_encode(digest, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
212 msn_object_set_sha1d(msnobj, base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
213 g_free(base64); |
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 msn_object_set_size(msnobj, st.st_size); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
216 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
217 /* Compute the SHA1C field. */ |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
218 buf = g_strdup_printf( |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
219 "Creator%sSize%dType%dLocation%sFriendly%sSHA1D%s", |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
220 msn_object_get_creator(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
221 msn_object_get_size(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
222 msn_object_get_type(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
223 msn_object_get_location(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
224 msn_object_get_friendly(msnobj), |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
225 msn_object_get_sha1d(msnobj)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
226 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
227 memset(digest, 0, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
228 |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
229 gaim_cipher_context_reset(ctx, NULL); |
11183 | 230 gaim_cipher_context_append(ctx, (const guchar *)buf, strlen(buf)); |
10687
b256ce6b85b8
[gaim-migrate @ 12235]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10684
diff
changeset
|
231 gaim_cipher_context_digest(ctx, sizeof(digest), digest, NULL); |
10684
72a5babfa8b4
[gaim-migrate @ 12231]
Luke Schierer <lschiere@pidgin.im>
parents:
10589
diff
changeset
|
232 gaim_cipher_context_destroy(ctx); |
7590
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
233 g_free(buf); |
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 base64 = gaim_base64_encode(digest, sizeof(digest)); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
236 msn_object_set_sha1c(msnobj, base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
237 g_free(base64); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
238 } |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
239 else |
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 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
|
242 msn_user_set_object(user, NULL); |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
243 } |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
244 } |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
245 |
3a48ade4f510
[gaim-migrate @ 8208]
Christian Hammond <chipx86@chipx86.com>
parents:
6858
diff
changeset
|
246 void |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
247 msn_user_add_group_id(MsnUser *user, int id) |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
248 { |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
249 MsnUserList *userlist; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
250 GaimAccount *account; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
251 GaimBuddy *b; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
252 GaimGroup *g; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
253 const char *passport; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
254 const char *group_name; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
255 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
256 g_return_if_fail(user != NULL); |
10044 | 257 g_return_if_fail(id >= 0); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
258 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
259 user->group_ids = g_list_append(user->group_ids, GINT_TO_POINTER(id)); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
260 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
261 userlist = user->userlist; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
262 account = userlist->session->account; |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
263 passport = msn_user_get_passport(user); |
9198
ab6636c5a136
[gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents:
9193
diff
changeset
|
264 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
265 group_name = msn_userlist_find_group_name(userlist, id); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
266 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
267 g = gaim_find_group(group_name); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
268 |
10451 | 269 if ((id == 0) && (g == NULL)) |
270 { | |
271 g = gaim_group_new(group_name); | |
272 gaim_blist_add_group(g, NULL); | |
273 } | |
274 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
275 b = gaim_find_buddy_in_group(account, passport, g); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
276 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
277 if (b == NULL) |
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 = gaim_buddy_new(account, passport, NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
280 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
281 gaim_blist_add_buddy(b, NULL, g, NULL); |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
282 } |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
283 |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
284 b->proto_data = user; |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
285 } |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
286 |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
287 void |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
288 msn_user_remove_group_id(MsnUser *user, int id) |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
289 { |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
290 g_return_if_fail(user != NULL); |
10044 | 291 g_return_if_fail(id >= 0); |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
292 |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
293 user->group_ids = g_list_remove(user->group_ids, GINT_TO_POINTER(id)); |
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
294 } |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
295 |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
296 void |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
297 msn_user_set_home_phone(MsnUser *user, const char *number) |
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 g_return_if_fail(user != NULL); |
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 if (user->phone.home != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
302 g_free(user->phone.home); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
303 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
304 user->phone.home = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
305 } |
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 void |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
308 msn_user_set_work_phone(MsnUser *user, const char *number) |
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 g_return_if_fail(user != NULL); |
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 if (user->phone.work != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
313 g_free(user->phone.work); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
314 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
315 user->phone.work = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
316 } |
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 void |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
319 msn_user_set_mobile_phone(MsnUser *user, const char *number) |
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 g_return_if_fail(user != NULL); |
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 if (user->phone.mobile != NULL) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
324 g_free(user->phone.mobile); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
325 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
326 user->phone.mobile = (number == NULL ? NULL : g_strdup(number)); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
327 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
328 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
329 void |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
330 msn_user_set_object(MsnUser *user, MsnObject *obj) |
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 g_return_if_fail(user != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
333 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
334 if (user->msnobj != NULL) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
335 msn_object_destroy(user->msnobj); |
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 user->msnobj = obj; |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
338 |
9860 | 339 if (user->list_op & MSN_LIST_FL_OP) |
340 msn_queue_buddy_icon_request(user); | |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
341 } |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
342 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
343 void |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
344 msn_user_set_client_caps(MsnUser *user, GHashTable *info) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
345 { |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
346 g_return_if_fail(user != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
347 g_return_if_fail(info != NULL); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
348 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
349 if (user->clientcaps != NULL) |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
350 g_hash_table_destroy(user->clientcaps); |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
351 |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
352 user->clientcaps = info; |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
353 } |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
354 |
5309 | 355 const char * |
356 msn_user_get_passport(const MsnUser *user) | |
357 { | |
358 g_return_val_if_fail(user != NULL, NULL); | |
359 | |
360 return user->passport; | |
361 } | |
362 | |
363 const char * | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
364 msn_user_get_friendly_name(const MsnUser *user) |
5309 | 365 { |
366 g_return_val_if_fail(user != NULL, NULL); | |
367 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
368 return user->friendly_name; |
5309 | 369 } |
370 | |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
371 const char * |
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
372 msn_user_get_store_name(const MsnUser *user) |
5309 | 373 { |
6701
b7e113a59b51
[gaim-migrate @ 7227]
Christian Hammond <chipx86@chipx86.com>
parents:
5518
diff
changeset
|
374 g_return_val_if_fail(user != NULL, NULL); |
5309 | 375 |
9193
502707ca1836
[gaim-migrate @ 9988]
Christian Hammond <chipx86@chipx86.com>
parents:
8475
diff
changeset
|
376 return user->store_name; |
5309 | 377 } |
378 | |
5363
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
379 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
380 msn_user_get_home_phone(const MsnUser *user) |
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 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
383 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
384 return user->phone.home; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
385 } |
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 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
388 msn_user_get_work_phone(const MsnUser *user) |
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 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
391 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
392 return user->phone.work; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
393 } |
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 const char * |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
396 msn_user_get_mobile_phone(const MsnUser *user) |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
397 { |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
398 g_return_val_if_fail(user != NULL, NULL); |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
399 |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
400 return user->phone.mobile; |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
401 } |
ebebc833cf77
[gaim-migrate @ 5739]
Christian Hammond <chipx86@chipx86.com>
parents:
5316
diff
changeset
|
402 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
403 MsnObject * |
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
404 msn_user_get_object(const MsnUser *user) |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
405 { |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
406 g_return_val_if_fail(user != NULL, NULL); |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
407 |
6788
c1995194e3d1
[gaim-migrate @ 7327]
Christian Hammond <chipx86@chipx86.com>
parents:
6701
diff
changeset
|
408 return user->msnobj; |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
409 } |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
410 |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
411 GHashTable * |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
412 msn_user_get_client_caps(const MsnUser *user) |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
413 { |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
414 g_return_val_if_fail(user != NULL, NULL); |
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
415 |
5475
ad9887c91a59
[gaim-migrate @ 5871]
Christian Hammond <chipx86@chipx86.com>
parents:
5363
diff
changeset
|
416 return user->clientcaps; |
5316
d5690ed70085
[gaim-migrate @ 5688]
Christian Hammond <chipx86@chipx86.com>
parents:
5309
diff
changeset
|
417 } |