Debian Codegraph @

src/EWS/addressbook/ews-oab-decoder.h

raw
1 /*
2 * SPDX-FileCopyrightText: (C) 1999-2011 Novell, Inc. (www.novell.com)
3 * SPDX-FileContributor: Chenthill Palanisamy <[email protected]>
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7 #ifndef EWS_OAB_DECODER_H
8 #define EWS_OAB_DECODER_H
9
10 #include <libebook/libebook.h>
11
12 /* Standard GObject macros */
13 #define EWS_TYPE_OAB_DECODER \
14 (ews_oab_decoder_get_type ())
15 #define EWS_OAB_DECODER(obj) \
16 (G_TYPE_CHECK_INSTANCE_CAST \
17 ((obj), EWS_TYPE_OAB_DECODER, EwsOabDecoder))
18 #define EWS_OAB_DECODER_CLASS(cls) \
19 (G_TYPE_CHECK_CLASS_CAST \
20 ((cls), EWS_TYPE_OAB_DECODER, EwsOabDecoderClass))
21 #define EWS_IS_OAB_DECODER(obj) \
22 (G_TYPE_CHECK_INSTANCE_TYPE \
23 ((obj), EWS_TYPE_OAB_DECODER))
24 #define EWS_IS_OAB_DECODER_CLASS(cls) \
25 (G_TYPE_CHECK_CLASS_TYPE \
26 ((cls), EWS_TYPE_OAB_DECODER))
27 #define EWS_OAB_DECODER_GET_CLASS(obj) \
28 (G_TYPE_INSTANCE_GET_CLASS \
29 ((obj), EWS_TYPE_OAB_DECODER, EwsOabDecoderClass))
30
31 G_BEGIN_DECLS
32
33 typedef struct _EwsOabDecoder EwsOabDecoder;
34 typedef struct _EwsOabDecoderClass EwsOabDecoderClass;
35 typedef struct _EwsOabDecoderPrivate EwsOabDecoderPrivate;
36
37 struct _EwsOabDecoder {
38 GObject parent;
39 EwsOabDecoderPrivate *priv;
40 };
41
42 struct _EwsOabDecoderClass {
43 GObjectClass parent_class;
44 };
45
46 typedef void (*EwsOabContactAddedCb) (EContact *contact,
47 goffset offset,
48 const gchar *sha1,
49 guint percent_complete,
50 gpointer user_data,
51 GCancellable *cancellable,
52 GError **error);
53 typedef gboolean (*EwsOabContactFilterCb) (goffset offset,
54 const gchar *sha1,
55 gpointer user_data,
56 GError **error);
57
58 GType ews_oab_decoder_get_type (void);
59 EwsOabDecoder * ews_oab_decoder_new (const gchar *oab_filename,
60 const gchar *cache_dir,
61 GError **error);
62 gboolean ews_oab_decoder_decode (EwsOabDecoder *eod,
63 EwsOabContactFilterCb filter_cb,
64 EwsOabContactAddedCb cb,
65 gpointer user_data,
66 GCancellable *cancellable,
67 GError **error);
68 EContact * ews_oab_decoder_get_contact_from_offset
69 (EwsOabDecoder *eod,
70 goffset offset,
71 GSList *oab_props,
72 GCancellable *cancellable,
73 GError **error);
74 gchar * ews_oab_decoder_get_oab_prop_string
75 (EwsOabDecoder *eod,
76 GError **error);
77 gboolean ews_oab_decoder_set_oab_prop_string
78 (EwsOabDecoder *eod,
79 const gchar *prop_str,
80 GError **error);
81
82 G_END_DECLS
83
84 #endif /* EWS_OAB_DECODER_H */
85