summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-05-03 03:52:37 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-05-03 03:52:37 +0000
commitcf904ec83224d4369e112bbbaf64a4b9b2b9d193 (patch)
tree312da44042d8ed733a203ec5430e73774f1c7f61 /cpp/src/qpid/broker
parent0b9a1572d25860399e2300a5860fea31b5aa00ee (diff)
downloadqpid-python-cf904ec83224d4369e112bbbaf64a4b9b2b9d193.tar.gz
Some more fixes to build under Visual Studio 2008
Remove some simple Visual Studio 2008 warnings Fix qmfconsole build under Windows and CMake git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@771020 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
-rw-r--r--cpp/src/qpid/broker/DeliveryRecord.h23
-rw-r--r--cpp/src/qpid/broker/Exchange.h16
-rw-r--r--cpp/src/qpid/broker/ExchangeRegistry.h8
-rw-r--r--cpp/src/qpid/broker/Message.h2
-rw-r--r--cpp/src/qpid/broker/Queue.h6
-rw-r--r--cpp/src/qpid/broker/RecoveryManagerImpl.cpp7
6 files changed, 32 insertions, 30 deletions
diff --git a/cpp/src/qpid/broker/DeliveryRecord.h b/cpp/src/qpid/broker/DeliveryRecord.h
index 9985e3f7a2..26516f8a3a 100644
--- a/cpp/src/qpid/broker/DeliveryRecord.h
+++ b/cpp/src/qpid/broker/DeliveryRecord.h
@@ -35,17 +35,7 @@
namespace qpid {
namespace broker {
class SemanticState;
-class DeliveryRecord;
-
-typedef std::deque<DeliveryRecord> DeliveryRecords;
-
-struct AckRange
-{
- DeliveryRecords::iterator start;
- DeliveryRecords::iterator end;
- AckRange(DeliveryRecords::iterator _start, DeliveryRecords::iterator _end) : start(_start), end(_end) {}
-};
-
+struct AckRange;
/**
* Record of a delivery for which an ack is outstanding.
@@ -113,6 +103,7 @@ class DeliveryRecord {
void deliver(framing::FrameHandler& h, DeliveryId deliveryId, uint16_t framesize);
void setId(DeliveryId _id) { id = _id; }
+ typedef std::deque<DeliveryRecord> DeliveryRecords;
static AckRange findRange(DeliveryRecords& records, DeliveryId first, DeliveryId last);
const QueuedMessage& getMessage() const { return msg; }
framing::SequenceNumber getId() const { return id; }
@@ -132,6 +123,16 @@ struct AcquireFunctor
record.acquire(results);
}
};
+
+typedef DeliveryRecord::DeliveryRecords DeliveryRecords;
+
+struct AckRange
+{
+ DeliveryRecords::iterator start;
+ DeliveryRecords::iterator end;
+ AckRange(DeliveryRecords::iterator _start, DeliveryRecords::iterator _end) : start(_start), end(_end) {}
+};
+
}
}
diff --git a/cpp/src/qpid/broker/Exchange.h b/cpp/src/qpid/broker/Exchange.h
index 9260222342..47c0bdb3af 100644
--- a/cpp/src/qpid/broker/Exchange.h
+++ b/cpp/src/qpid/broker/Exchange.h
@@ -121,9 +121,9 @@ protected:
public:
typedef boost::shared_ptr<Exchange> shared_ptr;
- explicit Exchange(const std::string& name, management::Manageable* parent = 0);
- Exchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args,
- management::Manageable* parent = 0);
+ QPID_BROKER_EXTERN explicit Exchange(const std::string& name, management::Manageable* parent = 0);
+ QPID_BROKER_EXTERN Exchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args,
+ management::Manageable* parent = 0);
QPID_BROKER_EXTERN virtual ~Exchange();
const std::string& getName() const { return name; }
@@ -140,19 +140,19 @@ public:
virtual bool bind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0;
virtual bool unbind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0;
virtual bool isBound(Queue::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args) = 0;
- virtual void setProperties(const boost::intrusive_ptr<Message>&);
+ QPID_BROKER_EXTERN virtual void setProperties(const boost::intrusive_ptr<Message>&);
virtual void route(Deliverable& msg, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0;
//PersistableExchange:
- void setPersistenceId(uint64_t id) const;
+ QPID_BROKER_EXTERN void setPersistenceId(uint64_t id) const;
uint64_t getPersistenceId() const { return persistenceId; }
- uint32_t encodedSize() const;
+ QPID_BROKER_EXTERN uint32_t encodedSize() const;
QPID_BROKER_EXTERN virtual void encode(framing::Buffer& buffer) const;
static QPID_BROKER_EXTERN Exchange::shared_ptr decode(ExchangeRegistry& exchanges, framing::Buffer& buffer);
// Manageable entry points
- management::ManagementObject* GetManagementObject(void) const;
+ QPID_BROKER_EXTERN management::ManagementObject* GetManagementObject(void) const;
// Federation hooks
class DynamicBridge {
@@ -172,7 +172,7 @@ protected:
qpid::sys::Mutex bridgeLock;
std::vector<DynamicBridge*> bridgeVector;
- virtual void handleHelloRequest();
+ QPID_BROKER_EXTERN virtual void handleHelloRequest();
void propagateFedOp(const std::string& routingKey, const std::string& tags,
const std::string& op, const std::string& origin);
};
diff --git a/cpp/src/qpid/broker/ExchangeRegistry.h b/cpp/src/qpid/broker/ExchangeRegistry.h
index 9ca432e41c..9edd54f025 100644
--- a/cpp/src/qpid/broker/ExchangeRegistry.h
+++ b/cpp/src/qpid/broker/ExchangeRegistry.h
@@ -47,14 +47,12 @@ class ExchangeRegistry{
ExchangeRegistry () : parent(0) {}
QPID_BROKER_EXTERN std::pair<Exchange::shared_ptr, bool> declare
- (const std::string& name, const std::string& type)
- throw(UnknownExchangeTypeException);
+ (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,
bool durable,
- const qpid::framing::FieldTable& args = framing::FieldTable())
- throw(UnknownExchangeTypeException);
+ const qpid::framing::FieldTable& args = framing::FieldTable());
QPID_BROKER_EXTERN void destroy(const std::string& name);
QPID_BROKER_EXTERN Exchange::shared_ptr get(const std::string& name);
Exchange::shared_ptr getDefault();
@@ -69,7 +67,7 @@ class ExchangeRegistry{
*/
bool registerExchange(const Exchange::shared_ptr&);
- void registerType(const std::string& type, FactoryFunction);
+ QPID_BROKER_EXTERN void registerType(const std::string& type, FactoryFunction);
/** Call f for each exchange in the registry. */
template <class F> void eachExchange(F f) const {
diff --git a/cpp/src/qpid/broker/Message.h b/cpp/src/qpid/broker/Message.h
index 458c6c7d1a..96eff453c0 100644
--- a/cpp/src/qpid/broker/Message.h
+++ b/cpp/src/qpid/broker/Message.h
@@ -138,7 +138,7 @@ public:
void destroy();
bool getContentFrame(const Queue& queue, framing::AMQFrame& frame, uint16_t maxContentSize, uint64_t offset) const;
- void sendContent(const Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize) const;
+ QPID_BROKER_EXTERN void sendContent(const Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize) const;
void sendHeader(framing::FrameHandler& out, uint16_t maxFrameSize) const;
QPID_BROKER_EXTERN bool isContentLoaded() const;
diff --git a/cpp/src/qpid/broker/Queue.h b/cpp/src/qpid/broker/Queue.h
index d1f71581d6..c5ef9a9307 100644
--- a/cpp/src/qpid/broker/Queue.h
+++ b/cpp/src/qpid/broker/Queue.h
@@ -183,7 +183,7 @@ namespace qpid {
Queue::shared_ptr shared_ref);
QPID_BROKER_EXTERN bool acquire(const QueuedMessage& msg);
- bool acquireMessageAt(const qpid::framing::SequenceNumber& position, QueuedMessage& message);
+ QPID_BROKER_EXTERN bool acquireMessageAt(const qpid::framing::SequenceNumber& position, QueuedMessage& message);
/**
* Delivers a message to the queue. Will record it as
@@ -241,7 +241,7 @@ namespace qpid {
/**
* dequeue from store (only done once messages is acknowledged)
*/
- bool dequeue(TransactionContext* ctxt, const QueuedMessage &msg);
+ QPID_BROKER_EXTERN bool dequeue(TransactionContext* ctxt, const QueuedMessage &msg);
/**
* Inform the queue that a previous transactional dequeue
* committed.
@@ -301,7 +301,7 @@ namespace qpid {
void setPosition(framing::SequenceNumber pos);
int getEventMode();
void setQueueEventManager(QueueEvents&);
- void insertSequenceNumbers(const std::string& key);
+ QPID_BROKER_EXTERN void insertSequenceNumbers(const std::string& key);
/**
* Notify queue that recovery has completed.
*/
diff --git a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
index 5f8b57fa0b..fa891f84bf 100644
--- a/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
+++ b/cpp/src/qpid/broker/RecoveryManagerImpl.cpp
@@ -28,11 +28,12 @@
#include "RecoveredDequeue.h"
#include "qpid/framing/reply_exceptions.h"
-using namespace qpid;
-using namespace qpid::broker;
using boost::dynamic_pointer_cast;
using boost::intrusive_ptr;
+namespace qpid {
+namespace broker {
+
RecoveryManagerImpl::RecoveryManagerImpl(QueueRegistry& _queues, ExchangeRegistry& _exchanges, LinkRegistry& _links,
DtxManager& _dtxMgr, uint64_t _stagingThreshold)
: queues(_queues), exchanges(_exchanges), links(_links), dtxMgr(_dtxMgr), stagingThreshold(_stagingThreshold) {}
@@ -252,3 +253,5 @@ void RecoverableTransactionImpl::enqueue(RecoverableQueue::shared_ptr queue, Rec
{
dynamic_pointer_cast<RecoverableQueueImpl>(queue)->enqueue(buffer, message);
}
+
+}}