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 class Connection;
00042
00043 using std::string;
00044 using framing::Content;
00045 using framing::FieldTable;
00046 using framing::MethodContent;
00047 using framing::SequenceNumber;
00048 using framing::SequenceSet;
00049 using framing::SequenceNumberSet;
00050 using qpid::SessionId;
00051 using framing::Xid;
00052
00054 enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
00055
00062 class SessionBase_0_10 {
00063 public:
00064
00065 typedef framing::TransferContent DefaultContent;
00066
00068 SessionBase_0_10();
00069 ~SessionBase_0_10();
00070
00072 framing::FrameSet::shared_ptr get();
00073
00075 SessionId getId() const;
00076
00080 void close();
00081
00091 void sync();
00092
00094 uint32_t timeout(uint32_t seconds);
00095
00097 void suspend();
00098
00100 void resume(Connection);
00101
00102 Execution& getExecution();
00103 void flush();
00104 void markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer);
00105 void sendCompletion();
00106
00107 protected:
00108 boost::shared_ptr<SessionImpl> impl;
00109 friend class SessionBase_0_10Access;
00110 };
00111
00112 }}
00113
00114 #endif