00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _Content_
00022 #define _Content_
00023
00024 #include <boost/function.hpp>
00025
00026 #include "qpid/framing/AMQContentBody.h"
00027 #include "qpid/framing/Buffer.h"
00028 #include "qpid/framing/OutputHandler.h"
00029
00030 namespace qpid {
00031
00032 namespace framing {
00033 class ChannelAdapter;
00034 }
00035
00036 namespace broker {
00037 class Content{
00038 public:
00039 typedef std::string DataBlock;
00040 typedef boost::function1<void, const DataBlock&> SendFn;
00041
00042 virtual ~Content(){}
00043
00045 virtual void add(framing::AMQContentBody::shared_ptr data) = 0;
00046
00048 virtual uint32_t size() = 0;
00049
00055 virtual void send(framing::ChannelAdapter& channel, uint32_t framesize) = 0;
00056
00057
00058
00059 virtual void encode(qpid::framing::Buffer& buffer) = 0;
00060 };
00061 }}
00062
00063
00064 #endif