2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef UICCTERMINAL_H_
19 #define UICCTERMINAL_H_
21 /* standard library header */
25 /* SLP library header */
26 #include "tapi_common.h"
35 namespace smartcard_service_api
37 class UICCTerminal: public Terminal
41 struct tapi_handle *handle;
43 /* temporary data for sync function */
50 // static int uiccResponseCallback(TelTapiEvent_t *event);
52 static void uiccTransmitAPDUCallback(TapiHandle *handle, int result, void *data, void *user_data);
53 static void uiccGetAtrCallback(TapiHandle *handle, int result, void *data, void *user_data);
54 static void uiccStatusNotiCallback(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
57 static UICCTerminal *getInstance();
62 bool isSecureElementPresence();
64 int transmitSync(ByteArray command, ByteArray &response);
65 int getATRSync(ByteArray &atr);
67 int transmit(ByteArray command, terminalTransmitCallback callback, void *userParam) { return -1; };
68 int getATR(terminalGetATRCallback callback, void *userParam) { return -1; }
70 // friend int uiccResponseCallback(TelTapiEvent_t *event);
71 friend void uiccTransmitAPDUCallback(TapiHandle *handle, int result, void *data, void *user_data);
72 friend void uiccGetAtrCallback(TapiHandle *handle, int result, void *data, void *user_data);
73 friend void uiccStatusNotiCallback(TapiHandle *handle, const char *noti_id, void *data, void *user_data);
76 } /* namespace smartcard_service_api */
77 #endif /* UICCTERMINAL_H_ */