00001 #ifndef QPID_CLIENT_SESSIONBASE_H
00002 #define QPID_CLIENT_SESSIONBASE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "qpid/SessionId.h"
00026 #include "qpid/framing/amqp_structs.h"
00027 #include "qpid/framing/ProtocolVersion.h"
00028 #include "qpid/framing/MethodContent.h"
00029 #include "qpid/framing/TransferContent.h"
00030 #include "qpid/client/Completion.h"
00031 #include "qpid/client/ConnectionImpl.h"
00032 #include "qpid/client/Execution.h"
00033 #include "qpid/client/SessionImpl.h"
00034 #include "qpid/client/TypedResult.h"
00035 #include "qpid/shared_ptr.h"
00036 #include <string>
00037
00038 namespace qpid {
00039 namespace client {
00040
00041 using std::string;
00042 using framing::Content;
00043 using framing::FieldTable;
00044 using framing::MethodContent;
00045 using framing::SequenceNumber;
00046 using framing::SequenceSet;
00047 using framing::SequenceNumberSet;
00048 using qpid::SessionId;
00049 using framing::Xid;
00050
00052 enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
00053
00060 class SessionBase_0_10 {
00061 public:
00062
00063 typedef framing::TransferContent DefaultContent;
00064
00066 SessionBase_0_10();
00067 ~SessionBase_0_10();
00068
00070 framing::FrameSet::shared_ptr get();
00071
00073 SessionId getId() const;
00074
00078 void close();
00079
00089 void sync();
00090
00092 uint32_t timeout(uint32_t seconds);
00093
00094 Execution& getExecution();
00095 void flush();
00096 void markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer);
00097 void sendCompletion();
00098
00099 protected:
00100 boost::shared_ptr<SessionImpl> impl;
00101 friend class SessionBase_0_10Access;
00102 };
00103
00104 }}
00105
00106 #endif