~ubuntu-branches/ubuntu/utopic/evolution-data-server/utopic-proposed

« back to all changes in this revision

Viewing changes to addressbook/libebook-contacts/e-book-contacts-types.h

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-06-13 12:02:14 UTC
  • mfrom: (1.1.116) (1.2.35 sid)
  • Revision ID: package-import@ubuntu.com-20140613120214-1zx93d8jxwt093aw
Tags: 3.12.2-1ubuntu1
* Merge with Debian, remaining changes:
  - debian/control: build depend on hardening-wrapper
  - Add build-depends and pass configure flag to enable Ubuntu Online
    Accounts support.
  - Filter out -Bsymbolic-functions from LDFLAGS (for future people
    wondering about this change, see e.g. BGO #594473 and duplicates).
  - Enable Ubuntu Online Accounts and split it and GOA into a separate
    package

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
/**
22
22
 * E_BOOK_CLIENT_ERROR:
23
23
 *
24
 
 * FIXME: Document me.
 
24
 * Error domain for #EBookClient errors
25
25
 *
26
26
 * Since: 3.2
27
27
 **/
49
49
 
50
50
/**
51
51
 * EBookClientError:
 
52
 * @E_BOOK_CLIENT_ERROR_NO_SUCH_BOOK: Requested book did not exist
 
53
 * @E_BOOK_CLIENT_ERROR_CONTACT_NOT_FOUND: Contact referred to was not found
 
54
 * @E_BOOK_CLIENT_ERROR_CONTACT_ID_ALREADY_EXISTS: Tried to add a contact which already exists
 
55
 * @E_BOOK_CLIENT_ERROR_NO_SUCH_SOURCE: Referred #ESource does not exist
 
56
 * @E_BOOK_CLIENT_ERROR_NO_SPACE: Out of disk space
52
57
 *
53
 
 * FIXME: Document me.
 
58
 * Error codes returned by #EBookClient APIs, if an #EClientError was not available.
54
59
 *
55
60
 * Since: 3.2
56
61
 **/
64
69
 
65
70
/**
66
71
 * EDataBookStatus:
 
72
 * @E_DATA_BOOK_STATUS_SUCCESS: No error
 
73
 * @E_DATA_BOOK_STATUS_BUSY: Backend was busy
 
74
 * @E_DATA_BOOK_STATUS_REPOSITORY_OFFLINE: Offsite repository was not online
 
75
 * @E_DATA_BOOK_STATUS_PERMISSION_DENIED: Permission denied
 
76
 * @E_DATA_BOOK_STATUS_CONTACT_NOT_FOUND: Contact referred to was not found
 
77
 * @E_DATA_BOOK_STATUS_CONTACTID_ALREADY_EXISTS: Tried to add a contact which already exists
 
78
 * @E_DATA_BOOK_STATUS_AUTHENTICATION_FAILED: Authentication failure
 
79
 * @E_DATA_BOOK_STATUS_AUTHENTICATION_REQUIRED: Authentication required for this operation
 
80
 * @E_DATA_BOOK_STATUS_UNSUPPORTED_FIELD: An unsupported #EContactField was specified for a given operation
 
81
 * @E_DATA_BOOK_STATUS_UNSUPPORTED_AUTHENTICATION_METHOD: The authentication method is unsupported
 
82
 * @E_DATA_BOOK_STATUS_TLS_NOT_AVAILABLE: TLS was not available
 
83
 * @E_DATA_BOOK_STATUS_NO_SUCH_BOOK: Book did not exist
 
84
 * @E_DATA_BOOK_STATUS_BOOK_REMOVED: Book was removed
 
85
 * @E_DATA_BOOK_STATUS_OFFLINE_UNAVAILABLE: XXX Document me
 
86
 * @E_DATA_BOOK_STATUS_SEARCH_SIZE_LIMIT_EXCEEDED: Exceeded limit of seach size
 
87
 * @E_DATA_BOOK_STATUS_SEARCH_TIME_LIMIT_EXCEEDED: Exceeded time limit for seach
 
88
 * @E_DATA_BOOK_STATUS_INVALID_QUERY: Given search espression is invalid
 
89
 * @E_DATA_BOOK_STATUS_QUERY_REFUSED: Given search espression was refused
 
90
 * @E_DATA_BOOK_STATUS_COULD_NOT_CANCEL: Unable to cancel an operation
 
91
 * @E_DATA_BOOK_STATUS_OTHER_ERROR: An other error occurred
 
92
 * @E_DATA_BOOK_STATUS_INVALID_SERVER_VERSION: Invalid server version
 
93
 * @E_DATA_BOOK_STATUS_NO_SPACE: Disk space insufficient
 
94
 * @E_DATA_BOOK_STATUS_INVALID_ARG: Invalid argument
 
95
 * @E_DATA_BOOK_STATUS_NOT_SUPPORTED: Unsupported operation
 
96
 * @E_DATA_BOOK_STATUS_NOT_OPENED: Tried to access a book which is not yet open
 
97
 * @E_DATA_BOOK_STATUS_OUT_OF_SYNC: Out of sync state
67
98
 *
68
 
 * XXX Document me!
 
99
 * Error codes for the #E_DATA_BOOK_ERROR domain, these are used
 
100
 * in the backend.
69
101
 *
70
102
 * Since: 3.6
71
103
 **/
98
130
        E_DATA_BOOK_STATUS_OUT_OF_SYNC
99
131
} EDataBookStatus;
100
132
 
 
133
/**
 
134
 * EBookIndexType:
 
135
 * @E_BOOK_INDEX_PREFIX: An index suitable for searching contacts with a prefix pattern
 
136
 * @E_BOOK_INDEX_SUFFIX: An index suitable for searching contacts with a suffix pattern
 
137
 * @E_BOOK_INDEX_PHONE: An index suitable for searching contacts for phone numbers.
 
138
 * <note><para>Phone numbers must be convertible into FQTN according to E.164 to be
 
139
 * stored in this index. The number "+9999999" for instance won't be stored because
 
140
 * the country calling code "+999" currently is not assigned.</para></note>
 
141
 * @E_BOOK_INDEX_SORT_KEY: Indicates that a given #EContactField should be usable as a sort key.
 
142
 *
 
143
 * The type of index defined by e_source_backend_summary_setup_set_indexed_fields()
 
144
 */
 
