1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
use libquassel_derive::NetworkMap;
use crate::primitive::{DateTime, StringList};
#[derive(Debug, Clone, PartialEq, NetworkMap)]
#[network(repr = "map")]
pub struct CoreInfo {
#[network(rename = "coreData", variant = "VariantMap", network)]
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, NetworkMap)]
#[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,
map
)]
session_connected_client_data: Vec<ConnectedClient>,
}
#[derive(Debug, Clone, PartialEq, NetworkMap)]
#[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,
}
|