Merge pull request #411 from CopernicaMarketingSoftware/remove-unused-class

Remove unused ConsumedMessage class
This commit is contained in:
Emiel Bruijntjes 2021-08-02 08:38:57 +02:00 committed by GitHub
commit 4b62948275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 93 deletions

View File

@ -8,7 +8,6 @@
#include "includes.h"
#include "basicgetokframe.h"
#include "basicreturnframe.h"
#include "consumedmessage.h"
#include "returnedmessage.h"
#include "channelopenframe.h"
#include "channelflowframe.h"

View File

@ -1,91 +0,0 @@
/**
* Base class for a message implementation
*
* @copyright 2014 - 2018 Copernica BV
*/
/**
* Dependencies
*/
#include "basicdeliverframe.h"
/**
* Set up namespace
*/
namespace AMQP {
/**
* Class definition
*/
class ConsumedMessage : public Message
{
private:
/**
* The consumer tag
* @var string
*/
std::string _consumerTag;
/**
* The delivery tag
* @var uint64_t
*/
uint64_t _deliveryTag;
/**
* Is this a redelivered message?
* @var bool
*/
bool _redelivered;
public:
/**
* Constructor
* @param frame
*/
ConsumedMessage(const BasicDeliverFrame &frame) :
Message(frame.exchange(), frame.routingKey()),
_consumerTag(frame.consumerTag()), _deliveryTag(frame.deliveryTag()), _redelivered(frame.redelivered())
{}
/**
* Constructor
* @param frame
*/
ConsumedMessage(const BasicGetOKFrame &frame) :
Message(frame.exchange(), frame.routingKey()),
_deliveryTag(frame.deliveryTag()), _redelivered(frame.redelivered())
{}
/**
* Destructor
*/
virtual ~ConsumedMessage() {}
/**
* Retrieve the consumer tag
* @return std::string
*/
const std::string &consumer() const
{
return _consumerTag;
}
/**
* Report to the handler
* @param callback
*/
void report(const MessageCallback &callback)
{
// send ourselves to the consumer
if (callback) callback(*this, _deliveryTag, _redelivered);
}
};
/**
* End of namespace
*/
}

View File

@ -67,7 +67,6 @@
#include "transactioncommitokframe.h"
#include "transactionrollbackframe.h"
#include "transactionrollbackokframe.h"
#include "consumedmessage.h"
#include "bodyframe.h"
#include "basicheaderframe.h"