diff options
Diffstat (limited to 'qpid/cpp/src/qpid/amqp_0_10')
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/Connection.h | 4 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/Exception.h | 26 | ||||
-rw-r--r-- | qpid/cpp/src/qpid/amqp_0_10/Map.h | 22 |
3 files changed, 26 insertions, 26 deletions
diff --git a/qpid/cpp/src/qpid/amqp_0_10/Connection.h b/qpid/cpp/src/qpid/amqp_0_10/Connection.h index 995d824796..cbf0eefba8 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Connection.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Connection.h @@ -40,8 +40,8 @@ class ConnectionInputHandlerFactory; namespace amqp_0_10 { -class Connection : public sys::ConnectionCodec, - public sys::ConnectionOutputHandler +class QPID_BROKER_CLASS_EXTERN Connection : public sys::ConnectionCodec, + public sys::ConnectionOutputHandler { typedef std::deque<framing::AMQFrame> FrameQueue; diff --git a/qpid/cpp/src/qpid/amqp_0_10/Exception.h b/qpid/cpp/src/qpid/amqp_0_10/Exception.h index 6d526c1706..c417262c45 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Exception.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Exception.h @@ -10,9 +10,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -28,11 +28,11 @@ namespace qpid { namespace amqp_0_10 { -/** +/** * Raised when the connection is unexpectedly closed. Sessions with * non-0 timeout may be available for re-attachment on another connection. */ -struct ConnectionException : public qpid::Exception { +struct QPID_COMMON_CLASS_EXTERN ConnectionException : public qpid::Exception { // FIXME aconway 2008-04-04: Merge qpid::ConnectionException // into this when the old code is removed. typedef connection::CloseCode Code; @@ -45,21 +45,21 @@ struct ConnectionException : public qpid::Exception { * Raised when a session is unexpectedly detached for any reason, or * if an attempt is made to use a session that is not attached. */ -struct SessionException : public qpid::Exception { +struct QPID_COMMON_CLASS_EXTERN SessionException : public qpid::Exception { // FIXME aconway 2008-04-04: should not have a code at this level. // Leave in place till old preview code is gone. - SessionException(int /*code*/, const std::string& msg) : qpid::Exception(msg) {} + SessionException(int /*code*/, const std::string& msg) : qpid::Exception(msg) {} }; /** Raised when the state of a session has been destroyed */ -struct SessionDestroyedException : public SessionException { +struct QPID_COMMON_CLASS_EXTERN SessionDestroyedException : public SessionException { // FIXME aconway 2008-04-04: should not have a code at this level. // Leave in place till old preview code is gone. - SessionDestroyedException(int code, const std::string& msg) : SessionException(code, msg){} + SessionDestroyedException(int code, const std::string& msg) : SessionException(code, msg){} }; /** Raised when a session is destroyed due to an execution.exception */ -struct SessionAbortedException : public SessionDestroyedException { +struct QPID_COMMON_CLASS_EXTERN SessionAbortedException : public SessionDestroyedException { typedef execution::ErrorCode Code; SessionAbortedException(Code c, const std::string m) : SessionDestroyedException(c, m), code(c) {} @@ -70,7 +70,7 @@ struct SessionAbortedException : public SessionDestroyedException { * Raised when a session with 0 timeout is unexpectedly detached * and therefore expires and is destroyed. */ -struct SessionExpiredException : public SessionDestroyedException { +struct QPID_COMMON_CLASS_EXTERN SessionExpiredException : public SessionDestroyedException { typedef session::DetachCode Code; SessionExpiredException(Code c, const std::string m) : SessionDestroyedException(c, m), code(c) {} @@ -80,17 +80,17 @@ struct SessionExpiredException : public SessionDestroyedException { /** * Raised when a session with non-0 timeout is unexpectedly detached * or if an attempt is made to use a session that is not attached. - * + * * The session is not necessarily destroyed, it may be possible to * re-attach. */ -struct SessionDetachedException : public SessionException { +struct QPID_COMMON_CLASS_EXTERN SessionDetachedException : public SessionException { typedef session::DetachCode Code; SessionDetachedException(Code c, const std::string m) : SessionException(c, m), code(c) {} Code code; }; - + }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_EXCEPTION_H*/ diff --git a/qpid/cpp/src/qpid/amqp_0_10/Map.h b/qpid/cpp/src/qpid/amqp_0_10/Map.h index 4093b1a0aa..2980e58e26 100644 --- a/qpid/cpp/src/qpid/amqp_0_10/Map.h +++ b/qpid/cpp/src/qpid/amqp_0_10/Map.h @@ -10,9 +10,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on ang * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -38,9 +38,9 @@ namespace amqp_0_10 { class Map; -class MapValue { +class QPID_COMMON_CLASS_EXTERN MapValue { public: - struct BadTypeException : public Exception {}; + struct QPID_COMMON_CLASS_EXTERN BadTypeException : public Exception {}; template <class R> struct Visitor { typedef R result_type; }; @@ -56,7 +56,7 @@ class MapValue { template <class V> typename V::result_type apply_visitor(const V&); uint8_t getCode() const { return code; } - + bool operator==(const MapValue&) const; template <class S> void serialize(S& s) { s(code); s.split(*this); } @@ -67,7 +67,7 @@ class MapValue { DecodeVisitor<S> dv(blob, s); qpid::amqp_0_10::apply_visitor(dv, code); } - + private: // TODO aconway 2008-04-15: Estimate required size, we will get a @@ -85,7 +85,7 @@ class MapValue { Blob blob; }; -class Map : public std::map<Str8, MapValue> { +class QPID_COMMON_CLASS_EXTERN Map : public std::map<Str8, MapValue> { public: template <class S> void serialize(S& s) { s.split(*this); } template <class S> void encode(S& s) const; @@ -93,7 +93,7 @@ class Map : public std::map<Str8, MapValue> { void encode(Codec::Size& s) const { s.raw(0, contentSize() + 4/*size*/); } template <class S> void decode(S& s); - + private: uint32_t contentSize() const; }; @@ -122,7 +122,7 @@ template <class V> struct MapValue::VisitVisitor { return visitor(*reinterpret_cast<T*>(blob.get())); } }; - + template <class V> typename V::result_type MapValue::apply_visitor(V& v) { VisitVisitor<V> visitor(v, blob); return qpid::amqp_0_10::apply_visitor(visitor, code); @@ -137,13 +137,13 @@ template <class R> struct MapValue::GetVisitor { R* operator()(R& r) { return &r; } template <class T> R* operator()(T&) { return 0; } }; - + template <class D> struct MapValue::DecodeVisitor { typedef void result_type; MapValue::Blob& blob; D& decoder; DecodeVisitor(Blob& b, D& d) : blob(b), decoder(d) {} - + template <class T> void operator()(T*) { T t; decoder(t); |