2 * Copyright (c) 2014 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 * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
20 * @brief This file defines descriptor class
23 #ifndef SRC_SERVICE_SOCKETS_DESCRIPTOR_H_
24 #define SRC_SERVICE_SOCKETS_DESCRIPTOR_H_
28 #include <protocol/Protocol.h>
29 #include <request/Request.h>
38 BinaryQueue m_readQueue;
39 BinaryQueue m_writeQueue;
40 RawBuffer m_writeBuffer;
45 bool isListen(void) const {
49 bool isDataToWrite(void) const;
51 Protocol *protocol(void) {
55 void setProtocol(Protocol *protocol) {
56 m_protocol = protocol;
59 void setListen(bool listen) {
63 void pushReadBuffer(const RawBuffer &readbuffer);
64 Request *extractRequest(void);
66 RawBuffer &prepareWriteBuffer(void);
73 #endif /* SRC_SERVICE_SOCKETS_DESCRIPTOR_H_ */