00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <string>
00022 #include <vector>
00023 #include <framing/amqp_framing.h>
00024
00025 #ifndef _IncomingMessage_
00026 #define _IncomingMessage_
00027
00028 #include <ClientMessage.h>
00029
00030 namespace qpid {
00031 namespace client {
00032
00033 class IncomingMessage{
00034
00035 qpid::framing::BasicDeliverBody::shared_ptr delivered;
00036 qpid::framing::BasicReturnBody::shared_ptr returned;
00037 qpid::framing::BasicGetOkBody::shared_ptr response;
00038 qpid::framing::AMQHeaderBody::shared_ptr header;
00039 std::vector<qpid::framing::AMQContentBody::shared_ptr> content;
00040
00041 u_int64_t contentSize();
00042 public:
00043 IncomingMessage(qpid::framing::BasicDeliverBody::shared_ptr intro);
00044 IncomingMessage(qpid::framing::BasicReturnBody::shared_ptr intro);
00045 IncomingMessage(qpid::framing::BasicGetOkBody::shared_ptr intro);
00046 ~IncomingMessage();
00047 void setHeader(qpid::framing::AMQHeaderBody::shared_ptr header);
00048 void addContent(qpid::framing::AMQContentBody::shared_ptr content);
00049 bool isComplete();
00050 bool isReturn();
00051 bool isDelivery();
00052 bool isResponse();
00053 const std::string& getConsumerTag();
00054 qpid::framing::AMQHeaderBody::shared_ptr& getHeader();
00055 u_int64_t getDeliveryTag();
00056 void getData(std::string& data);
00057 };
00058
00059 }
00060 }
00061
00062
00063 #endif