libpurple/protocols/msn/userlist.h

Mon, 03 Sep 2007 05:47:52 +0000

author
Carlos Silva <typ0@pidgin.im>
date
Mon, 03 Sep 2007 05:47:52 +0000
branch
cpw.khc.msnp14
changeset 20569
66628c75dada
parent 20564
35675dd4a44d
child 20597
69b6246d3f94
permissions
-rw-r--r--

Make block/unblock work right, as well as being add by a buddy. Finally fixes #723

9198
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
1 /**
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
2 * @file userlist.h MSN user list support
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
3 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
4 * purple
9198
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
5 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
9198
e8eb6d5eb9eb [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
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
8 * source distribution.
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
9 *
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
10 * This program is free software; you can redistribute it and/or modify
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
11 * it under the terms of the GNU General Public License as published by
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
13 * (at your option) any later version.
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
14 *
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
15 * This program is distributed in the hope that it will be useful,
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
18 * GNU General Public License for more details.
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
19 *
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
20 * You should have received a copy of the GNU General Public License
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
21 * along with this program; if not, write to the Free Software
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
e8eb6d5eb9eb [gaim-migrate @ 9993]
Christian Hammond <chipx86@chipx86.com>
parents: 9193
diff changeset
23 */
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
24 #ifndef _MSN_USERLIST_H_
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
25 #define _MSN_USERLIST_H_
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
26
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
27 typedef struct _MsnUserList MsnUserList;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
28
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
29 #include "cmdproc.h"
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
30 #include "user.h"
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
31 #include "group.h"
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
32
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
33 typedef enum
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
34 {
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
35 MSN_LIST_FL,
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
36 MSN_LIST_AL,
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
37 MSN_LIST_BL,
20530
0178f0d66bf0 Add Pending list to recognized lists during contact list parsing
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 20481
diff changeset
38 MSN_LIST_RL,
0178f0d66bf0 Add Pending list to recognized lists during contact list parsing
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 20481
diff changeset
39 MSN_LIST_PL
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
40
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
41 } MsnListId;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
42
20569
66628c75dada Make block/unblock work right, as well as being add by a buddy. Finally fixes #723
Carlos Silva <typ0@pidgin.im>
parents: 20564
diff changeset
43
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
44 struct _MsnUserList
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
45 {
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
46 MsnSession *session;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
47
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
48 /* MsnUsers *users; */
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
49 /* MsnGroups *groups; */
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
50
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
51 GList *users;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
52 GList *groups;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
53
9860
8f54a6091294 [gaim-migrate @ 10739]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
54 GQueue *buddy_icon_requests;
8f54a6091294 [gaim-migrate @ 10739]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
55 int buddy_icon_window;
13126
afce0fe97885 [gaim-migrate @ 15487]
Evan Schoenberg <evands@pidgin.im>
parents: 9860
diff changeset
56 guint buddy_icon_request_timer;
9860
8f54a6091294 [gaim-migrate @ 10739]
Felipe Contreras <felipe.contreras@gmail.com>
parents: 9198
diff changeset
57
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
58 int fl_users_count;
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
59
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
60 };
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
61
20569
66628c75dada Make block/unblock work right, as well as being add by a buddy. Finally fixes #723
Carlos Silva <typ0@pidgin.im>
parents: 20564
diff changeset
62 gboolean msn_userlist_user_is_in_group(MsnUser *user, const char * group_id);
66628c75dada Make block/unblock work right, as well as being add by a buddy. Finally fixes #723
Carlos Silva <typ0@pidgin.im>
parents: 20564
diff changeset
63 gboolean msn_userlist_user_is_in_list(MsnUser *user, MsnListId list_id);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
64 MsnListId msn_get_list_id(const char *list);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
65
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
66 void msn_got_add_user(MsnSession *session, MsnUser *user,
13855
24cff9e060d7 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 13126
diff changeset
67 MsnListId list_id, const char *group_id);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
68 void msn_got_rem_user(MsnSession *session, MsnUser *user,
13855
24cff9e060d7 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 13126
diff changeset
69 MsnListId list_id, const char *group_id);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
70 void msn_got_lst_user(MsnSession *session, MsnUser *user,
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
71 int list_op, GSList *group_ids);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
72
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
73 MsnUserList *msn_userlist_new(MsnSession *session);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
74 void msn_userlist_destroy(MsnUserList *userlist);
13870
258d48d6ab52 [gaim-migrate @ 16737]
Ma Yuan <mayuan2006@gmail.com>
parents: 13855
diff changeset
75
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
76 void msn_userlist_add_user(MsnUserList *userlist, MsnUser *user);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
77 void msn_userlist_remove_user(MsnUserList *userlist, MsnUser *user);
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
78
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
79 MsnUser * msn_userlist_find_user(MsnUserList *userlist, const char *passport);
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
80 MsnUser * msn_userlist_find_add_user(MsnUserList *userlist,
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
81 const char *passport, const char *userName);
13870
258d48d6ab52 [gaim-migrate @ 16737]
Ma Yuan <mayuan2006@gmail.com>
parents: 13855
diff changeset
82
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
83 void msn_userlist_add_group(MsnUserList *userlist, MsnGroup *group);
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
84 void msn_userlist_remove_group(MsnUserList *userlist, MsnGroup *group);
13855
24cff9e060d7 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 13126
diff changeset
85 MsnGroup *msn_userlist_find_group_with_id(MsnUserList *userlist, const char *id);
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
86 MsnGroup *msn_userlist_find_group_with_name(MsnUserList *userlist, const char *name);
13855
24cff9e060d7 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 13126
diff changeset
87 const char * msn_userlist_find_group_id(MsnUserList *userlist,
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
88 const char *group_name);
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
89 const char *msn_userlist_find_group_name(MsnUserList *userlist, const char *group_id);
13855
24cff9e060d7 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 13126
diff changeset
90 void msn_userlist_rename_group_id(MsnUserList *userlist, const char *group_id,
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
91 const char *new_name);
13855
24cff9e060d7 [gaim-migrate @ 16507]
Ma Yuan <mayuan2006@gmail.com>
parents: 13126
diff changeset
92 void msn_userlist_remove_group_id(MsnUserList *userlist, const char *group_id);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
93
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
94 void msn_userlist_rem_buddy(MsnUserList *userlist, const char *who);
20569
66628c75dada Make block/unblock work right, as well as being add by a buddy. Finally fixes #723
Carlos Silva <typ0@pidgin.im>
parents: 20564
diff changeset
95 void msn_userlist_add_buddy(MsnUserList *userlist,
66628c75dada Make block/unblock work right, as well as being add by a buddy. Finally fixes #723
Carlos Silva <typ0@pidgin.im>
parents: 20564
diff changeset
96 const char *who, const char *group_name);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
97 void msn_userlist_move_buddy(MsnUserList *userlist, const char *who,
20564
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
98 const char *old_group_name,
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
99 const char *new_group_name);
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
100
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
101 gboolean msn_userlist_add_buddy_to_group(MsnUserList *userlist, const char *who,
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
102 const char *group_name);
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
103 gboolean msn_userlist_rem_buddy_from_group(MsnUserList *userlist,
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
104 const char *who,
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
105 const char *group_name);
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
106
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
107 void msn_userlist_add_buddy_to_list(MsnUserList *userlist, const char *who,
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
108 MsnListId list_id);
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
109 void msn_userlist_rem_buddy_from_list(MsnUserList *userlist, const char *who,
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
110 MsnListId list_id);
35675dd4a44d Make buddy and group management actually work, add some SOAP templates, redesign some parts of code and separate some bigger functions into its smaller tasks which are completely unrelated to each other
Carlos Silva <typ0@pidgin.im>
parents: 20530
diff changeset
111
13910
fb8f57c2b934 [gaim-migrate @ 17481]
Ma Yuan <mayuan2006@gmail.com>
parents: 13870
diff changeset
112 void msn_userlist_load(MsnSession *session);
9193
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
113
6e76f1367896 [gaim-migrate @ 9988]
Felipe Contreras <felipe.contreras@gmail.com>
parents:
diff changeset
114 #endif /* _MSN_USERLIST_H_ */

mercurial