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