~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-client-gnome/src/contacts/addressbook/eds.h

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include <libebook/e-book.h>
44
44
#include <sflphone_const.h>
45
45
 
 
46
 
46
47
#define EMPTY_ENTRY     "empty"
47
48
 
48
49
G_BEGIN_DECLS
56
57
/**
57
58
 * Represent a contact entry
58
59
 */
59
 
typedef struct _Hit
60
 
{
61
 
  gchar *name;
62
 
  GdkPixbuf *photo;
63
 
  gchar *phone_business;
64
 
  gchar *phone_home;
65
 
  gchar *phone_mobile;
 
60
typedef struct _Hit {
 
61
    gchar *name;
 
62
    GdkPixbuf *photo;
 
63
    gchar *phone_business;
 
64
    gchar *phone_home;
 
65
    gchar *phone_mobile;
66
66
} Hit;
67
67
 
68
68
/**
69
69
 * Book structure for "outside world"
70
70
 */
71
 
typedef struct
72
 
{
73
 
  gchar *uid;
74
 
  gchar *name;
75
 
  gboolean active;
76
 
  EBook *ebook;
 
71
typedef struct {
 
72
    gchar *uid;
 
73
    gchar *uri;
 
74
    gchar *name;
 
75
    gboolean active;
 
76
    gboolean isdefault;
77
77
} book_data_t;
78
78
 
79
79
GSList *books_data;
82
82
 * Free a contact entry
83
83
 */
84
84
void
85
 
free_hit(Hit *h);
 
85
free_hit (Hit *h);
86
86
 
87
87
/**
88
88
 * Template callback function for the asynchronous search
89
89
 */
90
90
typedef void
91
 
(* SearchAsyncHandler)(GList *hits, gpointer user_data);
 
91
(* SearchAsyncHandler) (GList *hits, gpointer user_data);
92
92
 
93
93
/**
94
94
 * Template callback function for the asynchronous open
95
95
 */
96
96
typedef void
97
 
(* OpenAsyncHandler)();
 
97
(* OpenAsyncHandler) ();
98
98
 
99
99
/**
100
100
 * Initialize the address book.
101
101
 * Connection to evolution data server
102
102
 */
103
103
void
104
 
init(OpenAsyncHandler);
105
 
 
106
 
/**
107
 
 * Asynchronous search function
108
 
 */
109
 
void
110
 
search_async(const char *query, int max_results, SearchAsyncHandler handler,
111
 
    gpointer user_data);
 
104
init ();
 
105
 
 
106
/**
 
107
 * Fill list of addressbooks
 
108
 */
 
109
void
 
110
fill_books_data (void);
 
111
 
 
112
/**
 
113
 * Asynchronous query to EDS using get contact method.
 
114
 */
 
115
void
 
116
search_async_by_contacts (const char *query, int max_results, SearchAsyncHandler handler, gpointer user_data);
112
117
 
113
118
/**
114
119
 * Retrieve the specified information from the contact
115
120
 */
116
121
void
117
 
fetch_information_from_contact(EContact *contact, EContactField field,
118
 
    gchar **info);
 
122
fetch_information_from_contact (EContact *contact, EContactField field,
 
123
                                gchar **info);
119
124
 
120
125
GSList*
121
 
get_books(void);
 
126
get_books (void);
122
127
 
123
128
book_data_t *
124
 
books_get_book_data_by_uid(gchar *uid);
 
129
books_get_book_data_by_uid (gchar *uid);
125
130
 
126
131
/**
127
132
 * Public way to know if we can perform a search
141
146
GSList *
142
147
addressbook_get_books_data();
143
148
 
 
149
/**
 
150
 * Set the current address book
 
151
 */
 
152
void
 
153
set_current_addressbook (const gchar *name);
 
154
 
 
155
/**
 
156
 * Return current addressbook name
 
157
 */
 
158
const gchar *
 
159
get_current_addressbook (void);
 
160
 
 
161
void
 
162
set_current_addressbook_test (EBookQueryTest test);
 
163
 
 
164
EBookQueryTest
 
165
get_current_addressbook_test (void);
 
166
 
 
167
 
144
168
G_END_DECLS
145
169
 
146
170
#endif /* __EDS_H__ */