Frameworks/libpurple.framework/Versions/0.6.2/Headers/userlist.h
changeset 2592 e8d15275025e
parent 2489 56d91bf40dd8
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Frameworks/libpurple.framework/Versions/0.6.2/Headers/userlist.h	Fri Aug 21 13:25:11 2009 -0700
     1.3 @@ -0,0 +1,105 @@
     1.4 +/**
     1.5 + * @file userlist.h MSN user list support
     1.6 + *
     1.7 + * purple
     1.8 + *
     1.9 + * Purple is the legal property of its developers, whose names are too numerous
    1.10 + * to list here.  Please refer to the COPYRIGHT file distributed with this
    1.11 + * source distribution.
    1.12 + *
    1.13 + * This program is free software; you can redistribute it and/or modify
    1.14 + * it under the terms of the GNU General Public License as published by
    1.15 + * the Free Software Foundation; either version 2 of the License, or
    1.16 + * (at your option) any later version.
    1.17 + *
    1.18 + * This program is distributed in the hope that it will be useful,
    1.19 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.20 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.21 + * GNU General Public License for more details.
    1.22 + *
    1.23 + * You should have received a copy of the GNU General Public License
    1.24 + * along with this program; if not, write to the Free Software
    1.25 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
    1.26 + */
    1.27 +#ifndef _MSN_USERLIST_H_
    1.28 +#define _MSN_USERLIST_H_
    1.29 +
    1.30 +typedef struct _MsnUserList MsnUserList;
    1.31 +
    1.32 +#include "user.h"
    1.33 +#include "group.h"
    1.34 +
    1.35 +typedef enum
    1.36 +{
    1.37 +	MSN_LIST_FL,
    1.38 +	MSN_LIST_AL,
    1.39 +	MSN_LIST_BL,
    1.40 +	MSN_LIST_RL,
    1.41 +	MSN_LIST_PL
    1.42 +
    1.43 +} MsnListId;
    1.44 +
    1.45 +
    1.46 +struct _MsnUserList
    1.47 +{
    1.48 +	MsnSession *session;
    1.49 +
    1.50 +	GList *users; /* Contains MsnUsers */
    1.51 +	GList *groups; /* Contains MsnGroups */
    1.52 +
    1.53 +	GQueue *buddy_icon_requests;
    1.54 +	int buddy_icon_window;
    1.55 +	guint buddy_icon_request_timer;
    1.56 +
    1.57 +};
    1.58 +
    1.59 +gboolean msn_userlist_user_is_in_group(MsnUser *user, const char * group_id);
    1.60 +gboolean msn_userlist_user_is_in_list(MsnUser *user, MsnListId list_id);
    1.61 +
    1.62 +void msn_got_lst_user(MsnSession *session, MsnUser *user,
    1.63 +					  int list_op, GSList *group_ids);
    1.64 +
    1.65 +MsnUserList *msn_userlist_new(MsnSession *session);
    1.66 +void msn_userlist_destroy(MsnUserList *userlist);
    1.67 +
    1.68 +void msn_userlist_add_user(MsnUserList *userlist, MsnUser *user);
    1.69 +void msn_userlist_remove_user(MsnUserList *userlist, MsnUser *user);
    1.70 +
    1.71 +MsnUser * msn_userlist_find_user(MsnUserList *userlist, const char *passport);
    1.72 +MsnUser * msn_userlist_find_add_user(MsnUserList *userlist,
    1.73 +				const char *passport, const char *userName);
    1.74 +MsnUser * msn_userlist_find_user_with_id(MsnUserList *userlist, const char *uid);
    1.75 +MsnUser * msn_userlist_find_user_with_mobile_phone(MsnUserList *userlist, const char *number);
    1.76 +
    1.77 +void msn_userlist_add_group(MsnUserList *userlist, MsnGroup *group);
    1.78 +void msn_userlist_remove_group(MsnUserList *userlist, MsnGroup *group);
    1.79 +MsnGroup *msn_userlist_find_group_with_id(MsnUserList *userlist, const char *id);
    1.80 +MsnGroup *msn_userlist_find_group_with_name(MsnUserList *userlist, const char *name);
    1.81 +const char * msn_userlist_find_group_id(MsnUserList *userlist,
    1.82 +					const char *group_name);
    1.83 +const char *msn_userlist_find_group_name(MsnUserList *userlist, const char *group_id);
    1.84 +void msn_userlist_rename_group_id(MsnUserList *userlist, const char *group_id,
    1.85 +				  const char *new_name);
    1.86 +void msn_userlist_remove_group_id(MsnUserList *userlist, const char *group_id);
    1.87 +
    1.88 +void msn_userlist_rem_buddy(MsnUserList *userlist, const char *who);
    1.89 +void msn_userlist_add_buddy(MsnUserList *userlist,
    1.90 +			    const char *who, const char *group_name);
    1.91 +void msn_userlist_move_buddy(MsnUserList *userlist, const char *who,
    1.92 +						    const char *old_group_name,
    1.93 +						    const char *new_group_name);
    1.94 +
    1.95 +gboolean msn_userlist_add_buddy_to_group(MsnUserList *userlist, const char *who,
    1.96 +					 const char *group_name);
    1.97 +gboolean msn_userlist_rem_buddy_from_group(MsnUserList *userlist,
    1.98 +					   const char *who,
    1.99 +					   const char *group_name);
   1.100 +
   1.101 +void msn_userlist_add_buddy_to_list(MsnUserList *userlist, const char *who,
   1.102 +				    MsnListId list_id);
   1.103 +void msn_userlist_rem_buddy_from_list(MsnUserList *userlist, const char *who,
   1.104 +				      MsnListId list_id);
   1.105 +
   1.106 +void msn_userlist_load(MsnSession *session);
   1.107 +
   1.108 +#endif /* _MSN_USERLIST_H_ */