Mercurial > pidgin
diff src/protocols/msn/group.h @ 9193:502707ca1836
[gaim-migrate @ 9988]
Patch by Felipe Contreras to add MSN file transfer and buddy icons. Please
test and report any bugs!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 06 Jun 2004 02:39:08 +0000 |
parents | 06f57183e29f |
children | ab6636c5a136 |
line wrap: on
line diff
--- a/src/protocols/msn/group.h Sun Jun 06 02:16:08 2004 +0000 +++ b/src/protocols/msn/group.h Sun Jun 06 02:39:08 2004 +0000 @@ -23,36 +23,23 @@ #define _MSN_GROUP_H_ typedef struct _MsnGroup MsnGroup; -typedef struct _MsnGroups MsnGroups; #include <stdio.h> #include "session.h" #include "user.h" +#include "userlist.h" + /** * A group. */ struct _MsnGroup { - size_t ref_count; /**< The reference count. */ - MsnSession *session; /**< The MSN session. */ int id; /**< The group ID. */ char *name; /**< The name of the group. */ - - MsnUsers *users; /**< The users in the group. */ -}; - -/** - * A list of groups. - */ -struct _MsnGroups -{ - size_t count; /**< The number of groups. */ - - GList *groups; /**< The list of groups. */ }; /**************************************************************************/ @@ -69,7 +56,7 @@ * * @return A new group structure. */ -MsnGroup *msn_group_new(MsnSession *session, int id, const char *name); +MsnGroup *msn_group_new(MsnUserList *userlist, int id, const char *name); /** * Destroys a group structure. @@ -79,26 +66,6 @@ void msn_group_destroy(MsnGroup *group); /** - * Increments the reference count on a group. - * - * @param group The group. - * - * @return @a group - */ -MsnGroup *msn_group_ref(MsnGroup *group); - -/** - * Decrements the reference count on a group. - * - * This will destroy the structure if the count hits 0. - * - * @param group The group. - * - * @return @a group, or @c NULL if the new count is 0. - */ -MsnGroup *msn_group_unref(MsnGroup *group); - -/** * Sets the ID for a group. * * @param group The group. @@ -131,105 +98,4 @@ * @return The name. */ const char *msn_group_get_name(const MsnGroup *group); - -/** - * Adds a user to the group. - * - * @param group The group. - * @param user The user. - */ -void msn_group_add_user(MsnGroup *group, MsnUser *user); - -/** - * Removes a user from the group. - * - * @param group The group. - * @param user The user. - */ -void msn_group_remove_user(MsnGroup *group, MsnUser *user); - -/** - * Returns the users in a group. - * - * @param group The group. - * - * @return The list of users. - */ -MsnUsers *msn_group_get_users(const MsnGroup *group); - -/*@}*/ - -/**************************************************************************/ -/** @name Group List API */ -/**************************************************************************/ -/*@{*/ - -/** - * Creates a new MsnGroups structure. - * - * @return A new MsnGroups structure. - */ -MsnGroups *msn_groups_new(void); - -/** - * Destroys a groups list. - * - * @param groups The groups list. - */ -void msn_groups_destroy(MsnGroups *groups); - -/** - * Adds a group to a groups list. - * - * @param groups The groups list. - * @param group The group. - */ -void msn_groups_add(MsnGroups *groups, MsnGroup *group); - -/** - * Removes a group from a groups list. - * - * @param groups The groups list. - * @param group The group. - */ -void msn_groups_remove(MsnGroups *groups, MsnGroup *group); - -/** - * Returns the number of groups in a groups list. - * - * @param groups The groups list. - * - * @return The number of groups. - */ -size_t msn_groups_get_count(const MsnGroups *groups); - -/** - * Finds a group with the specified ID. - * - * @param groups A list of groups. - * @param id The group ID. - * - * @return The group if found, or @c NULL otherwise. - */ -MsnGroup *msn_groups_find_with_id(MsnGroups *groups, int id); - -/** - * Returns a GList of all groups. - * - * @param groups The list of groups. - * - * @return A GList of all groups. - */ -GList *msn_groups_get_list(const MsnGroups *groups); - -/** - * Finds a group with the specified name. - * - * @param groups A list of groups. - * @param name The group name. - * - * @return The group if found, or @c NULL otherwise. - */ -MsnGroup *msn_groups_find_with_name(MsnGroups *groups, const char *name); - #endif /* _MSN_GROUP_H_ */