+2004-02-20 Chris Toshok <toshok@ximian.com>
+
+ [ fixes bug #53994 ]
+
+ * libebook/e-book-query.c (e_book_query_get_type): new function,
+ supply e_book_query_copy as the CopyFunc, and e_book_query_unref
+ as the FreeFunc.
+ (e_book_query_copy): new function, just convert @q to a string and
+ reparse it, ala the EVCard copy function.
+
+ * libebook/e-book-query.h: add prototypes for
+ e_book_query_get_type and e_book_query_copy. also add
+ E_TYPE_BOOK_QUERY.
+
+ * libebook/e-contact.h: add
+ E_TYPE_CONTACT_{DATE,NAME,PHOTO,CERT,ADDRESS}.
+
2004-02-12 Chris Toshok <toshok@ximian.com>
* libebook/e-book-listener.c
return g_string_free (str, FALSE);
}
+
+GType
+e_book_query_get_type (void)
+{
+ static GType type_id = 0;
+
+ if (!type_id)
+ type_id = g_boxed_type_register_static ("EBookQuery",
+ (GBoxedCopyFunc) e_book_query_copy,
+ (GBoxedFreeFunc) e_book_query_unref);
+ return type_id;
+}
+
+EBookQuery*
+e_book_query_copy (EBookQuery *q)
+{
+ char *str = e_book_query_to_string (q);
+ EBookQuery *nq = e_book_query_from_string (str);
+
+ g_free (str);
+ return nq;
+}
G_BEGIN_DECLS
+#define E_TYPE_BOOK_QUERY (e_book_query_get_type ())
+
typedef struct EBookQuery EBookQuery;
typedef enum {
/* a special any field contains query */
EBookQuery* e_book_query_any_field_contains (const char *value);
+GType e_book_query_get_type (void);
+EBookQuery* e_book_query_copy (EBookQuery *q);
+
G_END_DECLS
#endif /* __E_BOOK_QUERY_H__ */
#define E_IS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CONTACT))
#define E_CONTACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), E_TYPE_CONTACT, EContactClass))
+#define E_TYPE_CONTACT_DATE (e_contact_date_get_type ())
+#define E_TYPE_CONTACT_NAME (e_contact_name_get_type ())
+#define E_TYPE_CONTACT_PHOTO (e_contact_photo_get_type ())
+#define E_TYPE_CONTACT_CERT (e_contact_cert_get_type ())
+#define E_TYPE_CONTACT_ADDRESS (e_contact_address_get_type ())
+
typedef struct _EContact EContact;
typedef struct _EContactClass EContactClass;
typedef struct _EContactPrivate EContactPrivate;