1 /* 2 * RAL -- Rubrica Addressbook Library 3 * file: groups.h 4 * 5 * Copyright (C) Nicola Fragale <nicolafragale@libero.it> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 */ 20 21 #ifndef _R_GROUPS_SET_H 22 #define _R_GROUPS_SET_H 23 24 #include <glib.h> 25 #include <glib-object.h> 26 27 #include "utils.h" 28 #include "group.h" 29 30 31 #define R_GROUP_TYPE (r_group_get_type()) 32 33 #define R_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ 34 R_GROUP_TYPE, RGroup)) 35 36 #define R_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \ 37 R_GROUP_TYPE, RGroupClass)) 38 39 #define IS_R_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ 40 R_GROUP_TYPE)) 41 42 #define IS_R_GROUP_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE((kls), R_GROUP_TYPE)) 43 44 #define R_GROUP_GET_CLASS(kls) (G_TYPE_INSTANCE_GET_CLASS((kls), \ 45 R_GROUP_TYPE, RGroupClass)) 46 47 48 49 typedef struct _RGroup RGroup; 50 typedef struct _RGroupClass RGroupClass; 51 typedef struct _RGroupPrivate RGroupPrivate; 52 53 54 struct _RGroup { 55 GObject parent; 56 57 RGroupPrivate* priv; 58 }; 59 60 61 struct _RGroupClass { 62 GObjectClass parent; 63 }; 64 65 66 67 GType r_group_get_type (void); 68 69 70 RGroup* r_group_new (void); 71 void r_group_free (RGroup* group); 72 RGroup* r_group_copy (RGroup* group); 73 74 gboolean r_group_check (RGroup* group, const gchar* property, 75 gchar** value); 76 77 gboolean r_group_rename (RGroup* group, gchar* newname); 78 gboolean r_group_change_pixmap (RGroup* group, gchar* newpix); 79 gboolean r_group_has_name (RGroup* group, const gchar* name); 80 gboolean r_group_has_owner (RGroup* group, const gchar* owner); 81 82 #endif 83