diff options
author | metamuffin <yvchraiqi@protonmail.com> | 2022-06-10 10:47:16 +0200 |
---|---|---|
committer | metamuffin <yvchraiqi@protonmail.com> | 2022-06-10 10:47:16 +0200 |
commit | 3238f8517097745032e19b3e26f57f0465a00b28 (patch) | |
tree | 2c712d2ab45276bed2981dbc32b7a4adeadbc878 /src/main.rs | |
parent | 829f0dc5ac68ee8a030894ce26c83b1c4eb02104 (diff) | |
download | karlender-3238f8517097745032e19b3e26f57f0465a00b28.tar karlender-3238f8517097745032e19b3e26f57f0465a00b28.tar.bz2 karlender-3238f8517097745032e19b3e26f57f0465a00b28.tar.zst |
move to workspace
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 9a84286..0000000 --- a/src/main.rs +++ /dev/null @@ -1,44 +0,0 @@ -pub mod condition; -pub mod interface; -pub mod protocol; - -use crate::{ - condition::{Condition, Property}, - protocol::Task, -}; -use crossbeam_channel::Sender; -use interface::network_loop; -use protocol::{ClientboundPacket, ServerboundPacket}; - -fn main() { - network_loop(); -} - -pub fn handle_packet(client: u32, packet: ServerboundPacket, responder: Sender<ClientboundPacket>) { - println!("{:?}, {:?}, {:?}", client, packet, responder); - match packet { - ServerboundPacket::Download => { - let _ = responder.send(ClientboundPacket::DownloadResponse(vec![Task { - name: "blub".to_string(), - description: "blob".to_string(), - tags: vec![], - priority: 69.0, - completed: None, - scheduled: None, - occurence: Some(Condition::And(vec![ - Condition::Equal { - modulus: None, - prop: Property::Monthofyear, - value: 1, - }, - Condition::Equal { - modulus: None, - prop: Property::Hour, - value: 12, - }, - ])), - deadline: None, - }])); - } - } -} |