aboutsummaryrefslogtreecommitdiff
path: root/src/message/signalproxy
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2025-02-27 01:03:29 +0100
committerMax Audron <audron@cocaine.farm>2025-02-27 01:03:29 +0100
commite4338a9d9d0a76029bca376c2bcb499962575e87 (patch)
treea0c14be508381e3f5091d1872210edd612f57dde /src/message/signalproxy
parentimplement NetworkId UserType (diff)
extend docs and reorganize files
Diffstat (limited to 'src/message/signalproxy')
-rw-r--r--src/message/signalproxy/mod.rs2
-rw-r--r--src/message/signalproxy/translation.rs122
-rw-r--r--src/message/signalproxy/translation/aos_soa.rs1134
-rw-r--r--src/message/signalproxy/translation/mod.rs112
4 files changed, 123 insertions, 1247 deletions
diff --git a/src/message/signalproxy/mod.rs b/src/message/signalproxy/mod.rs
index 6cd887b..062b400 100644
--- a/src/message/signalproxy/mod.rs
+++ b/src/message/signalproxy/mod.rs
@@ -15,7 +15,7 @@ pub mod objects;
mod rpccall;
mod syncmessage;
-mod translation;
+pub mod translation;
pub use translation::*;
pub use heartbeat::*;
diff --git a/src/message/signalproxy/translation.rs b/src/message/signalproxy/translation.rs
new file mode 100644
index 0000000..b175e44
--- /dev/null
+++ b/src/message/signalproxy/translation.rs
@@ -0,0 +1,122 @@
+//! Traits for Network Representation translation
+//!
+//! The traits found here usually do not need to implemented manually and can be derived using the [`libquassel::NetworkList`] and [`libquassel::NetworkMap`] macros.
+//!
+//! Quassel has 3 main ways to represent an object over the Network:
+//!
+//! ### VariantList
+//! The struct is serialized to a Vector of Variants. This is mostly used in the InitData messages.
+//! First the field name as a ByteArray (UTF-8 String), followed by the field value in it's own Type's va!iant.
+//! The order in which the fields are transmitted cannot be assumed.
+//!
+//! Example:
+//! ```ignore
+//! NetworkConfig {
+//! ping_timeout_enabled: true,
+//! ping_interval: 0,
+//! }
+//! ```
+//! to
+//! ```ignore
+//! VariantList([
+//! ByteArray(
+//! "pingTimeoutEnabled",
+//! ),
+//! bool(
+//! true,
+//! ),
+//! ByteArray(
+//! "pingInterval",
+//! ),
+//! i32(
+//! 30,
+//! ),
+//! ])
+//! ```
+//!
+//!
+//! ### VariantMap
+//! The struct is represented as a `VariantMap`. The keys and values of
+//! the struct are serialized to a corresponding `HashMap<String, Variant>`.
+//!
+//! Using the [libquassel::NetworkMap] macro this is selected with `#[network(repr = "map")]` on the object.
+//!
+//! Example:
+//! ```ignore
+//! NetworkConfig {
+//! ping_timeout_enabled: false,
+//! ping_interval: 0,
+//! }
+//! ```
+//! to
+//! ```ignore
+//! VariantMap({
+//! "pingTimeoutEnabled": bool(false)
+//! "pingInterval": i32(0)
+//! })
+//! ```
+//!
+//! ### Structure of Arrays
+//!
+//! For Objects that are transmitted as multiple at once the VariantMap
+//! representation is augemented and instead of transmitting multiple `VariantMaps`,
+//! each field is a `VariantList` of Items.
+//!
+//! Using the [libquassel::NetworkMap] macro this is selected with `#[network(repr = "maplist")]` on the
+//! object.
+//!
+//! Example:
+//! ```ignore
+//! vec![
+//! NetworkConfig {
+//! ping_timeout_enabled: false,
+//! ping_interval: 0,
+//! },
+//! NetworkConfig {
+//! ping_timeout_enabled: true,
+//! ping_interval: 1,
+//! },
+//! ]
+//! ```
+//! to
+//! ```ignore
+//! VariantMap({
+//! "pingTimeoutEnabled": VariantList([
+//! bool(false),
+//! bool(true),
+//! ]),
+//! "pingInterval": VariantList([
+//! i32(0),
+//! i32(1),
+//! ])
+//! })
+//! ```
+use crate::primitive::{Variant, VariantList};
+
+#[deprecated(
+ since = "0.1.0",
+ note = "please use NetworkMap and NetworkList implementations"
+)]
+pub trait Network {
+ type Item;
+
+ fn to_network(&self) -> Self::Item;
+ fn from_network(input: &mut Self::Item) -> Self;
+}
+
+pub trait NetworkMap
+where
+ // TODO correct this error type
+ Self::Item: TryFrom<Variant, Error = String>,
+ Self::Item: Into<Variant>,
+{
+ type Item;
+
+ fn to_network_map(&self) -> Self::Item;
+ fn from_network_map(input: &mut Self::Item) -> Self;
+}
+
+pub trait NetworkList {
+ fn to_network_list(&self) -> VariantList;
+ fn from_network_list(input: &mut VariantList) -> Self;
+}
diff --git a/src/message/signalproxy/translation/aos_soa.rs b/src/message/signalproxy/translation/aos_soa.rs
deleted file mode 100644
index c070aea..0000000
--- a/src/message/signalproxy/translation/aos_soa.rs
+++ /dev/null
@@ -1,1134 +0,0 @@
-// InitData {
-// class_name: "AliasManager",
-// object_name: "",
-// init_data: [
-// Variant::ByteArray(
-// "Aliases",
-// ),
-// Variant::VariantMap(
-// {
-// "names": Variant::StringList(
-// [
-// "j",
-// "ns",
-// "nickserv",
-// "cs",
-// "chanserv",
-// "hs",
-// "hostserv",
-// "wii",
-// "back",
-// "inxi",
-// "sysinfo",
-// ],
-// ),
-// "expansions": Variant::StringList(
-// [
-// "/join $0",
-// "/msg nickserv $0",
-// "/msg nickserv $0",
-// "/msg chanserv $0",
-// "/msg chanserv $0",
-// "/msg hostserv $0",
-// "/msg hostserv $0",
-// "/whois $0 $0",
-// "/quote away",
-// "/exec inxi $0",
-// "/exec inxi -d",
-// ],
-// ),
-// },
-// ),
-// ],
-// },
-
-// InitData {
-// class_name: "Network",
-// object_name: "2",
-// init_data: [
-// ByteArray(
-// "Caps",
-// ),
-// VariantMap(
-// {
-// "message-tags": String(
-// "",
-// ),
-// "multi-prefix": String(
-// "",
-// ),
-// "echo-message": String(
-// "",
-// ),
-// "away-notify": String(
-// "",
-// ),
-// "inspircd.org/standard-replies": String(
-// "",
-// ),
-// "sasl": String(
-// "",
-// ),
-// "labeled-response": String(
-// "",
-// ),
-// "inspircd.org/poison": String(
-// "",
-// ),
-// "account-tag": String(
-// "",
-// ),
-// "userhost-in-names": String(
-// "",
-// ),
-// "account-notify": String(
-// "",
-// ),
-// "extended-join": String(
-// "",
-// ),
-// "server-time": String(
-// "",
-// ),
-// "chghost": String(
-// "",
-// ),
-// "setname": String(
-// "",
-// ),
-// "cap-notify": String(
-// "",
-// ),
-// "batch": String(
-// "",
-// ),
-// "sts": String(
-// "duration=15552000,preload",
-// ),
-// "invite-notify": String(
-// "",
-// ),
-// },
-// ),
-// ByteArray(
-// "CapsEnabled",
-// ),
-// VariantList(
-// [
-// String(
-// "account-notify",
-// ),
-// String(
-// "away-notify",
-// ),
-// String(
-// "cap-notify",
-// ),
-// String(
-// "chghost",
-// ),
-// String(
-// "extended-join",
-// ),
-// String(
-// "multi-prefix",
-// ),
-// String(
-// "userhost-in-names",
-// ),
-// ],
-// ),
-// ByteArray(
-// "IrcUsersAndChannels",
-// ),
-// VariantMap(
-// {
-// "Users": VariantMap(
-// {
-// "suserHost": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// ],
-// ),
-// "lastAwayMessageTime": VariantList(
-// [
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// ],
-// ),
-// "away": VariantList(
-// [
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// ],
-// ),
-// "ircOperator": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// ],
-// ),
-// "account": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "*",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "audron",
-// ),
-// ],
-// ),
-// "loginTime": VariantList(
-// [
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// ],
-// ),
-// "userModes": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "Iwxi",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// ],
-// ),
-// "host": VariantList(
-// [
-// String(
-// "services",
-// ),
-// String(
-// "irc-tar.hr0.2d7ge7.IP",
-// ),
-// String(
-// "services",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "user/audron",
-// ),
-// ],
-// ),
-// "whoisServiceReply": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// ],
-// ),
-// "channels": VariantList(
-// [
-// StringList(
-// [],
-// ),
-// StringList(
-// [
-// "#audron-test",
-// ],
-// ),
-// StringList(
-// [],
-// ),
-// StringList(
-// [],
-// ),
-// StringList(
-// [
-// "#audron-test",
-// ],
-// ),
-// ],
-// ),
-// "realName": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "Quassel IRC User",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "Max Audron <audron@cocaine.farm>",
-// ),
-// ],
-// ),
-// "nick": VariantList(
-// [
-// String(
-// "NickServ",
-// ),
-// String(
-// "audron_",
-// ),
-// String(
-// "Global",
-// ),
-// String(
-// "irc.snoonet.org",
-// ),
-// String(
-// "audron",
-// ),
-// ],
-// ),
-// "idleTime": VariantList(
-// [
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// DateTime(
-// OffsetDateTime {
-// utc_datetime: PrimitiveDateTime {
-// date: Date {
-// year: 1970,
-// ordinal: 1,
-// },
-// time: Time {
-// hour: 0,
-// minute: 0,
-// second: 0,
-// nanosecond: 0,
-// },
-// },
-// offset: UtcOffset {
-// seconds: 0,
-// },
-// },
-// ),
-// ],
-// ),
-// "encrypted": VariantList(
-// [
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// bool(
-// false,
-// ),
-// ],
-// ),
-// "awayMessage": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// ],
-// ),
-// "user": VariantList(
-// [
-// String(
-// "NickServ",
-// ),
-// String(
-// "quassel",
-// ),
-// String(
-// "Global",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "audron",
-// ),
-// ],
-// ),
-// "server": VariantList(
-// [
-// String(
-// "",
-// ),
-// String(
-// "irc.snoonet.org",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "",
-// ),
-// String(
-// "irc.snoonet.org",
-// ),
-// ],
-// ),
-// },
-// ),
-// "Channels": VariantMap(
-// {
-// "encrypted": VariantList(
-// [
-// bool(
-// false,
-// ),
-// ],
-// ),
-// "topic": VariantList(
-// [
-// String(
-// "",
-// ),
-// ],
-// ),
-// "password": VariantList(
-// [
-// String(
-// "",
-// ),
-// ],
-// ),
-// "ChanModes": VariantList(
-// [
-// VariantMap(
-// {
-// "B": VariantMap(
-// {},
-// ),
-// "D": String(
-// "tCnT",
-// ),
-// "C": VariantMap(
-// {
-// "j": String(
-// "5:1",
-// ),
-// "x": String(
-// "10:5",
-// ),
-// "f": String(
-// "30:5",
-// ),
-// "F": String(
-// "5:60",
-// ),
-// },
-// ),
-// "A": VariantMap(
-// {},
-// ),
-// },
-// ),
-// ],
-// ),
-// "UserModes": VariantList(
-// [
-// VariantMap(
-// {
-// "audron": String(
-// "o",
-// ),
-// "audron_": String(
-// "",
-// ),
-// },
-// ),
-// ],
-// ),
-// "name": VariantList(
-// [
-// String(
-// "#audron-test",
-// ),
-// ],
-// ),
-// },
-// ),
-// },
-// ),
-// ByteArray(
-// "ServerList",
-// ),
-// VariantList(
-// [
-// VariantMap(
-// {
-// "ProxyHost": String(
-// "localhost",
-// ),
-// "sslVerify": bool(
-// true,
-// ),
-// "UseSSL": bool(
-// true,
-// ),
-// "Port": u32(
-// 6697,
-// ),
-// "Password": String(
-// "",
-// ),
-// "ProxyType": i32(
-// 1,
-// ),
-// "sslVersion": i32(
-// 0,
-// ),
-// "ProxyUser": String(
-// "",
-// ),
-// "ProxyPass": String(
-// "",
-// ),
-// "Host": String(
-// "irc.snoonet.org",
-// ),
-// "ProxyPort": u32(
-// 8080,
-// ),
-// "UseProxy": bool(
-// false,
-// ),
-// },
-// ),
-// ],
-// ),
-// ByteArray(
-// "Supports",
-// ),
-// VariantMap(
-// {
-// "NAMESX": String(
-// "",
-// ),
-// "MAXTARGETS": String(
-// "20",
-// ),
-// "NICKLEN": String(
-// "27",
-// ),
-// "SILENCE": String(
-// "32",
-// ),
-// "PREFIX": String(
-// "(Yohv)!@%+",
-// ),
-// "TOPICLEN": String(
-// "307",
-// ),
-// "UHNAMES": String(
-// "",
-// ),
-// "STATUSMSG": String(
-// "!@%+",
-// ),
-// "SECURELIST": String(
-// "60",
-// ),
-// "ACCEPT": String(
-// "16",
-// ),
-// "CHANNELLEN": String(
-// "64",
-// ),
-// "KEYLEN": String(
-// "32",
-// ),
-// "EXTBAN": String(
-// ",ABCNOQRSTUacjmprsz",
-// ),
-// "CHANMODES": String(
-// "IXZbegw,k,FHJLWdfjlx,ABCDKMNOPQRSTcimnprstuz",
-// ),
-// "KICKLEN": String(
-// "255",
-// ),
-// "ESILENCE": String(
-// "CcdiNnPpTtx",
-// ),
-// "HOSTLEN": String(
-// "64",
-// ),
-// "CHANLIMIT": String(
-// "#:200",
-// ),
-// "USERMODES": String(
-// ",,s,BHILRSTWcdghikorwx",
-// ),
-// "CLIENTTAGDENY": String(
-// "*",
-// ),
-// "CHANTYPES": String(
-// "#",
-// ),
-// "NETWORK": String(
-// "Snoonet",
-// ),
-// "INVEX": String(
-// "I",
-// ),
-// "ELIST": String(
-// "CMNTU",
-// ),
-// "CALLERID": String(
-// "g",
-// ),
-// "BOT": String(
-// "B",
-// ),
-// "NAMELEN": String(
-// "128",
-// ),
-// "USERIP": String(
-// "",
-// ),
-// "MODES": String(
-// "50",
-// ),
-// "WATCH": String(
-// "30",
-// ),
-// "MAXLIST": String(
-// "I:1024,X:1024,b:1024,e:1024,g:1024,w:1024",
-// ),
-// "USERLEN": String(
-// "11",
-// ),
-// "CASEMAPPING": String(
-// "rfc1459",
-// ),
-// "REMOVE": String(
-// "",
-// ),
-// "LINELEN": String(
-// "512",
-// ),
-// "AWAYLEN": String(
-// "200",
-// ),
-// "EXCEPTS": String(
-// "e",
-// ),
-// "WHOX": String(
-// "",
-// ),
-// "SAFELIST": String(
-// "",
-// ),
-// },
-// ),
-// ByteArray(
-// "autoIdentifyPassword",
-// ),
-// String(
-// "",
-// ),
-// ByteArray(
-// "autoIdentifyService",
-// ),
-// String(
-// "NickServ",
-// ),
-// ByteArray(
-// "autoReconnectInterval",
-// ),
-// u32(
-// 60,
-// ),
-// ByteArray(
-// "autoReconnectRetries",
-// ),
-// u16(
-// 20,
-// ),
-// ByteArray(
-// "codecForDecoding",
-// ),
-// ByteArray(
-// "",
-// ),
-// ByteArray(
-// "codecForEncoding",
-// ),
-// ByteArray(
-// "",
-// ),
-// ByteArray(
-// "codecForServer",
-// ),
-// ByteArray(
-// "",
-// ),
-// ByteArray(
-// "connectionState",
-// ),
-// i32(
-// 3,
-// ),
-// ByteArray(
-// "currentServer",
-// ),
-// String(
-// "travincal.snoonet.org",
-// ),
-// ByteArray(
-// "identityId",
-// ),
-// i32(
-// 1,
-// ),
-// ByteArray(
-// "isConnected",
-// ),
-// bool(
-// true,
-// ),
-// ByteArray(
-// "latency",
-// ),
-// i32(
-// 13,
-// ),
-// ByteArray(
-// "msgRateBurstSize",
-// ),
-// u32(
-// 5,
-// ),
-// ByteArray(
-// "msgRateMessageDelay",
-// ),
-// u32(
-// 2200,
-// ),
-// ByteArray(
-// "myNick",
-// ),
-// String(
-// "audron_",
-// ),
-// ByteArray(
-// "networkName",
-// ),
-// String(
-// "snoonet",
-// ),
-// ByteArray(
-// "perform",
-// ),
-// StringList(
-// [
-// "",
-// ],
-// ),
-// ByteArray(
-// "rejoinChannels",
-// ),
-// bool(
-// true,
-// ),
-// ByteArray(
-// "saslAccount",
-// ),
-// String(
-// "",
-// ),
-// ByteArray(
-// "saslPassword",
-// ),
-// String(
-// "",
-// ),
-// ByteArray(
-// "unlimitedMessageRate",
-// ),
-// bool(
-// false,
-// ),
-// ByteArray(
-// "unlimitedReconnectRetries",
-// ),
-// bool(
-// false,
-// ),
-// ByteArray(
-// "useAutoIdentify",
-// ),
-// bool(
-// false,
-// ),
-// ByteArray(
-// "useAutoReconnect",
-// ),
-// bool(
-// true,
-// ),
-// ByteArray(
-// "useCustomMessageRate",
-// ),
-// bool(
-// false,
-// ),
-// ByteArray(
-// "useRandomServer",
-// ),
-// bool(
-// false,
-// ),
-// ByteArray(
-// "useSasl",
-// ),
-// bool(
-// false,
-// ),
-// ],
-// },
diff --git a/src/message/signalproxy/translation/mod.rs b/src/message/signalproxy/translation/mod.rs
deleted file mode 100644
index a55d6f3..0000000
--- a/src/message/signalproxy/translation/mod.rs
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
-Quassel has 3 main ways to represent an object over the Network:
-
-# VariantList
-The struct is serialized to a Vector of Variants. This is mostly used in the InitData messages.
-First the field name as a ByteArray (UTF-8 String), followed by the field value in it's own Type's variant.
-The order in which the fields are transmitted cannot be assumed.
-
-Example:
-```ignore
-NetworkConfig {
- ping_timeout_enabled: true,
- ping_interval: 0,
-}
-```
-to
-```ignore
-VariantList([
- ByteArray(
- "pingTimeoutEnabled",
- ),
- bool(
- true,
- ),
- ByteArray(
- "pingInterval",
- ),
- i32(
- 30,
- ),
-])
-```
-
-
-# VariantMap
-The struct is represented as a `VariantMap`. The keys and values of
-the struct are serialized to a corresponding `HashMap<String, Variant>`.
-
-Example:
-```ignore
-NetworkConfig {
- ping_timeout_enabled: false,
- ping_interval: 0,
-}
-```
-to
-```ignore
-VariantMap({
- "pingTimeoutEnabled": bool(false)
- "pingInterval": i32(0)
-})
-```
-
-## Structure of Arrays
-
-For Objects that are transmitted as multiple at once the VariantMap
-representation is augemented and instead of transmitting multiple `VariantMaps`,
-each field is a `VariantList` of Items.
-
-Example:
-```ignore
-vec![
- NetworkConfig {
- ping_timeout_enabled: false,
- ping_interval: 0,
- },
- NetworkConfig {
- ping_timeout_enabled: true,
- ping_interval: 1,
- },
-]
-```
-to
-```ignore
-VariantMap({
- "pingTimeoutEnabled": VariantList([
- bool(false),
- bool(true),
- ]),
- "pingInterval": VariantList([
- i32(0),
- i32(1),
- ])
-})
-```
-**/
-use crate::primitive::{Variant, VariantList};
-
-#[deprecated(since="0.1.0", note="please use NetworkMap and NetworkList implementations")]
-pub trait Network {
- type Item;
-
- fn to_network(&self) -> Self::Item;
- fn from_network(input: &mut Self::Item) -> Self;
-}
-
-pub trait NetworkMap
-where
- // TODO correct this error type
- Self::Item: TryFrom<Variant, Error = String>,
- Self::Item: Into<Variant>,
-{
- type Item;
-
- fn to_network_map(&self) -> Self::Item;
- fn from_network_map(input: &mut Self::Item) -> Self;
-}
-
-pub trait NetworkList {
- fn to_network_list(&self) -> VariantList;
- fn from_network_list(input: &mut VariantList) -> Self;
-}