mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-11-16 03:59:11 +01:00
60ed23486b
Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
35 lines
683 B
C++
35 lines
683 B
C++
#ifndef CLIENTMESSAGE_H
|
|
#define CLIENTMESSAGE_H
|
|
|
|
#include <string>
|
|
|
|
#include "doormessage.h"
|
|
|
|
class Clientmessage
|
|
{
|
|
|
|
public:
|
|
|
|
Clientmessage(std::string token,
|
|
Doormessage doormessage);
|
|
|
|
static Clientmessage fromJson(const std::string &json);
|
|
std::string toJson() const;
|
|
|
|
const std::string& token() const;
|
|
const Doormessage& doormessage() const;
|
|
|
|
private:
|
|
|
|
std::string _token;
|
|
Doormessage _doormessage;
|
|
|
|
static const std::string _tokenKey;
|
|
const static std::string _unlockButtonKey;
|
|
const static std::string _lockButtonKey;
|
|
const static std::string _emergencyUnlockKey;
|
|
const static std::string _isOpenKey;
|
|
};
|
|
|
|
#endif
|