4 * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 /******************************************************************************
25 * File : email-core-account.h
26 * Desc : Account Management
29 * 2010.08.25 : created
30 *****************************************************************************/
31 #ifndef _EMAIL_CORE_ACCOUNT_H_
32 #define _EMAIL_CORE_ACCOUNT_H_
34 #include "email-types.h"
35 #include "email-internal-types.h"
36 #include "email-storage.h"
41 #endif /* __cplusplus */
43 INTERNAL_FUNC int emcore_validate_account(int account_id, int *err_code);
45 INTERNAL_FUNC int emcore_validate_account_with_account_info(email_account_t *account, int *err_code);
47 INTERNAL_FUNC int emcore_create_account(email_account_t *account, int *err_code);
49 INTERNAL_FUNC int emcore_delete_account(int account_id, int *err_code);
51 INTERNAL_FUNC int emcore_free_account_list(email_account_t **account_list, int count, int *err_code);
53 INTERNAL_FUNC void emcore_free_option(email_option_t *option);
55 INTERNAL_FUNC void emcore_free_account(email_account_t *account_list);
57 INTERNAL_FUNC void emcore_duplicate_account(const email_account_t *account, email_account_t **account_dup, int *err_code);
59 INTERNAL_FUNC int emcore_init_account_reference();
61 INTERNAL_FUNC int emcore_free_account_reference();
63 INTERNAL_FUNC email_account_t *emcore_get_account_reference(int account_id);
65 INTERNAL_FUNC int emcore_get_account_reference_list(email_account_t **account_list, int *count, int *err_code);
67 INTERNAL_FUNC int emcore_query_server_info(const char* domain_name, email_server_info_t **result_server_info);
69 INTERNAL_FUNC int emcore_free_server_info(email_server_info_t **target_server_info);
71 INTERNAL_FUNC int emcore_save_default_account_id(int input_account_id);
73 INTERNAL_FUNC int emcore_load_default_account_id(int *output_account_id);
75 INTERNAL_FUNC int emcore_recover_from_secured_storage_failure();
77 INTERNAL_FUNC int emcore_update_sync_status_of_account(int input_account_id, email_set_type_t input_set_operator, int input_sync_status);
80 #ifdef __FEATURE_BACKUP_ACCOUNT__
81 INTERNAL_FUNC int emcore_backup_accounts(const char *file_path, int *error_code);
83 INTERNAL_FUNC int emcore_restore_accounts(const char *file_path, int *error_code);
84 #endif /* __FEATURE_BACKUP_ACCOUNT_ */
88 #endif /* __cplusplus */
90 #endif /*_EMAIL_CORE_ACCOUNT_H_*/