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.
21 /* standard library header */
23 /* SLP library header */
26 #include "smartcard-types.h"
28 #include "ReaderHelper.h"
30 #endif /* __cplusplus */
33 namespace smartcard_service_api
35 class Reader: public ReaderHelper
40 ByteArray packageCert;
41 /* temporary data for sync function */
43 Session *openedSession;
45 Reader(void *context, char *name, void *handle);
47 SessionHelper *openSessionSync();
48 static bool dispatcherCallback(void *message);
49 void getPackageCert();
54 int openSession(openSessionCallback callback, void *userData);
57 friend class SEService;
58 friend class ClientDispatcher;
61 } /* namespace smartcard_service_api */
62 #endif /* __cplusplus */
68 #endif /* __cplusplus */
70 const char *reader_get_name(reader_h handle);
71 se_service_h reader_get_se_service(reader_h handle);
72 bool reader_is_secure_element_present(reader_h handle);
73 int reader_open_session(reader_h handle, reader_open_session_cb callback, void *userData);
74 void reader_close_sessions(reader_h handle);
75 void reader_destroy_instance(reader_h handle);
79 #endif /* __cplusplus */
81 #endif /* READER_H_ */