First draft of the new snapshot system and database changes
This commit is contained in:
parent
1c6482262f
commit
a634396845
@ -203,10 +203,10 @@ property_list = std::array<PropertyDescription, impl::property_count()>{
|
||||
PropertyDescription{CLIENT_TALK_REQUEST_MSG, "client_talk_request_msg", "", TYPE_STRING, FLAG_CLIENT_VIEW | FLAG_USER_EDITABLE}, //automatically up-to-date for any manager "in view", only valid with PERMISSION feature, holds matter for the request
|
||||
PropertyDescription{CLIENT_DESCRIPTION, "client_description", "", TYPE_STRING, FLAG_CLIENT_VIEW | FLAG_SS | FLAG_USER_EDITABLE}, //automatically up-to-date for any manager "in view"
|
||||
PropertyDescription{CLIENT_IS_TALKER, "client_is_talker", "0", TYPE_BOOL, FLAG_CLIENT_VIEW | FLAG_USER_EDITABLE}, //automatically up-to-date for any manager "in view"
|
||||
PropertyDescription{CLIENT_MONTH_BYTES_UPLOADED, "client_month_bytes_uploaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_MONTH_BYTES_DOWNLOADED, "client_month_bytes_downloaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_TOTAL_BYTES_UPLOADED, "client_total_bytes_uploaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_TOTAL_BYTES_DOWNLOADED, "client_total_bytes_downloaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_MONTH_BYTES_UPLOADED, "client_month_bytes_uploaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE | FLAG_GLOBAL}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_MONTH_BYTES_DOWNLOADED, "client_month_bytes_downloaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE | FLAG_GLOBAL}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_TOTAL_BYTES_UPLOADED, "client_total_bytes_uploaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE | FLAG_GLOBAL}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_TOTAL_BYTES_DOWNLOADED, "client_total_bytes_downloaded", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE | FLAG_GLOBAL}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_TOTAL_ONLINE_TIME, "client_total_online_time", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE | FLAG_NEW}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_MONTH_ONLINE_TIME, "client_month_online_time", "0", TYPE_UNSIGNED_NUMBER, FLAG_CLIENT_VARIABLE | FLAG_SAVE | FLAG_NEW}, //this needs to be requested (=> requestClientVariables)
|
||||
PropertyDescription{CLIENT_IS_PRIORITY_SPEAKER, "client_is_priority_speaker", "0", TYPE_BOOL, FLAG_CLIENT_VIEW | FLAG_USER_EDITABLE}, //automatically up-to-date for any manager "in view"
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "converter.h"
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace std;
|
||||
using namespace ts;
|
||||
@ -19,14 +17,14 @@ CONVERTER_METHOD_ENCODE(type, impl::converter_ ##type ##_encode) { \
|
||||
return std::to_string(std::any_cast<type>(value)); \
|
||||
)
|
||||
|
||||
CONVERTER_PRIMITIVE_ST(int8_t, std::stol(std::string{str}) & 0xFF);
|
||||
CONVERTER_PRIMITIVE_ST(uint8_t, std::stoul(std::string{str}) & 0xFF);
|
||||
CONVERTER_PRIMITIVE_ST(int8_t, std::stol(std::string{str}) & 0xFFU);
|
||||
CONVERTER_PRIMITIVE_ST(uint8_t, std::stoul(std::string{str}) & 0xFFU);
|
||||
|
||||
CONVERTER_PRIMITIVE_ST(int16_t, std::stol(std::string{str}) & 0xFFFF);
|
||||
CONVERTER_PRIMITIVE_ST(uint16_t, std::stoul(std::string{str}) & 0xFFFF);
|
||||
CONVERTER_PRIMITIVE_ST(int16_t, std::stol(std::string{str}) & 0xFFFFU);
|
||||
CONVERTER_PRIMITIVE_ST(uint16_t, std::stoul(std::string{str}) & 0xFFFFU);
|
||||
|
||||
CONVERTER_PRIMITIVE_ST(int32_t, std::stol(std::string{str}) & 0xFFFFFFFF);
|
||||
CONVERTER_PRIMITIVE_ST(uint32_t, std::stoul(std::string{str}) & 0xFFFFFFFF);
|
||||
CONVERTER_PRIMITIVE_ST(int32_t, std::stol(std::string{str}) & 0xFFFFFFFFU);
|
||||
CONVERTER_PRIMITIVE_ST(uint32_t, std::stoul(std::string{str}) & 0xFFFFFFFFU);
|
||||
|
||||
CONVERTER_PRIMITIVE_ST(int64_t, std::stoll(std::string{str}));
|
||||
CONVERTER_PRIMITIVE_ST(uint64_t, std::stoull(std::string{str}))
|
||||
@ -36,6 +34,8 @@ CONVERTER_PRIMITIVE_ST(float, std::stof(std::string{str}));
|
||||
CONVERTER_PRIMITIVE_ST(double, std::stod(std::string{str}));
|
||||
CONVERTER_PRIMITIVE_ST(long_double, std::stold(std::string{str}));
|
||||
|
||||
CONVERTER_PRIMITIVE_ST(long_long_unsigned_int_t, std::stoull(std::string{str}));
|
||||
|
||||
CONVERTER_ST(std__string, return std::string{str};, return std::any_cast<std__string>(value););
|
||||
CONVERTER_ST(std__string_view, return str;, return std::string{std::any_cast<std__string_view>(value)};);
|
||||
CONVERTER_ST(const_char__ , return str.data();, return std::string{std::any_cast<const_char__>(value)};);
|
@ -6,7 +6,7 @@
|
||||
|
||||
namespace ts {
|
||||
typedef long double long_double;
|
||||
|
||||
typedef long long unsigned int long_long_unsigned_int_t;
|
||||
/* Converter stuff */
|
||||
template <typename T>
|
||||
struct converter {
|
||||
@ -53,6 +53,8 @@ namespace ts {
|
||||
CONVERTER_PRIMITIVE(int64_t);
|
||||
CONVERTER_PRIMITIVE(uint64_t);
|
||||
|
||||
CONVERTER_PRIMITIVE(long_long_unsigned_int_t);
|
||||
|
||||
typedef std::string std__string;
|
||||
typedef std::string_view std__string_view;
|
||||
typedef const char* const_char__;
|
||||
|
Loading…
x
Reference in New Issue
Block a user