145
typedef enum {
 
146
        E_BOOK_INDEX_PREFIX = 0,
 
147
        E_BOOK_INDEX_SUFFIX,
 
148
        E_BOOK_INDEX_PHONE,
 
149
        E_BOOK_INDEX_SORT_KEY
 
150
} EBookIndexType;
 
151
 
 
152
/**
 
153
 * EBookCursorSortType:
 
154
 * @E_BOOK_CURSOR_SORT_ASCENDING: Sort results in ascending order
 
155
 * @E_BOOK_CURSOR_SORT_DESCENDING: Sort results in descending order
 
156
 *
 
157
 * Specifies the sort order of an ordered query
 
158
 *
 
159
 * Since: 3.12
 
160
 */
 
161
typedef enum {
 
162
        E_BOOK_CURSOR_SORT_ASCENDING = 0,
 
163
        E_BOOK_CURSOR_SORT_DESCENDING
 
164
} EBookCursorSortType;
 
165
 
 
166
/**
 
167
 * EBookCursorOrigin:
 
168
 * @E_BOOK_CURSOR_ORIGIN_CURRENT:  The current cursor position
 
169
 * @E_BOOK_CURSOR_ORIGIN_BEGIN:    The beginning of the cursor results.
 
170
 * @E_BOOK_CURSOR_ORIGIN_END:      The ending of the cursor results.
 
171
 *
 
172
 * Specifies the start position to in the list of traversed contacts
 
173
 * in calls to e_book_client_cursor_step().
 
174
 *
 
175
 * When an #EBookClientCursor is created, the current position implied by %E_BOOK_CURSOR_ORIGIN_CURRENT
 
176
 * is the same as %E_BOOK_CURSOR_ORIGIN_BEGIN.
 
177
 *
 
178
 * Since: 3.12
 
179
 */
 
180
typedef enum {
 
181
        E_BOOK_CURSOR_ORIGIN_CURRENT,
 
182
        E_BOOK_CURSOR_ORIGIN_BEGIN,
 
183
        E_BOOK_CURSOR_ORIGIN_END
 
184
} EBookCursorOrigin;
 
185
 
 
186
/**
 
187
 * EBookCursorStepFlags:
 
188
 * @E_BOOK_CURSOR_STEP_MOVE:  The cursor position should be modified while stepping
 
189
 * @E_BOOK_CURSOR_STEP_FETCH: Traversed contacts should be listed and returned while stepping.
 
190
 *
 
191
 * Defines the behaviour of e_book_client_cursor_step().
 
192
 *
 
193
 * Since: 3.12
 
194
 */
 
