aboutsummaryrefslogtreecommitdiff
path: root/aero-proto/src/dav/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'aero-proto/src/dav/node.rs')
-rw-r--r--aero-proto/src/dav/node.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/aero-proto/src/dav/node.rs b/aero-proto/src/dav/node.rs
index b0f97a5..96bd52b 100644
--- a/aero-proto/src/dav/node.rs
+++ b/aero-proto/src/dav/node.rs
@@ -1,4 +1,5 @@
use anyhow::Result;
+use futures::Stream;
use futures::future::BoxFuture;
use aero_dav::types as dav;
@@ -6,6 +7,7 @@ use aero_dav::realization::All;
use aero_collections::user::User;
type ArcUser = std::sync::Arc<User>;
+pub(crate) type Content = Box<dyn Stream<Item=Result<u64>>>;
pub(crate) enum PutPolicy {
CreateOnly,
@@ -28,8 +30,8 @@ pub(crate) trait DavNode: Send {
fn supported_properties(&self, user: &ArcUser) -> dav::PropName<All>;
/// Get the values for the given properties
fn properties(&self, user: &ArcUser, prop: dav::PropName<All>) -> Vec<dav::AnyProperty<All>>;
- /// Put a child
- //fn put(&self, policy: PutPolicy, stream: TryStream) -> BoxFuture<Result<dyn DavNode>>;
+ /// Put an element (create or update)
+ fn put(&self, policy: PutPolicy, stream: Content) -> BoxFuture<Result<()>>;
/// Get content
//fn content(&self) -> TryStream;