Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/sync.c @ 15823:32c366eeeb99
sed -ie 's/gaim/purple/g'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 07:01:17 +0000 |
parents | 5fe8042783c1 |
children | 59e09ff3490d 60bc06498746 4a099e4d0d09 |
comparison
equal
deleted
inserted
replaced
15822:84b0f9b23ede | 15823:32c366eeeb99 |
---|---|
1 /** | 1 /** |
2 * @file sync.c MSN list synchronization functions | 2 * @file sync.c MSN list synchronization functions |
3 * | 3 * |
4 * gaim | 4 * purple |
5 * | 5 * |
6 * Gaim is the legal property of its developers, whose names are too numerous | 6 * Purple is the legal property of its developers, whose names are too numerous |
7 * to list here. Please refer to the COPYRIGHT file distributed with this | 7 * to list here. Please refer to the COPYRIGHT file distributed with this |
8 * source distribution. | 8 * source distribution. |
9 * | 9 * |
10 * This program is free software; you can redistribute it and/or modify | 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 | 11 * it under the terms of the GNU General Public License as published by |
28 static MsnTable *cbs_table; | 28 static MsnTable *cbs_table; |
29 | 29 |
30 static void | 30 static void |
31 blp_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 31 blp_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
32 { | 32 { |
33 GaimConnection *gc = cmdproc->session->account->gc; | 33 PurpleConnection *gc = cmdproc->session->account->gc; |
34 const char *list_name; | 34 const char *list_name; |
35 | 35 |
36 list_name = cmd->params[0]; | 36 list_name = cmd->params[0]; |
37 | 37 |
38 if (!g_ascii_strcasecmp(list_name, "AL")) | 38 if (!g_ascii_strcasecmp(list_name, "AL")) |
41 * If the current setting is AL, messages from users who | 41 * If the current setting is AL, messages from users who |
42 * are not in BL will be delivered. | 42 * are not in BL will be delivered. |
43 * | 43 * |
44 * In other words, deny some. | 44 * In other words, deny some. |
45 */ | 45 */ |
46 gc->account->perm_deny = GAIM_PRIVACY_DENY_USERS; | 46 gc->account->perm_deny = PURPLE_PRIVACY_DENY_USERS; |
47 } | 47 } |
48 else | 48 else |
49 { | 49 { |
50 /* If the current setting is BL, only messages from people | 50 /* If the current setting is BL, only messages from people |
51 * who are in the AL will be delivered. | 51 * who are in the AL will be delivered. |
52 * | 52 * |
53 * In other words, permit some. | 53 * In other words, permit some. |
54 */ | 54 */ |
55 gc->account->perm_deny = GAIM_PRIVACY_ALLOW_USERS; | 55 gc->account->perm_deny = PURPLE_PRIVACY_ALLOW_USERS; |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 static void | 59 static void |
60 prp_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 60 prp_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
66 value = cmd->params[1]; | 66 value = cmd->params[1]; |
67 | 67 |
68 if (cmd->param_count == 2) | 68 if (cmd->param_count == 2) |
69 { | 69 { |
70 if (!strcmp(type, "PHH")) | 70 if (!strcmp(type, "PHH")) |
71 msn_user_set_home_phone(session->user, gaim_url_decode(value)); | 71 msn_user_set_home_phone(session->user, purple_url_decode(value)); |
72 else if (!strcmp(type, "PHW")) | 72 else if (!strcmp(type, "PHW")) |
73 msn_user_set_work_phone(session->user, gaim_url_decode(value)); | 73 msn_user_set_work_phone(session->user, purple_url_decode(value)); |
74 else if (!strcmp(type, "PHM")) | 74 else if (!strcmp(type, "PHM")) |
75 msn_user_set_mobile_phone(session->user, gaim_url_decode(value)); | 75 msn_user_set_mobile_phone(session->user, purple_url_decode(value)); |
76 } | 76 } |
77 else | 77 else |
78 { | 78 { |
79 if (!strcmp(type, "PHH")) | 79 if (!strcmp(type, "PHH")) |
80 msn_user_set_home_phone(session->user, NULL); | 80 msn_user_set_home_phone(session->user, NULL); |
91 MsnSession *session = cmdproc->session; | 91 MsnSession *session = cmdproc->session; |
92 const char *name; | 92 const char *name; |
93 int group_id; | 93 int group_id; |
94 | 94 |
95 group_id = atoi(cmd->params[0]); | 95 group_id = atoi(cmd->params[0]); |
96 name = gaim_url_decode(cmd->params[1]); | 96 name = purple_url_decode(cmd->params[1]); |
97 | 97 |
98 msn_group_new(session->userlist, group_id, name); | 98 msn_group_new(session->userlist, group_id, name); |
99 | 99 |
100 /* HACK */ | 100 /* HACK */ |
101 if (group_id == 0) | 101 if (group_id == 0) |
102 /* Group of ungroupped buddies */ | 102 /* Group of ungroupped buddies */ |
103 return; | 103 return; |
104 | 104 |
105 if ((gaim_find_group(name)) == NULL) | 105 if ((purple_find_group(name)) == NULL) |
106 { | 106 { |
107 GaimGroup *g = gaim_group_new(name); | 107 PurpleGroup *g = purple_group_new(name); |
108 gaim_blist_add_group(g, NULL); | 108 purple_blist_add_group(g, NULL); |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
112 static void | 112 static void |
113 lst_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) | 113 lst_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd) |
117 const char *friend = NULL; | 117 const char *friend = NULL; |
118 int list_op; | 118 int list_op; |
119 MsnUser *user; | 119 MsnUser *user; |
120 | 120 |
121 passport = cmd->params[0]; | 121 passport = cmd->params[0]; |
122 friend = gaim_url_decode(cmd->params[1]); | 122 friend = purple_url_decode(cmd->params[1]); |
123 list_op = atoi(cmd->params[2]); | 123 list_op = atoi(cmd->params[2]); |
124 | 124 |
125 user = msn_user_new(session->userlist, passport, friend); | 125 user = msn_user_new(session->userlist, passport, friend); |
126 | 126 |
127 msn_userlist_add_user(session->userlist, user); | 127 msn_userlist_add_user(session->userlist, user); |
193 { | 193 { |
194 if (!strcmp(value, "Y")) | 194 if (!strcmp(value, "Y")) |
195 user->mobile = TRUE; | 195 user->mobile = TRUE; |
196 } | 196 } |
197 else if (!strcmp(type, "PHH")) | 197 else if (!strcmp(type, "PHH")) |
198 msn_user_set_home_phone(user, gaim_url_decode(value)); | 198 msn_user_set_home_phone(user, purple_url_decode(value)); |
199 else if (!strcmp(type, "PHW")) | 199 else if (!strcmp(type, "PHW")) |
200 msn_user_set_work_phone(user, gaim_url_decode(value)); | 200 msn_user_set_work_phone(user, purple_url_decode(value)); |
201 else if (!strcmp(type, "PHM")) | 201 else if (!strcmp(type, "PHM")) |
202 msn_user_set_mobile_phone(user, gaim_url_decode(value)); | 202 msn_user_set_mobile_phone(user, purple_url_decode(value)); |
203 } | 203 } |
204 } | 204 } |
205 | 205 |
206 void | 206 void |
207 msn_sync_init(void) | 207 msn_sync_init(void) |