Remove unused ConsumedMessage class

This commit is contained in:
Raoul Wols 2021-07-28 12:14:50 +02:00
parent 819af12055
commit f0f17cdf18
No known key found for this signature in database
GPG Key ID: 9FFE06A0F6AAA2DF
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"