From d7488b8040278c2cf9cd1b1eead206efe408cd9f Mon Sep 17 00:00:00 2001 From: Max Audron Date: Mon, 5 Apr 2021 18:03:46 +0200 Subject: WIP: impl more signalproxy objects --- src/message/signalproxy/objects/ircuser.rs | 53 ++++++++++-------------------- 1 file changed, 18 insertions(+), 35 deletions(-) (limited to 'src/message/signalproxy/objects/ircuser.rs') diff --git a/src/message/signalproxy/objects/ircuser.rs b/src/message/signalproxy/objects/ircuser.rs index 1064965..85fea81 100644 --- a/src/message/signalproxy/objects/ircuser.rs +++ b/src/message/signalproxy/objects/ircuser.rs @@ -1,56 +1,39 @@ -use std::collections::HashMap; - -use crate::primitive::{DateTime, StringList, Variant, VariantMap}; +use crate::primitive::{DateTime, StringList}; #[allow(unused_imports)] use crate::message::signalproxy::Network; use libquassel_derive::Network; -impl Network for Vec { - type Item = VariantMap; - - fn to_network(&self) -> Self::Item { - Variant::VariantMap(self.iter().fold(HashMap::new(), |mut res, v| { - res.extend(v.to_network()); - - res - })) - } - fn from_network(input: &mut Self::Item) -> Self { - todo!() - } -} - #[allow(dead_code)] #[derive(Debug, Clone, PartialEq, Network)] #[network(repr = "maplist")] pub struct IrcUser { - user: String, - host: String, - nick: String, + pub user: String, + pub host: String, + pub nick: String, #[network(rename = "realName")] - real_name: String, - account: String, - away: bool, + pub real_name: String, + pub account: String, + pub away: bool, #[network(rename = "awayMessage")] - away_message: String, + pub away_message: String, #[network(rename = "idleTime")] - idle_time: DateTime, + pub idle_time: DateTime, #[network(rename = "loginTime")] - login_time: DateTime, - server: String, + pub login_time: DateTime, + pub server: String, #[network(rename = "ircOperator")] - irc_operator: String, + pub irc_operator: String, #[network(rename = "lastAwayMessageTime")] - last_away_message_time: DateTime, + pub last_away_message_time: DateTime, #[network(rename = "whoisServiceReply")] - whois_service_reply: String, + pub whois_service_reply: String, #[network(rename = "suserHost")] - suser_host: String, - encrypted: bool, - channels: StringList, + pub suser_host: String, + pub encrypted: bool, + pub channels: StringList, #[network(rename = "userModes")] - user_modes: String, + pub user_modes: String, } #[cfg(test)] -- cgit v1.2.3 path: root/src/primitive/message.rs (unfollow)
lass='deletions'>-551/+850
Commit message (Expand)AuthorLines
2021-09-28statetracker: cleanup codeMax Audron-29/+86
2021-09-28statetracker: first iteration of working rpc objectMax Audron-0/+709
2021-08-17rename override_type to typeMax Audron-7/+7
2021-08-17WIPMax Audron-10/+17
2021-07-31fix trailing semicolon match_variant macroMax Audron-1/+1
2021-07-31add doc for network translationMax Audron-0/+93
2021-07-25add Traits for syncable objectsMax Audron-48/+114
2021-07-21cleanup objects::TypesMax Audron-5/+35
2021-07-21add IgnoreListManagerMax Audron-0/+165
2021-07-21add cert-managerMax Audron-0/+32
2021-07-21add BufferViewManager and BufferViewConfigMax Audron-0/+95
2021-07-21migrate BufferSyncer to use Network derive and add to central TypesMax Audron-143/+22
2021-07-21rewrite network derive to work more consistentlyMax Audron-78/+90
2021-07-21fix wrong capitalization for HighlightRuleListMax Audron-2/+2
2021-07-21implement the Network trait generically for all inner Variant TypesMax Audron-1/+66
2021-07-21change IRC MessageType to be a bitflag instead of enumMax Audron-54/+94
2021-07-21fix network objectMax Audron-18/+24
2021-07-21minor docs and cleanupMax Audron-4/+8
2021-04-05WIP: impl more signalproxy objectsMax Audron-1000/+1621
2021-03-09WIP: impl signalproxy typesMax Audron-253/+376
2021-01-21add to and from network deriveMax Audron-42/+2767
2021-01-21reorganize tests and add quassel featuresMax Audron-551/+850
2021-01-04add example program: quasselproxyclientMax Audron-0/+280
2021-01-04random stuffMax Audron-2/+9
2021-01-04add more signalproxy objectsMax Audron-40/+120
2021-01-04add message parsing feature flagsMax Audron-43/+96
2021-01-04fix parsing of datetime when value is -1Max Audron-1/+9
2021-01-02update dependenciesMax Audron-267/+27
2021-01-02rework handshakemessage parsingMax Audron-141/+278
2020-10-16updateMax Audron-1553/+294
2020-10-16update paperworkMax Audron-487/+391
2021-01-04add example program: quasselproxyclientMax Audron-0/+280
and inspection proxy for quassel
2021-01-04random stuffMax Audron-2/+9
2021-01-04add more signalproxy objectsMax Audron-40/+120
2021-01-04add message parsing feature flagsMax Audron-43/+96
2021-01-04fix parsing of datetime when value is -1Max Audron-1/+9
2021-01-02update dependenciesMax Audron-267/+27
2021-01-02rework handshakemessage parsingMax Audron-141/+278
2020-10-16updateMax Audron-1553/+294
2020-10-16update paperworkMax Audron-487/+391