diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-28 17:21:30 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-28 17:21:30 +0200 |
commit | a2f5b451bd32780d60be69c6412cb351a54b765b (patch) | |
tree | dc8dc26889d9f447dffd1b2f0968c348386cfcd7 /aero-proto/src/dav/node.rs | |
parent | 18f2154151b2cf81e03bdda28fa2ea5d685e33d1 (diff) | |
download | aerogramme-caldav.tar.gz aerogramme-caldav.zip |
initial implementation of sync-collectioncaldav
Diffstat (limited to 'aero-proto/src/dav/node.rs')
-rw-r--r-- | aero-proto/src/dav/node.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/aero-proto/src/dav/node.rs b/aero-proto/src/dav/node.rs index 877342a..0a83f8c 100644 --- a/aero-proto/src/dav/node.rs +++ b/aero-proto/src/dav/node.rs @@ -3,7 +3,7 @@ use futures::future::{BoxFuture, FutureExt}; use futures::stream::{BoxStream, StreamExt}; use hyper::body::Bytes; -use aero_collections::davdag::Etag; +use aero_collections::davdag::{Etag, Token}; use aero_dav::realization::All; use aero_dav::types as dav; @@ -55,8 +55,14 @@ pub(crate) trait DavNode: Send { fn content<'a>(&self) -> Content<'a>; /// Delete fn delete(&self) -> BoxFuture<std::result::Result<(), std::io::Error>>; - - //@FIXME maybe add etag, maybe add a way to set content + /// Sync + fn diff<'a>( + &self, + sync_token: Option<Token>, + ) -> BoxFuture< + 'a, + std::result::Result<(Token, Vec<Box<dyn DavNode>>, Vec<dav::Href>), std::io::Error>, + >; /// Utility function to get a propname response from a node fn response_propname(&self, user: &ArcUser) -> dav::Response<All> { |