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 "qpid/framing/amqp_framing.h"
00023 #include "qpid/framing/AMQFrame.h"
00024 #include "qpid/framing/FrameHandler.h"
00025
00026 #ifndef _SendContent_
00027 #define _SendContent_
00028
00029 namespace qpid {
00030 namespace framing {
00031
00037 class SendContent
00038 {
00039 mutable FrameHandler& handler;
00040 const uint16_t maxFrameSize;
00041 uint expectedFrameCount;
00042 uint frameCount;
00043
00044 void sendFragment(const AMQContentBody& body, uint32_t offset, uint16_t size, bool first, bool last) const;
00045 void setFlags(AMQFrame& f, bool first, bool last) const;
00046 public:
00047 SendContent(FrameHandler& _handler, uint16_t _maxFrameSize, uint frameCount);
00048 void operator()(const AMQFrame& f);
00049 };
00050
00051 }
00052 }
00053
00054
00055 #endif