4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@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 * @ingroup TELEPHONY_API
24 * @addtogroup OMADM OMA-DM
28 * OMA-DM APIs allow an application to accomplish the following services: @n
29 * - Get Model Name. @n
32 #ifndef _ITAPI_OMADM_H_
33 #define _ITAPI_OMADM_H_
35 #include <TelDefines.h>
36 #include <TelUtility.h>
42 #define TAPI_OMADM_MAX_PRL_SIZE_LEN 17 /** Maximum length of PRL size string */
43 #define TAPI_OMADM_MAX_MODEL_NAME_LEN 17 /** Maximum length of Model name string */
44 #define TAPI_OMADM_MAX_OEM_NAME_LEN 65 /** Maximum length of OEM name string */
45 #define TAPI_OMADM_MAX_SW_VER_LEN 17 /** Maximum length of SW version string */
46 #define TAPI_OMADM_MAX_PRL_DATA_LEN 237 /** Maximum length of PRL data */
49 * @enum TelDataSignalType
53 TAPI_OMADM_PRL_WRITE_SUCCESS = 0x00, /**< Success */
54 TAPI_OMADM_PRL_WRITE_INVALID_SIZE = 0x01, /**< PRL size is invalid */
55 TAPI_OMADM_PRL_WRITE_FAIL = 0x02 /**< Fail */
56 } TelOMADMPRLWriteStatus_t;
59 * This structure contains PRL size string.
62 unsigned char prl_size[TAPI_OMADM_MAX_PRL_SIZE_LEN]; /**< PRL size string information */
66 * This structure contains Model name string.
69 unsigned char model_name[TAPI_OMADM_MAX_MODEL_NAME_LEN]; /**< model name information */
70 } TelOMADMModelName_t;
73 * This structure contains OEM name string.
76 unsigned char oem_name[TAPI_OMADM_MAX_OEM_NAME_LEN]; /**< OEM information */
80 * This structure contains S/W version string.
83 unsigned char sw_ver[TAPI_OMADM_MAX_SW_VER_LEN]; /**< S/W version information */
84 } TelOMADMSWVersion_t;
87 * This structure contains PRL data packet.
90 unsigned int total_size; /**< total size */
91 unsigned short current_size; /**< current size */
92 unsigned char more; /**< more data or not */
93 unsigned char prl_data[TAPI_OMADM_MAX_PRL_DATA_LEN]; /**< PRL data information */
97 * @brief This function requests PRL size.
100 * @par Sync (or) Async:
101 * This is a Asynchronous API.
103 * @par Important Notes:
109 * @param [out] pRequestID
110 * - Unique identifier for a particular request.
111 * - Request Id value can be any value from 0 to 255 if the API is returned successfully
112 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
114 * @par Async Response Message:
115 * - The event associated with this request is TAPI_EVENT_OMADM_PRL_SIZE_GET_CNF.
123 * @return Return Type (int) \n
124 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
125 * - Negative integer : it provides an error code (Refer #TapiResult_t)
127 * @par Prospective Clients:
131 int tel_get_omadm_prl_size(int *pRequestID);
134 * @brief This function requests Model name.
137 * @par Sync (or) Async:
138 * This is a Asynchronous API.
140 * @par Important Notes:
146 * @param [out] pRequestID
147 * - Unique identifier for a particular request.
148 * - Request Id value can be any value from 0 to 255 if the API is returned successfully
149 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
151 * @par Async Response Message:
152 * - The event associated with this request is TAPI_EVENT_OMADM_MODEL_NAME_GET_CNF.
160 * @return Return Type (int) \n
161 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
162 * - Negative integer : it provides an error code (Refer #TapiResult_t)
164 * @par Prospective Clients:
168 int tel_get_omadm_model_name(int *pRequestID);
171 * @brief This function requests OEM name.
174 * @par Sync (or) Async:
175 * This is a Asynchronous API.
177 * @par Important Notes:
183 * @param [out] pRequestID
184 * - Unique identifier for a particular request.
185 * - Request Id value can be any value from 0 to 255 if the API is returned successfully
186 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
188 * @par Async Response Message:
189 * - The event associated with this request is TAPI_EVENT_OMADM_OEM_NAME_GET_CNF.
197 * @return Return Type (int) \n
198 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
199 * - Negative integer : it provides an error code (Refer #TapiResult_t)
201 * @par Prospective Clients:
205 int tel_get_omadm_oem_name(int *pRequestID);
208 * @brief This function requests SW version.
211 * @par Sync (or) Async:
212 * This is a Asynchronous API.
214 * @par Important Notes:
220 * @param [out] pRequestID
221 * - Unique identifier for a particular request.
222 * - Request Id value can be any value from 0 to 255 if the API is returned successfully
223 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
226 * @par Async Response Message:
227 * - The event associated with this request is TAPI_EVENT_OMADM_SW_VERSION_GET_CNF.
235 * @return Return Type (int) \n
236 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
237 * - Negative integer : it provides an error code (Refer #TapiResult_t)
239 * @par Prospective Clients:
243 int tel_get_omadm_sw_ver(int *pRequestID);
246 * @brief This function requests read PRL data.
249 * @par Sync (or) Async:
250 * This is a Asynchronous API.
252 * @par Important Notes:
258 * @param [out] pRequestID
259 * - Unique identifier for a particular request.
260 * - Request Id value can be any value from 0 to 255 if the API is returned successfully
261 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
263 * @par Async Response Message:
264 * - The event associated with this request is TAPI_EVENT_OMADM_PRL_READ_GET_CNF.
272 * @return Return Type (int) \n
273 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
274 * - Negative integer : it provides an error code (Refer #TapiResult_t)
276 * @par Prospective Clients:
280 int tel_read_omadm_ril(int *pRequestID);
283 * @brief This function requests write PRL data.
285 * @par Sync (or) Async:
286 * This is a Asynchronous API.
288 * @par Important Notes:
294 * @param[in] pPrlData
297 * @param [out] pRequestID
298 * - Unique identifier for a particular request.
299 * - Request Id value can be any value from 0 to 255 if the API is returned successfully
300 * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
302 * @par Async Response Message:
303 * - The event associated with this request is TAPI_EVENT_OMADM_PRL_WRITE_SET_CNF.
311 * @return Return Type (int) \n
312 * - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
313 * - Negative integer : it provides an error code (Refer #TapiResult_t)
315 * @par Prospective Clients:
319 int tel_write_omadm_prl(TelOMADMPRLData_t *pPrlData, int *pRequestID);
325 #endif /* _ITAPI_OMADM_H_ */