diff options
| author | Max Audron <audron@cocaine.farm> | 2021-04-05 18:03:46 +0200 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2021-04-05 18:03:46 +0200 |
| commit | d7488b8040278c2cf9cd1b1eead206efe408cd9f (patch) | |
| tree | 1188190a730e6c0d4277c588545c5ff557afb3cd /src/message/signalproxy/objects/coreinfo.rs | |
| parent | WIP: impl signalproxy types (diff) | |
WIP: impl more signalproxy objects
Diffstat (limited to 'src/message/signalproxy/objects/coreinfo.rs')
| -rw-r--r-- | src/message/signalproxy/objects/coreinfo.rs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/message/signalproxy/objects/coreinfo.rs b/src/message/signalproxy/objects/coreinfo.rs new file mode 100644 index 0000000..a717366 --- /dev/null +++ b/src/message/signalproxy/objects/coreinfo.rs @@ -0,0 +1,60 @@ +use libquassel_derive::Network; + +use crate::primitive::{DateTime, StringList}; + +#[derive(Debug, Clone, PartialEq, Network)] +#[network(repr = "map")] +pub struct CoreInfo { + #[network(rename = "coreData", network, variant = "VariantMap")] + core_data: CoreData, +} + +// // S->C calls +// setCoreData(coreData: QVariantMap) +// /** +// * Replaces all properties of the object with the content of the +// * "properties" parameter. This parameter is in network representation. +// */ +// update(properties: QVariantMap) + +#[derive(Debug, Clone, PartialEq, Network)] +#[network(repr = "map")] +pub struct CoreData { + #[network(rename = "quasselVersion")] + quassel_version: String, + #[network(rename = "quasselBuildDate")] + quassel_build_date: String, + #[network(rename = "startTime")] + start_time: DateTime, + #[network(rename = "sessionConnectedClients")] + session_connected_clients: i32, + #[network( + rename = "sessionConnectedClientData", + variant = "VariantList", + network + )] + session_connected_client_data: Vec<ConnectedClient>, +} + +#[derive(Debug, Clone, PartialEq, Network)] +#[network(repr = "map")] +pub struct ConnectedClient { + #[network(rename = "id")] + id: i32, + #[network(rename = "remoteAddress")] + remote_address: String, + #[network(rename = "location")] + location: String, + #[network(rename = "clientVersion")] + client_version: String, + #[network(rename = "clientVersionDate")] + client_version_date: String, + #[network(rename = "connectedSince")] + connected_since: DateTime, + #[network(rename = "secure")] + secure: bool, + #[network(rename = "features")] + features: i32, + #[network(rename = "featureList")] + feature_list: StringList, +} |
