PacketProtocol.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PROTOCOLS__GENERICS__PACKET_PROTOCOL_H
00024 #define PROTOCOLS__GENERICS__PACKET_PROTOCOL_H
00025
00026 #include "Imports.h"
00027 #include "Packet.h"
00028
00029 namespace Protocols {
00030 namespace Generics {
00031
00033
00044 class PacketProtocol
00045 {
00046 CALITKO_MOCKABLE
00047
00048 public:
00049 virtual ~PacketProtocol() {}
00050 virtual int headerLength() const = 0;
00051 virtual int payloadLength (const QByteArray &header) const = 0;
00052 virtual Packet createPacket (const QByteArray &header,
00053 const QByteArray &payload) const = 0;
00054 };
00055
00056 }
00057 }
00058
00059 #endif // PROTOCOLS__GENERICS__PACKET_PROTOCOL_H