Initialize Tizen 2.3
[framework/telephony/libslp-tapi.git] / mobile / include / ITapiSap.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2012 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 * @open
23 * @ingroup              TelephonyAPI
24 * @addtogroup   SAP_TAPI        SAP
25 * @{
26 *
27 * @file ITapiSap.h
28
29      @brief This file serves as a "C" header file defines functions for Tapi SAP Services.\n
30       It contains a sample set of function prototypes that would be required by applications.
31
32 */
33
34 #ifndef _ITAPI_SAP_H_
35 #define _ITAPI_SAP_H_
36
37 #include <tapi_common.h>
38 #include <TelErr.h>
39 #include <TelSim.h>
40 #include <TelDefines.h>
41
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46
47 /**
48  * @brief  This API is used to request to connect sap.
49  *
50  * @par Sync (or) Async:
51  * This is an Asynchronous API.
52  *
53  * @par Important Notes:
54  * - None
55  *
56  * @warning
57  * - None.
58  *
59  * @param [in] handle
60  * - handle from tel_init().
61  *
62  * @param[in] max_msg_size
63  *
64  * @param [in] callback
65  * - To register callback function for result.
66  *
67  * @param [in] user_data
68  * - user_data for user specification.
69  *
70  * @par
71  *
72  * @pre
73  *
74  * @post
75  *
76  * @return Return Type (int) \n
77  * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
78  * - Negative integer : it provides an error code (Refer #TapiResult_t)
79  *
80  * @par Prospective Clients:
81  * External Apps.
82  *
83  * @see None
84  *
85  * @code
86  *
87  * @endcode
88  *
89  * @remarks None
90  *
91  */
92 /*================================================================================================*/
93 int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data);
94
95 /**
96  * @brief  This API is used to request sap to disconnect sap.
97  *
98  * @par Sync (or) Async:
99  * This is an Asynchronous API.
100  *
101  * @par Important Notes:
102  * - None
103  *
104  * @warning
105  * - None.
106  *
107  * @param [in] handle
108  * - handle from tel_init().
109  *
110  * @param [in] callback
111  * - To register callback function for result.
112  *
113  * @param [in] user_data
114  * - user_data for user specification.
115  *
116  * @par
117  *
118  * @pre
119  *
120  * @post
121  *
122  * @return Return Type (int) \n
123  * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
124  * - Negative integer : it provides an error code (Refer #TapiResult_t)
125  *
126  * @par Prospective Clients:
127  * External Apps.
128  *
129  * @see None
130  *
131  * @code
132  *
133  * @endcode
134  *
135  * @remarks None
136  *
137  */
138 /*================================================================================================*/
139 int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data);
140
141 /**
142  * @brief  This API is used to request sap connection status.
143  *
144  * @par Sync (or) Async:
145  * This is an Asynchronous API.
146  *
147  * @par Important Notes:
148  * - None
149  *
150  * @warning
151  * - None.
152  *
153  * @param [in] handle
154  * - handle from tel_init().
155  *
156  * @param [in] callback
157  * - To register callback function for result.
158  *
159  * @param [in] user_data
160  * - user_data for user specification.
161  *
162  * @par
163  *
164  * @pre
165  *
166  * @post
167  *
168  * @return Return Type (int) \n
169  * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
170  * - Negative integer : it provides an error code (Refer #TapiResult_t)
171  *
172  * @par Prospective Clients:
173  * External Apps.
174  *
175  * @see None
176  *
177  * @code
178  *
179  * @endcode
180  *
181  * @remarks None
182  *
183  */
184 /*================================================================================================*/
185 int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
186
187 /**
188  * @brief  This API is used to request to get atr.
189  *
190  * @par Sync (or) Async:
191  * This is an Asynchronous API.
192  *
193  * @par Important Notes:
194  * - None
195  *
196  * @warning
197  * - None.
198  *
199  * @param [in] handle
200  * - handle from tel_init().
201  *
202  * @param [in] callback
203  * - To register callback function for result.
204  *
205  * @param [in] user_data
206  * - user_data for user specification.
207  *
208  * @par
209  *
210  * @pre
211  *
212  * @post
213  *
214  * @return Return Type (int) \n
215  * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
216  * - Negative integer : it provides an error code (Refer #TapiResult_t)
217  *
218  * @par Prospective Clients:
219  * External Apps.
220  *
221  * @see None
222  *
223  * @code
224  *
225  * @endcode
226  *
227  * @remarks None
228  *
229  */
230 /*================================================================================================*/
231 int tel_req_sap_transfer_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
232
233 /**
234  * @brief  This API is used to request to transfer apdu.
235  *
236  * @par Sync (or) Async:
237  * This is an Asynchronous API.
238  *
239  * @par Important Notes:
240  * - None
241  *
242  * @warning
243  * - None.
244  *
245  * @param [in] handle
246  * - handle from tel_init().
247  *
248  * @param [in] apdu_data
249  *
250  * @param [in] callback
251  * - To register callback function for result.
252  *
253  * @param [in] user_data
254  * - user_data for user specification.
255  *
256  * @par
257  *
258  * @pre
259  *
260  * @post
261  *
262  * @return Return Type (int) \n
263  * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
264  * - Negative integer : it provides an error code (Refer #TapiResult_t)
265  *
266  * @par Prospective Clients:
267  * External Apps.
268  *
269  * @see None
270  *
271  * @code
272  *
273  * @endcode
274  *
275  * @remarks None
276  *
277  */
278 /*================================================================================================*/
279 int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data);
280
281 /**
282  * @brief  This API is used to request to transport protocol.
283  *
284  * @par Sync (or) Async:
285  * This is an Asynchronous API.
286  *
287  * @par Important Notes:
288  * - None
289  *
290  * @warning
291  * - None.
292  *
293  * @param [in] handle
294  * - handle from tel_init().
295  *
296  * @param [in] protocol
297  * - SAP transport protocol type
298  *
299  * @param [in] callback
300  * - To register callback function for result.
301  *
302  * @param [in] user_data
303  * - user_data for user specification.
304  *
305  * @par
306  *
307  * @pre
308  *
309  * @post
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  * @see None
319  *
320  * @code
321  *
322  * @endcode
323  *
324  * @remarks None
325  *
326  */
327 /*================================================================================================*/
328 int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data);
329
330 /**
331  * @brief  This API is used to request to control power_mode.
332  *
333  * @par Sync (or) Async:
334  * This is an Asynchronous API.
335  *
336  * @par Important Notes:
337  * - None
338  *
339  * @warning
340  * - None.
341  *
342  * @param [in] handle
343  * - handle from tel_init().
344  *
345  * @param [in] power_mode
346  * - enum data for controlling power mode of client
347  *
348  * @param [in] callback
349  * - To register callback function for result.
350  *
351  * @param [in] user_data
352  * - user_data for user specification.
353  *
354  * @par
355  *
356  * @pre
357  *
358  * @post
359  *
360  * @return Return Type (int) \n
361  * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
362  * - Negative integer : it provides an error code (Refer #TapiResult_t)
363  *
364  * @par Prospective Clients:
365  * External Apps.
366  *
367  * @see None
368  *
369  * @code
370  *
371  * @endcode
372  *
373  * @remarks None
374  *
375  */
376 /*================================================================================================*/
377 int tel_req_sap_power_operation(TapiHandle *handle, TelSimSapPowerMode_t power_mode, tapi_response_cb callback, void *user_data);
378
379 /**
380  * @brief  This API is used to request to get card_reader_status.
381  *
382  * @par Sync (or) Async:
383  * This is an Asynchronous API.
384  *
385  * @par Important Notes:
386  * - None
387  *
388  * @warning
389  * - None.
390  *
391  * @param [in] handle
392  * - handle from tel_init().
393  *
394  * @param [in] callback
395  * - To register callback function for result.
396  *
397  * @param [in] user_data
398  * - user_data for user specification.
399  *
400  * @par
401  *
402  * @pre
403  *
404  * @post
405  *
406  * @return Return Type (int) \n
407  * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
408  * - Negative integer : it provides an error code (Refer #TapiResult_t)
409  *
410  * @par Prospective Clients:
411  * External Apps.
412  *
413  * @see None
414  *
415  * @code
416  *
417  * @endcode
418  *
419  * @remarks None
420  *
421  */
422 /*================================================================================================*/
423 int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
424
425 #ifdef __cplusplus
426 }
427 #endif
428
429 #endif  /* _ITAPI_SAP_H_ */
430
431 /**
432 * @}
433 */