2015-09-24 21:12:59 +02:00
|
|
|
#ifndef CLIENTMESSAGE_H
|
|
|
|
#define CLIENTMESSAGE_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "doormessage.h"
|
|
|
|
|
|
|
|
class Clientmessage
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Clientmessage(std::string token,
|
|
|
|
Doormessage doormessage);
|
|
|
|
|
2015-09-25 00:38:34 +02:00
|
|
|
static Clientmessage fromJson(const std::string &json);
|
2015-09-24 21:12:59 +02:00
|
|
|
std::string toJson() const;
|
|
|
|
|
2015-09-25 00:38:34 +02:00
|
|
|
const std::string& token() const;
|
|
|
|
const Doormessage& doormessage() const;
|
|
|
|
|
2015-09-24 21:12:59 +02:00
|
|
|
private:
|
|
|
|
|
|
|
|
std::string _token;
|
|
|
|
Doormessage _doormessage;
|
2015-09-25 00:38:34 +02:00
|
|
|
|
|
|
|
static const std::string _tokenKey;
|
|
|
|
const static std::string _unlockButtonKey;
|
|
|
|
const static std::string _lockButtonKey;
|
|
|
|
const static std::string _emergencyUnlockKey;
|
2015-09-25 03:26:07 +02:00
|
|
|
const static std::string _isOpenKey;
|
2015-09-24 21:12:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|