2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
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 READERHELPER_H_
19 #define READERHELPER_H_
21 /* standard library header */
24 /* SLP library header */
27 #include "Synchronous.h"
28 #include "SessionHelper.h"
32 namespace smartcard_service_api
34 class SEServiceHelper;
36 typedef void (*openSessionCallback)(SessionHelper *session, int error, void *userData);
38 class ReaderHelper : public Synchronous
42 vector<SessionHelper *> sessions;
43 SEServiceHelper *seService;
49 virtual ~ReaderHelper() {}
51 inline const char *getName() { return name; }
52 inline SEServiceHelper *getSEService() { return seService; }
53 inline bool isSecureElementPresent() { return present; }
55 virtual void closeSessions() = 0;
57 virtual int openSession(openSessionCallback callback, void *userData) = 0;
58 virtual SessionHelper *openSessionSync() = 0;
61 } /* namespace smartcard_service_api */
62 #endif /* READERHELPER_H_ */