summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/qpid')
-rw-r--r--qpid/cpp/src/qpid/DataDir.h4
-rw-r--r--qpid/cpp/src/qpid/DisableExceptionLogging.h2
-rw-r--r--qpid/cpp/src/qpid/Modules.h2
-rw-r--r--qpid/cpp/src/qpid/Plugin.h20
-rw-r--r--qpid/cpp/src/qpid/RefCountedBuffer.h3
-rw-r--r--qpid/cpp/src/qpid/SaslFactory.h6
-rw-r--r--qpid/cpp/src/qpid/SessionState.h16
-rw-r--r--qpid/cpp/src/qpid/amqp_0_10/Connection.h4
-rw-r--r--qpid/cpp/src/qpid/amqp_0_10/Exception.h26
-rw-r--r--qpid/cpp/src/qpid/amqp_0_10/Map.h22
-rw-r--r--qpid/cpp/src/qpid/assert.h10
-rw-r--r--qpid/cpp/src/qpid/broker/Bridge.h11
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.cpp7
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.h7
-rw-r--r--qpid/cpp/src/qpid/broker/BrokerImportExport.h25
-rw-r--r--qpid/cpp/src/qpid/broker/Connection.cpp1
-rw-r--r--qpid/cpp/src/qpid/broker/Connection.h3
-rw-r--r--qpid/cpp/src/qpid/broker/ConnectionFactory.h9
-rw-r--r--qpid/cpp/src/qpid/broker/Daemon.h7
-rw-r--r--qpid/cpp/src/qpid/broker/DeliveryRecord.h16
-rw-r--r--qpid/cpp/src/qpid/broker/DirectExchange.h14
-rw-r--r--qpid/cpp/src/qpid/broker/DtxBuffer.h8
-rw-r--r--qpid/cpp/src/qpid/broker/DtxTimeout.h9
-rw-r--r--qpid/cpp/src/qpid/broker/DtxWorkRecord.h6
-rw-r--r--qpid/cpp/src/qpid/broker/ExchangeRegistry.h12
-rw-r--r--qpid/cpp/src/qpid/broker/Fairshare.h7
-rw-r--r--qpid/cpp/src/qpid/broker/FanOutExchange.h14
-rw-r--r--qpid/cpp/src/qpid/broker/HeadersExchange.h18
-rw-r--r--qpid/cpp/src/qpid/broker/Link.h4
-rw-r--r--qpid/cpp/src/qpid/broker/LinkRegistry.h9
-rw-r--r--qpid/cpp/src/qpid/broker/Message.h24
-rw-r--r--qpid/cpp/src/qpid/broker/PersistableMessage.h14
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.h49
-rw-r--r--qpid/cpp/src/qpid/broker/QueueCleaner.h6
-rw-r--r--qpid/cpp/src/qpid/broker/QueueEvents.h8
-rw-r--r--qpid/cpp/src/qpid/broker/QueueFlowLimit.h7
-rw-r--r--qpid/cpp/src/qpid/broker/QueueListeners.h13
-rw-r--r--qpid/cpp/src/qpid/broker/QueuePolicy.h14
-rw-r--r--qpid/cpp/src/qpid/broker/QueueRegistry.h14
-rw-r--r--qpid/cpp/src/qpid/broker/RecoveredDequeue.h7
-rw-r--r--qpid/cpp/src/qpid/broker/RecoveredEnqueue.h9
-rw-r--r--qpid/cpp/src/qpid/broker/RetryList.h8
-rw-r--r--qpid/cpp/src/qpid/broker/SecureConnection.h7
-rw-r--r--qpid/cpp/src/qpid/broker/SemanticState.h25
-rw-r--r--qpid/cpp/src/qpid/broker/SignalHandler.h8
-rw-r--r--qpid/cpp/src/qpid/broker/TopicExchange.h6
-rw-r--r--qpid/cpp/src/qpid/broker/TxAccept.h13
-rw-r--r--qpid/cpp/src/qpid/broker/TxBuffer.h20
-rw-r--r--qpid/cpp/src/qpid/client/Bounds.h9
-rw-r--r--qpid/cpp/src/qpid/client/ConnectionImpl.h17
-rw-r--r--qpid/cpp/src/qpid/client/Connector.h3
-rw-r--r--qpid/cpp/src/qpid/client/Demux.h8
-rw-r--r--qpid/cpp/src/qpid/client/Dispatcher.h6
-rw-r--r--qpid/cpp/src/qpid/client/SessionImpl.h51
-rw-r--r--qpid/cpp/src/qpid/client/SubscriptionImpl.h8
-rw-r--r--qpid/cpp/src/qpid/cluster/Cpg.cpp6
-rw-r--r--qpid/cpp/src/qpid/cluster/Cpg.h40
-rw-r--r--qpid/cpp/src/qpid/framing/AMQMethodBody.h12
-rw-r--r--qpid/cpp/src/qpid/framing/AccumulatedAck.h8
-rw-r--r--qpid/cpp/src/qpid/framing/FrameDecoder.h10
-rw-r--r--qpid/cpp/src/qpid/framing/FrameSet.h14
-rw-r--r--qpid/cpp/src/qpid/framing/ProtocolInitiation.h12
-rw-r--r--qpid/cpp/src/qpid/framing/Proxy.h2
-rw-r--r--qpid/cpp/src/qpid/framing/SendContent.h6
-rw-r--r--qpid/cpp/src/qpid/framing/SequenceNumberSet.h14
-rw-r--r--qpid/cpp/src/qpid/log/posix/SinkOptions.h2
-rw-r--r--qpid/cpp/src/qpid/management/ManagementAgent.h6
-rw-r--r--qpid/cpp/src/qpid/messaging/AddressParser.h6
-rw-r--r--qpid/cpp/src/qpid/sys/AsynchIO.h18
-rw-r--r--qpid/cpp/src/qpid/sys/AsynchIOHandler.h2
-rw-r--r--qpid/cpp/src/qpid/sys/ClusterSafe.h10
-rw-r--r--qpid/cpp/src/qpid/sys/DispatchHandle.h14
-rw-r--r--qpid/cpp/src/qpid/sys/Dispatcher.h8
-rw-r--r--qpid/cpp/src/qpid/sys/LockFile.h6
-rwxr-xr-xqpid/cpp/src/qpid/sys/PipeHandle.h14
-rw-r--r--qpid/cpp/src/qpid/sys/PollableCondition.h6
-rw-r--r--qpid/cpp/src/qpid/sys/Poller.h20
-rw-r--r--qpid/cpp/src/qpid/sys/Shlib.h14
-rw-r--r--qpid/cpp/src/qpid/sys/SocketAddress.h8
-rw-r--r--qpid/cpp/src/qpid/sys/Timer.h8
-rw-r--r--qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.h7
-rw-r--r--qpid/cpp/src/qpid/sys/posix/Fork.h3
-rw-r--r--qpid/cpp/src/qpid/sys/posix/PidFile.h4
-rw-r--r--qpid/cpp/src/qpid/sys/posix/Shlib.cpp2
-rw-r--r--qpid/cpp/src/qpid/sys/rdma/ImportExport.h35
-rw-r--r--qpid/cpp/src/qpid/sys/rdma/RdmaIO.h20
-rw-r--r--qpid/cpp/src/qpid/sys/rdma/rdma_wrap.h13
-rw-r--r--qpid/cpp/src/qpid/sys/ssl/SslCommonImportExport.h35
-rw-r--r--qpid/cpp/src/qpid/sys/ssl/SslIo.h19
89 files changed, 578 insertions, 482 deletions
diff --git a/qpid/cpp/src/qpid/DataDir.h b/qpid/cpp/src/qpid/DataDir.h
index 828299f3ba..a653201828 100644
--- a/qpid/cpp/src/qpid/DataDir.h
+++ b/qpid/cpp/src/qpid/DataDir.h
@@ -34,7 +34,7 @@ namespace qpid {
/**
* DataDir class.
*/
-class DataDir
+class QPID_COMMON_CLASS_EXTERN DataDir
{
const bool enabled;
const std::string dirPath;
@@ -48,7 +48,7 @@ class DataDir
bool isEnabled() { return enabled; }
const std::string& getPath() { return dirPath; }
};
-
+
} // namespace qpid
#endif /*!QPID_DATADIR_H*/
diff --git a/qpid/cpp/src/qpid/DisableExceptionLogging.h b/qpid/cpp/src/qpid/DisableExceptionLogging.h
index 04a9240513..48fcb08ce0 100644
--- a/qpid/cpp/src/qpid/DisableExceptionLogging.h
+++ b/qpid/cpp/src/qpid/DisableExceptionLogging.h
@@ -29,7 +29,7 @@ namespace qpid {
* Temporarily disable logging in qpid::Exception constructor.
* Used by log::Logger to avoid logging exceptions during Logger construction.
*/
-struct DisableExceptionLogging
+struct QPID_COMMON_CLASS_EXTERN DisableExceptionLogging
{
QPID_COMMON_EXTERN DisableExceptionLogging();
QPID_COMMON_EXTERN ~DisableExceptionLogging();
diff --git a/qpid/cpp/src/qpid/Modules.h b/qpid/cpp/src/qpid/Modules.h
index 159dd156c1..38011cd496 100644
--- a/qpid/cpp/src/qpid/Modules.h
+++ b/qpid/cpp/src/qpid/Modules.h
@@ -29,7 +29,7 @@
namespace qpid {
-struct ModuleOptions : public qpid::Options {
+struct QPID_COMMON_CLASS_EXTERN ModuleOptions : public qpid::Options {
std::string loadDir;
std::vector<std::string> load;
bool noLoad;
diff --git a/qpid/cpp/src/qpid/Plugin.h b/qpid/cpp/src/qpid/Plugin.h
index 4e057872b9..a0beba0d92 100644
--- a/qpid/cpp/src/qpid/Plugin.h
+++ b/qpid/cpp/src/qpid/Plugin.h
@@ -34,18 +34,18 @@ struct Options;
/**
* Plug-in base class.
*/
-class Plugin : private boost::noncopyable {
+class QPID_COMMON_CLASS_EXTERN Plugin : private boost::noncopyable {
public:
typedef std::vector<Plugin*> Plugins;
/** Default value returned by initOrder() */
static const int DEFAULT_INIT_ORDER=1000;
-
+
/**
* Base interface for targets that can receive plug-ins.
* Also allows plug-ins to attach a a function to be called
* when the target is 'finalized'.
*/
- class Target : private boost::noncopyable
+ class QPID_COMMON_CLASS_EXTERN Target : private boost::noncopyable
{
public:
/** Calls finalize() if not already called. */
@@ -63,19 +63,19 @@ class Plugin : private boost::noncopyable {
/**
* Constructor registers the plug-in to appear in getPlugins().
- *
+ *
* A concrete Plugin is instantiated as a global or static
- * member variable in a library so it is registered during
+ * member variable in a library so it is registered during
* initialization when the library is loaded.
*/
QPID_COMMON_EXTERN Plugin();
-
+
QPID_COMMON_EXTERN virtual ~Plugin();
/**
* Configuration options for the plugin.
* Then will be updated during option parsing by the host program.
- *
+ *
* @return An options group or 0 for no options. Default returns 0.
* Plugin retains ownership of return value.
*/
@@ -94,7 +94,7 @@ class Plugin : private boost::noncopyable {
/**
* Initialize Plugin functionality on a Target. Called after
* initializing the target.
- *
+ *
* Plugins should ignore targets they don't recognize.
*
* Called after the target is fully initialized.
@@ -108,7 +108,7 @@ class Plugin : private boost::noncopyable {
* a lower/higher value than DEFAULT_INIT_ORDER.
*/
QPID_COMMON_EXTERN virtual int initOrder() const;
-
+
/** List of registered Plugin objects.
* Caller must not delete plugin pointers.
*/
@@ -123,7 +123,7 @@ class Plugin : private boost::noncopyable {
/** For each registered plugin, add plugin.getOptions() to opts. */
QPID_COMMON_EXTERN static void addOptions(Options& opts);
};
-
+
} // namespace qpid
#endif /*!QPID_PLUGIN_H*/
diff --git a/qpid/cpp/src/qpid/RefCountedBuffer.h b/qpid/cpp/src/qpid/RefCountedBuffer.h
index f0ea86130b..8c23a3ae93 100644
--- a/qpid/cpp/src/qpid/RefCountedBuffer.h
+++ b/qpid/cpp/src/qpid/RefCountedBuffer.h
@@ -24,13 +24,14 @@
#include <qpid/RefCounted.h>
#include <qpid/BufferRef.h>
+#include "qpid/CommonImportExport.h"
namespace qpid {
/**
* Reference-counted byte buffer. No alignment guarantees.
*/
-class RefCountedBuffer : public RefCounted {
+class QPID_COMMON_CLASS_EXTERN RefCountedBuffer : public RefCounted {
public:
/** Create a reference counted buffer of size n */
static BufferRef create(size_t n);
diff --git a/qpid/cpp/src/qpid/SaslFactory.h b/qpid/cpp/src/qpid/SaslFactory.h
index 8554597147..8b15f62ba0 100644
--- a/qpid/cpp/src/qpid/SaslFactory.h
+++ b/qpid/cpp/src/qpid/SaslFactory.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
@@ -31,7 +31,7 @@ namespace qpid {
* Factory for instances of the Sasl interface through which Sasl
* support is provided to a ConnectionHandler.
*/
-class SaslFactory
+class QPID_COMMON_CLASS_EXTERN SaslFactory
{
public:
QPID_COMMON_EXTERN std::auto_ptr<Sasl> create(const std::string & userName, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf, bool allowInteraction=true );
diff --git a/qpid/cpp/src/qpid/SessionState.h b/qpid/cpp/src/qpid/SessionState.h
index 02853b1143..4f1d504450 100644
--- a/qpid/cpp/src/qpid/SessionState.h
+++ b/qpid/cpp/src/qpid/SessionState.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
@@ -38,7 +38,7 @@ using framing::SequenceNumber;
using framing::SequenceSet;
/** A point in the session. Points to command id + offset */
-struct SessionPoint : boost::totally_ordered1<SessionPoint> {
+struct QPID_COMMON_CLASS_EXTERN SessionPoint : boost::totally_ordered1<SessionPoint> {
QPID_COMMON_EXTERN SessionPoint(SequenceNumber command = 0, uint64_t offset = 0);
SequenceNumber command;
@@ -59,7 +59,7 @@ QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SessionPoint&);
*
* We only issue/use contiguous confirmations, out-of-order confirmation
* is ignored. Out of order completion is fully supported.
- *
+ *
* Raises NotImplemented if the command point is set greater than the
* max currently received command data, either explicitly via
* session.command-point or implicitly via session.gap.
@@ -71,21 +71,21 @@ QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SessionPoint&);
* could be extended to support partial replay without
* source-incompatbile API changes.
*/
-class SessionState {
+class QPID_COMMON_CLASS_EXTERN SessionState {
typedef std::vector<framing::AMQFrame> ReplayList;
public:
typedef boost::iterator_range<ReplayList::iterator> ReplayRange;
- struct Configuration {
+ struct QPID_COMMON_CLASS_EXTERN Configuration {
QPID_COMMON_EXTERN Configuration(size_t flush=1024*1024, size_t hard=0);
size_t replayFlushLimit; // Flush when the replay list >= N bytes. 0 disables.
size_t replayHardLimit; // Kill session if replay list > N bytes. 0 disables.
};
QPID_COMMON_EXTERN SessionState(const SessionId& =SessionId(), const Configuration& =Configuration());
-
+
QPID_COMMON_EXTERN virtual ~SessionState();
bool hasState() const;
@@ -186,7 +186,7 @@ class SessionState {
* So called 'push' bridges work by faking a subscribe request
* (and the accompanying flows etc) to the local broker to initiate
* the outflow of messages for the bridge.
- *
+ *
* As the peer doesn't send these it cannot include them in its
* session state. To keep the session state on either side of the
* bridge in sync, this hack allows the tracking of state for
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);
diff --git a/qpid/cpp/src/qpid/assert.h b/qpid/cpp/src/qpid/assert.h
index 49e7c5355d..b7bfea0995 100644
--- a/qpid/cpp/src/qpid/assert.h
+++ b/qpid/cpp/src/qpid/assert.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
@@ -23,15 +23,15 @@
*/
#include <boost/current_function.hpp>
-
+#include "qpid/CommonImportExport.h"
/**
- * Abort if !expr in debug mode, throw an exception if NDEBUG is set.
+ * Abort if !expr in debug mode, throw an exception if NDEBUG is set.
*/
#define QPID_ASSERT(expr) ((expr) ? static_cast<void>(0) : ::qpid::assert_fail(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
namespace qpid {
-void assert_fail(char const * expr, char const * function, char const * file, long line);
+QPID_COMMON_EXTERN void assert_fail(char const * expr, char const * function, char const * file, long line);
} // namespace qpid
diff --git a/qpid/cpp/src/qpid/broker/Bridge.h b/qpid/cpp/src/qpid/broker/Bridge.h
index a846254c57..ec9e534f5e 100644
--- a/qpid/cpp/src/qpid/broker/Bridge.h
+++ b/qpid/cpp/src/qpid/broker/Bridge.h
@@ -7,9 +7,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
@@ -31,6 +31,7 @@
#include "qpid/broker/Exchange.h"
#include "qmf/org/apache/qpid/broker/ArgsLinkBridge.h"
#include "qmf/org/apache/qpid/broker/Bridge.h"
+#include "qpid/broker/BrokerImportExport.h"
#include <boost/function.hpp>
#include <memory>
@@ -43,7 +44,9 @@ class ConnectionState;
class Link;
class LinkRegistry;
-class Bridge : public PersistableConfig, public management::Manageable, public Exchange::DynamicBridge
+class QPID_BROKER_CLASS_EXTERN Bridge :
+ public PersistableConfig, public management::Manageable,
+ public Exchange::DynamicBridge
{
public:
typedef boost::shared_ptr<Bridge> shared_ptr;
@@ -68,7 +71,7 @@ public:
void setPersistenceId(uint64_t id) const;
uint64_t getPersistenceId() const { return persistenceId; }
uint32_t encodedSize() const;
- void encode(framing::Buffer& buffer) const;
+ void encode(framing::Buffer& buffer) const;
const std::string& getName() const;
static Bridge::shared_ptr decode(LinkRegistry& links, framing::Buffer& buffer);
diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp
index 240766c443..8bcfd45312 100644
--- a/qpid/cpp/src/qpid/broker/Broker.cpp
+++ b/qpid/cpp/src/qpid/broker/Broker.cpp
@@ -20,6 +20,7 @@
*/
#include "qpid/broker/Broker.h"
+#include "qpid/broker/BrokerImportExport.h"
#include "qpid/broker/ConnectionState.h"
#include "qpid/broker/DirectExchange.h"
#include "qpid/broker/FanOutExchange.h"
@@ -508,7 +509,7 @@ const std::string _TRUE("true");
const std::string _FALSE("false");
}
-struct InvalidBindingIdentifier : public qpid::Exception
+struct QPID_BROKER_CLASS_EXTERN InvalidBindingIdentifier : public qpid::Exception
{
InvalidBindingIdentifier(const std::string& name) : qpid::Exception(name) {}
std::string getPrefix() const { return "invalid binding"; }
@@ -543,13 +544,13 @@ struct BindingIdentifier
}
};
-struct ObjectAlreadyExists : public qpid::Exception
+struct QPID_BROKER_CLASS_EXTERN ObjectAlreadyExists : public qpid::Exception
{
ObjectAlreadyExists(const std::string& name) : qpid::Exception(name) {}
std::string getPrefix() const { return "object already exists"; }
};
-struct UnknownObjectType : public qpid::Exception
+struct QPID_BROKER_CLASS_EXTERN UnknownObjectType : public qpid::Exception
{
UnknownObjectType(const std::string& type) : qpid::Exception(type) {}
std::string getPrefix() const { return "unknown object type"; }
diff --git a/qpid/cpp/src/qpid/broker/Broker.h b/qpid/cpp/src/qpid/broker/Broker.h
index 6d585bf614..eb83f9fa91 100644
--- a/qpid/cpp/src/qpid/broker/Broker.h
+++ b/qpid/cpp/src/qpid/broker/Broker.h
@@ -84,9 +84,10 @@ struct NoSuchTransportException : qpid::Exception
/**
* A broker instance.
*/
-class Broker : public sys::Runnable, public Plugin::Target,
- public management::Manageable,
- public RefCounted
+class QPID_BROKER_CLASS_EXTERN Broker :
+ public sys::Runnable, public Plugin::Target,
+ public management::Manageable,
+ public RefCounted
{
public:
diff --git a/qpid/cpp/src/qpid/broker/BrokerImportExport.h b/qpid/cpp/src/qpid/broker/BrokerImportExport.h
index ee05788063..a767dadb87 100644
--- a/qpid/cpp/src/qpid/broker/BrokerImportExport.h
+++ b/qpid/cpp/src/qpid/broker/BrokerImportExport.h
@@ -20,23 +20,16 @@
* under the License.
*/
-#if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
-# if defined(BROKER_EXPORT) || defined (qpidbroker_EXPORTS)
-# define QPID_BROKER_EXTERN __declspec(dllexport)
-# else
-# define QPID_BROKER_EXTERN __declspec(dllimport)
-# endif
-# ifdef _MSC_VER
-# define QPID_BROKER_CLASS_EXTERN
-# define QPID_BROKER_INLINE_EXTERN QPID_BROKER_EXTERN
-# else
-# define QPID_BROKER_CLASS_EXTERN QPID_BROKER_EXTERN
-# define QPID_BROKER_INLINE_EXTERN
-# endif
+#include "qpid/ImportExport.h"
+
+#if defined(BROKER_EXPORT) || defined (qpidbroker_EXPORTS)
+# define QPID_BROKER_EXTERN QPID_EXPORT
+# define QPID_BROKER_CLASS_EXTERN QPID_CLASS_EXPORT
+# define QPID_BROKER_INLINE_EXTERN QPID_INLINE_EXPORT
#else
-# define QPID_BROKER_EXTERN
-# define QPID_BROKER_CLASS_EXTERN
-# define QPID_BROKER_INLINE_EXTERN
+# define QPID_BROKER_EXTERN QPID_IMPORT
+# define QPID_BROKER_CLASS_EXTERN QPID_CLASS_IMPORT
+# define QPID_BROKER_INLINE_EXTERN QPID_INLINE_IMPORT
#endif
#endif
diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp
index c07e63e68c..33c8b9f33e 100644
--- a/qpid/cpp/src/qpid/broker/Connection.cpp
+++ b/qpid/cpp/src/qpid/broker/Connection.cpp
@@ -18,6 +18,7 @@
* under the License.
*
*/
+
#include "qpid/broker/Connection.h"
#include "qpid/broker/SessionOutputException.h"
#include "qpid/broker/SessionState.h"
diff --git a/qpid/cpp/src/qpid/broker/Connection.h b/qpid/cpp/src/qpid/broker/Connection.h
index 8f1aa701ef..814457420e 100644
--- a/qpid/cpp/src/qpid/broker/Connection.h
+++ b/qpid/cpp/src/qpid/broker/Connection.h
@@ -29,6 +29,7 @@
#include <boost/ptr_container/ptr_map.hpp>
+#include "qpid/broker/BrokerImportExport.h"
#include "qpid/broker/ConnectionHandler.h"
#include "qpid/broker/ConnectionState.h"
#include "qpid/broker/SessionHandler.h"
@@ -63,7 +64,7 @@ class LinkRegistry;
class SecureConnection;
struct ConnectionTimeoutTask;
-class Connection : public sys::ConnectionInputHandler,
+class QPID_BROKER_CLASS_EXTERN Connection : public sys::ConnectionInputHandler,
public ConnectionState,
public RefCounted
{
diff --git a/qpid/cpp/src/qpid/broker/ConnectionFactory.h b/qpid/cpp/src/qpid/broker/ConnectionFactory.h
index 7c1a9a08e1..2a18bb0041 100644
--- a/qpid/cpp/src/qpid/broker/ConnectionFactory.h
+++ b/qpid/cpp/src/qpid/broker/ConnectionFactory.h
@@ -7,9 +7,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
@@ -22,16 +22,17 @@
#define _ConnectionFactory_
#include "qpid/sys/ConnectionCodec.h"
+#include "qpid/broker/BrokerImportExport.h"
namespace qpid {
namespace broker {
class Broker;
-class ConnectionFactory : public sys::ConnectionCodec::Factory
+class QPID_BROKER_CLASS_EXTERN ConnectionFactory : public sys::ConnectionCodec::Factory
{
public:
ConnectionFactory(Broker& b);
-
+
virtual ~ConnectionFactory();
sys::ConnectionCodec*
diff --git a/qpid/cpp/src/qpid/broker/Daemon.h b/qpid/cpp/src/qpid/broker/Daemon.h
index a9cd98bce2..20ead1e979 100644
--- a/qpid/cpp/src/qpid/broker/Daemon.h
+++ b/qpid/cpp/src/qpid/broker/Daemon.h
@@ -19,6 +19,7 @@
*
*/
+#include "qpid/broker/BrokerImportExport.h"
#include "qpid/sys/IntegerTypes.h"
#include <boost/scoped_ptr.hpp>
#include <boost/function.hpp>
@@ -33,11 +34,11 @@ namespace broker {
* Tools for forking and managing a daemon process.
* NB: Only one Daemon instance is allowed in a process.
*/
-class Daemon : private boost::noncopyable
+class QPID_BROKER_CLASS_EXTERN Daemon : private boost::noncopyable
{
public:
/** Check daemon is running on port, throw exception if not */
- static pid_t getPid(std::string pidDir, uint16_t port);
+ QPID_BROKER_EXTERN static pid_t getPid(std::string pidDir, uint16_t port);
Daemon(std::string pidDir);
@@ -68,7 +69,7 @@ class Daemon : private boost::noncopyable
*@param port returned by parent call to wait().
*/
void ready(uint16_t port);
-
+
private:
static std::string pidFile(std::string pidDir, uint16_t port);
diff --git a/qpid/cpp/src/qpid/broker/DeliveryRecord.h b/qpid/cpp/src/qpid/broker/DeliveryRecord.h
index d388ba94be..cb986df92c 100644
--- a/qpid/cpp/src/qpid/broker/DeliveryRecord.h
+++ b/qpid/cpp/src/qpid/broker/DeliveryRecord.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
@@ -42,7 +42,7 @@ struct AckRange;
/**
* Record of a delivery for which an ack is outstanding.
*/
-class DeliveryRecord
+class QPID_BROKER_CLASS_EXTERN DeliveryRecord
{
QueuedMessage msg;
mutable boost::shared_ptr<Queue> queue;
@@ -66,16 +66,16 @@ class DeliveryRecord
public:
QPID_BROKER_EXTERN DeliveryRecord(const QueuedMessage& msg,
- const boost::shared_ptr<Queue>& queue,
+ const boost::shared_ptr<Queue>& queue,
const std::string& tag,
bool acquired,
bool accepted,
bool windowing,
uint32_t credit=0 // Only used if msg is empty.
);
-
+
bool coveredBy(const framing::SequenceSet* const range) const { return range->contains(id); }
-
+
void dequeue(TransactionContext* ctxt = 0) const;
void requeue() const;
void release(bool setRedelivered);
@@ -95,7 +95,7 @@ class DeliveryRecord
bool isAccepted() const { return !acceptExpected; }
bool isEnded() const { return ended; }
bool isWindowing() const { return windowing; }
-
+
uint32_t getCredit() const;
const std::string& getTag() const { return tag; }
@@ -132,7 +132,7 @@ typedef DeliveryRecord::DeliveryRecords DeliveryRecords;
struct AckRange
{
DeliveryRecords::iterator start;
- DeliveryRecords::iterator end;
+ DeliveryRecords::iterator end;
AckRange(DeliveryRecords::iterator _start, DeliveryRecords::iterator _end) : start(_start), end(_end) {}
};
diff --git a/qpid/cpp/src/qpid/broker/DirectExchange.h b/qpid/cpp/src/qpid/broker/DirectExchange.h
index a6f9cf91af..bb85a85b7a 100644
--- a/qpid/cpp/src/qpid/broker/DirectExchange.h
+++ b/qpid/cpp/src/qpid/broker/DirectExchange.h
@@ -7,9 +7,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
@@ -31,7 +31,7 @@
namespace qpid {
namespace broker {
-class DirectExchange : public virtual Exchange {
+class QPID_BROKER_CLASS_EXTERN DirectExchange : public virtual Exchange {
typedef qpid::sys::CopyOnWriteArray<Binding::shared_ptr> Queues;
struct BoundKey {
Queues queues;
@@ -43,16 +43,16 @@ class DirectExchange : public virtual Exchange {
public:
static const std::string typeName;
-
+
QPID_BROKER_EXTERN DirectExchange(const std::string& name,
management::Manageable* parent = 0, Broker* broker = 0);
QPID_BROKER_EXTERN DirectExchange(const std::string& _name,
- bool _durable,
+ bool _durable,
const qpid::framing::FieldTable& _args,
management::Manageable* parent = 0, Broker* broker = 0);
- virtual std::string getType() const { return typeName; }
-
+ virtual std::string getType() const { return typeName; }
+
QPID_BROKER_EXTERN virtual bool bind(boost::shared_ptr<Queue> queue,
const std::string& routingKey,
const qpid::framing::FieldTable* args);
diff --git a/qpid/cpp/src/qpid/broker/DtxBuffer.h b/qpid/cpp/src/qpid/broker/DtxBuffer.h
index 1511cb032f..d31b36083a 100644
--- a/qpid/cpp/src/qpid/broker/DtxBuffer.h
+++ b/qpid/cpp/src/qpid/broker/DtxBuffer.h
@@ -7,9 +7,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
@@ -27,11 +27,11 @@
namespace qpid {
namespace broker {
- class DtxBuffer : public TxBuffer{
+ class QPID_BROKER_CLASS_EXTERN DtxBuffer : public TxBuffer{
sys::Mutex lock;
const std::string xid;
bool ended;
- bool suspended;
+ bool suspended;
bool failed;
bool expired;
diff --git a/qpid/cpp/src/qpid/broker/DtxTimeout.h b/qpid/cpp/src/qpid/broker/DtxTimeout.h
index 680a210e4f..48ac64a629 100644
--- a/qpid/cpp/src/qpid/broker/DtxTimeout.h
+++ b/qpid/cpp/src/qpid/broker/DtxTimeout.h
@@ -7,9 +7,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
@@ -23,13 +23,14 @@
#include "qpid/Exception.h"
#include "qpid/sys/Timer.h"
+#include "qpid/broker/BrokerImportExport.h"
namespace qpid {
namespace broker {
class DtxManager;
-struct DtxTimeoutException : public Exception {};
+struct QPID_BROKER_CLASS_EXTERN DtxTimeoutException : public Exception {};
struct DtxTimeout : public sys::TimerTask
{
@@ -37,7 +38,7 @@ struct DtxTimeout : public sys::TimerTask
DtxManager& mgr;
const std::string xid;
- DtxTimeout(uint32_t timeout, DtxManager& mgr, const std::string& xid);
+ DtxTimeout(uint32_t timeout, DtxManager& mgr, const std::string& xid);
void fire();
};
diff --git a/qpid/cpp/src/qpid/broker/DtxWorkRecord.h b/qpid/cpp/src/qpid/broker/DtxWorkRecord.h
index aec2d2aed4..6db14be449 100644
--- a/qpid/cpp/src/qpid/broker/DtxWorkRecord.h
+++ b/qpid/cpp/src/qpid/broker/DtxWorkRecord.h
@@ -7,9 +7,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
@@ -43,7 +43,7 @@ namespace broker {
* across potentially multiple channels. Identified by a xid. Allows
* that work to be prepared, committed and rolled-back.
*/
-class DtxWorkRecord
+class QPID_BROKER_CLASS_EXTERN DtxWorkRecord
{
typedef std::vector<DtxBuffer::shared_ptr> Work;
diff --git a/qpid/cpp/src/qpid/broker/ExchangeRegistry.h b/qpid/cpp/src/qpid/broker/ExchangeRegistry.h
index 2b75a8f3cf..3b8cb2d7e9 100644
--- a/qpid/cpp/src/qpid/broker/ExchangeRegistry.h
+++ b/qpid/cpp/src/qpid/broker/ExchangeRegistry.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
@@ -40,9 +40,9 @@ namespace broker {
struct UnknownExchangeTypeException{};
-class ExchangeRegistry{
+class QPID_BROKER_CLASS_EXTERN ExchangeRegistry{
public:
- typedef boost::function5<Exchange::shared_ptr, const std::string&,
+ typedef boost::function5<Exchange::shared_ptr, const std::string&,
bool, const qpid::framing::FieldTable&, qpid::management::Manageable*, qpid::broker::Broker*> FactoryFunction;
ExchangeRegistry (Broker* b = 0) : parent(0), broker(b) {}
@@ -50,7 +50,7 @@ class ExchangeRegistry{
(const std::string& name, const std::string& type);
QPID_BROKER_EXTERN std::pair<Exchange::shared_ptr, bool> declare
(const std::string& name,
- const std::string& type,
+ const std::string& type,
bool durable,
const qpid::framing::FieldTable& args = framing::FieldTable());
QPID_BROKER_EXTERN void destroy(const std::string& name);
@@ -75,7 +75,7 @@ class ExchangeRegistry{
for (ExchangeMap::const_iterator i = exchanges.begin(); i != exchanges.end(); ++i)
f(i->second);
}
-
+
private:
typedef std::map<std::string, Exchange::shared_ptr> ExchangeMap;
typedef std::map<std::string, FactoryFunction > FunctionMap;
diff --git a/qpid/cpp/src/qpid/broker/Fairshare.h b/qpid/cpp/src/qpid/broker/Fairshare.h
index 1b25721e0c..31a9353357 100644
--- a/qpid/cpp/src/qpid/broker/Fairshare.h
+++ b/qpid/cpp/src/qpid/broker/Fairshare.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
@@ -22,6 +22,7 @@
*
*/
#include "qpid/broker/PriorityQueue.h"
+#include "qpid/broker/BrokerImportExport.h"
namespace qpid {
namespace framing {
@@ -34,7 +35,7 @@ namespace broker {
* from each priority level that are dispatched before allowing
* dispatch from the next level.
*/
-class Fairshare : public PriorityQueue
+class QPID_BROKER_CLASS_EXTERN Fairshare : public PriorityQueue
{
public:
Fairshare(size_t levels, uint limit);
diff --git a/qpid/cpp/src/qpid/broker/FanOutExchange.h b/qpid/cpp/src/qpid/broker/FanOutExchange.h
index 1a7d486796..4d96e789d9 100644
--- a/qpid/cpp/src/qpid/broker/FanOutExchange.h
+++ b/qpid/cpp/src/qpid/broker/FanOutExchange.h
@@ -7,9 +7,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
@@ -32,22 +32,22 @@
namespace qpid {
namespace broker {
-class FanOutExchange : public virtual Exchange {
+class QPID_BROKER_CLASS_EXTERN FanOutExchange : public virtual Exchange {
typedef qpid::sys::CopyOnWriteArray<Binding::shared_ptr> BindingsArray;
BindingsArray bindings;
FedBinding fedBinding;
public:
static const std::string typeName;
-
+
QPID_BROKER_EXTERN FanOutExchange(const std::string& name,
management::Manageable* parent = 0, Broker* broker = 0);
QPID_BROKER_EXTERN FanOutExchange(const std::string& _name,
- bool _durable,
+ bool _durable,
const qpid::framing::FieldTable& _args,
management::Manageable* parent = 0, Broker* broker = 0);
- virtual std::string getType() const { return typeName; }
-
+ virtual std::string getType() const { return typeName; }
+
QPID_BROKER_EXTERN virtual bool bind(Queue::shared_ptr queue,
const std::string& routingKey,
const qpid::framing::FieldTable* args);
diff --git a/qpid/cpp/src/qpid/broker/HeadersExchange.h b/qpid/cpp/src/qpid/broker/HeadersExchange.h
index 3b939d6851..08ac549395 100644
--- a/qpid/cpp/src/qpid/broker/HeadersExchange.h
+++ b/qpid/cpp/src/qpid/broker/HeadersExchange.h
@@ -7,9 +7,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
@@ -33,7 +33,7 @@ namespace qpid {
namespace broker {
-class HeadersExchange : public virtual Exchange {
+class QPID_BROKER_CLASS_EXTERN HeadersExchange : public virtual Exchange {
struct BoundKey
{
@@ -44,12 +44,12 @@ class HeadersExchange : public virtual Exchange {
struct MatchArgs
{
- const Queue::shared_ptr queue;
+ const Queue::shared_ptr queue;
const qpid::framing::FieldTable* args;
MatchArgs(Queue::shared_ptr q, const qpid::framing::FieldTable* a);
bool operator()(BoundKey & bk);
};
-
+
struct MatchKey
{
const Queue::shared_ptr queue;
@@ -86,12 +86,12 @@ class HeadersExchange : public virtual Exchange {
QPID_BROKER_EXTERN HeadersExchange(const std::string& name,
management::Manageable* parent = 0, Broker* broker = 0);
QPID_BROKER_EXTERN HeadersExchange(const std::string& _name,
- bool _durable,
+ bool _durable,
const qpid::framing::FieldTable& _args,
management::Manageable* parent = 0, Broker* broker = 0);
-
- virtual std::string getType() const { return typeName; }
-
+
+ virtual std::string getType() const { return typeName; }
+
QPID_BROKER_EXTERN virtual bool bind(Queue::shared_ptr queue,
const std::string& routingKey,
const qpid::framing::FieldTable* args);
diff --git a/qpid/cpp/src/qpid/broker/Link.h b/qpid/cpp/src/qpid/broker/Link.h
index 4badd8b3a1..2827d6b719 100644
--- a/qpid/cpp/src/qpid/broker/Link.h
+++ b/qpid/cpp/src/qpid/broker/Link.h
@@ -32,6 +32,7 @@
#include "qpid/management/Manageable.h"
#include "qpid/management/ManagementAgent.h"
#include "qmf/org/apache/qpid/broker/Link.h"
+#include "qpid/broker/BrokerImportExport.h"
#include <boost/ptr_container/ptr_vector.hpp>
namespace qpid {
@@ -41,7 +42,8 @@ namespace qpid {
class Broker;
class Connection;
- class Link : public PersistableConfig, public management::Manageable {
+ class QPID_BROKER_CLASS_EXTERN Link :
+ public PersistableConfig, public management::Manageable {
private:
sys::Mutex lock;
LinkRegistry* links;
diff --git a/qpid/cpp/src/qpid/broker/LinkRegistry.h b/qpid/cpp/src/qpid/broker/LinkRegistry.h
index 4c97e4f9d8..55cc6915bb 100644
--- a/qpid/cpp/src/qpid/broker/LinkRegistry.h
+++ b/qpid/cpp/src/qpid/broker/LinkRegistry.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
@@ -29,6 +29,7 @@
#include "qpid/sys/Mutex.h"
#include "qpid/sys/Timer.h"
#include "qpid/management/Manageable.h"
+#include "qpid/broker/BrokerImportExport.h"
#include <boost/shared_ptr.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/function.hpp>
@@ -39,7 +40,7 @@ namespace broker {
class Link;
class Broker;
class Connection;
- class LinkRegistry {
+ class QPID_BROKER_CLASS_EXTERN LinkRegistry {
// Declare a timer task to manage the establishment of link connections and the
// re-establishment of lost link connections.
@@ -150,7 +151,7 @@ namespace broker {
*/
void setPassive(bool);
-
+
/** Iterate over each link in the registry. Used for cluster updates. */
void eachLink(boost::function<void(boost::shared_ptr<Link>)> f);
/** Iterate over each bridge in the registry. Used for cluster updates. */
diff --git a/qpid/cpp/src/qpid/broker/Message.h b/qpid/cpp/src/qpid/broker/Message.h
index d85ee434db..e8f1aa9497 100644
--- a/qpid/cpp/src/qpid/broker/Message.h
+++ b/qpid/cpp/src/qpid/broker/Message.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
@@ -34,12 +34,12 @@
#include <vector>
namespace qpid {
-
+
namespace framing {
class FieldTable;
class SequenceNumber;
}
-
+
namespace broker {
class ConnectionToken;
class Exchange;
@@ -48,14 +48,14 @@ class MessageStore;
class Queue;
class ExpiryPolicy;
-class Message : public PersistableMessage {
+class QPID_BROKER_CLASS_EXTERN Message : public PersistableMessage {
public:
typedef boost::function<void (const boost::intrusive_ptr<Message>&)> MessageCallback;
-
+
QPID_BROKER_EXTERN Message(const framing::SequenceNumber& id = framing::SequenceNumber());
QPID_BROKER_EXTERN Message(const Message&);
QPID_BROKER_EXTERN ~Message();
-
+
uint64_t getPersistenceId() const { return persistenceId; }
void setPersistenceId(uint64_t _persistenceId) const { persistenceId = _persistenceId; }
@@ -85,8 +85,8 @@ public:
sys::AbsTime getExpiration() const { return expiration; }
void adjustTtl();
- framing::FrameSet& getFrames() { return frames; }
- const framing::FrameSet& getFrames() const { return frames; }
+ framing::FrameSet& getFrames() { return frames; }
+ const framing::FrameSet& getFrames() const { return frames; }
template <class T> T* getProperties() {
qpid::framing::AMQHeaderBody* p = frames.getHeaders();
@@ -135,7 +135,7 @@ public:
QPID_BROKER_EXTERN void decodeHeader(framing::Buffer& buffer);
QPID_BROKER_EXTERN void decodeContent(framing::Buffer& buffer);
-
+
void QPID_BROKER_EXTERN tryReleaseContent();
void releaseContent();
void releaseContent(MessageStore* s);//deprecated, use 'setStore(store); releaseContent();' instead
@@ -149,10 +149,10 @@ public:
bool isExcluded(const std::vector<std::string>& excludes) const;
void addTraceId(const std::string& id);
-
+
void forcePersistent();
bool isForcedPersistent();
-
+
/** Call cb when dequeue is complete, may call immediately. Holds cb by reference. */
void setDequeueCompleteCallback(MessageCallback& cb);
diff --git a/qpid/cpp/src/qpid/broker/PersistableMessage.h b/qpid/cpp/src/qpid/broker/PersistableMessage.h
index d29c2c45b4..8abeb5c546 100644
--- a/qpid/cpp/src/qpid/broker/PersistableMessage.h
+++ b/qpid/cpp/src/qpid/broker/PersistableMessage.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
@@ -41,7 +41,7 @@ class MessageStore;
/**
* Base class for persistable messages.
*/
-class PersistableMessage : public Persistable
+class QPID_BROKER_CLASS_EXTERN PersistableMessage : public Persistable
{
typedef std::list< boost::weak_ptr<PersistableQueue> > syncList;
sys::Mutex asyncDequeueLock;
@@ -75,7 +75,7 @@ class PersistableMessage : public Persistable
bool blocked;
bool requested;
bool released;
-
+
ContentReleaseState();
};
ContentReleaseState contentReleaseState;
@@ -102,7 +102,7 @@ class PersistableMessage : public Persistable
PersistableMessage();
void flush();
-
+
QPID_BROKER_EXTERN bool isContentReleased() const;
QPID_BROKER_EXTERN void setStore(MessageStore*);
@@ -126,14 +126,14 @@ class PersistableMessage : public Persistable
QPID_BROKER_EXTERN bool isDequeueComplete();
-
+
QPID_BROKER_EXTERN void dequeueComplete();
QPID_BROKER_EXTERN void dequeueAsync(PersistableQueue::shared_ptr queue,
MessageStore* _store);
bool isStoredOnQueue(PersistableQueue::shared_ptr queue);
-
+
void addToSyncList(PersistableQueue::shared_ptr queue, MessageStore* _store);
};
diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h
index c4f1bcc07e..8456061b6f 100644
--- a/qpid/cpp/src/qpid/broker/Queue.h
+++ b/qpid/cpp/src/qpid/broker/Queue.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
@@ -67,20 +67,21 @@ class Exchange;
* registered consumers or be stored until dequeued or until one
* or more consumers registers.
*/
-class Queue : public boost::enable_shared_from_this<Queue>,
- public PersistableQueue, public management::Manageable {
-
+class QPID_BROKER_CLASS_EXTERN Queue :
+ public boost::enable_shared_from_this<Queue>,
+ public PersistableQueue, public management::Manageable
+{
struct UsageBarrier
{
Queue& parent;
uint count;
-
+
UsageBarrier(Queue&);
bool acquire();
void release();
void destroy();
};
-
+
struct ScopedUse
{
UsageBarrier& barrier;
@@ -88,7 +89,7 @@ class Queue : public boost::enable_shared_from_this<Queue>,
ScopedUse(UsageBarrier& b) : barrier(b), acquired(barrier.acquire()) {}
~ScopedUse() { if (acquired) barrier.release(); }
};
-
+
typedef std::set< boost::shared_ptr<QueueObserver> > Observers;
enum ConsumeCode {NO_MESSAGES=0, CANT_CONSUME=1, CONSUMED=2};
@@ -184,8 +185,8 @@ class Queue : public boost::enable_shared_from_this<Queue>,
typedef std::vector<shared_ptr> vector;
QPID_BROKER_EXTERN Queue(const std::string& name,
- bool autodelete = false,
- MessageStore* const store = 0,
+ bool autodelete = false,
+ MessageStore* const store = 0,
const OwnershipToken* const owner = 0,
management::Manageable* parent = 0,
Broker* broker = 0);
@@ -245,11 +246,11 @@ class Queue : public boost::enable_shared_from_this<Queue>,
bool exclusive = false);
QPID_BROKER_EXTERN void cancel(Consumer::shared_ptr c);
- uint32_t purge(const uint32_t purge_request=0, boost::shared_ptr<Exchange> dest=boost::shared_ptr<Exchange>()); //defaults to all messages
+ uint32_t purge(const uint32_t purge_request=0, boost::shared_ptr<Exchange> dest=boost::shared_ptr<Exchange>()); //defaults to all messages
QPID_BROKER_EXTERN void purgeExpired();
//move qty # of messages to destination Queue destq
- uint32_t move(const Queue::shared_ptr destq, uint32_t qty);
+ uint32_t move(const Queue::shared_ptr destq, uint32_t qty);
QPID_BROKER_EXTERN uint32_t getMessageCount() const;
QPID_BROKER_EXTERN uint32_t getEnqueueCompleteMessageCount() const;
@@ -288,8 +289,8 @@ class Queue : public boost::enable_shared_from_this<Queue>,
* Inform queue of messages that were enqueued, have since
* been acquired but not yet accepted or released (and
* thus are still logically on the queue) - used in
- * clustered broker.
- */
+ * clustered broker.
+ */
void updateEnqueued(const QueuedMessage& msg);
/**
@@ -300,20 +301,20 @@ class Queue : public boost::enable_shared_from_this<Queue>,
* accepted it).
*/
bool isEnqueued(const QueuedMessage& msg);
-
+
/**
- * Gets the next available message
+ * Gets the next available message
*/
QPID_BROKER_EXTERN QueuedMessage get();
/** Get the message at position pos */
QPID_BROKER_EXTERN QueuedMessage find(framing::SequenceNumber pos) const;
- const QueuePolicy* getPolicy();
+ QPID_BROKER_EXTERN const QueuePolicy* getPolicy();
- void setAlternateExchange(boost::shared_ptr<Exchange> exchange);
- boost::shared_ptr<Exchange> getAlternateExchange();
- bool isLocal(boost::intrusive_ptr<Message>& msg);
+ QPID_BROKER_EXTERN void setAlternateExchange(boost::shared_ptr<Exchange> exchange);
+ QPID_BROKER_EXTERN boost::shared_ptr<Exchange> getAlternateExchange();
+ QPID_BROKER_EXTERN bool isLocal(boost::intrusive_ptr<Message>& msg);
//PersistableQueue support:
uint64_t getPersistenceId() const;
@@ -361,7 +362,7 @@ class Queue : public boost::enable_shared_from_this<Queue>,
/** return current position sequence number for the next message on the queue.
*/
QPID_BROKER_EXTERN framing::SequenceNumber getPosition();
- void addObserver(boost::shared_ptr<QueueObserver>);
+ QPID_BROKER_EXTERN void addObserver(boost::shared_ptr<QueueObserver>);
QPID_BROKER_EXTERN void insertSequenceNumbers(const std::string& key);
/**
* Notify queue that recovery has completed.
@@ -369,9 +370,9 @@ class Queue : public boost::enable_shared_from_this<Queue>,
void recoveryComplete(ExchangeRegistry& exchanges);
// For cluster update
- QueueListeners& getListeners();
- Messages& getMessages();
- const Messages& getMessages() const;
+ QPID_BROKER_EXTERN QueueListeners& getListeners();
+ QPID_BROKER_EXTERN Messages& getMessages();
+ QPID_BROKER_EXTERN const Messages& getMessages() const;
/**
* Reserve space in policy for an enqueued message that
diff --git a/qpid/cpp/src/qpid/broker/QueueCleaner.h b/qpid/cpp/src/qpid/broker/QueueCleaner.h
index 11c2d180ac..577463c49b 100644
--- a/qpid/cpp/src/qpid/broker/QueueCleaner.h
+++ b/qpid/cpp/src/qpid/broker/QueueCleaner.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
@@ -32,7 +32,7 @@ class QueueRegistry;
/**
* TimerTask to purge expired messages from queues
*/
-class QueueCleaner
+class QPID_BROKER_CLASS_EXTERN QueueCleaner
{
public:
QPID_BROKER_EXTERN QueueCleaner(QueueRegistry& queues, sys::Timer& timer);
diff --git a/qpid/cpp/src/qpid/broker/QueueEvents.h b/qpid/cpp/src/qpid/broker/QueueEvents.h
index fcddfe9092..b88d898763 100644
--- a/qpid/cpp/src/qpid/broker/QueueEvents.h
+++ b/qpid/cpp/src/qpid/broker/QueueEvents.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
@@ -39,7 +39,7 @@ namespace broker {
* of this. The notification happens asynchronously, in a separate
* thread.
*/
-class QueueEvents
+class QPID_BROKER_CLASS_EXTERN QueueEvents
{
public:
enum EventType {ENQUEUE, DEQUEUE};
@@ -76,7 +76,7 @@ class QueueEvents
volatile bool enabled;
qpid::sys::Mutex lock;//protect listeners from concurrent access
bool sync;
-
+
EventQueue::Batch::const_iterator handle(const EventQueue::Batch& e);
};
diff --git a/qpid/cpp/src/qpid/broker/QueueFlowLimit.h b/qpid/cpp/src/qpid/broker/QueueFlowLimit.h
index c02e479976..bf528817c2 100644
--- a/qpid/cpp/src/qpid/broker/QueueFlowLimit.h
+++ b/qpid/cpp/src/qpid/broker/QueueFlowLimit.h
@@ -7,9 +7,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
@@ -53,7 +53,8 @@ class Broker;
* passing _either_ level may turn flow control ON, but _both_ must be
* below level before flow control will be turned OFF.
*/
- class QueueFlowLimit : public StatefulQueueObserver
+// Note must be EXTERN because it is used by tests.
+ class QPID_BROKER_CLASS_EXTERN QueueFlowLimit : public StatefulQueueObserver
{
static uint64_t defaultMaxSize;
static uint defaultFlowStopRatio;
diff --git a/qpid/cpp/src/qpid/broker/QueueListeners.h b/qpid/cpp/src/qpid/broker/QueueListeners.h
index 0659499253..604d410f06 100644
--- a/qpid/cpp/src/qpid/broker/QueueListeners.h
+++ b/qpid/cpp/src/qpid/broker/QueueListeners.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
@@ -22,6 +22,7 @@
*
*/
#include "qpid/broker/Consumer.h"
+#include "qpid/broker/BrokerImportExport.h"
#include <deque>
namespace qpid {
@@ -30,14 +31,14 @@ namespace broker {
/**
* Track and notify components that wish to be notified of messages
* that become available on a queue.
- *
+ *
* None of the methods defined here are protected by locking. However
* the populate method allows a 'snapshot' to be taken of the
* listeners to be notified. NotificationSet::notify() may then be
* called outside of any lock that protects the QueueListeners
* instance from concurrent access.
*/
-class QueueListeners
+class QPID_BROKER_CLASS_EXTERN QueueListeners
{
public:
typedef std::deque<Consumer::shared_ptr> Listeners;
@@ -61,8 +62,8 @@ class QueueListeners
friend class QueueListeners;
};
- void addListener(Consumer::shared_ptr);
- void removeListener(Consumer::shared_ptr);
+ void addListener(Consumer::shared_ptr);
+ void removeListener(Consumer::shared_ptr);
void populate(NotificationSet&);
void snapshot(ListenerSet&);
bool contains(Consumer::shared_ptr c) const;
diff --git a/qpid/cpp/src/qpid/broker/QueuePolicy.h b/qpid/cpp/src/qpid/broker/QueuePolicy.h
index 3cdd63784d..22b3725d3c 100644
--- a/qpid/cpp/src/qpid/broker/QueuePolicy.h
+++ b/qpid/cpp/src/qpid/broker/QueuePolicy.h
@@ -7,9 +7,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
@@ -33,7 +33,7 @@
namespace qpid {
namespace broker {
-class QueuePolicy
+class QPID_BROKER_CLASS_EXTERN QueuePolicy
{
static uint64_t defaultMaxSize;
@@ -43,11 +43,11 @@ class QueuePolicy
uint32_t count;
uint64_t size;
bool policyExceeded;
-
+
static uint32_t getCapacity(const qpid::framing::FieldTable& settings, const std::string& key, uint32_t defaultValue);
protected:
- uint64_t getCurrentQueueSize() const { return size; }
+ uint64_t getCurrentQueueSize() const { return size; }
public:
typedef std::deque<QueuedMessage> Messages;
@@ -57,7 +57,7 @@ class QueuePolicy
static QPID_BROKER_EXTERN const std::string REJECT;
static QPID_BROKER_EXTERN const std::string FLOW_TO_DISK;
static QPID_BROKER_EXTERN const std::string RING;
- static QPID_BROKER_EXTERN const std::string RING_STRICT;
+ static QPID_BROKER_EXTERN const std::string RING_STRICT;
virtual ~QueuePolicy() {}
QPID_BROKER_EXTERN void tryEnqueue(boost::intrusive_ptr<Message> msg);
@@ -68,7 +68,7 @@ class QueuePolicy
virtual bool isEnqueued(const QueuedMessage&);
QPID_BROKER_EXTERN void update(qpid::framing::FieldTable& settings);
uint32_t getMaxCount() const { return maxCount; }
- uint64_t getMaxSize() const { return maxSize; }
+ uint64_t getMaxSize() const { return maxSize; }
void encode(framing::Buffer& buffer) const;
void decode ( framing::Buffer& buffer );
uint32_t encodedSize() const;
diff --git a/qpid/cpp/src/qpid/broker/QueueRegistry.h b/qpid/cpp/src/qpid/broker/QueueRegistry.h
index 8a32a64f05..d0ca7ba2ab 100644
--- a/qpid/cpp/src/qpid/broker/QueueRegistry.h
+++ b/qpid/cpp/src/qpid/broker/QueueRegistry.h
@@ -7,9 +7,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
@@ -47,7 +47,7 @@ class MessageStore;
* are deleted when and only when they are no longer in use.
*
*/
-class QueueRegistry {
+class QPID_BROKER_CLASS_EXTERN QueueRegistry {
public:
QPID_BROKER_EXTERN QueueRegistry(Broker* b = 0);
QPID_BROKER_EXTERN ~QueueRegistry();
@@ -61,7 +61,7 @@ class QueueRegistry {
QPID_BROKER_EXTERN std::pair<boost::shared_ptr<Queue>, bool> declare(
const std::string& name,
bool durable = false,
- bool autodelete = false,
+ bool autodelete = false,
const OwnershipToken* owner = 0,
boost::shared_ptr<Exchange> alternateExchange = boost::shared_ptr<Exchange>(),
const qpid::framing::FieldTable& args = framing::FieldTable(),
@@ -122,13 +122,13 @@ class QueueRegistry {
for (QueueMap::const_iterator i = queues.begin(); i != queues.end(); ++i)
f(i->second);
}
-
+
/**
* Change queue mode when cluster size drops to 1 node, expands again
* in practice allows flow queue to disk when last name to be exectuted
*/
void updateQueueClusterState(bool lastNode);
-
+
private:
typedef std::map<std::string, boost::shared_ptr<Queue> > QueueMap;
QueueMap queues;
@@ -144,7 +144,7 @@ private:
void destroyLH (const std::string& name);
};
-
+
}} // namespace qpid::broker
diff --git a/qpid/cpp/src/qpid/broker/RecoveredDequeue.h b/qpid/cpp/src/qpid/broker/RecoveredDequeue.h
index 66e66f1d5f..52e888d1f7 100644
--- a/qpid/cpp/src/qpid/broker/RecoveredDequeue.h
+++ b/qpid/cpp/src/qpid/broker/RecoveredDequeue.h
@@ -7,9 +7,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
@@ -25,6 +25,7 @@
#include "qpid/broker/Message.h"
#include "qpid/broker/MessageStore.h"
#include "qpid/broker/TxOp.h"
+#include "qpid/broker/BrokerImportExport.h"
#include <boost/intrusive_ptr.hpp>
@@ -34,7 +35,7 @@
namespace qpid {
namespace broker {
- class RecoveredDequeue : public TxOp{
+ class QPID_BROKER_CLASS_EXTERN RecoveredDequeue : public TxOp{
boost::shared_ptr<Queue> queue;
boost::intrusive_ptr<Message> msg;
diff --git a/qpid/cpp/src/qpid/broker/RecoveredEnqueue.h b/qpid/cpp/src/qpid/broker/RecoveredEnqueue.h
index 5f718001d5..99e777fd49 100644
--- a/qpid/cpp/src/qpid/broker/RecoveredEnqueue.h
+++ b/qpid/cpp/src/qpid/broker/RecoveredEnqueue.h
@@ -7,9 +7,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
@@ -25,6 +25,7 @@
#include "qpid/broker/Message.h"
#include "qpid/broker/MessageStore.h"
#include "qpid/broker/TxOp.h"
+#include "qpid/broker/BrokerImportExport.h"
#include <boost/intrusive_ptr.hpp>
@@ -34,7 +35,7 @@
namespace qpid {
namespace broker {
-class RecoveredEnqueue : public TxOp{
+class QPID_BROKER_CLASS_EXTERN RecoveredEnqueue : public TxOp{
boost::shared_ptr<Queue> queue;
boost::intrusive_ptr<Message> msg;
@@ -48,7 +49,7 @@ class RecoveredEnqueue : public TxOp{
boost::shared_ptr<Queue> getQueue() const { return queue; }
boost::intrusive_ptr<Message> getMessage() const { return msg; }
-
+
};
}
}
diff --git a/qpid/cpp/src/qpid/broker/RetryList.h b/qpid/cpp/src/qpid/broker/RetryList.h
index 242a7d2122..6cf6ee2d66 100644
--- a/qpid/cpp/src/qpid/broker/RetryList.h
+++ b/qpid/cpp/src/qpid/broker/RetryList.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
@@ -33,10 +33,10 @@ namespace broker {
* Simple utility for managing a list of urls to try on reconnecting a
* link. Currently only supports TCP urls.
*/
-class RetryList
+class QPID_BROKER_CLASS_EXTERN RetryList
{
public:
- QPID_BROKER_EXTERN RetryList();
+ QPID_BROKER_EXTERN RetryList();
QPID_BROKER_EXTERN void reset(const std::vector<Url>& urls);
QPID_BROKER_EXTERN bool next(Address& address);
private:
diff --git a/qpid/cpp/src/qpid/broker/SecureConnection.h b/qpid/cpp/src/qpid/broker/SecureConnection.h
index 1547faae1e..455b70b576 100644
--- a/qpid/cpp/src/qpid/broker/SecureConnection.h
+++ b/qpid/cpp/src/qpid/broker/SecureConnection.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
@@ -22,6 +22,7 @@
*
*/
+#include "qpid/broker/BrokerImportExport.h"
#include "qpid/sys/ConnectionCodec.h"
#include <memory>
@@ -38,7 +39,7 @@ namespace broker {
* 'secured' e.g. encrypted based on settings negotiatiated at the
* time of establishment.
*/
-class SecureConnection : public qpid::sys::ConnectionCodec
+class QPID_BROKER_CLASS_EXTERN SecureConnection : public qpid::sys::ConnectionCodec
{
public:
SecureConnection();
diff --git a/qpid/cpp/src/qpid/broker/SemanticState.h b/qpid/cpp/src/qpid/broker/SemanticState.h
index 8c69d6b89b..0c7c8901ff 100644
--- a/qpid/cpp/src/qpid/broker/SemanticState.h
+++ b/qpid/cpp/src/qpid/broker/SemanticState.h
@@ -22,6 +22,7 @@
*
*/
+#include "qpid/broker/BrokerImportExport.h"
#include "qpid/broker/Consumer.h"
#include "qpid/broker/Deliverable.h"
#include "qpid/broker/DeliveryAdapter.h"
@@ -65,9 +66,9 @@ class SessionContext;
*
* Message delivery is driven by ConsumerImpl::doOutput(), which is
* called when a client's socket is ready to write data.
- *
+ *
*/
-class SemanticState : private boost::noncopyable {
+class QPID_BROKER_CLASS_EXTERN SemanticState : private boost::noncopyable {
public:
class ConsumerImpl : public Consumer, public sys::OutputTask,
public boost::enable_shared_from_this<ConsumerImpl>,
@@ -99,15 +100,15 @@ class SemanticState : private boost::noncopyable {
public:
typedef boost::shared_ptr<ConsumerImpl> shared_ptr;
- ConsumerImpl(SemanticState* parent,
+ ConsumerImpl(SemanticState* parent,
const std::string& name, boost::shared_ptr<Queue> queue,
bool ack, bool acquire, bool exclusive,
const std::string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments);
~ConsumerImpl();
OwnershipToken* getSession();
- bool deliver(QueuedMessage& msg);
- bool filter(boost::intrusive_ptr<Message> msg);
- bool accept(boost::intrusive_ptr<Message> msg);
+ bool deliver(QueuedMessage& msg);
+ bool filter(boost::intrusive_ptr<Message> msg);
+ bool accept(boost::intrusive_ptr<Message> msg);
void disableNotify();
void enableNotify();
@@ -122,7 +123,7 @@ class SemanticState : private boost::noncopyable {
void addMessageCredit(uint32_t value);
void flush();
void stop();
- void complete(DeliveryRecord&);
+ void complete(DeliveryRecord&);
boost::shared_ptr<Queue> getQueue() const { return queue; }
bool isBlocked() const { return blocked; }
bool setBlocked(bool set) { std::swap(set, blocked); return set; }
@@ -188,7 +189,7 @@ class SemanticState : private boost::noncopyable {
const SessionContext& getSession() const { return session; }
ConsumerImpl& find(const std::string& destination);
-
+
/**
* Get named queue, never returns 0.
* @return: named queue
@@ -196,11 +197,11 @@ class SemanticState : private boost::noncopyable {
* @exception: ConnectionException if name="" and session has no default.
*/
boost::shared_ptr<Queue> getQueue(const std::string& name) const;
-
+
bool exists(const std::string& consumerTag);
- void consume(const std::string& destination,
- boost::shared_ptr<Queue> queue,
+ void consume(const std::string& destination,
+ boost::shared_ptr<Queue> queue,
bool ackRequired, bool acquire, bool exclusive,
const std::string& resumeId=std::string(), uint64_t resumeTtl=0,
const framing::FieldTable& = framing::FieldTable());
@@ -223,7 +224,7 @@ class SemanticState : private boost::noncopyable {
void suspendDtx(const std::string& xid);
void resumeDtx(const std::string& xid);
void recover(bool requeue);
- void deliver(DeliveryRecord& message, bool sync);
+ void deliver(DeliveryRecord& message, bool sync);
void acquire(DeliveryId first, DeliveryId last, DeliveryIds& acquired);
void release(DeliveryId first, DeliveryId last, bool setRedelivered);
void reject(DeliveryId first, DeliveryId last);
diff --git a/qpid/cpp/src/qpid/broker/SignalHandler.h b/qpid/cpp/src/qpid/broker/SignalHandler.h
index 7bfa9ea630..fe068ab989 100644
--- a/qpid/cpp/src/qpid/broker/SignalHandler.h
+++ b/qpid/cpp/src/qpid/broker/SignalHandler.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
@@ -22,6 +22,8 @@
*
*/
+#include "qpid/broker/BrokerImportExport.h"
+
namespace qpid {
namespace broker {
@@ -30,7 +32,7 @@ class Broker;
/**
* Handle signals e.g. to shut-down a broker.
*/
-class SignalHandler
+class QPID_BROKER_CLASS_EXTERN SignalHandler
{
public:
/** Set the broker to be shutdown on signals.
diff --git a/qpid/cpp/src/qpid/broker/TopicExchange.h b/qpid/cpp/src/qpid/broker/TopicExchange.h
index 636918f8a1..96c75de69d 100644
--- a/qpid/cpp/src/qpid/broker/TopicExchange.h
+++ b/qpid/cpp/src/qpid/broker/TopicExchange.h
@@ -33,7 +33,7 @@
namespace qpid {
namespace broker {
-class TopicExchange : public virtual Exchange {
+class QPID_BROKER_CLASS_EXTERN TopicExchange : public virtual Exchange {
struct TokenIterator;
class Normalizer;
@@ -141,7 +141,7 @@ class TopicExchange : public virtual Exchange {
private:
qpid::sys::RWlock* cacheLock;
std::map<std::string, BindingList>* bindingCache;
- bool cleared;
+ bool cleared;
public:
ClearCache(qpid::sys::RWlock* l, std::map<std::string, BindingList>* bc): cacheLock(l),
bindingCache(bc),cleared(false) {};
@@ -152,7 +152,7 @@ class TopicExchange : public virtual Exchange {
cleared =true;
}
};
- ~ClearCache(){
+ ~ClearCache(){
clearCache();
};
};
diff --git a/qpid/cpp/src/qpid/broker/TxAccept.h b/qpid/cpp/src/qpid/broker/TxAccept.h
index 314a150176..b6df936be4 100644
--- a/qpid/cpp/src/qpid/broker/TxAccept.h
+++ b/qpid/cpp/src/qpid/broker/TxAccept.h
@@ -7,9 +7,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
@@ -27,6 +27,7 @@
#include "qpid/framing/SequenceSet.h"
#include "qpid/broker/DeliveryRecord.h"
#include "qpid/broker/TxOp.h"
+#include "qpid/broker/BrokerImportExport.h"
namespace qpid {
namespace broker {
@@ -34,11 +35,11 @@ namespace qpid {
* Defines the transactional behaviour for accepts received by
* a transactional channel.
*/
- class TxAccept : public TxOp {
+ class QPID_BROKER_CLASS_EXTERN TxAccept : public TxOp {
struct RangeOp
{
AckRange range;
-
+
RangeOp(const AckRange& r);
void prepare(TransactionContext* ctxt);
void commit();
@@ -48,12 +49,12 @@ namespace qpid {
{
std::vector<RangeOp> ranges;
DeliveryRecords& unacked;
-
+
RangeOps(DeliveryRecords& u);
void operator()(framing::SequenceNumber start, framing::SequenceNumber end);
void prepare(TransactionContext* ctxt);
- void commit();
+ void commit();
};
framing::SequenceSet acked;
diff --git a/qpid/cpp/src/qpid/broker/TxBuffer.h b/qpid/cpp/src/qpid/broker/TxBuffer.h
index d49c8ba16a..425f6acb9b 100644
--- a/qpid/cpp/src/qpid/broker/TxBuffer.h
+++ b/qpid/cpp/src/qpid/broker/TxBuffer.h
@@ -7,9 +7,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
@@ -34,21 +34,21 @@
* transaction. This work can be committed or rolled back. Committing
* is a two-stage process: first all the operations should be
* prepared, then if that succeeds they can be committed.
- *
+ *
* In the 2pc case, a successful prepare may be followed by either a
* commit or a rollback.
- *
+ *
* Atomicity of prepare is ensured by using a lower level
* transactional facility. This saves explicitly rolling back all the
* successfully prepared ops when one of them fails. i.e. we do not
* use 2pc internally, we instead ensure that prepare is atomic at a
* lower level. This makes individual prepare operations easier to
* code.
- *
+ *
* Transactions on a messaging broker effect three types of 'action':
* (1) updates to persistent storage (2) updates to transient storage
* or cached data (3) network writes.
- *
+ *
* Of these, (1) should always occur atomically during prepare to
* ensure that if the broker crashes while a transaction is being
* completed the persistent state (which is all that then remains) is
@@ -59,7 +59,7 @@
*/
namespace qpid {
namespace broker {
- class TxBuffer{
+ class QPID_BROKER_CLASS_EXTERN TxBuffer {
typedef std::vector<TxOp::shared_ptr>::iterator op_iterator;
std::vector<TxOp::shared_ptr> ops;
protected:
@@ -78,7 +78,7 @@ namespace qpid {
*
* Once prepared, a transaction can be committed (or in
* the 2pc case, rolled back).
- *
+ *
* @returns true if all the operations prepared
* successfully, false if not.
*/
@@ -88,7 +88,7 @@ namespace qpid {
* Signals that the ops all prepared successfully and can
* now commit, i.e. the operation can now be fully carried
* out.
- *
+ *
* Should only be called after a call to prepare() returns
* true.
*/
@@ -96,7 +96,7 @@ namespace qpid {
/**
* Signals that all ops can be rolled back.
- *
+ *
* Should only be called either after a call to prepare()
* returns true (2pc) or instead of a prepare call
* ('server-local')
diff --git a/qpid/cpp/src/qpid/client/Bounds.h b/qpid/cpp/src/qpid/client/Bounds.h
index 838fcb8368..4696222c37 100644
--- a/qpid/cpp/src/qpid/client/Bounds.h
+++ b/qpid/cpp/src/qpid/client/Bounds.h
@@ -9,9 +9,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
@@ -21,11 +21,12 @@
*
*/
#include "qpid/sys/Waitable.h"
+#include "qpid/client/ClientImportExport.h"
namespace qpid{
namespace client{
-class Bounds
+class QPID_CLIENT_CLASS_EXTERN Bounds
{
public:
Bounds(size_t maxSize);
@@ -33,7 +34,7 @@ class Bounds
void reduce(size_t);
size_t getCurrentSize();
void setException(const sys::ExceptionHolder&);
-
+
private:
friend std::ostream& operator<<(std::ostream&, const Bounds&);
sys::Waitable lock;
diff --git a/qpid/cpp/src/qpid/client/ConnectionImpl.h b/qpid/cpp/src/qpid/client/ConnectionImpl.h
index cc81500b18..b7d4d423b2 100644
--- a/qpid/cpp/src/qpid/client/ConnectionImpl.h
+++ b/qpid/cpp/src/qpid/client/ConnectionImpl.h
@@ -7,9 +7,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
@@ -22,6 +22,7 @@
#ifndef _ConnectionImpl_
#define _ConnectionImpl_
+#include "qpid/client/ClientImportExport.h"
#include "qpid/client/Bounds.h"
#include "qpid/client/ConnectionHandler.h"
@@ -44,9 +45,11 @@ class Connector;
struct ConnectionSettings;
class SessionImpl;
-class ConnectionImpl : public Bounds,
+// TODO aconway 2011-04-05: exposed for use by cluster::UpdateClient,
+// clean up dependencies.
+class QPID_CLIENT_CLASS_EXTERN ConnectionImpl : public Bounds,
public framing::FrameHandler,
- public sys::TimeoutHandler,
+ public sys::TimeoutHandler,
public sys::ShutdownHandler,
public boost::enable_shared_from_this<ConnectionImpl>
{
@@ -54,7 +57,7 @@ class ConnectionImpl : public Bounds,
static const uint16_t NEXT_CHANNEL;
- SessionMap sessions;
+ SessionMap sessions;
ConnectionHandler handler;
boost::scoped_ptr<Connector> connector;
framing::ProtocolVersion version;
@@ -82,13 +85,13 @@ class ConnectionImpl : public Bounds,
static void init();
static boost::shared_ptr<ConnectionImpl> create(framing::ProtocolVersion version, const ConnectionSettings& settings);
~ConnectionImpl();
-
+
void open();
bool isOpen() const;
boost::shared_ptr<SessionImpl> newSession(const std::string& name, uint32_t timeout, uint16_t channel=NEXT_CHANNEL);
void addSession(const boost::shared_ptr<SessionImpl>&, uint16_t channel=NEXT_CHANNEL);
-
+
void close();
void handle(framing::AMQFrame& frame);
void erase(uint16_t channel);
diff --git a/qpid/cpp/src/qpid/client/Connector.h b/qpid/cpp/src/qpid/client/Connector.h
index 586012f9d6..d26937d494 100644
--- a/qpid/cpp/src/qpid/client/Connector.h
+++ b/qpid/cpp/src/qpid/client/Connector.h
@@ -24,6 +24,7 @@
#include "qpid/framing/OutputHandler.h"
#include "qpid/framing/ProtocolVersion.h"
+#include "qpid/client/ClientImportExport.h"
#include <boost/shared_ptr.hpp>
@@ -49,7 +50,7 @@ struct ConnectionSettings;
class ConnectionImpl;
///@internal
-class Connector : public framing::OutputHandler
+class QPID_CLIENT_CLASS_EXTERN Connector : public framing::OutputHandler
{
public:
// Protocol connector factory related stuff (it might be better to separate this code from the TCP Connector in the future)
diff --git a/qpid/cpp/src/qpid/client/Demux.h b/qpid/cpp/src/qpid/client/Demux.h
index 31dc3f9c06..ec26a76c86 100644
--- a/qpid/cpp/src/qpid/client/Demux.h
+++ b/qpid/cpp/src/qpid/client/Demux.h
@@ -7,9 +7,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
@@ -43,7 +43,7 @@ public:
};
///@internal
-class Demux
+class QPID_CLIENT_CLASS_EXTERN Demux
{
public:
typedef boost::function<bool(const framing::FrameSet&)> Condition;
@@ -52,7 +52,7 @@ public:
QPID_CLIENT_EXTERN Demux();
QPID_CLIENT_EXTERN ~Demux();
-
+
QPID_CLIENT_EXTERN void handle(framing::FrameSet::shared_ptr);
QPID_CLIENT_EXTERN void close(const sys::ExceptionHolder& ex);
QPID_CLIENT_EXTERN void open();
diff --git a/qpid/cpp/src/qpid/client/Dispatcher.h b/qpid/cpp/src/qpid/client/Dispatcher.h
index 74fdb90103..65599fd5db 100644
--- a/qpid/cpp/src/qpid/client/Dispatcher.h
+++ b/qpid/cpp/src/qpid/client/Dispatcher.h
@@ -7,9 +7,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
@@ -43,7 +43,7 @@ class SubscriptionImpl;
typedef framing::Handler<framing::FrameSet> FrameSetHandler;
///@internal
-class Dispatcher : public sys::Runnable
+class QPID_CLIENT_CLASS_EXTERN Dispatcher : public sys::Runnable
{
typedef std::map<std::string, boost::intrusive_ptr<SubscriptionImpl> >Listeners;
sys::Mutex lock;
diff --git a/qpid/cpp/src/qpid/client/SessionImpl.h b/qpid/cpp/src/qpid/client/SessionImpl.h
index cd7b2c123d..e366def807 100644
--- a/qpid/cpp/src/qpid/client/SessionImpl.h
+++ b/qpid/cpp/src/qpid/client/SessionImpl.h
@@ -7,9 +7,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
@@ -22,6 +22,7 @@
#ifndef _SessionImpl_
#define _SessionImpl_
+#include "qpid/client/ClientImportExport.h"
#include "qpid/client/Demux.h"
#include "qpid/client/Execution.h"
#include "qpid/client/Results.h"
@@ -59,7 +60,9 @@ class ConnectionImpl;
class SessionHandler;
///@internal
-class SessionImpl : public framing::FrameHandler::InOutHandler,
+// TODO aconway 2011-04-05: exposed for use by cluster::UpdateClient,
+// clean up dependencies.
+class QPID_CLIENT_CLASS_EXTERN SessionImpl : public framing::FrameHandler::InOutHandler,
public Execution,
private framing::AMQP_ClientOperations::SessionHandler,
private framing::AMQP_ClientOperations::ExecutionHandler,
@@ -110,18 +113,18 @@ public:
void sendFlush();
void setException(const sys::ExceptionHolder&);
-
+
//NOTE: these are called by the network thread when the connection is closed or dies
void connectionClosed(uint16_t code, const std::string& text);
void connectionBroke(const std::string& text);
- /** Set timeout in seconds, returns actual timeout allowed by broker */
+ /** Set timeout in seconds, returns actual timeout allowed by broker */
uint32_t setTimeout(uint32_t requestedSeconds);
/** Get timeout in seconds. */
uint32_t getTimeout() const;
- /**
+ /**
* get the Connection associated with this connection
*/
boost::shared_ptr<ConnectionImpl> getConnection();
@@ -150,7 +153,7 @@ private:
void setExceptionLH(const sys::ExceptionHolder&); // LH = lock held when called.
void detach();
-
+
void check() const;
void checkOpen() const;
void handleClosed();
@@ -170,29 +173,29 @@ private:
Future sendCommand(const framing::AMQBody&, const framing::MethodContent* = 0);
void sendContent(const framing::MethodContent&);
void waitForCompletionImpl(const framing::SequenceNumber& id);
-
+
void sendCompletionImpl();
// Note: Following methods are called by network thread in
// response to session controls from the broker
- void attach(const std::string& name, bool force);
- void attached(const std::string& name);
- void detach(const std::string& name);
+ void attach(const std::string& name, bool force);
+ void attached(const std::string& name);
+ void detach(const std::string& name);
void detached(const std::string& name, uint8_t detachCode);
- void requestTimeout(uint32_t timeout);
- void timeout(uint32_t timeout);
- void commandPoint(const framing::SequenceNumber& commandId, uint64_t commandOffset);
- void expected(const framing::SequenceSet& commands, const framing::Array& fragments);
- void confirmed(const framing::SequenceSet& commands, const framing::Array& fragments);
- void completed(const framing::SequenceSet& commands, bool timelyReply);
- void knownCompleted(const framing::SequenceSet& commands);
- void flush(bool expected, bool confirmed, bool completed);
+ void requestTimeout(uint32_t timeout);
+ void timeout(uint32_t timeout);
+ void commandPoint(const framing::SequenceNumber& commandId, uint64_t commandOffset);
+ void expected(const framing::SequenceSet& commands, const framing::Array& fragments);
+ void confirmed(const framing::SequenceSet& commands, const framing::Array& fragments);
+ void completed(const framing::SequenceSet& commands, bool timelyReply);
+ void knownCompleted(const framing::SequenceSet& commands);
+ void flush(bool expected, bool confirmed, bool completed);
void gap(const framing::SequenceSet& commands);
// Note: Following methods are called by network thread in
// response to execution commands from the broker
- void sync();
- void result(const framing::SequenceNumber& commandId, const std::string& value);
+ void sync();
+ void result(const framing::SequenceNumber& commandId, const std::string& value);
void exception(uint16_t errorCode,
const framing::SequenceNumber& commandId,
uint8_t classCode,
@@ -200,7 +203,7 @@ private:
uint8_t fieldIndex,
const std::string& description,
const framing::FieldTable& errorInfo);
-
+
// Note: Following methods are called by network thread in
// response to message commands from the broker
// EXCEPT Message.Transfer
@@ -239,13 +242,13 @@ private:
SessionState sessionState;
- // Only keep track of message credit
+ // Only keep track of message credit
sys::Semaphore* sendMsgCredit;
bool doClearDeliveryPropertiesExchange;
bool autoDetach;
-
+
friend class client::SessionHandler;
};
diff --git a/qpid/cpp/src/qpid/client/SubscriptionImpl.h b/qpid/cpp/src/qpid/client/SubscriptionImpl.h
index da77213423..0583d01cfa 100644
--- a/qpid/cpp/src/qpid/client/SubscriptionImpl.h
+++ b/qpid/cpp/src/qpid/client/SubscriptionImpl.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
@@ -40,11 +40,11 @@ namespace client {
class SubscriptionManager;
class SubscriptionManagerImpl;
-class SubscriptionImpl : public RefCounted, public MessageListener {
+class QPID_CLIENT_CLASS_EXTERN SubscriptionImpl : public RefCounted, public MessageListener {
public:
QPID_CLIENT_EXTERN SubscriptionImpl(SubscriptionManager, const std::string& queue,
const SubscriptionSettings&, const std::string& name, MessageListener* =0);
-
+
/** The name of the subsctription, used as the "destination" for messages from the broker.
* Usually the same as the queue name but can be set differently.
*/
diff --git a/qpid/cpp/src/qpid/cluster/Cpg.cpp b/qpid/cpp/src/qpid/cluster/Cpg.cpp
index 0856bcd824..d54d007de9 100644
--- a/qpid/cpp/src/qpid/cluster/Cpg.cpp
+++ b/qpid/cpp/src/qpid/cluster/Cpg.cpp
@@ -32,7 +32,7 @@
// This is a macro instead of a function because we don't want to
// evaluate the MSG argument unless there is an error.
#define CPG_CHECK(RESULT, MSG) \
- if ((RESULT) != CPG_OK) throw Exception(errorStr((RESULT), (MSG)))
+ if ((RESULT) != CPG_OK) throw qpid::Exception(errorStr((RESULT), (MSG)))
namespace qpid {
namespace cluster {
@@ -44,7 +44,7 @@ using namespace std;
Cpg* Cpg::cpgFromHandle(cpg_handle_t handle) {
void* cpg=0;
CPG_CHECK(cpg_context_get(handle, &cpg), "Cannot get CPG instance.");
- if (!cpg) throw Exception("Cannot get CPG instance.");
+ if (!cpg) throw qpid::Exception("Cannot get CPG instance.");
return reinterpret_cast<Cpg*>(cpg);
}
@@ -154,7 +154,7 @@ void Cpg::join(const std::string& name) {
group = name;
callCpg ( cpgJoinOp );
}
-
+
void Cpg::leave() {
callCpg ( cpgLeaveOp );
}
diff --git a/qpid/cpp/src/qpid/cluster/Cpg.h b/qpid/cpp/src/qpid/cluster/Cpg.h
index 6b81c602bd..26de3fece1 100644
--- a/qpid/cpp/src/qpid/cluster/Cpg.h
+++ b/qpid/cpp/src/qpid/cluster/Cpg.h
@@ -34,7 +34,7 @@ namespace cluster {
/**
* Lightweight C++ interface to cpg.h operations.
- *
+ *
* Manages a single CPG handle, initialized in ctor, finialzed in destructor.
* On error all functions throw Cpg::Exception.
*
@@ -42,10 +42,6 @@ namespace cluster {
class Cpg : public sys::IOHandle {
public:
- struct Exception : public ::qpid::Exception {
- Exception(const std::string& msg) : ::qpid::Exception(msg) {}
- };
-
struct Name : public cpg_name {
Name() { length = 0; }
Name(const char* s) { copy(s, strlen(s)); }
@@ -87,22 +83,22 @@ class Cpg : public sys::IOHandle {
*@param handler for CPG events.
*/
Cpg(Handler&);
-
+
/** Destructor calls shutdown if not already calledx. */
~Cpg();
/** Disconnect from CPG */
void shutdown();
-
+
void dispatchOne();
void dispatchAll();
void dispatchBlocking();
- void join(const std::string& group);
+ void join(const std::string& group);
void leave();
/** Multicast to the group. NB: must not be called concurrently.
- *
+ *
*@return true if the message was multi-cast, false if
* it was not sent due to flow control.
*/
@@ -113,7 +109,7 @@ class Cpg : public sys::IOHandle {
MemberId self() const;
int getFd();
-
+
private:
// Maximum number of retries for cog functions that can tell
@@ -125,46 +121,46 @@ class Cpg : public sys::IOHandle {
// Base class for the Cpg operations that need retry capability.
- struct CpgOp {
+ struct CpgOp {
std::string opName;
- CpgOp ( std::string opName )
+ CpgOp ( std::string opName )
: opName(opName) { }
- virtual cpg_error_t op ( cpg_handle_t handle, struct cpg_name * ) = 0;
+ virtual cpg_error_t op ( cpg_handle_t handle, struct cpg_name * ) = 0;
virtual std::string msg(const Name&) = 0;
virtual ~CpgOp ( ) { }
};
- struct CpgJoinOp : public CpgOp {
+ struct CpgJoinOp : public CpgOp {
CpgJoinOp ( )
: CpgOp ( std::string("cpg_join") ) { }
- cpg_error_t op(cpg_handle_t handle, struct cpg_name * group) {
- return cpg_join ( handle, group );
+ cpg_error_t op(cpg_handle_t handle, struct cpg_name * group) {
+ return cpg_join ( handle, group );
}
std::string msg(const Name& name) { return cantJoinMsg(name); }
};
- struct CpgLeaveOp : public CpgOp {
+ struct CpgLeaveOp : public CpgOp {
CpgLeaveOp ( )
: CpgOp ( std::string("cpg_leave") ) { }
- cpg_error_t op(cpg_handle_t handle, struct cpg_name * group) {
- return cpg_leave ( handle, group );
+ cpg_error_t op(cpg_handle_t handle, struct cpg_name * group) {
+ return cpg_leave ( handle, group );
}
std::string msg(const Name& name) { return cantLeaveMsg(name); }
};
- struct CpgFinalizeOp : public CpgOp {
+ struct CpgFinalizeOp : public CpgOp {
CpgFinalizeOp ( )
: CpgOp ( std::string("cpg_finalize") ) { }
- cpg_error_t op(cpg_handle_t handle, struct cpg_name *) {
- return cpg_finalize ( handle );
+ cpg_error_t op(cpg_handle_t handle, struct cpg_name *) {
+ return cpg_finalize ( handle );
}
std::string msg(const Name& name) { return cantFinalizeMsg(name); }
diff --git a/qpid/cpp/src/qpid/framing/AMQMethodBody.h b/qpid/cpp/src/qpid/framing/AMQMethodBody.h
index c634180712..f05ad1192d 100644
--- a/qpid/cpp/src/qpid/framing/AMQMethodBody.h
+++ b/qpid/cpp/src/qpid/framing/AMQMethodBody.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
@@ -37,18 +37,18 @@ class Buffer;
class AMQP_ServerOperations;
class MethodBodyConstVisitor;
-class AMQMethodBody : public AMQBody {
+class QPID_COMMON_CLASS_EXTERN AMQMethodBody : public AMQBody {
public:
AMQMethodBody() {}
QPID_COMMON_EXTERN virtual ~AMQMethodBody();
virtual void accept(MethodBodyConstVisitor&) const = 0;
-
+
virtual MethodId amqpMethodId() const = 0;
virtual ClassId amqpClassId() const = 0;
virtual bool isContentBearing() const = 0;
- virtual bool resultExpected() const = 0;
- virtual bool responseExpected() const = 0;
+ virtual bool resultExpected() const = 0;
+ virtual bool responseExpected() const = 0;
template <class T> bool isA() const {
return amqpClassId()==T::CLASS_ID && amqpMethodId()==T::METHOD_ID;
diff --git a/qpid/cpp/src/qpid/framing/AccumulatedAck.h b/qpid/cpp/src/qpid/framing/AccumulatedAck.h
index 8e241b4ba1..fd4c106414 100644
--- a/qpid/cpp/src/qpid/framing/AccumulatedAck.h
+++ b/qpid/cpp/src/qpid/framing/AccumulatedAck.h
@@ -7,9 +7,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
@@ -32,7 +32,7 @@
namespace qpid {
namespace framing {
- struct Range
+ struct QPID_COMMON_CLASS_EXTERN Range
{
SequenceNumber start;
SequenceNumber end;
@@ -47,7 +47,7 @@ namespace qpid {
* Keeps an accumulated record of acknowledged messages (by delivery
* tag).
*/
- class AccumulatedAck {
+ class QPID_COMMON_CLASS_EXTERN AccumulatedAck {
public:
/**
* Everything up to this value has been acknowledged.
diff --git a/qpid/cpp/src/qpid/framing/FrameDecoder.h b/qpid/cpp/src/qpid/framing/FrameDecoder.h
index 26bed6c447..a19f8910a3 100644
--- a/qpid/cpp/src/qpid/framing/FrameDecoder.h
+++ b/qpid/cpp/src/qpid/framing/FrameDecoder.h
@@ -32,15 +32,15 @@ namespace framing {
* Decode a frame from buffer. If buffer does not contain a complete
* frame, caches the fragment for the next call to decode.
*/
-class FrameDecoder
+class QPID_COMMON_CLASS_EXTERN FrameDecoder
{
public:
QPID_COMMON_EXTERN bool decode(Buffer& buffer);
- const AMQFrame& getFrame() const { return frame; }
- AMQFrame& getFrame() { return frame; }
+ QPID_COMMON_EXTERN const AMQFrame& getFrame() const { return frame; }
+ QPID_COMMON_EXTERN AMQFrame& getFrame() { return frame; }
- void setFragment(const char*, size_t);
- std::pair<const char*, size_t> getFragment() const;
+ QPID_COMMON_EXTERN void setFragment(const char*, size_t);
+ QPID_COMMON_EXTERN std::pair<const char*, size_t> getFragment() const;
private:
std::vector<char> fragment;
diff --git a/qpid/cpp/src/qpid/framing/FrameSet.h b/qpid/cpp/src/qpid/framing/FrameSet.h
index cae75e5ec8..8722153c22 100644
--- a/qpid/cpp/src/qpid/framing/FrameSet.h
+++ b/qpid/cpp/src/qpid/framing/FrameSet.h
@@ -7,9 +7,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
@@ -34,7 +34,7 @@ namespace framing {
/**
* Collects the frames representing a message.
*/
-class FrameSet
+class QPID_COMMON_CLASS_EXTERN FrameSet
{
typedef InlineVector<AMQFrame, 4> Frames;
const SequenceNumber id;
@@ -61,7 +61,7 @@ public:
QPID_COMMON_EXTERN AMQMethodBody* getMethod();
QPID_COMMON_EXTERN const AMQHeaderBody* getHeaders() const;
QPID_COMMON_EXTERN AMQHeaderBody* getHeaders();
-
+
template <class T> bool isA() const {
const AMQMethodBody* method = getMethod();
return method && method->isA<T>();
@@ -70,12 +70,12 @@ public:
template <class T> const T* as() const {
const AMQMethodBody* method = getMethod();
return (method && method->isA<T>()) ? dynamic_cast<const T*>(method) : 0;
- }
+ }
template <class T> T* as() {
AMQMethodBody* method = getMethod();
return (method && method->isA<T>()) ? dynamic_cast<T*>(method) : 0;
- }
+ }
template <class T> const T* getHeaderProperties() const {
const AMQHeaderBody* header = getHeaders();
@@ -84,7 +84,7 @@ public:
Frames::const_iterator begin() const { return parts.begin(); }
Frames::const_iterator end() const { return parts.end(); }
-
+
const SequenceNumber& getId() const { return id; }
template <class P> void remove(P predicate) {
diff --git a/qpid/cpp/src/qpid/framing/ProtocolInitiation.h b/qpid/cpp/src/qpid/framing/ProtocolInitiation.h
index c519bc2442..7c66034d1d 100644
--- a/qpid/cpp/src/qpid/framing/ProtocolInitiation.h
+++ b/qpid/cpp/src/qpid/framing/ProtocolInitiation.h
@@ -7,9 +7,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
@@ -30,18 +30,18 @@
namespace qpid {
namespace framing {
-class ProtocolInitiation : public AMQDataBlock
+class QPID_COMMON_CLASS_EXTERN ProtocolInitiation : public AMQDataBlock
{
private:
ProtocolVersion version;
-
+
public:
QPID_COMMON_EXTERN ProtocolInitiation();
QPID_COMMON_EXTERN ProtocolInitiation(uint8_t major, uint8_t minor);
QPID_COMMON_EXTERN ProtocolInitiation(ProtocolVersion p);
QPID_COMMON_EXTERN virtual ~ProtocolInitiation();
- QPID_COMMON_EXTERN virtual void encode(Buffer& buffer) const;
- QPID_COMMON_EXTERN virtual bool decode(Buffer& buffer);
+ QPID_COMMON_EXTERN virtual void encode(Buffer& buffer) const;
+ QPID_COMMON_EXTERN virtual bool decode(Buffer& buffer);
inline virtual uint32_t encodedSize() const { return 8; }
inline uint8_t getMajor() const { return version.getMajor(); }
inline uint8_t getMinor() const { return version.getMinor(); }
diff --git a/qpid/cpp/src/qpid/framing/Proxy.h b/qpid/cpp/src/qpid/framing/Proxy.h
index 0884e9cbd2..029e27382a 100644
--- a/qpid/cpp/src/qpid/framing/Proxy.h
+++ b/qpid/cpp/src/qpid/framing/Proxy.h
@@ -32,7 +32,7 @@ class AMQBody;
/**
* Base class for proxies.
*/
-class Proxy
+class QPID_COMMON_CLASS_EXTERN Proxy
{
public:
class ScopedSync
diff --git a/qpid/cpp/src/qpid/framing/SendContent.h b/qpid/cpp/src/qpid/framing/SendContent.h
index 1c464b9c8b..c21f4dc2fb 100644
--- a/qpid/cpp/src/qpid/framing/SendContent.h
+++ b/qpid/cpp/src/qpid/framing/SendContent.h
@@ -7,9 +7,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
@@ -35,7 +35,7 @@ namespace framing {
* necessary. Currently only works on content frames but this could be
* changed once we support multi-frame segments in general.
*/
-class SendContent
+class QPID_COMMON_CLASS_EXTERN SendContent
{
FrameHandler& handler;
const uint16_t maxFrameSize;
diff --git a/qpid/cpp/src/qpid/framing/SequenceNumberSet.h b/qpid/cpp/src/qpid/framing/SequenceNumberSet.h
index c8356c8163..fe4e32c112 100644
--- a/qpid/cpp/src/qpid/framing/SequenceNumberSet.h
+++ b/qpid/cpp/src/qpid/framing/SequenceNumberSet.h
@@ -7,9 +7,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
@@ -32,7 +32,7 @@
namespace qpid {
namespace framing {
-class SequenceNumberSet : public InlineVector<SequenceNumber, 2>
+class QPID_COMMON_CLASS_EXTERN SequenceNumberSet : public InlineVector<SequenceNumber, 2>
{
typedef InlineVector<SequenceNumber, 2> Base;
public:
@@ -41,17 +41,17 @@ public:
void encode(Buffer& buffer) const;
void decode(Buffer& buffer);
- uint32_t encodedSize() const;
+ uint32_t encodedSize() const;
QPID_COMMON_EXTERN SequenceNumberSet condense() const;
QPID_COMMON_EXTERN void addRange(const SequenceNumber& start, const SequenceNumber& end);
template <class T>
void processRanges(T& t) const
{
- if (size() % 2) { //must be even number
+ if (size() % 2) { //must be even number
throw InvalidArgumentException("SequenceNumberSet contains odd number of elements");
}
-
+
for (SequenceNumberSet::const_iterator i = begin(); i != end(); i++) {
SequenceNumber first = *(i);
SequenceNumber last = *(++i);
@@ -60,7 +60,7 @@ public:
}
friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SequenceNumberSet&);
-};
+};
}} // namespace qpid::framing
diff --git a/qpid/cpp/src/qpid/log/posix/SinkOptions.h b/qpid/cpp/src/qpid/log/posix/SinkOptions.h
index d929c29025..52ba1ed13b 100644
--- a/qpid/cpp/src/qpid/log/posix/SinkOptions.h
+++ b/qpid/cpp/src/qpid/log/posix/SinkOptions.h
@@ -35,7 +35,7 @@ struct SyslogFacility {
SyslogFacility(int i=0) : value(i) {}
};
-struct SinkOptions : public qpid::log::SinkOptions {
+struct QPID_COMMON_CLASS_EXTERN SinkOptions : public qpid::log::SinkOptions {
SinkOptions(const std::string& argv0);
virtual ~SinkOptions() {}
diff --git a/qpid/cpp/src/qpid/management/ManagementAgent.h b/qpid/cpp/src/qpid/management/ManagementAgent.h
index fb15dc6ed1..b9c8f7d503 100644
--- a/qpid/cpp/src/qpid/management/ManagementAgent.h
+++ b/qpid/cpp/src/qpid/management/ManagementAgent.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
@@ -46,7 +46,7 @@ class ConnectionState;
}
namespace management {
-class ManagementAgent
+class QPID_BROKER_CLASS_EXTERN ManagementAgent
{
private:
diff --git a/qpid/cpp/src/qpid/messaging/AddressParser.h b/qpid/cpp/src/qpid/messaging/AddressParser.h
index 1635331d19..1772c32d49 100644
--- a/qpid/cpp/src/qpid/messaging/AddressParser.h
+++ b/qpid/cpp/src/qpid/messaging/AddressParser.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
@@ -26,7 +26,7 @@
namespace qpid {
namespace messaging {
-class AddressParser
+class QPID_MESSAGING_CLASS_EXTERN AddressParser
{
public:
AddressParser(const std::string&);
diff --git a/qpid/cpp/src/qpid/sys/AsynchIO.h b/qpid/cpp/src/qpid/sys/AsynchIO.h
index 50da8fa4fc..fb4979a685 100644
--- a/qpid/cpp/src/qpid/sys/AsynchIO.h
+++ b/qpid/cpp/src/qpid/sys/AsynchIO.h
@@ -9,9 +9,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
@@ -31,7 +31,7 @@
namespace qpid {
namespace sys {
-
+
class Socket;
class Poller;
@@ -39,7 +39,7 @@ class Poller;
* Asynchronous acceptor: accepts connections then does a callback with the
* accepted fd
*/
-class AsynchAcceptor {
+class QPID_COMMON_CLASS_EXTERN AsynchAcceptor {
public:
typedef boost::function1<void, const Socket&> Callback;
@@ -52,7 +52,7 @@ public:
* Asynchronous connector: starts the process of initiating a connection and
* invokes a callback when completed or failed.
*/
-class AsynchConnector {
+class QPID_COMMON_CLASS_EXTERN AsynchConnector {
public:
typedef boost::function1<void, const Socket&> ConnectedCallback;
typedef boost::function3<void, const Socket&, int, const std::string&> FailedCallback;
@@ -80,14 +80,14 @@ struct AsynchIOBufferBase {
const int32_t byteCount;
int32_t dataStart;
int32_t dataCount;
-
+
AsynchIOBufferBase(char* const b, const int32_t s) :
bytes(b),
byteCount(s),
dataStart(0),
dataCount(0)
{}
-
+
virtual ~AsynchIOBufferBase()
{}
@@ -100,11 +100,11 @@ struct AsynchIOBufferBase {
};
/*
- * Asychronous reader/writer:
+ * Asychronous reader/writer:
* Reader accepts buffers to read into; reads into the provided buffers
* and then does a callback with the buffer and amount read. Optionally it
* can callback when there is something to read but no buffer to read it into.
- *
+ *
* Writer accepts a buffer and queues it for writing; can also be given
* a callback for when writing is "idle" (ie fd is writable, but nothing
* to write).
diff --git a/qpid/cpp/src/qpid/sys/AsynchIOHandler.h b/qpid/cpp/src/qpid/sys/AsynchIOHandler.h
index b9867606c4..48d0989309 100644
--- a/qpid/cpp/src/qpid/sys/AsynchIOHandler.h
+++ b/qpid/cpp/src/qpid/sys/AsynchIOHandler.h
@@ -39,7 +39,7 @@ class AsynchIO;
struct AsynchIOBufferBase;
class Socket;
-class AsynchIOHandler : public OutputControl {
+class QPID_COMMON_CLASS_EXTERN AsynchIOHandler : public OutputControl {
std::string identifier;
AsynchIO* aio;
ConnectionCodec::Factory* factory;
diff --git a/qpid/cpp/src/qpid/sys/ClusterSafe.h b/qpid/cpp/src/qpid/sys/ClusterSafe.h
index 27e4eb46a5..e4c07f516b 100644
--- a/qpid/cpp/src/qpid/sys/ClusterSafe.h
+++ b/qpid/cpp/src/qpid/sys/ClusterSafe.h
@@ -56,10 +56,10 @@ QPID_COMMON_EXTERN bool isClusterSafe();
* Mark a scope as cluster safe. Sets isClusterSafe in constructor and resets
* to previous value in destructor.
*/
-class ClusterSafeScope {
+class QPID_COMMON_CLASS_EXTERN ClusterSafeScope {
public:
- ClusterSafeScope();
- ~ClusterSafeScope();
+ QPID_COMMON_EXTERN ClusterSafeScope();
+ QPID_COMMON_EXTERN ~ClusterSafeScope();
private:
bool save;
};
@@ -68,7 +68,7 @@ class ClusterSafeScope {
* Mark a scope as cluster unsafe. Clears isClusterSafe in constructor and resets
* to previous value in destructor.
*/
-class ClusterUnsafeScope {
+class QPID_COMMON_CLASS_EXTERN ClusterUnsafeScope {
public:
QPID_COMMON_EXTERN ClusterUnsafeScope();
QPID_COMMON_EXTERN ~ClusterUnsafeScope();
@@ -80,7 +80,7 @@ class ClusterUnsafeScope {
* Enable cluster-safe assertions. By default they are no-ops.
* Called by cluster code.
*/
-void enableClusterSafe();
+QPID_COMMON_EXTERN void enableClusterSafe();
}} // namespace qpid::sys
diff --git a/qpid/cpp/src/qpid/sys/DispatchHandle.h b/qpid/cpp/src/qpid/sys/DispatchHandle.h
index 115a3c44f7..d5ec24a0dc 100644
--- a/qpid/cpp/src/qpid/sys/DispatchHandle.h
+++ b/qpid/cpp/src/qpid/sys/DispatchHandle.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
@@ -36,11 +36,11 @@ class DispatchHandleRef;
/**
* In order to have your own handle (file descriptor on Unix) watched by the poller
* you need to:
- *
+ *
* - Subclass IOHandle, in the constructor supply an appropriate
* IOHandlerPrivate object for the platform.
*
- * - Construct a DispatchHandle passing it your IOHandle and
+ * - Construct a DispatchHandle passing it your IOHandle and
* callback functions for read, write and disconnect events.
*
* - Ensure the DispatchHandle is not deleted until the poller is no longer using it.
@@ -50,7 +50,7 @@ class DispatchHandleRef;
* stops watching that handle. Your callback can call rewatch() or related functions
* to re-enable polling.
*/
-class DispatchHandle : public PollerHandle {
+class QPID_COMMON_CLASS_EXTERN DispatchHandle : public PollerHandle {
friend class DispatchHandleRef;
public:
typedef boost::function1<void, DispatchHandle&> Callback;
@@ -77,7 +77,7 @@ public:
* Provide a handle to poll and a set of callbacks. Note
* callbacks can be 0, meaning you are not interested in that
* event.
- *
+ *
*@param h: the handle to watch. The IOHandle encapsulates a
* platfrom-specific handle to an IO object (e.g. a file descriptor
* on Unix.)
@@ -110,7 +110,7 @@ public:
/** Stop watching permanently. Disassociates from the poller. */
QPID_COMMON_EXTERN void stopWatch();
-
+
/** Interrupt watching this handle and make a serialised callback that respects the
* same exclusivity guarantees as the other callbacks
*/
diff --git a/qpid/cpp/src/qpid/sys/Dispatcher.h b/qpid/cpp/src/qpid/sys/Dispatcher.h
index e8213d0579..15a8c37094 100644
--- a/qpid/cpp/src/qpid/sys/Dispatcher.h
+++ b/qpid/cpp/src/qpid/sys/Dispatcher.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
@@ -29,13 +29,13 @@
namespace qpid {
namespace sys {
-class Dispatcher : public Runnable {
+class QPID_COMMON_CLASS_EXTERN Dispatcher : public Runnable {
const Poller::shared_ptr poller;
public:
QPID_COMMON_EXTERN Dispatcher(Poller::shared_ptr poller);
QPID_COMMON_EXTERN ~Dispatcher();
-
+
QPID_COMMON_EXTERN void run();
};
diff --git a/qpid/cpp/src/qpid/sys/LockFile.h b/qpid/cpp/src/qpid/sys/LockFile.h
index 14a76cbf3e..da830bdbc9 100644
--- a/qpid/cpp/src/qpid/sys/LockFile.h
+++ b/qpid/cpp/src/qpid/sys/LockFile.h
@@ -41,7 +41,7 @@ class LockFilePrivate;
* doesn't, the old owner has probably died without cleaning up the lock
* file.
*/
-class LockFile : private boost::noncopyable
+class QPID_COMMON_CLASS_EXTERN LockFile : private boost::noncopyable
{
std::string path;
bool created;
@@ -55,10 +55,8 @@ public:
QPID_COMMON_EXTERN LockFile(const std::string& path_, bool create);
QPID_COMMON_EXTERN ~LockFile();
};
-
+
}} /* namespace qpid::sys */
#endif /*!_sys_LockFile_h*/
-
-
diff --git a/qpid/cpp/src/qpid/sys/PipeHandle.h b/qpid/cpp/src/qpid/sys/PipeHandle.h
index 8aac76996b..83a71af6f7 100755
--- a/qpid/cpp/src/qpid/sys/PipeHandle.h
+++ b/qpid/cpp/src/qpid/sys/PipeHandle.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
@@ -26,17 +26,17 @@
#include "qpid/CommonImportExport.h"
#include <string>
-// This class is a portability wrapper around pipe fds.
-// It currently exists primarily and solely for the purpose of
-// integration with single-threaded components that require QMF
+// This class is a portability wrapper around pipe fds.
+// It currently exists primarily and solely for the purpose of
+// integration with single-threaded components that require QMF
// integration through a signalling fd.
namespace qpid {
namespace sys {
- class PipeHandle {
+ class QPID_COMMON_CLASS_EXTERN PipeHandle {
private:
- int writeFd;
+ int writeFd;
int readFd;
public:
QPID_COMMON_EXTERN PipeHandle(bool nonBlocking=true);
diff --git a/qpid/cpp/src/qpid/sys/PollableCondition.h b/qpid/cpp/src/qpid/sys/PollableCondition.h
index 2eb6f2d947..3ba69b9da4 100644
--- a/qpid/cpp/src/qpid/sys/PollableCondition.h
+++ b/qpid/cpp/src/qpid/sys/PollableCondition.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
@@ -33,7 +33,7 @@ namespace sys {
class PollableConditionPrivate;
-class PollableCondition {
+class QPID_COMMON_CLASS_EXTERN PollableCondition {
public:
typedef boost::function1<void, PollableCondition&> Callback;
diff --git a/qpid/cpp/src/qpid/sys/Poller.h b/qpid/cpp/src/qpid/sys/Poller.h
index 01ee139ee6..3fa101b410 100644
--- a/qpid/cpp/src/qpid/sys/Poller.h
+++ b/qpid/cpp/src/qpid/sys/Poller.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
@@ -44,7 +44,7 @@ namespace sys {
*/
class PollerHandle;
class PollerPrivate;
-class Poller : public Runnable {
+class QPID_COMMON_CLASS_EXTERN Poller : public Runnable {
PollerPrivate* const impl;
public:
@@ -71,20 +71,20 @@ public:
struct Event {
PollerHandle* handle;
EventType type;
-
+
Event(PollerHandle* handle0, EventType type0) :
handle(handle0),
type(type0) {
}
-
+
void process();
};
-
+
QPID_COMMON_EXTERN Poller();
QPID_COMMON_EXTERN ~Poller();
/** Note: this function is async-signal safe */
QPID_COMMON_EXTERN void shutdown();
-
+
// Interrupt waiting for a specific poller handle
// returns true if we could interrupt the handle
// - in this case on return the handle is no longer being monitored,
@@ -94,9 +94,9 @@ public:
// - This can either be because it has just received an event which has been
// reported and has not been reenabled since.
// - Because it was removed from the monitoring set
- // - Or because it is already being interrupted
+ // - Or because it is already being interrupted
QPID_COMMON_EXTERN bool interrupt(PollerHandle& handle);
-
+
// Poller run loop
QPID_COMMON_EXTERN void run();
@@ -114,7 +114,7 @@ public:
*/
class IOHandle;
class PollerHandlePrivate;
-class PollerHandle {
+class QPID_COMMON_CLASS_EXTERN PollerHandle {
friend class Poller;
friend class PollerPrivate;
friend struct Poller::Event;
diff --git a/qpid/cpp/src/qpid/sys/Shlib.h b/qpid/cpp/src/qpid/sys/Shlib.h
index 7f66cfec14..11690121a8 100644
--- a/qpid/cpp/src/qpid/sys/Shlib.h
+++ b/qpid/cpp/src/qpid/sys/Shlib.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
@@ -22,7 +22,7 @@
*
*/
-#include "qpid/CommonImportExport.h"
+#include "qpid/CommonImportExport.h"
#include <boost/noncopyable.hpp>
#include <iostream>
@@ -32,7 +32,7 @@ namespace sys {
/** Encapsulates a shared library handle.
*@see AutoShlib
*/
-class Shlib {
+class QPID_COMMON_CLASS_EXTERN Shlib {
public:
/** Load a shared library */
Shlib(const char* libname) { load(libname); }
@@ -55,14 +55,14 @@ class Shlib {
return reinterpret_cast<T>(reinterpret_cast<intptr_t>(
this->getSymbol(symbol)));
}
-
+
private:
void* handle;
QPID_COMMON_EXTERN void load(const char* libname);
};
/** A shared library handle that unloads the shlib in it's dtor */
-class AutoShlib : public Shlib {
+class QPID_COMMON_CLASS_EXTERN AutoShlib : public Shlib {
public:
/** Load shared library */
AutoShlib(const std::string& libname) : Shlib(libname) {}
@@ -70,7 +70,7 @@ class AutoShlib : public Shlib {
QPID_COMMON_EXTERN ~AutoShlib() throw();
};
-
+
}} // namespace qpid::sys
#endif /*!QPID_SYS_SHLIB_H*/
diff --git a/qpid/cpp/src/qpid/sys/SocketAddress.h b/qpid/cpp/src/qpid/sys/SocketAddress.h
index 27b9642f2c..1f66443d9c 100644
--- a/qpid/cpp/src/qpid/sys/SocketAddress.h
+++ b/qpid/cpp/src/qpid/sys/SocketAddress.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
@@ -32,7 +32,7 @@ namespace qpid {
namespace sys {
class SocketAddress {
- friend const ::addrinfo& getAddrInfo(const SocketAddress&);
+ QPID_COMMON_EXTERN friend const ::addrinfo& getAddrInfo(const SocketAddress&);
public:
/** Create a SocketAddress from hostname and port*/
@@ -41,7 +41,7 @@ public:
QPID_COMMON_EXTERN SocketAddress& operator=(const SocketAddress&);
QPID_COMMON_EXTERN ~SocketAddress();
- std::string asString() const;
+ QPID_COMMON_EXTERN std::string asString() const;
private:
std::string host;
diff --git a/qpid/cpp/src/qpid/sys/Timer.h b/qpid/cpp/src/qpid/sys/Timer.h
index 98ba39ce38..6ffd87173a 100644
--- a/qpid/cpp/src/qpid/sys/Timer.h
+++ b/qpid/cpp/src/qpid/sys/Timer.h
@@ -7,9 +7,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
@@ -38,7 +38,7 @@ namespace sys {
class Timer;
-class TimerTask : public RefCounted {
+class QPID_COMMON_CLASS_EXTERN TimerTask : public RefCounted {
friend class Timer;
friend bool operator<(const boost::intrusive_ptr<TimerTask>&,
const boost::intrusive_ptr<TimerTask>&);
@@ -73,7 +73,7 @@ class TimerTask : public RefCounted {
bool operator<(const boost::intrusive_ptr<TimerTask>& a,
const boost::intrusive_ptr<TimerTask>& b);
-class Timer : private Runnable {
+class QPID_COMMON_CLASS_EXTERN Timer : private Runnable {
qpid::sys::Monitor monitor;
std::priority_queue<boost::intrusive_ptr<TimerTask> > tasks;
qpid::sys::Thread runner;
diff --git a/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.h b/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.h
index 1645cf1a58..d0b5a9c1e9 100644
--- a/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.h
+++ b/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.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
@@ -22,6 +22,7 @@
*
*/
+#include "qpid/CommonImportExport.h"
#include "qpid/sys/IntegerTypes.h"
#include "qpid/sys/SecurityLayer.h"
#include <sasl/sasl.h>
@@ -34,7 +35,7 @@ namespace cyrus {
/**
* Implementation of SASL security layer using cyrus-sasl library
*/
-class CyrusSecurityLayer : public qpid::sys::SecurityLayer
+class QPID_COMMON_CLASS_EXTERN CyrusSecurityLayer : public qpid::sys::SecurityLayer
{
public:
CyrusSecurityLayer(sasl_conn_t*, uint16_t maxFrameSize);
diff --git a/qpid/cpp/src/qpid/sys/posix/Fork.h b/qpid/cpp/src/qpid/sys/posix/Fork.h
index 698c61ed30..4f055da67d 100644
--- a/qpid/cpp/src/qpid/sys/posix/Fork.h
+++ b/qpid/cpp/src/qpid/sys/posix/Fork.h
@@ -21,6 +21,7 @@
#include <string>
#include <sys/types.h>
+#include "qpid/CommonImportExport.h"
namespace qpid {
namespace sys {
@@ -28,7 +29,7 @@ namespace sys {
/**
* Fork the process. Call parent() in parent and child() in child.
*/
-class Fork {
+class QPID_COMMON_CLASS_EXTERN Fork {
public:
Fork();
virtual ~Fork();
diff --git a/qpid/cpp/src/qpid/sys/posix/PidFile.h b/qpid/cpp/src/qpid/sys/posix/PidFile.h
index fb19d407f4..2c625a3679 100644
--- a/qpid/cpp/src/qpid/sys/posix/PidFile.h
+++ b/qpid/cpp/src/qpid/sys/posix/PidFile.h
@@ -31,7 +31,7 @@
namespace qpid {
namespace sys {
-class PidFile : public LockFile
+class QPID_COMMON_CLASS_EXTERN PidFile : public LockFile
{
public:
QPID_COMMON_EXTERN PidFile(const std::string& path_, bool create);
@@ -56,7 +56,7 @@ public:
*/
QPID_COMMON_EXTERN void writePid(void);
};
-
+
}} /* namespace qpid::sys */
#endif /*!_sys_PidFile_h*/
diff --git a/qpid/cpp/src/qpid/sys/posix/Shlib.cpp b/qpid/cpp/src/qpid/sys/posix/Shlib.cpp
index 3fb685d5b8..58a2572fb3 100644
--- a/qpid/cpp/src/qpid/sys/posix/Shlib.cpp
+++ b/qpid/cpp/src/qpid/sys/posix/Shlib.cpp
@@ -29,7 +29,7 @@ namespace sys {
void Shlib::load(const char* name) {
::dlerror();
- handle = ::dlopen(name, RTLD_NOW);
+ handle = ::dlopen(name, RTLD_NOW | RTLD_GLOBAL);
const char* error = ::dlerror();
if (error) {
throw Exception(QPID_MSG(error << ": " << name));
diff --git a/qpid/cpp/src/qpid/sys/rdma/ImportExport.h b/qpid/cpp/src/qpid/sys/rdma/ImportExport.h
new file mode 100644
index 0000000000..8d11993403
--- /dev/null
+++ b/qpid/cpp/src/qpid/sys/rdma/ImportExport.h
@@ -0,0 +1,35 @@
+#ifndef RDMAWRAP_IMPORTEXPORT_H
+#define RDMAWRAP_IMPORTEXPORT_H
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "qpid/ImportExport.h"
+
+#if defined (rdmawrap_EXPORTS)
+# define RDMAWRAP_EXTERN QPID_EXPORT
+# define RDMAWRAP_CLASS_EXTERN QPID_CLASS_EXPORT
+# define RDMAWRAP_INLINE_EXTERN QPID_INLINE_EXPORT
+#else
+# define RDMAWRAP_EXTERN QPID_IMPORT
+# define RDMAWRAP_CLASS_EXTERN QPID_CLASS_IMPORT
+# define RDMAWRAP_INLINE_EXTERN QPID_INLINE_IMPORT
+#endif
+
+#endif /*!RDMAWRAP_IMPORTEXPORT_H*/
diff --git a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.h b/qpid/cpp/src/qpid/sys/rdma/RdmaIO.h
index ec9caaf08d..a6df566a73 100644
--- a/qpid/cpp/src/qpid/sys/rdma/RdmaIO.h
+++ b/qpid/cpp/src/qpid/sys/rdma/RdmaIO.h
@@ -7,9 +7,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
@@ -21,6 +21,7 @@
#ifndef Rdma_Acceptor_h
#define Rdma_Acceptor_h
+#include "ImportExport.h"
#include "qpid/sys/rdma/rdma_wrap.h"
#include "qpid/sys/AtomicValue.h"
@@ -37,7 +38,8 @@ namespace Rdma {
class Connection;
- class AsynchIO
+// FIXME aconway 2011-03-22: class vs. member declarations.
+ class RDMAWRAP_CLASS_EXTERN AsynchIO
{
typedef boost::function1<void, AsynchIO&> ErrorCallback;
typedef boost::function2<void, AsynchIO&, Buffer*> ReadCallback;
@@ -111,7 +113,7 @@ namespace Rdma {
void doWriteCallback();
void checkDrained();
void doStoppedCallback();
-
+
void queueBuffer(Buffer* buff, int credit);
Buffer* extractBuffer(const QueuePairEvent& e);
};
@@ -143,7 +145,7 @@ namespace Rdma {
// These are the parameters necessary to start the conversation
// * Each peer HAS to allocate buffers of the size of the maximum receive from its peer
- // * Each peer HAS to know the initial "credit" it has for transmitting to its peer
+ // * Each peer HAS to know the initial "credit" it has for transmitting to its peer
struct ConnectionParams {
uint32_t maxRecvBufferSize;
uint16_t initialXmitCredit;
@@ -168,9 +170,9 @@ namespace Rdma {
typedef boost::function2<void, Rdma::Connection::intrusive_ptr, ErrorType> ErrorCallback;
typedef boost::function1<void, Rdma::Connection::intrusive_ptr> DisconnectedCallback;
- class ConnectionManager {
+ class RDMAWRAP_CLASS_EXTERN ConnectionManager {
typedef boost::function1<void, ConnectionManager&> NotifyCallback;
-
+
enum State {IDLE, STOPPED};
qpid::sys::AtomicValue<State> state;
Connection::intrusive_ptr ci;
@@ -203,7 +205,7 @@ namespace Rdma {
typedef boost::function2<bool, Rdma::Connection::intrusive_ptr, const ConnectionParams&> ConnectionRequestCallback;
typedef boost::function1<void, Rdma::Connection::intrusive_ptr> EstablishedCallback;
- class Listener : public ConnectionManager
+ class RDMAWRAP_CLASS_EXTERN Listener : public ConnectionManager
{
ConnectionParams checkConnectionParams;
ConnectionRequestCallback connectionRequestCallback;
@@ -226,7 +228,7 @@ namespace Rdma {
typedef boost::function2<void, Rdma::Connection::intrusive_ptr, const ConnectionParams&> RejectedCallback;
typedef boost::function2<void, Rdma::Connection::intrusive_ptr, const ConnectionParams&> ConnectedCallback;
- class Connector : public ConnectionManager
+ class RDMAWRAP_CLASS_EXTERN Connector : public ConnectionManager
{
ConnectionParams connectionParams;
RejectedCallback rejectedCallback;
diff --git a/qpid/cpp/src/qpid/sys/rdma/rdma_wrap.h b/qpid/cpp/src/qpid/sys/rdma/rdma_wrap.h
index 8e3429027b..7b66773ee8 100644
--- a/qpid/cpp/src/qpid/sys/rdma/rdma_wrap.h
+++ b/qpid/cpp/src/qpid/sys/rdma/rdma_wrap.h
@@ -7,9 +7,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
@@ -23,6 +23,7 @@
#include <rdma/rdma_cma.h>
+#include "ImportExport.h"
#include "qpid/RefCounted.h"
#include "qpid/sys/IOHandle.h"
#include "qpid/sys/Mutex.h"
@@ -90,7 +91,7 @@ namespace Rdma {
RECV
};
- class QueuePairEvent {
+ class RDMAWRAP_CLASS_EXTERN QueuePairEvent {
boost::shared_ptr< ::ibv_cq > cq;
::ibv_wc wc;
QueueDirection dir;
@@ -116,7 +117,7 @@ namespace Rdma {
// Wrapper for a queue pair - this has the functionality for
// putting buffers on the receive queue and for sending buffers
// to the other end of the connection.
- class QueuePair : public qpid::sys::IOHandle, public qpid::RefCounted {
+ class RDMAWRAP_CLASS_EXTERN QueuePair : public qpid::sys::IOHandle, public qpid::RefCounted {
friend class Connection;
boost::shared_ptr< ::ibv_pd > pd;
@@ -168,7 +169,7 @@ namespace Rdma {
void notifySend();
};
- class ConnectionEvent {
+ class RDMAWRAP_CLASS_EXTERN ConnectionEvent {
friend class Connection;
// The order of the members is important as we have to acknowledge
@@ -195,7 +196,7 @@ namespace Rdma {
// registered buffers can't be shared between different connections
// (this can only happen between connections on the same controller in any case,
// so needs careful management if used)
- class Connection : public qpid::sys::IOHandle, public qpid::RefCounted {
+ class RDMAWRAP_CLASS_EXTERN Connection : public qpid::sys::IOHandle, public qpid::RefCounted {
boost::shared_ptr< ::rdma_event_channel > channel;
boost::shared_ptr< ::rdma_cm_id > id;
QueuePair::intrusive_ptr qp;
diff --git a/qpid/cpp/src/qpid/sys/ssl/SslCommonImportExport.h b/qpid/cpp/src/qpid/sys/ssl/SslCommonImportExport.h
new file mode 100644
index 0000000000..4fbf1afeb6
--- /dev/null
+++ b/qpid/cpp/src/qpid/sys/ssl/SslCommonImportExport.h
@@ -0,0 +1,35 @@
+#ifndef QPID_SSL_COMMON_IMPORT_EXPORT_H
+#define QPID_SSL_COMMON_IMPORT_EXPORT_H
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "qpid/ImportExport.h"
+
+#if defined(SSL_COMMON_EXPORT) || defined (qpidssl_common_EXPORTS)
+# define QPID_SSL_COMMON_EXTERN QPID_EXPORT
+# define QPID_SSL_COMMON_CLASS_EXTERN QPID_CLASS_EXPORT
+# define QPID_SSL_COMMON_INLINE_EXTERN QPID_INLINE_EXPORT
+#else
+# define QPID_SSL_COMMON_EXTERN QPID_IMPORT
+# define QPID_SSL_COMMON_CLASS_EXTERN QPID_CLASS_IMPORT
+# define QPID_SSL_COMMON_INLINE_EXTERN QPID_INLINE_IMPORT
+#endif
+
+#endif
diff --git a/qpid/cpp/src/qpid/sys/ssl/SslIo.h b/qpid/cpp/src/qpid/sys/ssl/SslIo.h
index 53ac69d8d6..ecb031a5cf 100644
--- a/qpid/cpp/src/qpid/sys/ssl/SslIo.h
+++ b/qpid/cpp/src/qpid/sys/ssl/SslIo.h
@@ -9,9 +9,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
@@ -23,6 +23,7 @@
#include "qpid/sys/DispatchHandle.h"
#include "qpid/sys/SecuritySettings.h"
+#include "qpid/sys/ssl/SslCommonImportExport.h"
#include <boost/function.hpp>
#include <deque>
@@ -30,7 +31,7 @@
namespace qpid {
namespace sys {
namespace ssl {
-
+
class SslSocket;
/*
@@ -87,31 +88,31 @@ struct SslIOBufferBase {
const int32_t byteCount;
int32_t dataStart;
int32_t dataCount;
-
+
SslIOBufferBase(char* const b, const int32_t s) :
bytes(b),
byteCount(s),
dataStart(0),
dataCount(0)
{}
-
+
virtual ~SslIOBufferBase()
{}
};
/*
- * Asychronous reader/writer:
+ * Asychronous reader/writer:
* Reader accepts buffers to read into; reads into the provided buffers
* and then does a callback with the buffer and amount read. Optionally it can callback
* when there is something to read but no buffer to read it into.
- *
+ *
* Writer accepts a buffer and queues it for writing; can also be given
* a callback for when writing is "idle" (ie fd is writable, but nothing to write)
- *
+ *
* The class is implemented in terms of DispatchHandle to allow it to be deleted by deleting
* the contained DispatchHandle
*/
-class SslIO : private qpid::sys::DispatchHandle {
+class QPID_SSL_COMMON_CLASS_EXTERN SslIO : private qpid::sys::DispatchHandle {
public:
typedef SslIOBufferBase BufferBase;