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 SERVERCHANNEL_H_
19 #define SERVERCHANNEL_H_
21 /* standard library header */
23 /* SLP library header */
28 #include "ServerSession.h"
30 namespace smartcard_service_api
32 class ServerChannel: public Channel
39 ServerChannel(ServerSession *session, void *caller, int channelNum, Terminal *terminal);
40 void setChannelNumber(int channelNum) { this->channelNum = channelNum; }
41 void unsetPrivilegeMode() { this->privilege = false; }
45 int transmitSync(ByteArray command, ByteArray &result);
50 int getChannelNumber() { return channelNum; }
51 Terminal *getTerminal() { return terminal; }
53 int close(closeCallback callback, void *userParam) { return -1; }
54 int transmit(ByteArray command, transmitCallback callback, void *userParam) { return -1; };
56 friend class ServerReader;
57 friend class ServerSession;
58 friend class ServiceInstance;
59 friend class ServerResource;
62 } /* namespace smartcard_service_api */
63 #endif /* SERVERCHANNEL_H_ */