00001 #ifndef QPID_FRAMING_HEADER_H
00002 #define QPID_FRAMING_HEADER_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028
00029
00030
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033
00034 namespace qpid {
00035 namespace framing {
00036
00037 class Header {
00038 uint8_t flags;
00039 public:
00040 Header(
00041 bool _sync) :
00042 flags(0){
00043 setSync(_sync);
00044 }
00045 Header() : flags(0) {}
00046
00047 void setSync(bool _sync);
00048 bool getSync() const;
00049 friend std::ostream& operator<<(std::ostream&, const Header&);
00050 void encode(Buffer&) const;
00051 void decode(Buffer&, uint32_t=0);
00052 void encodeStructBody(Buffer&) const;
00053 void decodeStructBody(Buffer&, uint32_t=0);
00054 uint32_t size() const;
00055 uint32_t bodySize() const;
00056 void print(std::ostream& out) const;
00057 };
00058
00059 }}
00060 #endif