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/framing/Uuid.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/Response.h"
00033 #include "qpid/client/SessionCore.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::SequenceNumberSet;
00046 using framing::Uuid;
00047
00071 enum SynchronousMode { SYNC=true, ASYNC=false };
00072
00073
00077 class SessionBase
00078 {
00079 public:
00080 SessionBase();
00081 ~SessionBase();
00082
00084 framing::FrameSet::shared_ptr get();
00085
00087 Uuid getId() const;
00088
00100 void setSynchronous(SynchronousMode mode);
00101 void setSynchronous(bool set);
00102 bool isSynchronous() const;
00103 SynchronousMode getSynchronous() const;
00104
00109 void suspend();
00110
00112 void close();
00113
00119 void sync();
00120
00121 Execution& getExecution();
00122
00123 typedef framing::TransferContent DefaultContent;
00124
00125 protected:
00126 shared_ptr<SessionCore> impl;
00127 framing::ProtocolVersion version;
00128 friend class Connection;
00129 SessionBase(shared_ptr<SessionCore>);
00130 };
00131
00132 }}
00133
00134 #endif