diff --git a/src/lib.rs b/src/lib.rs index 760260a..e58c8e2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,10 +15,14 @@ use webrtc::peer_connection::sdp::session_description::RTCSessionDescription; use webrtc::ice_transport::ice_candidate::{RTCIceCandidate, RTCIceCandidateInit}; mod boxes; +mod tracking_events; + use boxes::NormalizedBoxCoords; +use tracking_events::TrackingUpdate; pub mod types { pub use crate::boxes::NormalizedBoxCoords; + pub use crate::tracking_events::TrackingUpdate; } static MAX_MESSAGE: usize = 50; @@ -32,7 +36,7 @@ pub enum ApplicationMessage { NameRequest(Option), ChangeTrackingID(u16), - TrackingBoxes(Vec), + TrackingBoxes(TrackingUpdate), ManualMovementOverride((i32, i32)), WebRTCPacket(RTCSessionDescription), diff --git a/src/tracking_events.rs b/src/tracking_events.rs new file mode 100644 index 0000000..cb70f07 --- /dev/null +++ b/src/tracking_events.rs @@ -0,0 +1,10 @@ +use serde::{Serialize, Deserialize}; + +use crate::NormalizedBoxCoords; + + +#[derive(Serialize, Deserialize, Debug, Clone)] +pub struct TrackingUpdate { + target_id: Option, + boxes: Vec +}