Tizen 2.0 Release
[platform/core/messaging/email-service.git] / email-daemon / include / email-daemon.h
1 /*
2 *  email-service
3 *
4 * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5 *
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 *
20 */
21
22
23
24 /**
25  * This file defines all APIs of Email Framework.
26  * @file        email-daemon.h
27  * @author      Kyu-ho Jo(kyuho.jo@samsung.com)
28  * @version     0.1
29  * @brief       This file is the header file of email-engine library.
30  */
31 #ifndef __EMAIL_DAEMON_H__
32 #define __EMAIL_DAEMON_H__
33
34 /**
35 * @defgroup EMAIL_SERVICE EmailFW
36 * @{
37 */
38
39 /**
40 * @ingroup EMAIL_SERVICE
41 * @defgroup EMAIL_SERVICE Email Service
42 * @{
43 */
44
45 #include "email-types.h"
46 #include "email-internal-types.h"
47
48 #include <time.h>
49
50 #ifdef __cplusplus
51 extern "C"
52 {
53 #endif /* __cplusplus */
54
55 /*****************************************************************************/
56 /*  Initialization                                                           */
57 /*****************************************************************************/
58 /**
59  * Initialize Email-engine.
60  *
61  * @param[out] err_code Specifies the error code returned.
62  * @remarks N/A
63  * @return This function returns true on success or false on failure.
64  */
65 INTERNAL_FUNC int emdaemon_initialize(int* err_code);
66
67 /**
68  * Finalize Email-engine.
69  *
70  * @param[out] err_code Specifies the error code returned.
71  * @remarks N/A
72  * @return This function returns true on success or false on failure.
73  */
74 INTERNAL_FUNC int emdaemon_finalize(int* err_code);
75
76
77 /*****************************************************************************/
78 /*  Account                                                                  */
79 /*****************************************************************************/
80 /**
81  * Create a new email account.
82  *
83  * @param[in] account   Specifies the structure pointer of account.
84  * @param[out] err_code Specifies the error code returned.
85  * @remarks N/A
86  * @return This function returns true on success or false on failure.
87  */
88 INTERNAL_FUNC int emdaemon_create_account(email_account_t* account, int* err_code);
89
90 /**
91  * Delete a email account.
92  *
93  * @param[in] account_id        Specifies the account ID.
94  * @param[out] err_code         Specifies the error code returned.
95  * @remarks N/A
96  * @return This function returns true on success or false on failure.
97  */
98 INTERNAL_FUNC int emdaemon_delete_account(int account_id, int* err_code);
99
100 /**
101  * Validate a email account.
102  *
103  * @param[in] account_id        Specifies the account ID.
104  * @param[out] err_code         Specifies the error code returned.
105  * @remarks N/A
106  * @return This function returns true on success or false on failure.
107  */
108 INTERNAL_FUNC int emdaemon_validate_account(int account_id, int *handle, int* err_code);
109
110 /**
111  * Change the information of a email account.
112  *
113  * @param[in] account_id        Specifies the orignal account ID.
114  * @param[in] new_account       Specifies the information of new account.
115  * @param[out] err_code         Specifies the error code returned.
116  * @remarks N/A
117  * @return This function returns true on success or false on failure.
118  */
119 INTERNAL_FUNC int emdaemon_update_account(int account_id, email_account_t* new_account, int* err_code);
120
121 /**
122  * Change the information of a email account after validation
123  *
124  * @param[in] old_account_id    Specifies the orignal account ID.
125  * @param[in] new_account_info  Specifies the information of new account.
126  * @param[in] handle                    Specifies the handle for stopping validation.
127  * @param[out] err_code                 Specifies the error code returned.
128  * @remarks N/A
129  * @return This function returns true on success or false on failure.
130  */
131 INTERNAL_FUNC int emdaemon_validate_account_and_update(int old_account_id, email_account_t* new_account_info, int *handle,int *err_code);
132
133 /**
134  * Get a email account by ID.
135  *
136  * @param[in] account_id        Specifies the account ID.
137  * @param[in] pulloption        Specifies the pulloption.
138  * @param[out] acount           The returned account is saved here.
139  * @param[out] err_code         Specifies the error code returned.
140  * @remarks N/A
141  * @return This function returns true on success or false on failure.
142  */
143 INTERNAL_FUNC int emdaemon_get_account(int account_id, int pulloption, email_account_t* acount, int* err_code);
144
145 /**
146  * Get all emails.
147  *
148  * @param[out] acount_list      The returned accounts are saved here.(possibly NULL)
149  * @param[out] count                    The count of returned accounts is saved here.(possibly 0)
150  * @param[out] err_code         Specifies the error code returned.
151  * @remarks N/A
152  * @return This function returns true on success or false on failure.
153  */
154 INTERNAL_FUNC int emdaemon_get_account_list(email_account_t** acount_list, int* count, int* err_code);
155
156 /**
157  * Free allocated memory.
158  *
159  * @param[in] account_list      Specifies the structure pointer of account.
160  * @param[in] count                     Specifies the count of accounts.
161  * @param[out] err_code         Specifies the error code returned.
162  * @remarks N/A
163  * @return This function returns true on success or false on failure.
164  */
165 INTERNAL_FUNC int emdaemon_free_account(email_account_t** account_list, int count, int* err_code);
166
167 /**
168  * Get a information of filtering.
169  *
170  * @param[in] filter_id                 Specifies the filter ID.
171  * @param[out] filtering_set    The returned information of filter are saved here.
172  * @param[out] err_code                 Specifies the error code returned.
173  * @remarks N/A
174  * @return This function returns true on success or false on failure.
175  */
176 INTERNAL_FUNC int emdaemon_get_filter(int filter_id, email_rule_t** filtering_set, int* err_code);
177
178 /**
179  * Get all filterings.
180  *
181  * @param[out] filtering_set            The returned filterings are saved here.(possibly NULL)
182  * @param[out] count                            The count of returned filters is saved here.(possibly 0)
183  * @param[out] err_code                 Specifies the error code returned.
184  * @remarks N/A
185  * @return This function returns true on success or false on failure.
186  */
187 INTERNAL_FUNC int emdaemon_get_filter_list(email_rule_t** filtering_set, int* count, int* err_code);
188
189 /**
190  * find a filter already exists.
191  *
192  * @param[in] filtering_set     Specifies the pointer of adding filter structure.
193  * @param[out] err_code         Specifies the error code returned.
194  * @remarks N/A
195  * @return This function returns true if enable add filter, else returns false.
196  */
197 INTERNAL_FUNC int emdaemon_find_filter(email_rule_t* filter_info, int* err_code);
198
199 /**
200  * Add a filter information.
201  *
202  * @param[in] filtering_set             Specifies the pointer of adding filter structure.
203  * @remarks N/A
204  * @return This function returns true on success or false on failure.(only EMAIL_FILTER_BLOCK supported.)
205  */
206 INTERNAL_FUNC int emdaemon_add_filter(email_rule_t* filtering_set);
207
208 /**
209  * Change a filter information.
210  *
211  * @param[in] filter_id Specifies the original filter ID.
212  * @param[in] new_set   Specifies the information of new filter.
213  * @param[out] err_code Specifies the error code returned.
214  * @remarks N/A
215  * @return This function returns true on success or false on failure.
216  */
217 INTERNAL_FUNC int emdaemon_update_filter(int filter_id, email_rule_t* new_set, int* err_code);
218
219 /**
220  * Delete a filter information.
221  *
222  * @param[in] filter_id Specifies the filter ID.
223  * @param[out] err_code         Specifies the error code returned.
224  * @remarks N/A
225  * @return This function returns true on success or false on failure.
226  */
227 INTERNAL_FUNC int emdaemon_delete_filter(int filter_id, int* err_code);
228
229 /**
230  * Free allocated memory.
231  *
232  * @param[in] filtering_set     Specifies the pointer of pointer of filter structure for memory free.
233  * @param[in] count                     Specifies the count of filter.
234  * @param[out] err_code         Specifies the error code returned.
235  * @remarks N/A
236  * @return This function returns true on success or false on failure.
237  */
238 INTERNAL_FUNC int emdaemon_free_filter (email_rule_t** filtering_set, int count, int* err_code);
239
240
241 /*****************************************************************************/
242 /*  Mail                                                                     */
243 /*****************************************************************************/
244
245 /**
246  * Send a mail.
247  *
248  * @param[in] mail_id                           Specifies the mail ID.
249  * @param[in] callback                  Specifies the callback function for retrieving sending information.
250  * @param[in] handle                            Specifies the handle for stopping sending.
251  * @param[out] err_code         Specifies the error code returned.
252  * @remarks N/A
253  * @return This function returns true on success or false on failure.
254  */
255 INTERNAL_FUNC int emdaemon_send_mail(int mail_id, int *handle, int* err_code);
256
257 /**
258  * Send all mails to been saved in Offline-mode.
259  *
260  * @param[in] account_id                        Specifies the account ID.
261  * @param[in] callback                          Specifies the callback function for retrieving sending information.
262  * @param[in] handle                                    Specifies the handle for stopping sending.
263  * @param[out] err_code                 Specifies the error code returned.
264  * @remarks N/A
265  * @return This function returns true on success or false on failure.
266  */
267 INTERNAL_FUNC int emdaemon_send_mail_saved(int account_id, int *handle, int* err_code);
268
269 INTERNAL_FUNC int emdaemon_add_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t *input_meeting_request, int input_from_eas);
270
271 INTERNAL_FUNC int emdaemon_add_meeting_request(int account_id, int input_mailbox_id, email_meeting_request_t *meeting_req, int* err_code);
272
273 /**
274  * Delete a mail or multiple mails.
275  *
276  * @param[in] mailbox_id                Specifies the mailbox.
277  * @param[in] mail_id                   Specifies the arrary of mail id.
278  * @param[in] num                               Specifies the number of mail id.
279  * @param[in] from_server           Specifies whether mails are deleted from server.
280  * @param[in] callback                  Specifies the callback function for retrieving deleting information.
281  * @param[in] handle                            Reserved.
282  * @param[out] err_code         Specifies the error code returned.
283  * @remarks N/A
284  * @return This function returns true on success or false on failure.
285  */
286
287 INTERNAL_FUNC int emdaemon_delete_mail(int mailbox_id, int mail_id[], int num, int from_server,  int *handle, int* err_code);
288
289 /**
290  * Delete all mail from a mailbox.
291  *
292  * @param[in] input_mailbox_id  Specifies the id of target mailbox.
293  * @param[in] input_from_server Specifies whether mails are also deleted from server.
294  * @param[in] output_handle             Reserved.
295  * @param[out] output_err_code  Specifies the error code returned.
296  * @remarks N/A
297  * @return This function returns true on success or false on failure.
298  */
299 INTERNAL_FUNC int emdaemon_delete_mail_all(int input_mailbox_id, int input_from_server, int *output_handle, int *output_err_code);
300
301 /**
302  * Move a email to another mailbox.
303  *
304  *
305  * @param[in] mail_id                   Specifies the mail ID.
306  * @param[in] dst_mailbox_id    Specifies the mailbox ID for moving email.
307  * @param[in] noti_param_1      Specifies first parameter of result notification.
308  * @param[in] noti_param_2      Specifies second parameter of result notification.
309  * @param[out] err_code                 Specifies the error code returned.
310  * @remarks N/A
311  * @return This function returns true on success or false on failure.
312  */
313 INTERNAL_FUNC int emdaemon_move_mail(int mail_ids[], int num, int dst_mailbox_id, int noti_param_1, int noti_param_2, int* err_code);
314
315 /**
316  * Move all email to another mailbox.
317  *
318  *
319  * @param[in] src_mailbox_id            Specifies the source mailbox ID for moving email.
320  * @param[in] dst_mailbox_id            Specifies the destination mailbox ID for moving email.
321  * @param[out] err_code                         Specifies the error code returned.
322  * @remarks N/A
323  * @return This function returns true on success or false on failure.
324  */
325 INTERNAL_FUNC int emdaemon_move_mail_all_mails(int src_mailbox_id, int dst_mailbox_id, int* err_code);
326
327
328 /**
329  * Update a existing email information.
330  *
331  * @param[in] input_mail_data   Specifies the structure of mail data.
332  * @param[in] input_attachment_data_list        Specifies the structure of mail data.
333  * @param[in] input_attachment_count    Specifies the pointer of attachment structure.
334  * @param[in] input_meeting_request     Specifies the number of attachment data.
335  * @param[in] input_from_eas    Specifies whether the mail is from EAS.
336  * @remarks N/A
337  * @return This function returns EMAIL_ERROR_NONE on success or error code on failure.
338  */
339 INTERNAL_FUNC int emdaemon_update_mail(email_mail_data_t *input_mail_data, email_attachment_data_t *input_attachment_data_list, int input_attachment_count, email_meeting_request_t *input_meeting_request, int input_from_eas);
340
341
342 /**
343  * Callback for mail resend
344  *
345  * @param[in] data                            Specifies the pointer to mail_id.
346  * @remarks N/A
347  * @return This function returns void.
348  */
349 INTERNAL_FUNC void _OnMailSendRetryTimerCB( void* data );
350
351 /**
352  * Download email body from server.
353  *
354  * @param[in] account_id                Specifies the account ID.
355  * @param[in] mail_id                   Specifies the mail ID.
356  * @param[in] callback          Specifies the callback function for retrieving download status.
357  * @param[in] handle                    Specifies the handle for stopping downloading.
358  * @param[out] err_code Specifies the error code returned.
359  * @remarks N/A
360  * @return This function returns true on success or false on failure.
361  */
362 INTERNAL_FUNC int emdaemon_download_body(int account_id, int mail_id, int verbose, int with_attachment,  int *handle, int* err_code);
363
364 /**
365  * Get a mail attachment.
366  *
367  * @param[in] mail_id           Specifies the mail ID.
368  * @param[in] attachment_id     Specifies the attachment ID.
369  * @param[out] attachment       The returned attachment is save here.
370  * @param[out] err_code         Specifies the error code returned.
371  * @remarks N/A
372  * @return This function returns true on success or false on failure.
373  */
374 INTERNAL_FUNC int emdaemon_get_attachment(int attachment_id, email_attachment_data_t** attachment, int* err_code);
375
376 /**
377  * Download a email nth-attachment from server.
378  *
379  * @param[in] account_id                Specifies the account ID.
380  * @param[in] mail_id                   Specifies the mail ID.
381  * @param[in] nth                               Specifies the buffer that a attachment number been saved. the minimum number is "1".
382  * @param[in] callback          Specifies the callback function for retrieving download status.
383  * @param[in] handle                    Specifies the handle for stopping downloading.
384  * @param[out] err_code Specifies the error code returned.
385  * @remarks N/A
386  * @return This function returns true on success or false on failure.
387  */
388 INTERNAL_FUNC int emdaemon_download_attachment(int account_id, int mail_id, int nth,  int *handle, int* err_code);
389
390
391 /**
392  * Append a attachment to email.
393  *
394  * @param[in] mail_id           Specifies the mail ID.
395  * @param[in] attachment        Specifies the structure of attachment.
396  * @param[out] err_code         Specifies the error code returned.
397  * @remarks N/A
398  * @return This function returns true on success or false on failure.
399  */
400 INTERNAL_FUNC int emdaemon_add_attachment(int mail_id, email_attachment_data_t* attachment, int* err_code);
401
402 /**
403  * Delete a attachment from email.
404  *
405  * @param[in] mail_id           Specifies the mail id.
406  * @param[in] attachment_id  Specifies the attachment id.
407  * @param[out] err_code         Specifies the error code returned.
408  * @remarks N/A
409  * @return This function returns true on success or false on failure.
410  */
411 INTERNAL_FUNC int emdaemon_delete_mail_attachment(int attachment_id, int* err_code);
412
413 /**
414  * Free allocated memroy for email attachment.
415  *
416  * @param[in] atch_info Specifies the pointer of mail attachment structure pointer.
417  * @param[out] err_code Specifies the error code returned.
418  * @remarks N/A
419  * @return This function returns true on success or false on failure.
420  */
421 INTERNAL_FUNC int emdaemon_free_attachment_data(email_attachment_data_t** atch_info, int* err_code);
422
423 /**
424  * Change email read/unread flag.
425  * @param[in] account_id  Specifies the account id.
426  * @param[in] mail_ids          Specifies the array of mail ID.
427  * @param[in] num                           Specifies the numbers of mail ID.
428  * @param[in] field_type  Specifies the field type what you want to set. Refer email_flags_field_type.
429  * @param[in] value           Specifies the value what you want to set.
430  * @param[in] onserver          Specifies the mail on server.
431  * @param[out] err_code   Specifies the error code returned.
432  * @remarks N/A
433  * @return This function returns true on success or false on failure.
434  */
435 INTERNAL_FUNC int emdaemon_set_flags_field(int account_id, int mail_ids[], int num, email_flags_field_type field_type, int value, int onserver, int* err_code);
436
437 /*****************************************************************************/
438 /*  Mailbox                                                                  */
439 /*****************************************************************************/
440 INTERNAL_FUNC int emdaemon_get_imap_mailbox_list(int account_id, char* mailbox, int *handle, int* err_code);
441
442 /**
443  * Download header of new emails from mail server.
444  *
445  * @param[in] input_account_id          Specifies the account ID.
446  * @param[in] input_mailbox_id          Specifies the mailbox ID.
447  * @param[out] handle           Specifies the handle for stopping downloading.
448  * @param[out] err_code Specifies the error code returned.
449  * @remarks N/A
450  * @return This function returns true on success or false on failure.
451  */
452 INTERNAL_FUNC int emdaemon_sync_header(int input_account_id, int input_mailbox_id, int *handle, int* err_code);
453
454
455 /**
456  * Get mail count from mailbox.
457  *
458  * @param[in] mailbox   Specifies the pointer of mailbox structure.
459  * @param[out] total    Total email count is saved here.
460  * @param[out] unseen   Unread email count is saved here.
461  * @param[out] err_code Specifies the error code returned.
462  * @remarks N/A
463  * @return This function returns true on success or false on failure.
464  */
465 INTERNAL_FUNC int emdaemon_get_mail_count_of_mailbox(email_mailbox_t* mailbox, int* total, int* unseen, int* err_code);
466
467 /**
468  * Get all mailboxes from account.
469  *
470  * @param[in] account_id                Specifies the account ID.
471  * @param[out] mailbox_list     Specifies the pointer of mailbox structure pointer.(possibly NULL)
472  * @param[out] count                    The mailbox count is saved here.(possibly 0)
473  * @param[out] err_code         Specifies the error code returned.
474  * @remarks N/A
475  * @return This function returns true on success or false on failure.
476  */
477 INTERNAL_FUNC int emdaemon_get_mailbox_list(int account_id, email_mailbox_t** mailbox_list, int* count, int* err_code);
478
479 /**
480  * Create a new mailbox.
481  *
482  * @param[in] new_mailbox       Specifies the pointer of creating mailbox information.
483  * @param[out] handle           Specifies the handle for stopping creating mailbox.
484  * @param[out] err_code         Specifies the error code returned.
485  * @remarks N/A
486  * @return This function returns true on success or false on failure.
487  */
488 INTERNAL_FUNC int emdaemon_add_mailbox(email_mailbox_t* new_mailbox, int on_server, int *handle, int* err_code);
489
490 /**
491  * Delete a mailbox.
492  *
493  * @param[in] input_mailbox_id  Specifies the input_mailbox_id of deleting mailbox information.
494  * @param[out] handle                   Specifies the handle for stopping creating mailbox.
495  * @param[out] err_code                 Specifies the error code returned.
496  * @remarks N/A
497  * @return This function returns true on success or false on failure.
498  */
499 INTERNAL_FUNC int emdaemon_delete_mailbox(int input_mailbox_id, int on_server, int *handle, int* err_code);
500
501 /**
502  * Delete all sub-mailboxes from a specific mailbox.
503  *
504  * @param[in] mailbox   Specifies the pointer of mailbox information.
505  * @param[out] err_code Specifies the error code returned.
506  * @remarks N/A
507  * @return This function returns true on success or false on failure.
508  */
509 INTERNAL_FUNC int emdaemon_delete_mailbox_all(email_mailbox_t* mailbox, int* err_code);
510
511 /**
512  * Free allocated memory for mailbox information.
513  *
514  * @param[in] mailbox_list      Specifies the pointer for searching mailbox structure pointer.
515  * @param[in] count                     Specifies the count of mailboxes.
516  * @param[out] err_code         Specifies the error code returned.
517  * @remarks N/A
518  * @return This function returns true on success or false on failure.
519  */
520 INTERNAL_FUNC int emdaemon_free_mailbox(email_mailbox_t** mailbox_list, int count, int* err_code);
521
522 /*****************************************************************************/
523 /*  Etc                                                                      */
524 /*****************************************************************************/
525
526
527 /**
528  * Register a callback for event processing.
529  *
530  * @param[in] action                    Kind of event callback.
531  * @param[in] callback          Function which will be called during processing event.
532  * @param[in] event_data        Event data which will be passed to the callback.
533  * @remarks N/A
534  * @return This function returns true on success or false on failure.
535  */
536 INTERNAL_FUNC int emdaemon_register_event_callback(email_action_t action, email_event_callback callback, void* event_data);
537
538 /**
539  * Unregister a callback for event processing.
540  *
541  * @param[in] action                    Kind of event callback.
542  * @param[in] callback          Function which will be called during processing event.
543  * @remarks N/A
544  * @return This function returns true on success or false on failure.
545  */
546 INTERNAL_FUNC int emdaemon_unregister_event_callback(email_action_t action, email_event_callback callback);
547
548 /**
549  * Get current event queue status.
550  *
551  * @param[out] on_sending               True if sending is in progress.
552  * @param[out] on_receiving             True if receiving is in progress.
553  * @remarks N/A
554  */
555 INTERNAL_FUNC void emdaemon_get_event_queue_status(int* on_sending, int* on_receiving);
556
557 /**
558  * Get the handle of a pending job.
559  *
560  * @param[in] action                    Specifies kind of the job.
561  * @param[in] account_id        Specifies the account ID.
562  * @param[in] mail_id                   Specifies the mail ID.
563  * @remarks N/A
564  * @return This function return its handle if a pending job exists, otherwise -1.
565  */
566 INTERNAL_FUNC int emdaemon_get_pending_job(email_action_t action, int account_id, int mail_id, email_event_status_type_t* status);
567
568 /**
569  * Cancel a progressive work.
570  *
571  * @param[in] account_id                Specifies the account ID.
572  * @param[in] handle                            Specifies the ID of cancelling work.
573  * @param[out] err_code         Specifies the error code returned.
574  * @remarks N/A
575  * @return This function returns true on success or false on failure.
576  */
577 INTERNAL_FUNC int emdaemon_cancel_job(int account_id, int handle, int* err_code);
578
579
580
581 /**
582  * Cancel a progressive send mail job.
583  *
584  * @param[in] account_id                Specifies the account ID.
585  * @param[in] mail_id                           Specifies the Mail ID of cancelling send mail.
586  * @param[out] err_code         Specifies the error code returned.
587  * @remarks N/A
588  * @return This function returns true on success or false on failure.
589  */
590 INTERNAL_FUNC int emdaemon_cancel_sending_mail_job(int account_id, int mail_id, int* err_code);
591
592 /**
593  * set email options.
594  *
595  * @param[in] option                    Specifies the email options.
596  * @param[out] err_code Specifies the error code returned.
597  * @remarks N/A
598  * @return This function returns true on success or false on failure.
599  */
600 INTERNAL_FUNC int emdaemon_set_option(email_option_t* option, int* err_code);
601
602 /**
603  * get email options.
604  *
605  * @param[out] option                   Specifies the email options.
606  * @param[out] err_code         Specifies the error code returned.
607  * @remarks N/A
608  * @return This function returns true on success or false on failure.
609  */
610 INTERNAL_FUNC int emdaemon_get_option(email_option_t* option, int* err_code);
611
612 /**
613  * Sync the Local activity
614  *
615  *
616  * @param[in] account_id                Specifies the Account ID.
617  * @param[out] err_code         Specifies the error code returned.
618  * @remarks N/A
619  * @return This function returns true on success or false on failure.
620  */
621 INTERNAL_FUNC int emdaemon_sync_local_activity(int account_id, int *err_code);
622
623
624 #ifdef __FEATURE_AUTO_POLLING__
625 INTERNAL_FUNC int emdaemon_start_auto_polling(int* err_code);
626 #endif /* __FEATURE_AUTO_POLLING__ */
627
628 INTERNAL_FUNC int emdaemon_insert_accountinfo_to_contact(email_account_t* account);
629
630 INTERNAL_FUNC int emdaemon_update_accountinfo_to_contact(email_account_t* old_account, email_account_t* new_account);
631
632 INTERNAL_FUNC int emdaemon_update_mailbox(email_mailbox_t* old_mailbox, email_mailbox_t* new_mailbox, int on_server, int *handle, int* err_code);
633
634 INTERNAL_FUNC int emdaemon_set_mailbox_type(int input_mailbox_id, email_mailbox_type_e input_mailbox_type);
635
636 INTERNAL_FUNC int emdaemon_set_local_mailbox(int input_mailbox_id, int input_is_local_mailbox);
637
638 INTERNAL_FUNC int emdaemon_search_mail_on_server(int input_account_id, int input_mailbox_id, email_search_filter_t *input_search_filter, int input_search_filter_count, unsigned int *output_handle, int *err_code);
639
640 INTERNAL_FUNC int emdaemon_clear_all_mail_data(int* err_code);
641
642 INTERNAL_FUNC int emdaemon_send_mail_retry( int mail_id,  int timeout_in_sec, int* err_code);
643
644 INTERNAL_FUNC int emdaemon_validate_account_and_create(email_account_t* new_account, int *handle, int* err_code);
645
646 INTERNAL_FUNC int emdaemon_set_mail_slot_size_of_mailbox(int account_id, int mailbox_id, int new_slot_size, int *handle, int *err_code);
647
648 INTERNAL_FUNC int emdaemon_rename_mailbox(int input_mailbox_id, char *input_mailbox_path, char *input_mailbox_alias, int input_on_server, int *output_handle);
649
650 INTERNAL_FUNC int emdaemon_move_mail_thread_to_mailbox(int thread_id, int target_mailbox_id, int move_always_flag, int *err_code);
651
652 INTERNAL_FUNC int emdaemon_delete_mail_thread(int thread_id, int delete_always_flag, int *handle, int *err_code);
653
654 INTERNAL_FUNC int emdaemon_modify_seen_flag_of_thread(int thread_id, int seen_flag, int on_server, int *handle, int *err_code);
655
656 INTERNAL_FUNC int emdaemon_expunge_mails_deleted_flagged(int input_mailbox_id, int input_on_server, int *output_handle);
657
658 #ifdef __cplusplus
659 }
660 #endif /* __cplusplus */
661
662 /**
663 * @} @}
664 */
665
666 #endif /* __EMAIL_DAEMON_H__ */