[evolution-data-server/openismus-work-3-8] EBookQuery: Added end marker for the EBookQueryTest enum
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-3-8] EBookQuery: Added end marker for the EBookQueryTest enum
- Date: Sun, 1 Dec 2013 09:30:05 +0000 (UTC)
commit ece1ee3b7675ff0d667b35e1b3e0bc133f99abd1
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Thu Nov 21 20:31:46 2013 +0900
EBookQuery: Added end marker for the EBookQueryTest enum
Also declare the first member with "= 0", just because we now
use it to index an array, and I'm paranoid/unsure about the C spec
in this case.
Conflicts:
addressbook/libebook-contacts/e-book-query.c
addressbook/libebook-contacts/e-book-query.h
addressbook/libebook-contacts/e-book-query.c | 3 +++
addressbook/libebook-contacts/e-book-query.h | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/addressbook/libebook-contacts/e-book-query.c b/addressbook/libebook-contacts/e-book-query.c
index 7affc02..dc4840a 100644
--- a/addressbook/libebook-contacts/e-book-query.c
+++ b/addressbook/libebook-contacts/e-book-query.c
@@ -854,6 +854,8 @@ field_test_name (EBookQueryTest field_test)
return "translit_beginswith";
case E_BOOK_QUERY_TRANSLIT_ENDS_WITH:
return "translit_endswith";
+ case E_BOOK_QUERY_LAST:
+ g_return_val_if_reached (NULL);
}
return NULL;
@@ -878,6 +880,7 @@ is_phone_test (EBookQueryTest field_test)
case E_BOOK_QUERY_TRANSLIT_CONTAINS:
case E_BOOK_QUERY_TRANSLIT_BEGINS_WITH:
case E_BOOK_QUERY_TRANSLIT_ENDS_WITH:
+ case E_BOOK_QUERY_LAST:
break;
}
diff --git a/addressbook/libebook-contacts/e-book-query.h b/addressbook/libebook-contacts/e-book-query.h
index c23d4ef..4ad9e76 100644
--- a/addressbook/libebook-contacts/e-book-query.h
+++ b/addressbook/libebook-contacts/e-book-query.h
@@ -64,13 +64,14 @@ typedef struct _EBookQuery EBookQuery;
* @E_BOOK_QUERY_TRANSLIT_CONTAINS: Like %E_BOOK_QUERY_CONTAINS, but transliterates text to Latin script
before the comparison
* @E_BOOK_QUERY_TRANSLIT_BEGINS_WITH: Like %E_BOOK_QUERY_BEGINS_WITH, but transliterates text to Latin
script before the comparison
* @E_BOOK_QUERY_TRANSLIT_ENDS_WITH: Like %E_BOOK_QUERY_ENDS_WITH, but transliterates text to Latin script
before the comparison
+ * @E_BOOK_QUERY_LAST: End marker for the #EBookQueryTest enumeration, not a valid query test.
*
* The kind of test a query created by e_book_query_field_test() shall perform.
*
* See also: e_phone_number_compare_strings().
**/
typedef enum {
- E_BOOK_QUERY_IS,
+ E_BOOK_QUERY_IS = 0,
E_BOOK_QUERY_CONTAINS,
E_BOOK_QUERY_BEGINS_WITH,
E_BOOK_QUERY_ENDS_WITH,
@@ -85,7 +86,7 @@ typedef enum {
E_BOOK_QUERY_TRANSLIT_IS,
E_BOOK_QUERY_TRANSLIT_CONTAINS,
E_BOOK_QUERY_TRANSLIT_BEGINS_WITH,
- E_BOOK_QUERY_TRANSLIT_ENDS_WITH
+ E_BOOK_QUERY_TRANSLIT_ENDS_WITH,
/*
Consider these "coming soon".
@@ -96,6 +97,8 @@ typedef enum {
E_BOOK_QUERY_GE,
E_BOOK_QUERY_EQ,
*/
+
+ E_BOOK_QUERY_LAST
} EBookQueryTest;
EBookQuery * e_book_query_from_string (const gchar *query_string);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]