1 /* 2 * RAL -- Rubrica Addressbook Library 3 * file: ref.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_REF_H 22 #define _R_REF_H 23 24 #include <glib.h> 25 #include <glib-object.h> 26 27 28 #define R_REF_TYPE (r_ref_get_type()) 29 30 #define R_REF(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ 31 R_REF_TYPE, RRef)) 32 33 #define R_REF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \ 34 R_REF_TYPE, RRefClass)) 35 36 #define IS_R_REF(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), R_REF_TYPE)) 37 #define IS_R_REF_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE((kls), R_REF_TYPE)) 38 39 #define R_REF_GET_CLASS(kls) (G_TYPE_INSTANCE_GET_CLASS((kls), \ 40 R_REF_TYPE, RRefClass)) 41 42 43 typedef struct _RRef RRef; 44 typedef struct _RRefClass RRefClass; 45 typedef struct _RRefPrivate RRefPrivate; 46 47 48 struct _RRef 49 { 50 GObject parent; 51 52 RRefPrivate* private; 53 }; 54 55 56 struct _RRefClass 57 { 58 GObjectClass parent; 59 }; 60 61 62 GType r_ref_get_type (void); 63 64 65 RRef* r_ref_new (glong id); 66 void r_ref_free (RRef* ref); 67 68 RRef* r_ref_copy (RRef* ref); 69 gboolean r_ref_check (RRef* ref, const gchar* property, gchar** value); 70 71 #endif 72