More API changes
This commit is contained in:
parent
0cf441475d
commit
f8c8f09203
3 changed files with 10 additions and 3 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue