tizen 2.3 release
[framework/telephony/libslp-tapi.git] / include / ITapiSap.h
1 /*
2  * libslp-tapi
3  *
4  * Copyright (c) 2014 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  * @file ITapiSap.h
23  */
24
25 /**
26  * @internal
27  * @addtogroup CAPI_TELEPHONY_SERVICE_SAP
28  * @{
29  */
30
31 #ifndef _ITAPI_SAP_H_
32 #define _ITAPI_SAP_H_
33
34 #include <tapi_common.h>
35 #include <TelSim.h>
36
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41
42 /**
43  * @brief Requests to connect SAP.
44  *
45  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
46  *
47  *          <b> Prospective Clients: </b> External Apps.
48  *
49  * @since_tizen 2.3
50  * @privlevel platform
51  * @privilege %http://tizen.org/privilege/telephony.admin
52  *
53  * @param[in] handle The handle from tel_init()
54  * @param[in] max_msg_size The maximum message size
55  * @param[in] callback To register a callback function for result
56  * @param[in] user_data The user data for user specification
57  *
58  * @return The return type (int) \n
59  *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n
60  *         Negative integer : It provides an error code (Refer #TapiResult_t).
61  */
62 int tel_req_sap_connect(TapiHandle *handle, int max_msg_size, tapi_response_cb callback, void *user_data);
63
64 /**
65  * @brief Requests to disconnect SAP.
66  *
67  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
68  *
69  *          <b> Prospective Clients: </b> External Apps.
70  *
71  * @since_tizen 2.3
72  * @privlevel platform
73  * @privilege %http://tizen.org/privilege/telephony.admin
74  *
75  * @param[in] handle The handle from tel_init()
76  * @param[in] callback To register a callback function for result
77  * @param[in] user_data The user data for user specification
78  *
79  * @return The return type (int) \n
80  *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n
81  *         Negative integer : It provides an error code (Refer #TapiResult_t).
82  */
83 int tel_req_sap_disconnect(TapiHandle *handle, tapi_response_cb callback, void *user_data);
84
85 /**
86  * @brief Requests for the SAP connection status.
87  *
88  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
89  *
90  *          <b> Prospective Clients: </b> External Apps.
91  *
92  * @since_tizen 2.3
93  * @privlevel platform
94  * @privilege %http://tizen.org/privilege/telephony.admin
95  *
96  * @param[in] handle The handle from tel_init()
97  * @param[in] callback To register a callback function for result
98  * @param[in] user_data The user data for user specification
99  *
100  * @return The return type (int) \n 
101  *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
102  *         Negative integer : It provides an error code (Refer #TapiResult_t).
103  */
104 int tel_req_sap_connection_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
105
106 /**
107  * @brief Requests to get atr.
108  *
109  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
110  *
111  *          <b> Prospective Clients: </b> External Apps.
112  *
113  * @since_tizen 2.3
114  * @privlevel platform
115  * @privilege %http://tizen.org/privilege/telephony.admin
116  *
117  * @param[in] handle The handle from tel_init()
118  * @param[in] callback To register a callback function for result
119  * @param[in] user_data The user data for user specification
120  *
121  * @return The return type (int) \n 
122  *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
123  *         Negative integer : It provides an error code (Refer #TapiResult_t).
124  */
125 int tel_req_sap_transfer_atr(TapiHandle *handle, tapi_response_cb callback, void *user_data);
126
127 /**
128  * @brief Requests to transfer APDU.
129  *
130  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
131  *
132  *          <b> Prospective Clients: </b> External Apps.
133  *
134  * @since_tizen 2.3
135  * @privlevel platform
136  * @privilege %http://tizen.org/privilege/telephony.admin
137  *
138  * @param[in] handle The handle from tel_init()
139  * @param[in] apdu_data The APDU data
140  * @param[in] callback To register a callback function for result
141  * @param[in] user_data The user data for user specification
142  *
143  * @return The return type (int) \n 
144  *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
145  *         Negative integer : It provides an error code (Refer #TapiResult_t).
146  */
147 int tel_req_sap_transfer_apdu(TapiHandle *handle, TelSapApduData_t *apdu_data, tapi_response_cb callback, void *user_data);
148
149 /**
150  * @brief Requests to transport protocol.
151  *
152  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
153  *
154  *          <b> Prospective Clients: </b> External Apps.
155  *
156  * @since_tizen 2.3
157  * @privlevel platform
158  * @privilege %http://tizen.org/privilege/telephony.admin
159  *
160  * @param[in] handle The handle from tel_init()
161  * @param[in] protocol The SAP transport protocol type
162  * @param[in] callback To register a callback function for result
163  * @param[in] user_data The user data for user specification
164  *
165  * @return The return type (int)\n 
166  *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully\n
167  *         Negative integer : It provides an error code (Refer #TapiResult_t).
168  */
169 int tel_req_sap_transport_protocol(TapiHandle *handle, TelSimSapProtocol_t protocol, tapi_response_cb callback, void *user_data);
170
171 /**
172  * @brief Requests to control power mode.
173  *
174  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
175  *
176  *          <b> Prospective Clients: </b> External Apps.
177  *
178  * @since_tizen 2.3
179  * @privlevel platform
180  * @privilege %http://tizen.org/privilege/telephony.admin
181  *
182  * @param[in] handle The handle from tel_init()
183  * @param[in] power_mode The data to control the power mode of client
184  * @param[in] callback To register a callback function for result
185  * @param[in] user_data The user data for user specification
186  *
187  * @return The return type (int) \n 
188  *         Integer '0' ( same with TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n 
189  *         Negative integer : It provides an error code (Refer #TapiResult_t).
190  */
191 int tel_req_sap_power_operation(TapiHandle *handle, TelSimSapPowerMode_t power_mode, tapi_response_cb callback, void *user_data);
192
193 /**
194  * @brief Requests to get the card reader status.
195  *
196  * @details <b> Sync (or) Async: </b> This is an Asynchronous API.\n
197  *
198  *          <b> Prospective Clients: </b> External Apps.
199  *
200  * @since_tizen 2.3
201  * @privlevel platform
202  * @privilege %http://tizen.org/privilege/telephony.admin
203  *
204  * @param[in] handle The handle from tel_init()
205  * @param[in] callback To register a callback function for result
206  * @param[in] user_data The user data for user specification
207  *
208  * @return The return type (int) \n 
209  *         Integer '0' ( same with #TAPI_API_SUCCESS ): indicates that the operation has completed successfully \n
210  *         Negative integer : It provides an error code (Refer #TapiResult_t).
211  */
212 int tel_req_sap_cardreader_status(TapiHandle *handle, tapi_response_cb callback, void *user_data);
213
214 #ifdef __cplusplus
215 }
216 #endif
217
218 #endif  /* _ITAPI_SAP_H_ */
219
220 /**
221  * @}
222  */