diff options
| author | Alan Conway <aconway@apache.org> | 2007-02-13 02:41:14 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-02-13 02:41:14 +0000 |
| commit | 9517deedff9691dbe3429b0b917dfd4208b0b1b8 (patch) | |
| tree | f8868a2fbc63e92c770b401eeff2aee3a522697a /gentools/templ.cpp/AMQP_ServerOperations.h.tmpl | |
| parent | d26ea3376f66f69486fe214c8a7a8b96a7605c99 (diff) | |
| download | qpid-python-9517deedff9691dbe3429b0b917dfd4208b0b1b8.tar.gz | |
* gentools/templ.cpp/*Proxy*, CppGenerator.java: Changes to Proxy
classes to make them directly usable as an API for low-level AMQP access.
- Proxies hold reference to a ChannelAdapter not just an output handler.
- Removed MethodContext parameter, makes no sense on requester end.
- Return RequestId from request methods so caller can correlate
incoming responses.
- Add RequestId parameter to response methods so caller can provide
correlation for outgoing responses.
- No longer inherit from *Operations classes as the signatures no
longer match. Proxy is for caller (client/requester) and Operations
is for callee (server/responder)
* cpp/lib/client/ClientChannel.h: Channel provides a raw proxy to the broker.
Normal users will still use the Channel API to deal with the broker, but
advanced users (incl ourselves!) can use the raw API to directly send
and receive any AMQP message.
* cpp/lib/broker/BrokerChannel,BrokerAdapter: Refactor for new proxies.
broker::Channel is also a ClientProxy
* Sundry files:
- Pass ProtcolVersion by value, it is only two bytes.
- Misc. const correctness fixes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@506823 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'gentools/templ.cpp/AMQP_ServerOperations.h.tmpl')
| -rw-r--r-- | gentools/templ.cpp/AMQP_ServerOperations.h.tmpl | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl index c6db6f002a..aca065c757 100644 --- a/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl +++ b/gentools/templ.cpp/AMQP_ServerOperations.h.tmpl @@ -29,43 +29,25 @@ #ifndef _AMQP_ServerOperations_ #define _AMQP_ServerOperations_ -#include <FieldTable.h> -#include <FramingContent.h> -#include <ProtocolVersion.h> -#include <ProtocolVersionException.h> -#include "MethodContext.h" +#include "ProtocolVersion.h" namespace qpid { namespace framing { -class AMQP_ServerProxy; -class AMQP_ClientProxy; +class MethodContext; class AMQP_ServerOperations { protected: ProtocolVersion version; - AMQP_ServerOperations() {} public: - AMQP_ServerOperations(u_int8_t major, u_int8_t minor) : version(major, minor) {} - AMQP_ServerOperations(const ProtocolVersion& version) : version(version) {} virtual ~AMQP_ServerOperations() {} - inline u_int8_t getMajor() const { return version.getMajor(); } - inline u_int8_t getMinor() const { return version.getMinor(); } - inline const ProtocolVersion& getVersion() const { return version; } - inline bool isVersion(u_int8_t _major, u_int8_t _minor) const - { - return version.equals(_major, _minor); - } - inline bool isVersion(const ProtocolVersion& _version) const - { - return version.equals(_version); - } + virtual ProtocolVersion getVersion() const = 0; - // Include framing constant declarations - #include <AMQP_Constants.h> + // Include framing constant declarations + #include "AMQP_Constants.h" // Inner classes |
