[evolution-data-server] Register EVCardAttributeParam as a boxed type



commit 2263b4f4a58b2d3a62055138d5e085e3f4f4c3bb
Author: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
Date:   Sat May 14 13:22:45 2011 +0100

    Register EVCardAttributeParam as a boxed type
    
    Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=650169

 addressbook/libebook/e-vcard.c |   22 ++++++++++++++++++++++
 addressbook/libebook/e-vcard.h |    3 +++
 2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libebook/e-vcard.c b/addressbook/libebook/e-vcard.c
index b80d7f5..1fc11a5 100644
--- a/addressbook/libebook/e-vcard.c
+++ b/addressbook/libebook/e-vcard.c
@@ -1468,6 +1468,28 @@ e_vcard_attribute_remove_params (EVCardAttribute *attr)
 	attr->encoding = EVC_ENCODING_RAW;
 }
 
+
+GType
+e_vcard_attribute_param_get_type (void)
+{
+	static volatile gsize type_id__volatile = 0;
+
+	if (g_once_init_enter (&type_id__volatile)) {
+		GType type_id;
+
+		type_id =
+			g_boxed_type_register_static ("EVCardAttributeParam",
+						      (GBoxedCopyFunc)
+						      e_vcard_attribute_param_copy,
+						      (GBoxedFreeFunc)
+						      e_vcard_attribute_free);
+
+		g_once_init_leave (&type_id__volatile, type_id);
+	}
+
+	return type_id__volatile;
+}
+
 /**
  * e_vcard_attribute_param_new:
  * @name: the name of the new parameter
diff --git a/addressbook/libebook/e-vcard.h b/addressbook/libebook/e-vcard.h
index 65d73ec..e0fd6fe 100644
--- a/addressbook/libebook/e-vcard.h
+++ b/addressbook/libebook/e-vcard.h
@@ -129,6 +129,8 @@ typedef enum {
 
 #define E_TYPE_VCARD_ATTRIBUTE  (e_vcard_attribute_get_type ())
 
+#define E_TYPE_VCARD_PARAM_ATTRIBUTE  (e_vcard_attribute_param_get_type ())
+
 typedef struct _EVCard EVCard;
 typedef struct _EVCardClass EVCardClass;
 typedef struct _EVCardPrivate EVCardPrivate;
@@ -186,6 +188,7 @@ void             e_vcard_attribute_remove_param      (EVCardAttribute *attr, con
 void             e_vcard_attribute_remove_param_value (EVCardAttribute *attr, const gchar *param_name, const gchar *s);
 
 /* attribute parameters */
+GType                 e_vcard_attribute_param_get_type        (void);
 EVCardAttributeParam* e_vcard_attribute_param_new             (const gchar *name);
 void                  e_vcard_attribute_param_free            (EVCardAttributeParam *param);
 EVCardAttributeParam* e_vcard_attribute_param_copy            (EVCardAttributeParam *param);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]