comparison src/blist.c @ 7098:770233dad86c

[gaim-migrate @ 7663] Renamed a few of the buddy list structs to be compliant with the rest of gaim. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 01 Oct 2003 04:05:46 +0000
parents 9946001989a3
children 9220c7490cd1
comparison
equal deleted inserted replaced
7097:2c331b10161e 7098:770233dad86c
32 #include "signals.h" 32 #include "signals.h"
33 #include "util.h" 33 #include "util.h"
34 34
35 #define PATHSIZE 1024 35 #define PATHSIZE 1024
36 36
37 struct gaim_buddy_list *gaimbuddylist = NULL; 37 GaimBuddyList *gaimbuddylist = NULL;
38 static struct gaim_blist_ui_ops *blist_ui_ops = NULL; 38 static GaimBlistUiOps *blist_ui_ops = NULL;
39 39
40 40
41 /***************************************************************************** 41 /*****************************************************************************
42 * Private Utility functions * 42 * Private Utility functions *
43 *****************************************************************************/ 43 *****************************************************************************/
80 g_free(hb); 80 g_free(hb);
81 } 81 }
82 82
83 static void blist_pref_cb(const char *name, GaimPrefType typ, gpointer value, gpointer data) 83 static void blist_pref_cb(const char *name, GaimPrefType typ, gpointer value, gpointer data)
84 { 84 {
85 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 85 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
86 GaimBlistNode *gnode, *cnode, *bnode; 86 GaimBlistNode *gnode, *cnode, *bnode;
87 87
88 if (!ops) 88 if (!ops)
89 return; 89 return;
90 90
145 145
146 /***************************************************************************** 146 /*****************************************************************************
147 * Public API functions * 147 * Public API functions *
148 *****************************************************************************/ 148 *****************************************************************************/
149 149
150 struct gaim_buddy_list *gaim_blist_new() 150 GaimBuddyList *gaim_blist_new()
151 { 151 {
152 struct gaim_buddy_list *gbl = g_new0(struct gaim_buddy_list, 1); 152 GaimBuddyList *gbl = g_new0(GaimBuddyList, 1);
153 153
154 gbl->ui_ops = gaim_blist_get_ui_ops(); 154 gbl->ui_ops = gaim_blist_get_ui_ops();
155 155
156 gbl->buddies = g_hash_table_new_full((GHashFunc)_gaim_blist_hbuddy_hash, 156 gbl->buddies = g_hash_table_new_full((GHashFunc)_gaim_blist_hbuddy_hash,
157 (GEqualFunc)_gaim_blist_hbuddy_equal, 157 (GEqualFunc)_gaim_blist_hbuddy_equal,
166 166
167 return gbl; 167 return gbl;
168 } 168 }
169 169
170 void 170 void
171 gaim_set_blist(struct gaim_buddy_list *list) 171 gaim_set_blist(GaimBuddyList *list)
172 { 172 {
173 gaimbuddylist = list; 173 gaimbuddylist = list;
174 } 174 }
175 175
176 struct gaim_buddy_list * 176 GaimBuddyList *
177 gaim_get_blist(void) 177 gaim_get_blist(void)
178 { 178 {
179 return gaimbuddylist; 179 return gaimbuddylist;
180 } 180 }
181 181
182 void gaim_blist_show () 182 void gaim_blist_show ()
183 { 183 {
184 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 184 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
185 if (ops) 185 if (ops)
186 ops->show(gaimbuddylist); 186 ops->show(gaimbuddylist);
187 } 187 }
188 188
189 void gaim_blist_destroy() 189 void gaim_blist_destroy()
190 { 190 {
191 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 191 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
192 if (ops) 192 if (ops)
193 ops->destroy(gaimbuddylist); 193 ops->destroy(gaimbuddylist);
194 } 194 }
195 195
196 void gaim_blist_set_visible (gboolean show) 196 void gaim_blist_set_visible (gboolean show)
197 { 197 {
198 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 198 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
199 if (ops) 199 if (ops)
200 ops->set_visible(gaimbuddylist, show); 200 ops->set_visible(gaimbuddylist, show);
201 } 201 }
202 202
203 void gaim_blist_update_buddy_status (GaimBuddy *buddy, int status) 203 void gaim_blist_update_buddy_status (GaimBuddy *buddy, int status)
204 { 204 {
205 struct gaim_blist_ui_ops *ops; 205 GaimBlistUiOps *ops;
206 206
207 if (buddy->uc == status) 207 if (buddy->uc == status)
208 return; 208 return;
209 209
210 ops = gaimbuddylist->ui_ops; 210 ops = gaimbuddylist->ui_ops;
221 if (ops) 221 if (ops)
222 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); 222 ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
223 } 223 }
224 224
225 static gboolean presence_update_timeout_cb(GaimBuddy *buddy) { 225 static gboolean presence_update_timeout_cb(GaimBuddy *buddy) {
226 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 226 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
227 GaimConversation *conv; 227 GaimConversation *conv;
228 228
229 conv = gaim_find_conversation_with_account(buddy->name, buddy->account); 229 conv = gaim_find_conversation_with_account(buddy->name, buddy->account);
230 230
231 if(buddy->present == GAIM_BUDDY_SIGNING_ON) { 231 if(buddy->present == GAIM_BUDDY_SIGNING_ON) {
251 251
252 return FALSE; 252 return FALSE;
253 } 253 }
254 254
255 void gaim_blist_update_buddy_presence(GaimBuddy *buddy, int presence) { 255 void gaim_blist_update_buddy_presence(GaimBuddy *buddy, int presence) {
256 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 256 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
257 gboolean do_something = FALSE; 257 gboolean do_something = FALSE;
258 258
259 if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) { 259 if (!GAIM_BUDDY_IS_ONLINE(buddy) && presence) {
260 int old_present = buddy->present; 260 int old_present = buddy->present;
261 buddy->present = GAIM_BUDDY_SIGNING_ON; 261 buddy->present = GAIM_BUDDY_SIGNING_ON;
285 } 285 }
286 286
287 287
288 void gaim_blist_update_buddy_idle (GaimBuddy *buddy, int idle) 288 void gaim_blist_update_buddy_idle (GaimBuddy *buddy, int idle)
289 { 289 {
290 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 290 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
291 if(buddy->idle == idle) 291 if(buddy->idle == idle)
292 return; 292 return;
293 293
294 buddy->idle = idle; 294 buddy->idle = idle;
295 gaim_contact_compute_priority_buddy(gaim_buddy_get_contact(buddy)); 295 gaim_contact_compute_priority_buddy(gaim_buddy_get_contact(buddy));
297 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); 297 ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
298 } 298 }
299 299
300 void gaim_blist_update_buddy_evil (GaimBuddy *buddy, int warning) 300 void gaim_blist_update_buddy_evil (GaimBuddy *buddy, int warning)
301 { 301 {
302 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 302 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
303 if(buddy->evil == warning) 303 if(buddy->evil == warning)
304 return; 304 return;
305 305
306 buddy->evil = warning; 306 buddy->evil = warning;
307 if (ops) 307 if (ops)
308 ops->update(gaimbuddylist,(GaimBlistNode*)buddy); 308 ops->update(gaimbuddylist,(GaimBlistNode*)buddy);
309 } 309 }
310 310
311 void gaim_blist_update_buddy_icon(GaimBuddy *buddy) { 311 void gaim_blist_update_buddy_icon(GaimBuddy *buddy) {
312 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 312 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
313 if(ops) 313 if(ops)
314 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); 314 ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
315 } 315 }
316 316
317 void gaim_blist_rename_buddy (GaimBuddy *buddy, const char *name) 317 void gaim_blist_rename_buddy (GaimBuddy *buddy, const char *name)
318 { 318 {
319 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 319 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
320 g_free(buddy->name); 320 g_free(buddy->name);
321 buddy->name = g_strdup(name); 321 buddy->name = g_strdup(name);
322 if (ops) 322 if (ops)
323 ops->update(gaimbuddylist, (GaimBlistNode*)buddy); 323 ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
324 } 324 }
325 325
326 void gaim_blist_alias_chat(GaimBlistChat *chat, const char *alias) 326 void gaim_blist_alias_chat(GaimBlistChat *chat, const char *alias)
327 { 327 {
328 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 328 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
329 329
330 g_free(chat->alias); 330 g_free(chat->alias);
331 331
332 if(alias && strlen(alias)) 332 if(alias && strlen(alias))
333 chat->alias = g_strdup(alias); 333 chat->alias = g_strdup(alias);
338 ops->update(gaimbuddylist, (GaimBlistNode*)chat); 338 ops->update(gaimbuddylist, (GaimBlistNode*)chat);
339 } 339 }
340 340
341 void gaim_blist_alias_buddy (GaimBuddy *buddy, const char *alias) 341 void gaim_blist_alias_buddy (GaimBuddy *buddy, const char *alias)
342 { 342 {
343 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 343 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
344 GaimConversation *conv; 344 GaimConversation *conv;
345 345
346 g_free(buddy->alias); 346 g_free(buddy->alias);
347 347
348 if(alias && strlen(alias)) 348 if(alias && strlen(alias))
359 gaim_conversation_autoset_title(conv); 359 gaim_conversation_autoset_title(conv);
360 } 360 }
361 361
362 void gaim_blist_server_alias_buddy (GaimBuddy *buddy, const char *alias) 362 void gaim_blist_server_alias_buddy (GaimBuddy *buddy, const char *alias)
363 { 363 {
364 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 364 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
365 GaimConversation *conv; 365 GaimConversation *conv;
366 366
367 g_free(buddy->server_alias); 367 g_free(buddy->server_alias);
368 368
369 if(alias && strlen(alias) && g_utf8_validate(alias, -1, NULL)) 369 if(alias && strlen(alias) && g_utf8_validate(alias, -1, NULL))
380 gaim_conversation_autoset_title(conv); 380 gaim_conversation_autoset_title(conv);
381 } 381 }
382 382
383 void gaim_blist_rename_group(GaimGroup *group, const char *name) 383 void gaim_blist_rename_group(GaimGroup *group, const char *name)
384 { 384 {
385 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 385 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
386 GaimGroup *dest_group; 386 GaimGroup *dest_group;
387 GaimBlistNode *prev, *child, *next; 387 GaimBlistNode *prev, *child, *next;
388 GSList *accts; 388 GSList *accts;
389 389
390 if(!name || !strlen(name) || !strcmp(name, group->name)) { 390 if(!name || !strlen(name) || !strcmp(name, group->name)) {
433 } 433 }
434 434
435 GaimBlistChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components) 435 GaimBlistChat *gaim_blist_chat_new(GaimAccount *account, const char *alias, GHashTable *components)
436 { 436 {
437 GaimBlistChat *chat; 437 GaimBlistChat *chat;
438 struct gaim_blist_ui_ops *ops; 438 GaimBlistUiOps *ops;
439 439
440 if(!components) 440 if(!components)
441 return NULL; 441 return NULL;
442 442
443 chat = g_new0(GaimBlistChat, 1); 443 chat = g_new0(GaimBlistChat, 1);
486 } 486 }
487 487
488 GaimBuddy *gaim_buddy_new(GaimAccount *account, const char *screenname, const char *alias) 488 GaimBuddy *gaim_buddy_new(GaimAccount *account, const char *screenname, const char *alias)
489 { 489 {
490 GaimBuddy *b; 490 GaimBuddy *b;
491 struct gaim_blist_ui_ops *ops; 491 GaimBlistUiOps *ops;
492 492
493 b = g_new0(GaimBuddy, 1); 493 b = g_new0(GaimBuddy, 1);
494 b->account = account; 494 b->account = account;
495 b->name = g_strdup(screenname); 495 b->name = g_strdup(screenname);
496 b->alias = g_strdup(alias); 496 b->alias = g_strdup(alias);
533 533
534 void gaim_blist_add_chat(GaimBlistChat *chat, GaimGroup *group, GaimBlistNode *node) 534 void gaim_blist_add_chat(GaimBlistChat *chat, GaimGroup *group, GaimBlistNode *node)
535 { 535 {
536 GaimBlistNode *n = node, *cnode = (GaimBlistNode*)chat; 536 GaimBlistNode *n = node, *cnode = (GaimBlistNode*)chat;
537 GaimGroup *g = group; 537 GaimGroup *g = group;
538 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 538 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
539 gboolean save = FALSE; 539 gboolean save = FALSE;
540 540
541 541
542 g_return_if_fail(chat != NULL); 542 g_return_if_fail(chat != NULL);
543 g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT((GaimBlistNode*)chat)); 543 g_return_if_fail(GAIM_BLIST_NODE_IS_CHAT((GaimBlistNode*)chat));
612 void gaim_blist_add_buddy (GaimBuddy *buddy, GaimContact *contact, GaimGroup *group, GaimBlistNode *node) 612 void gaim_blist_add_buddy (GaimBuddy *buddy, GaimContact *contact, GaimGroup *group, GaimBlistNode *node)
613 { 613 {
614 GaimBlistNode *cnode, *bnode; 614 GaimBlistNode *cnode, *bnode;
615 GaimGroup *g; 615 GaimGroup *g;
616 GaimContact *c; 616 GaimContact *c;
617 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 617 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
618 gboolean save = FALSE; 618 gboolean save = FALSE;
619 struct _gaim_hbuddy *hb; 619 struct _gaim_hbuddy *hb;
620 620
621 g_return_if_fail(buddy != NULL); 621 g_return_if_fail(buddy != NULL);
622 g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY((GaimBlistNode*)buddy)); 622 g_return_if_fail(GAIM_BLIST_NODE_IS_BUDDY((GaimBlistNode*)buddy));
738 gaim_blist_save(); 738 gaim_blist_save();
739 } 739 }
740 740
741 GaimContact *gaim_contact_new() 741 GaimContact *gaim_contact_new()
742 { 742 {
743 struct gaim_blist_ui_ops *ops; 743 GaimBlistUiOps *ops;
744 GaimContact *c = g_new0(GaimContact, 1); 744 GaimContact *c = g_new0(GaimContact, 1);
745 ((GaimBlistNode*)c)->type = GAIM_BLIST_CONTACT_NODE; 745 ((GaimBlistNode*)c)->type = GAIM_BLIST_CONTACT_NODE;
746 746
747 c->totalsize = c->currentsize = c->online = 0; 747 c->totalsize = c->currentsize = c->online = 0;
748 748
771 GaimGroup *gaim_group_new(const char *name) 771 GaimGroup *gaim_group_new(const char *name)
772 { 772 {
773 GaimGroup *g = gaim_find_group(name); 773 GaimGroup *g = gaim_find_group(name);
774 774
775 if (!g) { 775 if (!g) {
776 struct gaim_blist_ui_ops *ops; 776 GaimBlistUiOps *ops;
777 g= g_new0(GaimGroup, 1); 777 g= g_new0(GaimGroup, 1);
778 g->name = g_strdup(name); 778 g->name = g_strdup(name);
779 g->totalsize = 0; 779 g->totalsize = 0;
780 g->currentsize = 0; 780 g->currentsize = 0;
781 g->online = 0; 781 g->online = 0;
792 return g; 792 return g;
793 } 793 }
794 794
795 void gaim_blist_add_contact(GaimContact *contact, GaimGroup *group, GaimBlistNode *node) 795 void gaim_blist_add_contact(GaimContact *contact, GaimGroup *group, GaimBlistNode *node)
796 { 796 {
797 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 797 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
798 GaimGroup *g; 798 GaimGroup *g;
799 GaimBlistNode *gnode, *cnode, *bnode; 799 GaimBlistNode *gnode, *cnode, *bnode;
800 gboolean save = FALSE; 800 gboolean save = FALSE;
801 801
802 g_return_if_fail(contact != NULL); 802 g_return_if_fail(contact != NULL);
912 } 912 }
913 } 913 }
914 914
915 void gaim_blist_add_group (GaimGroup *group, GaimBlistNode *node) 915 void gaim_blist_add_group (GaimGroup *group, GaimBlistNode *node)
916 { 916 {
917 struct gaim_blist_ui_ops *ops; 917 GaimBlistUiOps *ops;
918 GaimBlistNode *gnode = (GaimBlistNode*)group; 918 GaimBlistNode *gnode = (GaimBlistNode*)group;
919 gboolean save = FALSE; 919 gboolean save = FALSE;
920 920
921 g_return_if_fail(group != NULL); 921 g_return_if_fail(group != NULL);
922 g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP((GaimBlistNode*)group)); 922 g_return_if_fail(GAIM_BLIST_NODE_IS_GROUP((GaimBlistNode*)group));
973 gaim_blist_save(); 973 gaim_blist_save();
974 } 974 }
975 975
976 void gaim_blist_remove_contact(GaimContact* contact) 976 void gaim_blist_remove_contact(GaimContact* contact)
977 { 977 {
978 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 978 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
979 979
980 GaimBlistNode *gnode, *cnode = (GaimBlistNode*)contact; 980 GaimBlistNode *gnode, *cnode = (GaimBlistNode*)contact;
981 981
982 gnode = cnode->parent; 982 gnode = cnode->parent;
983 983
1000 } 1000 }
1001 } 1001 }
1002 1002
1003 void gaim_blist_remove_buddy (GaimBuddy *buddy) 1003 void gaim_blist_remove_buddy (GaimBuddy *buddy)
1004 { 1004 {
1005 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 1005 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
1006 1006
1007 GaimBlistNode *cnode, *node = (GaimBlistNode*)buddy; 1007 GaimBlistNode *cnode, *node = (GaimBlistNode*)buddy;
1008 GaimGroup *group; 1008 GaimGroup *group;
1009 struct _gaim_hbuddy hb; 1009 struct _gaim_hbuddy hb;
1010 1010
1053 gaim_blist_remove_contact((GaimContact*)cnode); 1053 gaim_blist_remove_contact((GaimContact*)cnode);
1054 } 1054 }
1055 1055
1056 void gaim_blist_remove_chat (GaimBlistChat *chat) 1056 void gaim_blist_remove_chat (GaimBlistChat *chat)
1057 { 1057 {
1058 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 1058 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
1059 1059
1060 GaimBlistNode *gnode, *node = (GaimBlistNode*)chat; 1060 GaimBlistNode *gnode, *node = (GaimBlistNode*)chat;
1061 GaimGroup *group; 1061 GaimGroup *group;
1062 1062
1063 gnode = node->parent; 1063 gnode = node->parent;
1081 g_free(chat); 1081 g_free(chat);
1082 } 1082 }
1083 1083
1084 void gaim_blist_remove_group (GaimGroup *group) 1084 void gaim_blist_remove_group (GaimGroup *group)
1085 { 1085 {
1086 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 1086 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
1087 GaimBlistNode *node = (GaimBlistNode*)group; 1087 GaimBlistNode *node = (GaimBlistNode*)group;
1088 GList *l; 1088 GList *l;
1089 1089
1090 if(node->child) { 1090 if(node->child) {
1091 char *buf; 1091 char *buf;
1355 return l; 1355 return l;
1356 } 1356 }
1357 1357
1358 void gaim_blist_add_account(GaimAccount *account) 1358 void gaim_blist_add_account(GaimAccount *account)
1359 { 1359 {
1360 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 1360 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
1361 GaimBlistNode *gnode, *cnode, *bnode; 1361 GaimBlistNode *gnode, *cnode, *bnode;
1362 1362
1363 if(!gaimbuddylist) 1363 if(!gaimbuddylist)
1364 return; 1364 return;
1365 1365
1402 } 1402 }
1403 } 1403 }
1404 1404
1405 void gaim_blist_remove_account(GaimAccount *account) 1405 void gaim_blist_remove_account(GaimAccount *account)
1406 { 1406 {
1407 struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops; 1407 GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
1408 GaimBlistNode *gnode, *cnode, *bnode; 1408 GaimBlistNode *gnode, *cnode, *bnode;
1409 1409
1410 if (!gaimbuddylist) 1410 if (!gaimbuddylist)
1411 return; 1411 return;
1412 1412
2276 2276
2277 void 2277 void
2278 gaim_blist_request_add_buddy(GaimAccount *account, const char *username, 2278 gaim_blist_request_add_buddy(GaimAccount *account, const char *username,
2279 const char *group, const char *alias) 2279 const char *group, const char *alias)
2280 { 2280 {
2281 struct gaim_blist_ui_ops *ui_ops; 2281 GaimBlistUiOps *ui_ops;
2282 2282
2283 ui_ops = gaim_blist_get_ui_ops(); 2283 ui_ops = gaim_blist_get_ui_ops();
2284 2284
2285 if (ui_ops != NULL && ui_ops->request_add_buddy != NULL) 2285 if (ui_ops != NULL && ui_ops->request_add_buddy != NULL)
2286 ui_ops->request_add_buddy(account, username, group, alias); 2286 ui_ops->request_add_buddy(account, username, group, alias);
2287 } 2287 }
2288 2288
2289 void 2289 void
2290 gaim_blist_request_add_chat(GaimAccount *account, GaimGroup *group) 2290 gaim_blist_request_add_chat(GaimAccount *account, GaimGroup *group)
2291 { 2291 {
2292 struct gaim_blist_ui_ops *ui_ops; 2292 GaimBlistUiOps *ui_ops;
2293 2293
2294 ui_ops = gaim_blist_get_ui_ops(); 2294 ui_ops = gaim_blist_get_ui_ops();
2295 2295
2296 if (ui_ops != NULL && ui_ops->request_add_chat != NULL) 2296 if (ui_ops != NULL && ui_ops->request_add_chat != NULL)
2297 ui_ops->request_add_chat(account, group); 2297 ui_ops->request_add_chat(account, group);
2298 } 2298 }
2299 2299
2300 void 2300 void
2301 gaim_blist_request_add_group(void) 2301 gaim_blist_request_add_group(void)
2302 { 2302 {
2303 struct gaim_blist_ui_ops *ui_ops; 2303 GaimBlistUiOps *ui_ops;
2304 2304
2305 ui_ops = gaim_blist_get_ui_ops(); 2305 ui_ops = gaim_blist_get_ui_ops();
2306 2306
2307 if (ui_ops != NULL && ui_ops->request_add_group != NULL) 2307 if (ui_ops != NULL && ui_ops->request_add_group != NULL)
2308 ui_ops->request_add_group(); 2308 ui_ops->request_add_group();
2595 2595
2596 return group->online; 2596 return group->online;
2597 } 2597 }
2598 2598
2599 void 2599 void
2600 gaim_blist_set_ui_ops(struct gaim_blist_ui_ops *ops) 2600 gaim_blist_set_ui_ops(GaimBlistUiOps *ops)
2601 { 2601 {
2602 blist_ui_ops = ops; 2602 blist_ui_ops = ops;
2603 } 2603 }
2604 2604
2605 struct gaim_blist_ui_ops * 2605 GaimBlistUiOps *
2606 gaim_blist_get_ui_ops(void) 2606 gaim_blist_get_ui_ops(void)
2607 { 2607 {
2608 return blist_ui_ops; 2608 return blist_ui_ops;
2609 } 2609 }
2610 2610