use super::types as dav; use super::versioningtypes as vers; // RFC 6578 // https://datatracker.ietf.org/doc/html/rfc6578 #[derive(Debug, PartialEq, Clone)] pub enum PropertyRequest { SyncToken(SyncTokenRequest), } #[derive(Debug, PartialEq, Clone)] pub enum Property { SyncToken(SyncToken), } #[derive(Debug, PartialEq, Clone)] pub enum ReportTypeName { SyncCollection, } //@FIXME add SyncToken to Multistatus /// Name: sync-collection /// /// Namespace: DAV: /// /// Purpose: WebDAV report used to synchronize data between client and /// server. /// /// Description: See Section 3. /// /// /// /// /// #[derive(Debug, PartialEq, Clone)] pub struct SyncCollection { pub sync_token: SyncTokenRequest, pub sync_level: SyncLevel, pub limit: Option, pub prop: dav::PropName, } /// Name: sync-token /// /// Namespace: DAV: /// /// Purpose: The synchronization token provided by the server and /// returned by the client. /// /// Description: See Section 3. /// /// /// /// /// Used by multistatus #[derive(Debug, PartialEq, Clone)] pub struct SyncToken(pub String); /// Used by propfind and report sync-collection #[derive(Debug, PartialEq, Clone)] pub enum SyncTokenRequest { InitialSync, IncrementalSync(String), } /// Name: sync-level /// /// Namespace: DAV: /// /// Purpose: Indicates the "scope" of the synchronization report /// request. /// /// Description: See Section 3.3. #[derive(Debug, PartialEq, Clone)] pub enum SyncLevel { One, Infinite, }