comparison libpurple/protocols/msn/userlist.h @ 20481:eb93710aec4d

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
author Carlos Silva <typ0@pidgin.im>
date Tue, 28 Aug 2007 03:54:18 +0000
parents 18ecdee88ed0
children ff4ae9dde291
comparison
equal deleted inserted replaced
20480:7d3e53e3f623 20481:eb93710aec4d
38 MSN_LIST_RL, 38 MSN_LIST_RL,
39 MSN_LIST_PL 39 MSN_LIST_PL
40 40
41 } MsnListId; 41 } MsnListId;
42 42
43 typedef struct
44 {
45 char *who;
46 char *old_group_name;
47
48 } MsnMoveBuddy;
49
50 struct _MsnUserList 43 struct _MsnUserList
51 { 44 {
52 MsnSession *session; 45 MsnSession *session;
53 46
54 /* MsnUsers *users; */ 47 /* MsnUsers *users; */
77 MsnUserList *msn_userlist_new(MsnSession *session); 70 MsnUserList *msn_userlist_new(MsnSession *session);
78 void msn_userlist_destroy(MsnUserList *userlist); 71 void msn_userlist_destroy(MsnUserList *userlist);
79 72
80 void msn_userlist_add_user(MsnUserList *userlist, MsnUser *user); 73 void msn_userlist_add_user(MsnUserList *userlist, MsnUser *user);
81 void msn_userlist_remove_user(MsnUserList *userlist, MsnUser *user); 74 void msn_userlist_remove_user(MsnUserList *userlist, MsnUser *user);
82 MsnUser *msn_userlist_find_user(MsnUserList *userlist, 75
83 const char *passport); 76 MsnUser * msn_userlist_find_user(MsnUserList *userlist, const char *passport);
84 MsnUser *msn_userlist_find_add_user(MsnUserList *userlist, 77 MsnUser * msn_userlist_find_add_user(MsnUserList *userlist,
85 const char *passport,const char *userName); 78 const char *passport, const char *userName);
86 79
87 void msn_userlist_add_group(MsnUserList *userlist, MsnGroup *group); 80 void msn_userlist_add_group(MsnUserList *userlist, MsnGroup *group);
88 void msn_userlist_remove_group(MsnUserList *userlist, MsnGroup *group); 81 void msn_userlist_remove_group(MsnUserList *userlist, MsnGroup *group);
89 MsnGroup *msn_userlist_find_group_with_id(MsnUserList *userlist, const char *id); 82 MsnGroup *msn_userlist_find_group_with_id(MsnUserList *userlist, const char *id);
90 MsnGroup *msn_userlist_find_group_with_name(MsnUserList *userlist, 83 MsnGroup *msn_userlist_find_group_with_name(MsnUserList *userlist, const char *name);
91 const char *name);
92 const char * msn_userlist_find_group_id(MsnUserList *userlist, 84 const char * msn_userlist_find_group_id(MsnUserList *userlist,
93 const char *group_name); 85 const char *group_name);
94 const char *msn_userlist_find_group_name(MsnUserList *userlist, 86 const char *msn_userlist_find_group_name(MsnUserList *userlist, const char *group_id);
95 const char *group_id);
96 void msn_userlist_rename_group_id(MsnUserList *userlist, const char *group_id, 87 void msn_userlist_rename_group_id(MsnUserList *userlist, const char *group_id,
97 const char *new_name); 88 const char *new_name);
98 void msn_userlist_remove_group_id(MsnUserList *userlist, const char *group_id); 89 void msn_userlist_remove_group_id(MsnUserList *userlist, const char *group_id);
99 90
100 void msn_userlist_rem_buddy(MsnUserList *userlist, const char *who, 91 void msn_userlist_rem_buddy(MsnUserList *userlist, const char *who);
101 int list_id, const char *group_name); 92 void msn_userlist_add_buddy(MsnUserList *userlist, const char *who, const char *group_name);
102 void msn_userlist_add_buddy(MsnUserList *userlist, const char *who,
103 int list_id, const char *group_name);
104 void msn_userlist_move_buddy(MsnUserList *userlist, const char *who, 93 void msn_userlist_move_buddy(MsnUserList *userlist, const char *who,
105 const char *old_group_name, 94 const char *old_group_name,
106 const char *new_group_name); 95 const char *new_group_name);
96
97 gboolean msn_userlist_add_buddy_to_group(MsnUserList *userlist, const char *who,
98 const char *group_name);
99 gboolean msn_userlist_rem_buddy_from_group(MsnUserList *userlist,
100 const char *who,
101 const char *group_name);
102
103 void msn_userlist_add_buddy_to_list(MsnUserList *userlist, const char *who,
104 MsnListId list_id);
105 void msn_userlist_rem_buddy_from_list(MsnUserList *userlist, const char *who,
106 MsnListId list_id);
107
107 void msn_userlist_load(MsnSession *session); 108 void msn_userlist_load(MsnSession *session);
108 109
109 #endif /* _MSN_USERLIST_H_ */ 110 #endif /* _MSN_USERLIST_H_ */