diff options
author | Black Hat <bhat@encom.eu.org> | 2019-09-26 22:22:36 -0700 |
---|---|---|
committer | Black Hat <bhat@encom.eu.org> | 2019-09-26 22:22:36 -0700 |
commit | 363cf452bcdbaf6ff1cf94a83ca66cbb31122346 (patch) | |
tree | c64c8fda885e4e1785130e8ee3e7c47fd18cbf67 /lib/csapi/definitions/client_device.h | |
parent | 412e2cf19449e73aa7da729e9c5de6502687aade (diff) | |
parent | 944653463fe4134c82d85e2d01e2bc0fa43fd727 (diff) | |
download | libquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.tar.gz libquotient-363cf452bcdbaf6ff1cf94a83ca66cbb31122346.zip |
Merge branch 'master' of https://github.com/quotient-im/libQuotient into
bhat-libqtolm-update
Diffstat (limited to 'lib/csapi/definitions/client_device.h')
-rw-r--r-- | lib/csapi/definitions/client_device.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/csapi/definitions/client_device.h b/lib/csapi/definitions/client_device.h index a6224f71..f076c4da 100644 --- a/lib/csapi/definitions/client_device.h +++ b/lib/csapi/definitions/client_device.h @@ -6,32 +6,32 @@ #include "converters.h" -#include "converters.h" +namespace Quotient +{ -namespace QMatrixClient +// Data structures + +/// A client device +struct Device { - // Data structures + /// Identifier of this device. + QString deviceId; + /// Display name set by the user for this device. Absent if no name has + /// beenset. + QString displayName; + /// The IP address where this device was last seen. (May be a few minutes + /// outof date, for efficiency reasons). + QString lastSeenIp; + /// The timestamp (in milliseconds since the unix epoch) when this deviceswas + /// last seen. (May be a few minutes out of date, for efficiencyreasons). + Omittable<qint64> lastSeenTs; +}; - /// A client device - struct Device - { - /// Identifier of this device. - QString deviceId; - /// Display name set by the user for this device. Absent if no name has been - /// set. - QString displayName; - /// The IP address where this device was last seen. (May be a few minutes out - /// of date, for efficiency reasons). - QString lastSeenIp; - /// The timestamp (in milliseconds since the unix epoch) when this devices - /// was last seen. (May be a few minutes out of date, for efficiency - /// reasons). - Omittable<qint64> lastSeenTs; - }; - template <> struct JsonObjectConverter<Device> - { - static void dumpTo(QJsonObject& jo, const Device& pod); - static void fillFrom(const QJsonObject& jo, Device& pod); - }; +template <> +struct JsonObjectConverter<Device> +{ + static void dumpTo(QJsonObject& jo, const Device& pod); + static void fillFrom(const QJsonObject& jo, Device& pod); +}; -} // namespace QMatrixClient +} // namespace Quotient |