Frameworks/libpurple.framework/Versions/2.10.12r8d2874a79747/Headers/group.h
branchadium-1.5.11
changeset 6014 fcb71cb71a3d
parent 5941 307f53385811
parent 6013 f8d0dc659e3f
child 6016 325e2ab3406f
equal deleted inserted replaced
5941:307f53385811 6014:fcb71cb71a3d
     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 "internal.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 */