3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
33 * @brief Defines control API of messaging framework
37 #ifndef MAPI_CONTROL_H
38 #define MAPI_CONTROL_H
41 * @section Introduction
42 * - Introduction : Overview on Messaging Control API
44 * - Program : Messaging Control API Reference
47 /*==================================================================================================
49 ==================================================================================================*/
59 * @ingroup MESSAGING_FRAMEWORK
60 * @defgroup MESSAGING_CONTROL_API Messaging Control API
64 /*==================================================================================================
66 ==================================================================================================*/
71 * Opens a channel between an application and messaging framework.
74 * For application to utilize the services of Messaging Framework, this API should be called to establish connection between the application and Messaging Framework.
76 * \par Typical use case:
77 * Any application which utilizes the services of Messaging Framework needs to call this API.
79 * \par Method of function operation:
80 * Check for Message Server ready status. If ready connect to the Messaging Server socket and pass the handle application.
82 * \par Sync (or) Async:
83 * This is a Synchronous API.
85 * \par Important notes:
86 * - The handle parameter returned must be used by application for further API calls to Messaging Service \n
87 * - memory for the handle need not be allocated by the application \n
88 * - An error will be returned in case Messaging Service is not running.
90 * \param MSG_HANDLE_T input - handle to be passed for all Messaging Services .
92 * \return Return Type (int) \n
93 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
94 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
95 * - MSG_ERR_MEMORY_ERROR - Memory error.
96 * - MSG_ERR_COMMUNICATION_ERROR - Communication error between client and server \n
98 * \par Prospective clients:
99 * External/Native Apps using Messaging Services.
101 * \par Related functions:
104 * \par Known issues/bugs:
111 * MSG_HANDLE_T msgHandle = NULL;
112 * MSG_ERROR_T err = MSG_SUCCESS;
114 * err = msg_open_msg_handle(&msgHandle);
116 * if (err != MSG_SUCCESS)
118 * sprintf(str, "msg_open_msg_handle() Fail [%d]", err);
121 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
127 /*================================================================================================*/
128 int msg_open_msg_handle(MSG_HANDLE_T *handle);
134 * Closes the channel between application and messaging framework.
137 * Once application utilizes services of Messaging Service, this API needs to be invoked the close the channel between application and Messaging Service.
139 * \par Typical use case:
140 * Any application which has completed using services of Messaging Framework needs to call this API.
142 * \par Method of function operation:
143 * Closes the connection to Messaging Service and deleted the reference to the handle object
145 * \par Sync (or) Async:
146 * This is a Synchronous API.
148 * \par Important notes:
149 * - The handle parameter returned must be used by application for further API calls to Messaging Service \n
150 * - memory for the handle need not be allocated by the application \n
151 * - An error will be returned in case Messaging Service is not running.
153 * \param MSG_HANDLE_T input - handle to be passed for all Messaging Services .
155 * \return Return Type (int) \n
156 * - MSG_SUCCESS - Successfully connected to Messaging Service \n
157 * - MSG_ERR_NULL_POINTER - Input parameter is NULL.
158 * - MSG_ERR_COMMUNICATION_ERROR - Communication error between client and server \n
160 * \par Prospective clients:
161 * External/Native Apps using Messaging Services.
163 * \par Related functions:
166 * \par Known issues/bugs:
173 * MSG_HANDLE_T msgHandle = NULL;
174 * MSG_ERROR_T err = MSG_SUCCESS;
178 * err = msg_open_msg_handle(&msgHandle);
182 * err = msg_close_msg_handle(&msgHandle);
184 * if (err != MSG_SUCCESS)
186 * sprintf(str, "msg_close_msg_handle() Fail [%d]", err);
189 * return err; // if success, return OPERATION_SUCCESS. Or if fail, return related error code.
195 /*================================================================================================*/
196 int msg_close_msg_handle(MSG_HANDLE_T *handle);
206 #endif // MAPI_STORAGE_H