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.
20 /* standard library header */
22 /* SLP library header */
25 #include "Serializable.h"
27 namespace smartcard_service_api
29 class Message: public Serializable
35 static const int MSG_REQUEST_READERS = 0x80;
36 static const int MSG_REQUEST_SHUTDOWN = 0x81;
37 static const int MSG_REQUEST_OPEN_SESSION = 0x82;
38 static const int MSG_REQUEST_CLOSE_SESSION = 0x83;
39 static const int MSG_REQUEST_OPEN_CHANNEL = 0x84;
40 static const int MSG_REQUEST_CLOSE_CHANNEL = 0x85;
41 static const int MSG_REQUEST_GET_ATR = 0x86;
42 static const int MSG_REQUEST_TRANSMIT = 0x87;
43 static const int MSG_REQUEST_GET_CHANNEL_COUNT = 0x88;
45 static const int MSG_NOTIFY_SE_REMOVED = 0x90;
46 static const int MSG_NOTIFY_SE_INSERTED = 0x91;
48 static const int MSG_OPERATION_RELEASE_CLIENT = 0xC0;
62 ByteArray serialize();
63 void deserialize(unsigned char *buffer, unsigned int length);
64 void deserialize(ByteArray buffer);
66 inline bool isSynchronousCall() { return (caller == callback); }
68 const char *toString();
71 } /* namespace smartcard_service_api */
73 #endif /* MESSAGE_H_ */