diff --git a/src/data/calendar.rs b/src/data/calendar.rs index b4d7482..8c31076 100644 --- a/src/data/calendar.rs +++ b/src/data/calendar.rs @@ -1,4 +1,5 @@ use crate::data::Task; +use crate::data::task::TaskId; /// A Caldav Calendar pub struct Calendar { diff --git a/src/data/mod.rs b/src/data/mod.rs index 9e14d79..db9e69c 100644 --- a/src/data/mod.rs +++ b/src/data/mod.rs @@ -5,11 +5,11 @@ use std::sync::Arc; mod calendar; -mod tasks; +mod task; mod client; pub use calendar::Calendar; -pub use tasks::Task; +pub use task::Task; use client::Client; /// A Caldav data source @@ -38,6 +38,10 @@ impl DataSource { // TODO: how to handle conflicts? } + pub fn update_changes_to_server(&self) { + + } + pub fn calendars(&self) -> Vec<&Calendar> { self.calendars .iter() diff --git a/src/data/tasks.rs b/src/data/task.rs similarity index 93% rename from src/data/tasks.rs rename to src/data/task.rs index 838e9cb..91011bf 100644 --- a/src/data/tasks.rs +++ b/src/data/task.rs @@ -1,8 +1,10 @@ use uuid::Uuid; +pub type TaskId = Uuid; + /// A to-do task pub struct Task { - id: Uuid, + id: TaskId, name: String, }