4 * Copyright (c) 2000 - 2011 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.
23 #ifndef __EMAIL_API_INTI_H__
24 #define __EMAIL_API_INTI_H__
26 #include "email-types.h"
29 * @defgroup EMAIL_SERVICE Email Service
35 * @ingroup EMAIL_SERVICE
36 * @defgroup EMAIL_API_INIT Email Initialization API
42 * This file contains the data structures and interfaces needed for application,
43 * to interact with email-service.
44 * @file email-api-init.h
45 * @author Kyuho Jo <kyuho.jo@samsung.com>
46 * @author Sunghyun Kwon <sh0701.kwon@samsung.com>
48 * @brief This file contains the data structures and interfaces of Email FW Initialization provided by
53 * #include "email-api-init.h"
56 * other_app_invoke_uniform_api_sample(int* error_code)
58 * int err = EMAIL_ERROR_NONE;
60 * // Open connections to email-service and DB
61 * // The connections will be maintain throughout application's execution
62 * if(EMAIL_ERROR_NONE == email_service_begin())
64 * If(EMAIL_ERROR_NONE != email_open_db())
69 * // Execute email_init_storage() if and only if there is no db file.
70 * // This fuction will create db file and tables for email service
71 * If(EMAIL_ERROR_NONE !=email_init_storage())
79 * // Work with calling MAPI functions
83 * // Close the connections to email-service and DB after all email job is finished. (ex. close an email application)
84 * // DO NOT have to call these funtions until the connections is not needed any more.
85 * err =email_close_db();
86 * err =email_service_end();
97 #endif /* __cplusplus */
102 * @fn email_init_storage(void)
103 * @brief Create all table for email. Exposed to External Application- core team.Creates all Email DB tables [ EXTERNAL]
105 * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure
110 EXPORT_API int email_init_storage(void);
115 * @fn email_open_db(void)
116 * @brief This function Open the email DB and register busy handler
118 * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
123 EXPORT_API int email_open_db(void);
129 * @fn email_close_db(void)
130 * @brief This function closes the connection of the email DB
132 * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
137 EXPORT_API int email_close_db(void);
142 * @fn email_service_begin(void)
143 * @brief Does the IPC Proxy Initialization by the Application which used the Email FW API's
145 * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
150 EXPORT_API int email_service_begin(void);
155 * @fn email_service_end(void)
156 * @brief This function does the IPC Proxy Finaization by the Application which used the Email FW API's
158 * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
163 EXPORT_API int email_service_end(void);
167 #endif /* __cplusplus */
174 #endif /* __EMAIL_API_INTI_H__ */