31 lines
730 B
C++
31 lines
730 B
C++
#ifndef _CAPSERVER_SOCKET_HEADER_HPP_
|
|
#define _CAPSERVER_SOCKET_HEADER_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _SOCKET_SOCKET_HPP_
|
|
#include <socket/socket.hpp>
|
|
#endif
|
|
|
|
class SocketHeader
|
|
{
|
|
public:
|
|
typedef enum ContentType{Unknown,ImageJPG};
|
|
SocketHeader();
|
|
virtual ~SocketHeader();
|
|
int getSizeHeader(void)const;
|
|
int getVersion(void)const;
|
|
void setVersion(int version);
|
|
int getContentLength(void)const;
|
|
void setContentLength(int contentLength);
|
|
ContentType getContentType(void)const;
|
|
void setContentType(int contentType);
|
|
bool marshall(Socket &socket);
|
|
bool unmarshall(Socket &socket);
|
|
private:
|
|
int mSizeHeader;
|
|
int mVersion;
|
|
int mContentLength;
|
|
int mContentType;
|
|
};
|
|
#endif |