summaryrefslogtreecommitdiff
path: root/cpp/lib/common/framing/ProtocolVersion.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-02-13 02:41:14 +0000
committerAlan Conway <aconway@apache.org>2007-02-13 02:41:14 +0000
commit9517deedff9691dbe3429b0b917dfd4208b0b1b8 (patch)
treef8868a2fbc63e92c770b401eeff2aee3a522697a /cpp/lib/common/framing/ProtocolVersion.h
parentd26ea3376f66f69486fe214c8a7a8b96a7605c99 (diff)
downloadqpid-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 'cpp/lib/common/framing/ProtocolVersion.h')
-rw-r--r--cpp/lib/common/framing/ProtocolVersion.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/cpp/lib/common/framing/ProtocolVersion.h b/cpp/lib/common/framing/ProtocolVersion.h
index 6aba87c6f5..aa526aa293 100644
--- a/cpp/lib/common/framing/ProtocolVersion.h
+++ b/cpp/lib/common/framing/ProtocolVersion.h
@@ -35,19 +35,19 @@ private:
u_int8_t minor_;
public:
- ProtocolVersion();
- ProtocolVersion(u_int8_t _major, u_int8_t _minor);
- ProtocolVersion(const ProtocolVersion& p);
- virtual ~ProtocolVersion();
-
- inline u_int8_t getMajor() const { return major_; }
- inline void setMajor(u_int8_t major) { major_ = major; }
- inline u_int8_t getMinor() const { return minor_; }
- inline void setMinor(u_int8_t minor) { minor_ = minor; }
- virtual bool equals(u_int8_t _major, u_int8_t _minor) const;
- virtual bool equals(const ProtocolVersion& p) const;
- virtual const std::string toString() const;
- ProtocolVersion operator=(const ProtocolVersion& p);
+ ProtocolVersion(u_int8_t _major=0, u_int8_t _minor=0)
+ : major_(_major), minor_(_minor) {}
+
+ u_int8_t getMajor() const { return major_; }
+ void setMajor(u_int8_t major) { major_ = major; }
+ u_int8_t getMinor() const { return minor_; }
+ void setMinor(u_int8_t minor) { minor_ = minor; }
+ const std::string toString() const;
+
+ ProtocolVersion& operator=(ProtocolVersion p);
+
+ bool operator==(ProtocolVersion p) const;
+ bool operator!=(ProtocolVersion p) const { return ! (*this == p); }
};
} // namespace framing