upload tizen1.0 source
[framework/telephony/libslp-tapi.git] / include / tapi / ITapiOmadm.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Ja-young Gu <jygu@samsung.com>
7  *
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
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  */
20
21 /**
22  * @internal
23  * @ingroup           TELEPHONY_API
24  * @addtogroup  OMADM OMA-DM
25  * @{
26  * @file ITapiOmadm.h
27  *
28  * OMA-DM APIs allow an application to accomplish the following services: @n
29  * - Get Model Name. @n
30  */
31
32 #ifndef _ITAPI_OMADM_H_
33 #define _ITAPI_OMADM_H_
34
35 #include <TelDefines.h>
36 #include <TelUtility.h>
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
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 */
47
48 /**
49  * @enum TelDataSignalType
50  * Data Signal Type
51  */
52 typedef enum {
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;
57
58 /**
59  * This structure contains PRL size string.
60  */
61 typedef struct {
62         unsigned char prl_size[TAPI_OMADM_MAX_PRL_SIZE_LEN]; /**< PRL size string information */
63 } TelOMADMPRLSize_t;
64
65 /**
66  * This structure contains Model name string.
67  */
68 typedef struct {
69         unsigned char model_name[TAPI_OMADM_MAX_MODEL_NAME_LEN]; /**< model name information */
70 } TelOMADMModelName_t;
71
72 /**
73  * This structure contains OEM name string.
74  */
75 typedef struct {
76         unsigned char oem_name[TAPI_OMADM_MAX_OEM_NAME_LEN]; /**< OEM information */
77 } TelOMADMOEMName_t;
78
79 /**
80  * This structure contains S/W version string.
81  */
82 typedef struct {
83         unsigned char sw_ver[TAPI_OMADM_MAX_SW_VER_LEN]; /**< S/W version information */
84 } TelOMADMSWVersion_t;
85
86 /**
87  * This structure contains PRL data packet.
88  */
89 typedef struct {
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 */
94 } TelOMADMPRLData_t;
95
96 /**
97  * @brief This function requests PRL size.
98  *
99  *
100  * @par Sync (or) Async:
101  * This is a Asynchronous API.
102  *
103  * @par Important Notes:
104  *   - None.
105  *
106  * @warning
107  * - None.
108  *
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.
113  *
114  * @par Async Response Message:
115  * - The event associated with this request is TAPI_EVENT_OMADM_PRL_SIZE_GET_CNF.
116  *
117  * @pre
118  *  - None
119  *
120  * @post
121  *  - None.
122  *
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)
126  *
127  * @par Prospective Clients:
128  * External Apps.
129  *
130  */
131 int tel_get_omadm_prl_size(int *pRequestID);
132
133 /**
134  * @brief This function requests Model name.
135  *
136  *
137  * @par Sync (or) Async:
138  * This is a Asynchronous API.
139  *
140  * @par Important Notes:
141  *   - None.
142  *
143  * @warning
144  * - None.
145  *
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.
150  *
151  * @par Async Response Message:
152  * - The event associated with this request is TAPI_EVENT_OMADM_MODEL_NAME_GET_CNF.
153  *
154  * @pre
155  *  - None
156  *
157  * @post
158  *  - None.
159  *
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)
163  *
164  * @par Prospective Clients:
165  * External Apps.
166  *
167  */
168 int tel_get_omadm_model_name(int *pRequestID);
169
170 /**
171  * @brief This function requests OEM name.
172  *
173  *
174  * @par Sync (or) Async:
175  * This is a Asynchronous API.
176  *
177  * @par Important Notes:
178  *   - None.
179  *
180  * @warning
181  * - None.
182  *
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.
187  *
188  * @par Async Response Message:
189  * - The event associated with this request is TAPI_EVENT_OMADM_OEM_NAME_GET_CNF.
190  *
191  * @pre
192  *  - None
193  *
194  * @post
195  *  - None.
196  *
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)
200  *
201  * @par Prospective Clients:
202  * External Apps.
203  *
204  */
205 int tel_get_omadm_oem_name(int *pRequestID);
206
207 /**
208  * @brief This function requests SW version.
209  *
210  *
211  * @par Sync (or) Async:
212  * This is a Asynchronous API.
213  *
214  * @par Important Notes:
215  *   - None.
216  *
217  * @warning
218  * - None.
219  *
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.
224  *
225  *
226  * @par Async Response Message:
227  * - The event associated with this request is TAPI_EVENT_OMADM_SW_VERSION_GET_CNF.
228  *
229  * @pre
230  *  - None
231  *
232  * @post
233  *  - None.
234  *
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)
238  *
239  * @par Prospective Clients:
240  * External Apps.
241  *
242  */
243 int tel_get_omadm_sw_ver(int *pRequestID);
244
245 /**
246  * @brief This function requests read PRL data.
247  *
248  *
249  * @par Sync (or) Async:
250  * This is a Asynchronous API.
251  *
252  * @par Important Notes:
253  *   - None.
254  *
255  * @warning
256  * - None.
257  *
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.
262  *
263  * @par Async Response Message:
264  * - The event associated with this request is TAPI_EVENT_OMADM_PRL_READ_GET_CNF.
265  *
266  * @pre
267  *  - None
268  *
269  * @post
270  *  - None.
271  *
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)
275  *
276  * @par Prospective Clients:
277  * External Apps.
278  *
279  */
280 int tel_read_omadm_ril(int *pRequestID);
281
282 /**
283  * @brief This function requests write PRL data.
284  *
285  * @par Sync (or) Async:
286  * This is a Asynchronous API.
287  *
288  * @par Important Notes:
289  *   - None.
290  *
291  * @warning
292  * - None.
293  *
294  * @param[in] pPrlData
295  * - PRL data.
296  *
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.
301  *
302  * @par Async Response Message:
303  * - The event associated with this request is TAPI_EVENT_OMADM_PRL_WRITE_SET_CNF.
304  *
305  * @pre
306  *  - None
307  *
308  * @post
309  *  - None.
310  *
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)
314  *
315  * @par Prospective Clients:
316  * External Apps.
317  *
318  */
319 int tel_write_omadm_prl(TelOMADMPRLData_t *pPrlData, int *pRequestID);
320
321 #ifdef __cplusplus
322 }
323 #endif
324
325 #endif  /* _ITAPI_OMADM_H_ */
326
327 /**
328  * @}
329  */
330