00001 #ifndef QPID_FRAMING_EXCHANGEQUERYRESULT_H
00002 #define QPID_FRAMING_EXCHANGEQUERYRESULT_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 ExchangeQueryResult {
00038 string type;
00039 FieldTable arguments;
00040 uint16_t flags;
00041 public:
00042 static const uint16_t TYPE = 1793;
00043 ExchangeQueryResult(
00044 const string& _type,
00045 bool _durable,
00046 bool _notFound,
00047 const FieldTable& _arguments) :
00048 type(_type),
00049 arguments(_arguments),
00050 flags(0){
00051 setDurable(_durable);
00052 setNotFound(_notFound);
00053 flags |= (1 << 8);
00054 flags |= (1 << 11);
00055 }
00056 ExchangeQueryResult() : flags(0) {}
00057
00058 void setType(const string& _type);
00059 const string& getType() const;
00060 bool hasType() const;
00061 void clearTypeFlag();
00062 void setDurable(bool _durable);
00063 bool getDurable() const;
00064 void setNotFound(bool _notFound);
00065 bool getNotFound() const;
00066 void setArguments(const FieldTable& _arguments);
00067 const FieldTable& getArguments() const;
00068 FieldTable& getArguments();
00069 bool hasArguments() const;
00070 void clearArgumentsFlag();
00071 friend std::ostream& operator<<(std::ostream&, const ExchangeQueryResult&);
00072 void encode(Buffer&) const;
00073 void decode(Buffer&, uint32_t=0);
00074 void encodeStructBody(Buffer&) const;
00075 void decodeStructBody(Buffer&, uint32_t=0);
00076 uint32_t size() const;
00077 uint32_t bodySize() const;
00078 void print(std::ostream& out) const;
00079 };
00080
00081 }}
00082 #endif