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 "Serializable.h"
28 namespace smartcard_service_api
30 class Message: public Serializable
36 static const int MSG_REQUEST_READERS = 0x80;
37 static const int MSG_REQUEST_SHUTDOWN = 0x81;
38 static const int MSG_REQUEST_OPEN_SESSION = 0x82;
39 static const int MSG_REQUEST_CLOSE_SESSION = 0x83;
40 static const int MSG_REQUEST_OPEN_CHANNEL = 0x84;
41 static const int MSG_REQUEST_CLOSE_CHANNEL = 0x85;
42 static const int MSG_REQUEST_GET_ATR = 0x86;
43 static const int MSG_REQUEST_TRANSMIT = 0x87;
44 static const int MSG_REQUEST_GET_CHANNEL_COUNT = 0x88;
46 static const int MSG_NOTIFY_SE_REMOVED = 0x90;
47 static const int MSG_NOTIFY_SE_INSERTED = 0x91;
49 static const int MSG_OPERATION_RELEASE_CLIENT = 0xC0;
63 ByteArray serialize();
64 void deserialize(unsigned char *buffer, unsigned int length);
65 void deserialize(ByteArray buffer);
67 inline bool isSynchronousCall() { return (caller == callback); }
69 const char *toString();
72 } /* namespace smartcard_service_api */
73 #endif /* MESSAGE_H_ */