Frameworks/libpurple.framework/Versions/0.6.2/Headers/group.h
author Zachary West <zacw@adium.im>
Fri Aug 21 13:25:11 2009 -0700 (2009-08-21)
changeset 2592 e8d15275025e
parent 1739 Frameworks/libpurple.framework/Versions/0.6.0/Headers/group.h@8b0daad9656c
permissions -rw-r--r--
im.pidgin.adium.1-4 at 267c6165e02e34318a1823960bd04c0639952f73
     1 /**
     2  * @file group.h Group functions
     3  *
     4  * purple
     5  *
     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
     8  * source distribution.
     9  *
    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.
    14  *
    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.
    19  *
    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
    23  */
    24 #ifndef _MSN_GROUP_H_
    25 #define _MSN_GROUP_H_
    26 
    27 typedef struct _MsnGroup  MsnGroup;
    28 
    29 #include <stdio.h>
    30 
    31 #include "session.h"
    32 #include "user.h"
    33 #include "userlist.h"
    34 
    35 #define MSN_INDIVIDUALS_GROUP_ID	"1983"
    36 #define MSN_INDIVIDUALS_GROUP_NAME	_("Other Contacts")
    37 
    38 #define MSN_NON_IM_GROUP_ID		"email"
    39 #define MSN_NON_IM_GROUP_NAME	_("Non-IM Contacts")
    40 
    41 /**
    42  * A group.
    43  */
    44 struct _MsnGroup
    45 {
    46 	MsnSession *session;    /**< The MSN session.           */
    47 
    48 	char *id;                 /**< The group ID.              */
    49 	char *name;             /**< The name of the group.     */
    50 };
    51 
    52 /**************************************************************************
    53  ** @name Group API                                                       *
    54  **************************************************************************/
    55 /*@{*/
    56 
    57 /**
    58  * Creates a new group structure.
    59  *
    60  * @param session The MSN session.
    61  * @param id      The group ID.
    62  * @param name    The name of the group.
    63  *
    64  * @return A new group structure.
    65  */
    66 MsnGroup *msn_group_new(MsnUserList *userlist, const char *id, const char *name);
    67 
    68 /**
    69  * Destroys a group structure.
    70  *
    71  * @param group The group to destroy.
    72  */
    73 void msn_group_destroy(MsnGroup *group);
    74 
    75 /**
    76  * Sets the ID for a group.
    77  *
    78  * @param group The group.
    79  * @param id    The ID.
    80  */
    81 void msn_group_set_id(MsnGroup *group, const char *id);
    82 
    83 /**
    84  * Sets the name for a group.
    85  *
    86  * @param group The group.
    87  * @param name  The name.
    88  */
    89 void msn_group_set_name(MsnGroup *group, const char *name);
    90 
    91 /**
    92  * Returns the ID for a group.
    93  *
    94  * @param group The group.
    95  *
    96  * @return The ID.
    97  */
    98 char* msn_group_get_id(const MsnGroup *group);
    99 
   100 /**
   101  * Returns the name for a group.
   102  *
   103  * @param group The group.
   104  *
   105  * @return The name.
   106  */
   107 const char *msn_group_get_name(const MsnGroup *group);
   108 
   109 #endif /* _MSN_GROUP_H_ */
   110