Tizen 2.0 Release
[platform/core/messaging/email-service.git] / email-core / include / email-core-imap-mailbox.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  * File :  email-core-imap-mailbox.h
26  * Desc :  Mail IMAP mailbox Header
27  *
28  * Auth : 
29  *
30  * History : 
31  *    2006.08.01  :  created
32  *****************************************************************************/
33 #ifndef __EMAIL_CORE_IMAP_MAILBOX_H__
34 #define __EMAIL_CORE_IMAP_MAILBOX_H__
35
36
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif /* __cplusplus */
41
42 INTERNAL_FUNC int emcore_check_sync_imap_mailbox(email_mailbox_t *mailbox, int *synchronous, int *err_code);
43 /**
44  * Get mailbox list from imap server.
45  *
46  * @param[in] account_id        Specifies the account ID.
47  * @param[in] mailbox   Specifies the target mailbox. if NULL, get all mailbox.
48  * @param[in] callback  Specifies the callback function for retrieving mailbox list.
49  * @param[in] handle    Specifies the handle for stopping this job.
50  * @param[out] err_code Specifies the error code returned.
51  * @remarks N/A
52  * @return This function returns true on success or false on failure.
53  */
54 INTERNAL_FUNC int emcore_sync_mailbox_list(int account_id, char *mailbox, int handle, int *err_code);
55
56 /**
57  * Download mailbox list from imap server.
58  *
59  * @param[in] stream    Specifies the internal mail stream.
60  * @param[in] mailbox   Specifies the target mailbox. if NULL, get all mailbox.
61  * @param[out] mailbox_list     The returned mailbox are saved here.
62  * @param[out] count    The count of mailbox is saved here.
63  * @param[out] err_code Specifies the error code returned.
64  * @remarks N/A
65  * @return This function returns true on success or false on failure.
66  */
67 INTERNAL_FUNC int emcore_download_mailbox_list(void *mail_stream, char *mailbox, email_internal_mailbox_t **mailbox_list, int *count, int *err_code);
68 INTERNAL_FUNC int emcore_delete_imap_mailbox(int input_mailbox_id, int *err_code);
69 INTERNAL_FUNC int emcore_create_imap_mailbox(email_mailbox_t *mailbox, int *err_code);
70 INTERNAL_FUNC int emcore_move_mailbox_on_imap_server(int input_account_id, char *input_old_mailbox_path, char *input_new_mailbox_path);
71 INTERNAL_FUNC int emcore_set_sync_imap_mailbox(email_internal_mailbox_t *mailbox, int synchronous, int *err_code);
72 INTERNAL_FUNC int emcore_set_mail_slot_size(int account_id, int mailbox_id, int new_slot_size, int *err_code);
73 INTERNAL_FUNC int emcore_remove_overflowed_mails(emstorage_mailbox_tbl_t *intput_mailbox_tbl, int *err_code);   
74 INTERNAL_FUNC int emcore_get_default_mail_slot_count(int input_account_id, int *output_count);
75
76 #ifdef __cplusplus
77 }
78 #endif /* __cplusplus */
79
80 #endif