4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
\r
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
\r
8 * Licensed under the Apache License, Version 2.0 (the "License");
\r
9 * you may not use this file except in compliance with the License.
\r
10 * You may obtain a copy of the License at
\r
12 * http://www.apache.org/licenses/LICENSE-2.0
\r
14 * Unless required by applicable law or agreed to in writing, software
\r
15 * distributed under the License is distributed on an "AS IS" BASIS,
\r
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
17 * See the License for the specific language governing permissions and
\r
18 * limitations under the License.
\r
23 #ifndef __EMAIL_API_INTI_H__
\r
24 #define __EMAIL_API_INTI_H__
\r
26 #include "email-types.h"
\r
29 * @defgroup EMAIL_SERVICE Email Service
\r
35 * @ingroup EMAIL_SERVICE
\r
36 * @defgroup EMAIL_API_INIT Email Initialization API
\r
42 * This file contains the data structures and interfaces needed for application,
\r
43 * to interact with email-service.
\r
44 * @file email-api-init.h
\r
45 * @author Kyuho Jo <kyuho.jo@samsung.com>
\r
46 * @author Sunghyun Kwon <sh0701.kwon@samsung.com>
\r
48 * @brief This file contains the data structures and interfaces of Email FW Initialization provided by
\r
53 * #include "emf_mapi_init.h"
\r
56 * other_app_invoke_uniform_api_sample(int* error_code)
\r
58 * int err = EMF_ERROR_NONE;
\r
60 * // Open connections to email-service and DB
\r
61 * // The connections will be maintain throughout application's execution
\r
62 * if(EMF_ERROR_NONE == email_service_begin())
\r
64 * If(EMF_ERROR_NONE != email_open_db())
\r
69 * // Execute email_init_storage() if and only if there is no db file.
\r
70 * // This fuction will create db file and tables for email service
\r
71 * If(EMF_ERROR_NONE !=email_init_storage())
\r
79 * // Work with calling MAPI functions
\r
83 * // Close the connections to email-service and DB after all email job is finished. (ex. close an email application)
\r
84 * // DO NOT have to call these funtions until the connections is not needed any more.
\r
85 * err =email_close_db();
\r
86 * err =email_service_end();
\r
97 #endif /* __cplusplus */
\r
102 * @fn email_init_storage(void)
\r
103 * @brief Create all table for email. Exposed to External Application- core team.Creates all Email DB tables [ EXTERNAL]
\r
105 * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure
\r
110 EXPORT_API int email_init_storage(void);
\r
115 * @fn email_open_db(void)
\r
116 * @brief This function Open the email DB and register busy handler
\r
118 * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.
\r
123 EXPORT_API int email_open_db(void);
\r
129 * @fn email_close_db(void)
\r
130 * @brief This function closes the connection of the email DB
\r
132 * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.
\r
137 EXPORT_API int email_close_db(void);
\r
142 * @fn email_service_begin(void)
\r
143 * @brief Does the IPC Proxy Initialization by the Application which used the Email FW API's
\r
145 * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.
\r
150 EXPORT_API int email_service_begin(void);
\r
155 * @fn email_service_end(void)
\r
156 * @brief This function does the IPC Proxy Finaization by the Application which used the Email FW API's
\r
158 * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.
\r
163 EXPORT_API int email_service_end(void);
\r
167 #endif /* __cplusplus */
\r
174 #endif /* __EMAIL_API_INTI_H__ */
\r