--- /dev/null
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2026 Olaf Wintermann. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#![allow(dead_code)]
+
+use crate::dav::session::Session;
+
+pub struct DavQuery {
+ pub from: String,
+ pub properties: Vec<String>,
+ pub filter: Vec<String>,
+ pub depth: u16
+}
+
+pub fn query(from: &str) -> DavQuery {
+ DavQuery {
+ from: from.to_string(),
+ properties: Vec::new(),
+ filter: Vec::new(),
+ depth: 1
+ }
+}
+
+impl DavQuery {
+ pub fn property(&mut self, prop: &str) -> &Self {
+ self.properties.push(prop.to_string());
+ self
+ }
+
+ pub fn depth(&mut self, depth: u16) -> &mut Self {
+ self.depth = depth;
+ self
+ }
+
+ pub fn filter(&mut self, filter: Cmp) -> &mut Self {
+ self.filter.push(filter.cmp);
+ self
+ }
+}
+
+
+pub struct Cmp {
+ cmp: String,
+}
+
+
+impl Cmp {
+ pub fn eq_str(prop: &str, str: &str) -> Cmp {
+ Cmp {
+ cmp: format!("{} = '{}'", prop, str),
+ }
+ }
+}
\ No newline at end of file