diff options
| author | Gordon Sim <gsim@apache.org> | 2008-04-24 21:07:34 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-04-24 21:07:34 +0000 |
| commit | 1c86294add5cbb640aac7f458c4de693de48dd9f (patch) | |
| tree | 22d7774e00c7514c4b76be5cf8b50727b74fe4e3 /cpp/src/qpid/client/SessionImpl.h | |
| parent | 96f12949244b5af2b717156823309b66fe7bfb84 (diff) | |
| download | qpid-python-1c86294add5cbb640aac7f458c4de693de48dd9f.tar.gz | |
Generate c++ code from final 0-10 spec
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@651423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/SessionImpl.h')
| -rw-r--r-- | cpp/src/qpid/client/SessionImpl.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/cpp/src/qpid/client/SessionImpl.h b/cpp/src/qpid/client/SessionImpl.h index 86820dbb92..3b2e80fefd 100644 --- a/cpp/src/qpid/client/SessionImpl.h +++ b/cpp/src/qpid/client/SessionImpl.h @@ -54,8 +54,8 @@ class ConnectionImpl; class SessionImpl : public framing::FrameHandler::InOutHandler, public Execution, - private framing::AMQP_ClientOperations::Session010Handler, - private framing::AMQP_ClientOperations::Execution010Handler + private framing::AMQP_ClientOperations::SessionHandler, + private framing::AMQP_ClientOperations::ExecutionHandler { public: SessionImpl(shared_ptr<ConnectionImpl>, uint16_t channel, uint64_t maxFrameSize); @@ -95,6 +95,12 @@ public: void connectionBroke(uint16_t code, const std::string& text); private: + enum ErrorType { + OK, + CONNECTION_CLOSE, + SESSION_DETACH, + EXCEPTION + }; enum State { INACTIVE, ATTACHING, @@ -102,8 +108,8 @@ private: DETACHING, DETACHED }; - typedef framing::AMQP_ClientOperations::Session010Handler SessionHandler; - typedef framing::AMQP_ClientOperations::Execution010Handler ExecutionHandler; + typedef framing::AMQP_ClientOperations::SessionHandler SessionHandler; + typedef framing::AMQP_ClientOperations::ExecutionHandler ExecutionHandler; typedef sys::StateMonitor<State, DETACHED> StateMonitor; typedef StateMonitor::Set States; @@ -145,19 +151,16 @@ private: // Note: Following methods are called by network thread in // response to execution commands from the broker void sync(); - void result(uint32_t commandId, const std::string& value); + void result(const framing::SequenceNumber& commandId, const std::string& value); void exception(uint16_t errorCode, - uint32_t commandId, + const framing::SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const framing::FieldTable& errorInfo); - - //hack for old generator: - void commandPoint(uint32_t id, uint64_t offset) { commandPoint(framing::SequenceNumber(id), offset); } - + ErrorType error; int code; // Error code std::string text; // Error text mutable StateMonitor state; @@ -170,7 +173,7 @@ private: shared_ptr<ConnectionImpl> connection; framing::ChannelHandler channel; - framing::AMQP_ServerProxy::Session010 proxy; + framing::AMQP_ServerProxy::Session proxy; Results results; Demux demux; |
