2.0_alpha release commit
[framework/messaging/email-service.git] / email-api / include / email-api-init.h
index cd4e00c..63fa085 100755 (executable)
-/*\r
-*  email-service\r
-*\r
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
-*\r
-* Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>\r
-*\r
-* Licensed under the Apache License, Version 2.0 (the "License");\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an "AS IS" BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*\r
-*/\r
-\r
-\r
-#ifndef __EMAIL_API_INTI_H__\r
-#define __EMAIL_API_INTI_H__\r
-\r
-#include "email-types.h"\r
-\r
-/**\r
-* @defgroup EMAIL_SERVICE Email Service\r
-* @{\r
-*/\r
-\r
-\r
-/**\r
-* @ingroup EMAIL_SERVICE\r
-* @defgroup EMAIL_API_INIT Email Initialization API\r
-* @{\r
-*/\r
-\r
-/**\r
- *\r
- * This file contains the data structures and interfaces needed for application,\r
- * to interact with email-service.\r
- * @file               email-api-init.h\r
- * @author     Kyuho Jo <kyuho.jo@samsung.com>\r
- * @author     Sunghyun Kwon <sh0701.kwon@samsung.com>\r
- * @version    0.1\r
- * @brief              This file contains the data structures and interfaces of Email FW Initialization provided by\r
- *                     email-service .\r
- *@{\r
- *@code\r
- *\r
- *     #include "emf_mapi_init.h"\r
- *\r
- *     bool\r
- *     other_app_invoke_uniform_api_sample(int* error_code)\r
- *     {\r
- *              int err = EMF_ERROR_NONE;\r
- *\r
- *             // Open connections to email-service and DB\r
- *             // The connections will be maintain throughout application's execution\r
- *             if(EMF_ERROR_NONE == email_service_begin())\r
- *             {\r
- *                     If(EMF_ERROR_NONE != email_open_db())\r
- *                     {\r
- *                             return false;\r
- *                     }\r
- *\r
- *                     // Execute email_init_storage() if and only if there is no db file.\r
- *                     // This fuction will create db file and tables for email service\r
- *                     If(EMF_ERROR_NONE !=email_init_storage())\r
- *                     {\r
- *                             return false;\r
- *                     }\r
- *             }\r
- *\r
- *             ......\r
- *\r
- *             // Work with calling MAPI functions\r
- *\r
- *             ......\r
- *\r
- *             // Close the connections to email-service and DB after all email job is finished. (ex. close an email application)\r
- *             // DO NOT have to call these funtions until the connections is not needed any more.\r
- *             err =email_close_db();\r
- *             err =email_service_end();\r
- *      }\r
- *\r
- * @endcode\r
- * @}\r
- */\r
-\r
-\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif /* __cplusplus */\r
-\r
-/**\r
-\r
- * @open\r
- * @fn email_init_storage(void)\r
- * @brief      Create all table for email. Exposed to External Application- core team.Creates all Email DB tables [ EXTERNAL]\r
- *\r
- * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure\r
- * @exception none\r
- * @see none\r
- * @remarks N/A\r
- */\r
-EXPORT_API int email_init_storage(void);\r
-\r
-/**\r
-\r
- * @open\r
- * @fn email_open_db(void)\r
- * @brief This function Open the email DB and register busy handler\r
- *\r
- * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.\r
- * @exception none\r
- * @see        none\r
- * @remarks N/A\r
- */\r
-EXPORT_API int email_open_db(void);\r
-\r
-\r
-/**\r
-\r
- * @open\r
- * @fn email_close_db(void)\r
- * @brief      This function closes the connection of  the email DB\r
- *\r
- * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.\r
- * @exception none\r
- * @see none\r
- * @remarks N/A\r
- */\r
-EXPORT_API int email_close_db(void);\r
-\r
-/**\r
-\r
- * @open\r
- * @fn email_service_begin(void)\r
- * @brief      Does the IPC Proxy Initialization by the Application which used the Email FW API's\r
- *\r
- * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.\r
- * @exception none\r
- * @see        none\r
- * @remarks N/A\r
- */\r
-EXPORT_API int email_service_begin(void);\r
-\r
-/**\r
-\r
- * @open\r
- * @fn email_service_end(void)\r
- * @brief      This function does the IPC Proxy Finaization by the Application which used the Email FW API's\r
- *\r
- * @return This function returns EMF_ERROR_NONE on success or error code (refer to EMF_ERROR_XXX) on failure.\r
- * @exception  none\r
- * @see        none\r
- * @remarks N/A\r
- */\r
-EXPORT_API int email_service_end(void);\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif /* __cplusplus */\r
-\r
-/**\r
-* @} @}\r
-*/\r
-\r
-\r
-#endif  /* __EMAIL_API_INTI_H__ */\r
+/*
+*  email-service
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+
+
+#ifndef __EMAIL_API_INTI_H__
+#define __EMAIL_API_INTI_H__
+
+#include "email-types.h"
+
+/**
+* @defgroup EMAIL_SERVICE Email Service
+* @{
+*/
+
+
+/**
+* @ingroup EMAIL_SERVICE
+* @defgroup EMAIL_API_INIT Email Initialization API
+* @{
+*/
+
+/**
+ *
+ * This file contains the data structures and interfaces needed for application,
+ * to interact with email-service.
+ * @file               email-api-init.h
+ * @author     Kyuho Jo <kyuho.jo@samsung.com>
+ * @author     Sunghyun Kwon <sh0701.kwon@samsung.com>
+ * @version    0.1
+ * @brief              This file contains the data structures and interfaces of Email FW Initialization provided by
+ *                     email-service .
+ *@{
+ *@code
+ *
+ *     #include "email-api-init.h"
+ *
+ *     bool
+ *     other_app_invoke_uniform_api_sample(int* error_code)
+ *     {
+ *              int err = EMAIL_ERROR_NONE;
+ *
+ *             // Open connections to email-service and DB
+ *             // The connections will be maintain throughout application's execution
+ *             if(EMAIL_ERROR_NONE == email_service_begin())
+ *             {
+ *                     If(EMAIL_ERROR_NONE != email_open_db())
+ *                     {
+ *                             return false;
+ *                     }
+ *
+ *                     // Execute email_init_storage() if and only if there is no db file.
+ *                     // This fuction will create db file and tables for email service
+ *                     If(EMAIL_ERROR_NONE !=email_init_storage())
+ *                     {
+ *                             return false;
+ *                     }
+ *             }
+ *
+ *             ......
+ *
+ *             // Work with calling MAPI functions
+ *
+ *             ......
+ *
+ *             // Close the connections to email-service and DB after all email job is finished. (ex. close an email application)
+ *             // DO NOT have to call these funtions until the connections is not needed any more.
+ *             err =email_close_db();
+ *             err =email_service_end();
+ *      }
+ *
+ * @endcode
+ * @}
+ */
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+
+ * @open
+ * @fn email_init_storage(void)
+ * @brief      Create all table for email. Exposed to External Application- core team.Creates all Email DB tables [ EXTERNAL]
+ *
+ * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure
+ * @exception none
+ * @see none
+ * @remarks N/A
+ */
+EXPORT_API int email_init_storage(void);
+
+/**
+
+ * @open
+ * @fn email_open_db(void)
+ * @brief This function Open the email DB and register busy handler
+ *
+ * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
+ * @exception none
+ * @see        none
+ * @remarks N/A
+ */
+EXPORT_API int email_open_db(void);
+
+
+/**
+
+ * @open
+ * @fn email_close_db(void)
+ * @brief      This function closes the connection of  the email DB
+ *
+ * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
+ * @exception none
+ * @see none
+ * @remarks N/A
+ */
+EXPORT_API int email_close_db(void);
+
+/**
+
+ * @open
+ * @fn email_service_begin(void)
+ * @brief      Does the IPC Proxy Initialization by the Application which used the Email FW API's
+ *
+ * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
+ * @exception none
+ * @see        none
+ * @remarks N/A
+ */
+EXPORT_API int email_service_begin(void);
+
+/**
+
+ * @open
+ * @fn email_service_end(void)
+ * @brief      This function does the IPC Proxy Finaization by the Application which used the Email FW API's
+ *
+ * @return This function returns EMAIL_ERROR_NONE on success or error code (refer to EMAIL_ERROR_XXX) on failure.
+ * @exception  none
+ * @see        none
+ * @remarks N/A
+ */
+EXPORT_API int email_service_end(void);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+/**
+* @} @}
+*/
+
+
+#endif  /* __EMAIL_API_INTI_H__ */