commit e48c78765ca1e2e5a68fd93bac7191eaf6918352
Author: Jordan Sherer <jordan@widefido.com>
Date: Wed Jan 2 12:23:28 2019 -0500
Transition to persistent inbox for later retrieval
Fixed issue with inbox items disappearing due to aging.
commit 1df07595bf6507438c1488839f7a2075a432a1a1
Author: Jordan Sherer <jordan@widefido.com>
Date: Wed Jan 2 09:23:28 2019 -0500
Filtered value and count queries for the inbox
commit c93a93a1c43a65fae4a31ddeb40c77c53204bbdb
Author: Jordan Sherer <jordan@widefido.com>
Date: Tue Jan 1 22:58:07 2019 -0500
Initial cut of inbox storage
43 lines
913 B
C++
43 lines
913 B
C++
#ifndef MESSAGE_H
|
|
#define MESSAGE_H
|
|
|
|
/**
|
|
* (C) 2018 Jordan Sherer <kn4crd@gmail.com> - All Rights Reserved
|
|
**/
|
|
|
|
#include <QMap>
|
|
#include <QByteArray>
|
|
#include <QJsonDocument>
|
|
#include <QJsonObject>
|
|
#include <QString>
|
|
#include <QVariant>
|
|
|
|
|
|
class Message {
|
|
public:
|
|
Message();
|
|
Message(QString const &type, QString const &value="");
|
|
Message(QString const &type, QString const &value, QMap<QString, QVariant> const ¶ms);
|
|
|
|
void read(const QJsonObject &json);
|
|
void write(QJsonObject &json) const;
|
|
|
|
QByteArray toJson() const;
|
|
|
|
QString type() const { return type_; }
|
|
void setType(QString type){ type_ = type; }
|
|
|
|
QString value() const { return value_; }
|
|
void setValue(QString value){ value_ = value; }
|
|
|
|
QMap<QString, QVariant> params() const { return params_; }
|
|
|
|
private:
|
|
QString type_;
|
|
QString value_;
|
|
QMap<QString, QVariant> params_;
|
|
};
|
|
|
|
|
|
#endif // MESSAGE_H
|