Initial API structre
This commit is contained in:
commit
58b96a89b0
9 changed files with 133 additions and 0 deletions
24
src/data/calendar.rs
Normal file
24
src/data/calendar.rs
Normal 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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue