2 * @file group.h Group functions
6 * Purple 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
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
27 typedef struct _MsnGroup MsnGroup;
35 #define MSN_INDIVIDUALS_GROUP_ID "1983"
36 #define MSN_INDIVIDUALS_GROUP_NAME _("Other Contacts")
38 #define MSN_NON_IM_GROUP_ID "email"
39 #define MSN_NON_IM_GROUP_NAME _("Non-IM Contacts")
46 MsnSession *session; /**< The MSN session. */
48 char *id; /**< The group ID. */
49 char *name; /**< The name of the group. */
52 /**************************************************************************
54 **************************************************************************/
58 * Creates a new group structure.
60 * @param session The MSN session.
61 * @param id The group ID.
62 * @param name The name of the group.
64 * @return A new group structure.
66 MsnGroup *msn_group_new(MsnUserList *userlist, const char *id, const char *name);
69 * Destroys a group structure.
71 * @param group The group to destroy.
73 void msn_group_destroy(MsnGroup *group);
76 * Sets the ID for a group.
78 * @param group The group.
81 void msn_group_set_id(MsnGroup *group, const char *id);
84 * Sets the name for a group.
86 * @param group The group.
87 * @param name The name.
89 void msn_group_set_name(MsnGroup *group, const char *name);
92 * Returns the ID for a group.
94 * @param group The group.
98 char* msn_group_get_id(const MsnGroup *group);
101 * Returns the name for a group.
103 * @param group The group.
107 const char *msn_group_get_name(const MsnGroup *group);
109 #endif /* _MSN_GROUP_H_ */