src/protocols/msn/userlist.c

changeset 9198
e8eb6d5eb9eb
parent 9197
3c9b907b45a7
child 9208
40dc519d6404
equal deleted inserted replaced
9197:3c9b907b45a7 9198:e8eb6d5eb9eb
1 /**
2 * @file userlist.c MSN user list support
3 *
4 * gaim
5 *
6 * Gaim 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
8 * source distribution.
9 *
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 */
1 #include "msn.h" 24 #include "msn.h"
2 #include "userlist.h" 25 #include "userlist.h"
3 26
4 const char *lists[] = { "FL", "AL", "BL", "RL" }; 27 const char *lists[] = { "FL", "AL", "BL", "RL" };
5 28
341 364
342 MsnUserList* 365 MsnUserList*
343 msn_userlist_new(MsnSession *session) 366 msn_userlist_new(MsnSession *session)
344 { 367 {
345 MsnUserList *userlist; 368 MsnUserList *userlist;
346 369
347 userlist = g_new0(MsnUserList, 1); 370 userlist = g_new0(MsnUserList, 1);
348 371
349 userlist->session = session; 372 userlist->session = session;
350 373
351 return userlist; 374 return userlist;
455 478
456 int 479 int
457 msn_userlist_find_group_id(MsnUserList *userlist, const char *group_name) 480 msn_userlist_find_group_id(MsnUserList *userlist, const char *group_name)
458 { 481 {
459 MsnGroup *group; 482 MsnGroup *group;
460 483
461 group = msn_userlist_find_group_with_name(userlist, group_name); 484 group = msn_userlist_find_group_with_name(userlist, group_name);
462 485
463 if (group != NULL) 486 if (group != NULL)
464 return msn_group_get_id(group); 487 return msn_group_get_id(group);
465 else 488 else
468 491
469 const char * 492 const char *
470 msn_userlist_find_group_name(MsnUserList *userlist, int group_id) 493 msn_userlist_find_group_name(MsnUserList *userlist, int group_id)
471 { 494 {
472 MsnGroup *group; 495 MsnGroup *group;
473 496
474 group = msn_userlist_find_group_with_id(userlist, group_id); 497 group = msn_userlist_find_group_with_id(userlist, group_id);
475 498
476 if (group != NULL) 499 if (group != NULL)
477 return msn_group_get_name(group); 500 return msn_group_get_name(group);
478 else 501 else

mercurial