diff options
| author | Chris Toshok <toshok@ximian.com> | 2004-02-21 01:20:46 +0000 |
|---|---|---|
| committer | Chris Toshok <toshok@src.gnome.org> | 2004-02-21 01:20:46 +0000 |
| commit | e19eac527a3d67914d09e840c37d4e3d31bb9417 (patch) | |
| tree | 80d04915a761d7dd1ccddd29cf874aa8f310b28a | |
| parent | 3cb9b06ba29c4a74510d6d13d1509460600282b9 (diff) | |
| download | evolution-data-server-e19eac527a3d67914d09e840c37d4e3d31bb9417.tar.gz | |
[ fixes bug #53994 ]
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}.
| -rw-r--r-- | addressbook/ChangeLog | 17 | ||||
| -rw-r--r-- | addressbook/libebook/e-book-query.c | 22 | ||||
| -rw-r--r-- | addressbook/libebook/e-book-query.h | 5 | ||||
| -rw-r--r-- | addressbook/libebook/e-contact.h | 6 |
4 files changed, 50 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 128c1a039..f3dfe64c3 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,20 @@ +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 diff --git a/addressbook/libebook/e-book-query.c b/addressbook/libebook/e-book-query.c index c6a6bd474..24ff6b8bd 100644 --- a/addressbook/libebook/e-book-query.c +++ b/addressbook/libebook/e-book-query.c @@ -626,3 +626,25 @@ e_book_query_to_string (EBookQuery *q) 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; +} diff --git a/addressbook/libebook/e-book-query.h b/addressbook/libebook/e-book-query.h index ff3bf2b51..3110e52b8 100644 --- a/addressbook/libebook/e-book-query.h +++ b/addressbook/libebook/e-book-query.h @@ -6,6 +6,8 @@ G_BEGIN_DECLS +#define E_TYPE_BOOK_QUERY (e_book_query_get_type ()) + typedef struct EBookQuery EBookQuery; typedef enum { @@ -44,6 +46,9 @@ EBookQuery* e_book_query_field_test (EContactField field, /* 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__ */ diff --git a/addressbook/libebook/e-contact.h b/addressbook/libebook/e-contact.h index fc8d26c7a..0af14b404 100644 --- a/addressbook/libebook/e-contact.h +++ b/addressbook/libebook/e-contact.h @@ -21,6 +21,12 @@ #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; |
