diff --git a/citadel-internal-service-types/src/messaging_layer.rs b/citadel-internal-service-types/src/messaging_layer.rs new file mode 100644 index 0000000..0c5a1b6 --- /dev/null +++ b/citadel-internal-service-types/src/messaging_layer.rs @@ -0,0 +1,30 @@ +use serde::{Deserialize, Serialize}; +use crate::InternalServiceResponse; + + +pub enum MessengerUpdate { + Message { message: CWMessage }, + Other { response: InternalServiceResponse }, +} + +#[derive(Serialize, Deserialize)] +pub enum CWProtocolMessage { + Message { message: CWMessage }, + MessageAck { id: u64 }, + Poll { ids: Vec }, + PollResponse { messages: Vec }, +} + +pub struct OutgoingCWMessage { + pub cid: u64, + pub peer_cid: Option, + pub contents: Vec, +} + +#[derive(Serialize, Deserialize)] +pub struct CWMessage { + pub id: u64, + pub cid: u64, + pub peer_cid: Option, + pub contents: Vec, +} \ No newline at end of file