Initial API structre

This commit is contained in:
daladim 2021-02-18 12:02:04 +01:00
commit 58b96a89b0
9 changed files with 133 additions and 0 deletions

24
src/data/calendar.rs Normal file
View file

@ -0,0 +1,24 @@
use crate::data::TaskView;
/// A Caldav Calendar
pub struct Calendar {
name: String,
tasks: Vec<TaskView>,
}
impl Calendar {
pub fn name() -> String {
self.name
}
pub fn tasks() -> Vec<TaskView> {
self.tasks
}
}
impl Drop for Calendar {
fn drop(&mut self) {
// TODO: display a warning in case some TaskViews still have a refcount > 0
}
}