More API changes
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
use crate::data::Task;
|
use crate::data::Task;
|
||||||
|
use crate::data::task::TaskId;
|
||||||
|
|
||||||
/// A Caldav Calendar
|
/// A Caldav Calendar
|
||||||
pub struct Calendar {
|
pub struct Calendar {
|
||||||
|
|||||||
+6
-2
@@ -5,11 +5,11 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
mod calendar;
|
mod calendar;
|
||||||
mod tasks;
|
mod task;
|
||||||
mod client;
|
mod client;
|
||||||
|
|
||||||
pub use calendar::Calendar;
|
pub use calendar::Calendar;
|
||||||
pub use tasks::Task;
|
pub use task::Task;
|
||||||
use client::Client;
|
use client::Client;
|
||||||
|
|
||||||
/// A Caldav data source
|
/// A Caldav data source
|
||||||
@@ -38,6 +38,10 @@ impl DataSource {
|
|||||||
// TODO: how to handle conflicts?
|
// TODO: how to handle conflicts?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn update_changes_to_server(&self) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
pub fn calendars(&self) -> Vec<&Calendar> {
|
pub fn calendars(&self) -> Vec<&Calendar> {
|
||||||
self.calendars
|
self.calendars
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
|
pub type TaskId = Uuid;
|
||||||
|
|
||||||
/// A to-do task
|
/// A to-do task
|
||||||
pub struct Task {
|
pub struct Task {
|
||||||
id: Uuid,
|
id: TaskId,
|
||||||
name: String,
|
name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user