195
typedef enum {
 
196
        E_BOOK_CURSOR_STEP_MOVE = (1 << 0),
 
197
        E_BOOK_CURSOR_STEP_FETCH = (1 << 1)
 
198
} EBookCursorStepFlags;
 
199
 
 
200
GQuark          e_book_client_error_quark       (void) G_GNUC_CONST;
 
201
const gchar *   e_book_client_error_to_string   (EBookClientError code);
 
202
 
 
203
#ifndef EDS_DISABLE_DEPRECATED
 
204
 
 
205
/**
 
206
 * EBookViewStatus:
 
207
 * @E_BOOK_VIEW_STATUS_OK: Ok
 
208
 * @E_BOOK_VIEW_STATUS_TIME_LIMIT_EXCEEDED: Time limit exceeded
 
209
 * @E_BOOK_VIEW_STATUS_SIZE_LIMIT_EXCEEDED: Size limit exceeded
 
210
 * @E_BOOK_VIEW_ERROR_INVALID_QUERY: Invalid search expression
 
211
 * @E_BOOK_VIEW_ERROR_QUERY_REFUSED: Search expression refused
 
212
 * @E_BOOK_VIEW_ERROR_OTHER_ERROR: Another error occurred
 
213
 *
 
214
 * Status messages used in notifications in the deprecated #EBookView class
 
215
 *
 
216
 * Deprecated: 3.2: Use #EBookClientView instead.
 
217
 */
101
218
typedef enum {
102
219
        E_BOOK_VIEW_STATUS_OK,
103
220
        E_BOOK_VIEW_STATUS_TIME_LIMIT_EXCEEDED,
107
224
        E_BOOK_VIEW_ERROR_OTHER_ERROR
108
225
} EBookViewStatus;
109
226
 
 
227
/**
 
228
 * EBookChangeType:
 
229
 * @E_BOOK_CHANGE_CARD_ADDED: A vCard was added
 
230
 * @E_BOOK_CHANGE_CARD_DELETED: A vCard was deleted
 
231
 * @E_BOOK_CHANGE_CARD_MODIFIED: A vCard was modified
 
232
 *
 
233
 * The type of change in an #EBookChange
 
234
 *
 
235
 * Deprecated: 3.2
 
236
 */
110
237
typedef enum {
111
238
        E_BOOK_CHANGE_CARD_ADDED,
112
239
        E_BOOK_CHANGE_CARD_DELETED,
113
240
        E_BOOK_CHANGE_CARD_MODIFIED
114
241
} EBookChangeType;
115
242
 
 
243
/**
 
244
 * EBookChange:
 
245
 * @change_type: The #EBookChangeType
 
246
 * @contact: The #EContact which changed
 
247
 *
 
248
 * This is a part of the deprecated #EBook API.
 
249
 *
 
250
 * Deprecated: 3.2
 
251
 */
116
252
typedef struct {
117
253
        EBookChangeType  change_type;
118
254
        EContact        *contact;
119
255
} EBookChange;
120
256
 
121
 
/**
122
 
 * EBookIndexType:
123
 
 * @E_BOOK_INDEX_PREFIX: An index suitable for searching contacts with a prefix pattern
124
 
 * @E_BOOK_INDEX_SUFFIX: An index suitable for searching contacts with a suffix pattern
125
 
 * @E_BOOK_INDEX_PHONE: An index suitable for searching contacts for phone numbers.
126
 
 * <note><para>that phone numbers must be convertible into FQTN according to E.164 to be
127
 
 * stored in this index. The number "+9999999" for instance won't be stored because
128
 
 * the country calling code "+999" currently is not assigned.</para></note>
129
 
 *
130
 
 * The type of index defined by e_source_backend_summary_setup_set_indexed_fields()
131
 
 */
132
 
typedef enum {
133
 
        E_BOOK_INDEX_PREFIX = 0,
134
 
        E_BOOK_INDEX_SUFFIX,
135
 
        E_BOOK_INDEX_PHONE
136
 
} EBookIndexType;
137
 
 
138
 
GQuark          e_book_client_error_quark       (void) G_GNUC_CONST;
139
 
const gchar *   e_book_client_error_to_string   (EBookClientError code);
140
 
 
141
 
#ifndef EDS_DISABLE_DEPRECATED
142
257
GError *        e_book_client_error_create      (EBookClientError code,
143
258
                                                 const gchar *custom_msg);
144
 
#endif /* E_BOOK_DISABLE_DEPRECATED */
 
259
#endif /* EDS_DISABLE_DEPRECATED */
145
260
 
146
261
G_END_DECLS
147
262