aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-10-24 18:17:58 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2023-10-24 18:17:58 +0200
commit4a351f516947afbde448a387921ae53db547c345 (patch)
tree4171f42918b1c79d05b6a57c90871d6fb3cca391
parentAdd tests for (calp translation). (diff)
downloadcalp-4a351f516947afbde448a387921ae53db547c345.tar.gz
calp-4a351f516947afbde448a387921ae53db547c345.tar.xz
Split webdav documentation into multiple files.
-rw-r--r--doc/ref/webdav.texi253
-rw-r--r--doc/ref/webdav/properties.texi39
-rw-r--r--doc/ref/webdav/resource-types.texi38
-rw-r--r--doc/ref/webdav/resources.texi157
-rw-r--r--doc/ref/webdav/util.texi10
5 files changed, 248 insertions, 249 deletions
diff --git a/doc/ref/webdav.texi b/doc/ref/webdav.texi
index a6593b93..991a15b1 100644
--- a/doc/ref/webdav.texi
+++ b/doc/ref/webdav.texi
@@ -41,252 +41,7 @@ Live properties are handled through GOOPS methods.
Dead properties are (by default) stored directly inside each resource.
-@node WebDAV Properties
-@section Properties
-
-@itemize
-@item @code{(calp webdav property)}
-@item @code{(calp webdav propfind)}
-@end itemize
-
-@subsection Default Live Properties
-
-@deftp {GOOPS method} creationdate
-@end deftp
-
-@deftp {GOOPS method} displayname
-@end deftp
-
-@deftp {GOOPS method} getcontentlanguage
-@end deftp
-
-@deftp {GOOPS method} getcontentlength
-@end deftp
-
-@deftp {GOOPS method} getcontenttype
-@end deftp
-
-@deftp {GOOPS method} getetag
-@end deftp
-
-@deftp {GOOPS method} getlastmodified
-@end deftp
-
-@deftp {GOOPS method} lockdiscovery
-@end deftp
-
-@deftp {GOOPS method} resourcetype
-@end deftp
-
-@deftp {GOOPS method} supportedlock
-@end deftp
-
-
-@node WebDAV Resources
-@section Resources
-
-@deftp {GOOPS class} <resource>
-Base type for all WebDAV resources.
-
-The base class shouldn't be directly instanciated.
-
- @defun resource? x
- Is the given object a <resource>, or decendant?
- @end defun
-@end deftp
-
-@deftp {GOOPS method} name resource
-The name of a resource is the local part of a href.
-@end deftp
-
-@deftp {GOOPS method} children resource
-All direct children of a resource, as a list.
-@end deftp
-
-@defun add-child! parent child [#:overwrite?] [#:collection?=(is-collection? child)]
-Adds a resource as a child of another resource.
-
-Before adding the resource to the parents child set,
-@code{(setup-new-resource! child parent)} is called. If
-@var{collection?} is true, then
-@code{(setup-new-collection! child parent)} is also called.
-
-If @var{overwrite?} is present, then the parent will be checked for a
-child which already has that name, and take action accordingly.
-It will return one of: @code{'replaced} if a resource already existed
-with that name, but it has been replaced, @code{'collision}, if the
-old one was kept, and @code{'created} if the new resource was added
-without collisions.
-
-If @var{overwrite?} is absent then the method always returns @var{'created}.
-@end defun
-
-@defun add-resource! resource name content
-Creates a new resource with the given name, and make it a child of
-@var{self}. Setting its initial content to @var{content}.
-
-Calls @code{add-resource!}, so the same book-keeping procedures are called.
-@c TODO Document throw
-@c TODO Document return
-@end defun
-
-@defun add-collection! resource name
-Similar to @code{add-resource!} but the created resource is instead a collection.
-@end defun
-
-@deftp {GOOPS method} setup-new-resource! (self <resource>) (parent <resource>)
-Book-keeping procedure called by @code{add-resource!} on @emph{all}
-added resources.
-
-Base implementation in a no-op.
-@end deftp
-
-@deftp {GOOPS method} setup-new-collection! (self <resource>) (parent <resource>)
-Book-keeping procedure called by @code{add-resource!} if
-@var{collection?} is true.
-
-Base implementation is a no-op.
-@end deftp
-
-@deftp {GOOPS method} is-collection? resource
-Is the given resource a collection.
-
-The base implementation simply checks if the resource has any children.
-@end deftp
-
-@deftp {GOOPS method} content resource
-@deftpx {GOOPS method} set-content! resource content
-Get and set the content of a given resource. @var{content}s type can
-be anything that the given resource type accepts. Overrides of this
-procedure should preferably save its contents properly.
-@end deftp
-
-@c
-
-@defun get-property resource xml-tag
-@defunx get-live-property resource xml-tag
-@defunx get-dead-property resource xml-tag
-@end defun
-
-
-@defun set-property resource xml-el
-@defunx set-property! resource xml-el
-@defunx set-dead-property resource xml-el
-@defunx set-dead-property! resource xml-el
-@defunx set-live-property resource xml-el
-@defunx set-live-property! resource xml-el
-@end defun
-
-
-@defun remove-property resource xml-tag
-@defunx remove-property! resource xml-tag
-@defunx remove-dead-property resource xml-tag
-@defunx remove-dead-property! resource xml-tag
-@defunx remove-live-property resource xml-tag
-@defunx remove-live-property! resource xml-tag
-@end defun
-
-@c
-
-@deftp {GOOPS method} copy-resource (resource <resource>) include-children? [name]
-Create a new resource which looks as similar as possible to the given
-resource. The new resource will have the same (GOOPS) class as the
-source, displayname, contentlanguage and all dead properties are
-transfered, other live properties are currently not explicitly
-transfered (but probably still transfered implicitly).
-
-The new resources name is @var{name} if given, and the name of the
-original resource otherwise.
-
-If @var{include-children?} is true then a deep copy is performed,
-otherwise no children are copied, and the resulting resource will be a
-leaf node.
-
-Content is copied verbatim.
-
-@b{NOTE} currently no helper method is called, which means that extra
-resources held by the resource object can't be copied.
-For example, FILE can't create a copy (but it also shouldn't do that
-here, but rathen when the element is ``mounted'' into the tree).
-@end deftp
-
-@c
-
-@defun lookup-resource root-resource path
-@end defun
-
-
-@defun all-resources-under resource [prefix='()]
-Returns the given resource, and all its children in a flat list.
-
-Currently depth first, but that might change.
-The root resource is however guaranteed to be first.
-@end defun
-
-@c
-
-@c TODO
- make-live-property
- live-property?
- property-getter
-
- property-setter-generator
- property-remover-generator
-
- prepare-update-properties
-
- live-properties
- dead-properties
-
- webdav-properties
-
-
-@node WebDAV Resource Types
-@section Resource Types
-
-@subsection @code{(calp webdav resource base)}
-
-Implementation of @code{(calp webdav resource)}. Exists to possibly
-avoid dependency loops.
-
-@subsection @code{(calp webdav resource calendar)}
-@subsection @code{(calp webdav resource file)}
-
-Resources backed by the file system.
-
-@defun file-resource? x
-@end defun
-
-@deftp {GOOPS method} children <file-resource>
-@end deftp
-
-@deftp {GOOPS method} is-collection? <file-resource>
-@end deftp
-
-@deftp {GOOPS method} creationdate <file-resource>
-Retrived directly from the file through @command{stat -c %W $@{filename@}}.
-@end deftp
-
-@deftp {GOOPS method} content <file-resource>
-@deftpx {GOOPS method} set-content! <file-resource> data
-Directly interfaced with the file.
-
-Data can't be retrieved for collections, and will always be
-returned as a bytevector for non-collections.
-
-Data can be set either as a string or a bytevector. When a string is
-used Guile's current encoding will be used.
-@end deftp
-
-@subsection @code{(calp webdav resource virtual)}
-
-@node WebDAV Utilities
-@section Utilities
-@defun href->string href
-HREF's are represented as lists of strings. The root resource (``/'')
-is the empty list.
-@end defun
-
-@defun string->href string
-Return a href list back into a string. A leading slash will always be added.
-@end defun
+@include webdav/properties.texi
+@include webdav/resources.texi
+@include webdav/resource-types.texi
+@include webdav/util.texi
diff --git a/doc/ref/webdav/properties.texi b/doc/ref/webdav/properties.texi
new file mode 100644
index 00000000..dc591292
--- /dev/null
+++ b/doc/ref/webdav/properties.texi
@@ -0,0 +1,39 @@
+@node WebDAV Properties
+@section Properties
+
+@itemize
+@item @code{(calp webdav property)}
+@item @code{(calp webdav propfind)}
+@end itemize
+
+@subsection Default Live Properties
+
+@deftp {GOOPS method} creationdate
+@end deftp
+
+@deftp {GOOPS method} displayname
+@end deftp
+
+@deftp {GOOPS method} getcontentlanguage
+@end deftp
+
+@deftp {GOOPS method} getcontentlength
+@end deftp
+
+@deftp {GOOPS method} getcontenttype
+@end deftp
+
+@deftp {GOOPS method} getetag
+@end deftp
+
+@deftp {GOOPS method} getlastmodified
+@end deftp
+
+@deftp {GOOPS method} lockdiscovery
+@end deftp
+
+@deftp {GOOPS method} resourcetype
+@end deftp
+
+@deftp {GOOPS method} supportedlock
+@end deftp
diff --git a/doc/ref/webdav/resource-types.texi b/doc/ref/webdav/resource-types.texi
new file mode 100644
index 00000000..1861acc0
--- /dev/null
+++ b/doc/ref/webdav/resource-types.texi
@@ -0,0 +1,38 @@
+@node WebDAV Resource Types
+@section Resource Types
+
+@subsection @code{(calp webdav resource base)}
+
+Implementation of @code{(calp webdav resource)}. Exists to possibly
+avoid dependency loops.
+
+@subsection @code{(calp webdav resource calendar)}
+@subsection @code{(calp webdav resource file)}
+
+Resources backed by the file system.
+
+@defun file-resource? x
+@end defun
+
+@deftp {GOOPS method} children <file-resource>
+@end deftp
+
+@deftp {GOOPS method} is-collection? <file-resource>
+@end deftp
+
+@deftp {GOOPS method} creationdate <file-resource>
+Retrived directly from the file through @command{stat -c %W $@{filename@}}.
+@end deftp
+
+@deftp {GOOPS method} content <file-resource>
+@deftpx {GOOPS method} set-content! <file-resource> data
+Directly interfaced with the file.
+
+Data can't be retrieved for collections, and will always be
+returned as a bytevector for non-collections.
+
+Data can be set either as a string or a bytevector. When a string is
+used Guile's current encoding will be used.
+@end deftp
+
+@subsection @code{(calp webdav resource virtual)}
diff --git a/doc/ref/webdav/resources.texi b/doc/ref/webdav/resources.texi
new file mode 100644
index 00000000..b9b3869f
--- /dev/null
+++ b/doc/ref/webdav/resources.texi
@@ -0,0 +1,157 @@
+@node WebDAV Resources
+@section Resources
+
+@deftp {GOOPS class} <resource>
+Base type for all WebDAV resources.
+
+The base class shouldn't be directly instanciated.
+
+ @defun resource? x
+ Is the given object a <resource>, or decendant?
+ @end defun
+@end deftp
+
+@deftp {GOOPS method} name resource
+The name of a resource is the local part of a href.
+@end deftp
+
+@deftp {GOOPS method} children resource
+All direct children of a resource, as a list.
+@end deftp
+
+@defun add-child! parent child [#:overwrite?] [#:collection?=(is-collection? child)]
+Adds a resource as a child of another resource.
+
+Before adding the resource to the parents child set,
+@code{(setup-new-resource! child parent)} is called. If
+@var{collection?} is true, then
+@code{(setup-new-collection! child parent)} is also called.
+
+If @var{overwrite?} is present, then the parent will be checked for a
+child which already has that name, and take action accordingly.
+It will return one of: @code{'replaced} if a resource already existed
+with that name, but it has been replaced, @code{'collision}, if the
+old one was kept, and @code{'created} if the new resource was added
+without collisions.
+
+If @var{overwrite?} is absent then the method always returns @var{'created}.
+@end defun
+
+@defun add-resource! resource name content
+Creates a new resource with the given name, and make it a child of
+@var{self}. Setting its initial content to @var{content}.
+
+Calls @code{add-resource!}, so the same book-keeping procedures are called.
+@c TODO Document throw
+@c TODO Document return
+@end defun
+
+@defun add-collection! resource name
+Similar to @code{add-resource!} but the created resource is instead a collection.
+@end defun
+
+@deftp {GOOPS method} setup-new-resource! (self <resource>) (parent <resource>)
+Book-keeping procedure called by @code{add-resource!} on @emph{all}
+added resources.
+
+Base implementation in a no-op.
+@end deftp
+
+@deftp {GOOPS method} setup-new-collection! (self <resource>) (parent <resource>)
+Book-keeping procedure called by @code{add-resource!} if
+@var{collection?} is true.
+
+Base implementation is a no-op.
+@end deftp
+
+@deftp {GOOPS method} is-collection? resource
+Is the given resource a collection.
+
+The base implementation simply checks if the resource has any children.
+@end deftp
+
+@deftp {GOOPS method} content resource
+@deftpx {GOOPS method} set-content! resource content
+Get and set the content of a given resource. @var{content}s type can
+be anything that the given resource type accepts. Overrides of this
+procedure should preferably save its contents properly.
+@end deftp
+
+@c
+
+@defun get-property resource xml-tag
+@defunx get-live-property resource xml-tag
+@defunx get-dead-property resource xml-tag
+@end defun
+
+
+@defun set-property resource xml-el
+@defunx set-property! resource xml-el
+@defunx set-dead-property resource xml-el
+@defunx set-dead-property! resource xml-el
+@defunx set-live-property resource xml-el
+@defunx set-live-property! resource xml-el
+@end defun
+
+
+@defun remove-property resource xml-tag
+@defunx remove-property! resource xml-tag
+@defunx remove-dead-property resource xml-tag
+@defunx remove-dead-property! resource xml-tag
+@defunx remove-live-property resource xml-tag
+@defunx remove-live-property! resource xml-tag
+@end defun
+
+@c
+
+@deftp {GOOPS method} copy-resource (resource <resource>) include-children? [name]
+Create a new resource which looks as similar as possible to the given
+resource. The new resource will have the same (GOOPS) class as the
+source, displayname, contentlanguage and all dead properties are
+transfered, other live properties are currently not explicitly
+transfered (but probably still transfered implicitly).
+
+The new resources name is @var{name} if given, and the name of the
+original resource otherwise.
+
+If @var{include-children?} is true then a deep copy is performed,
+otherwise no children are copied, and the resulting resource will be a
+leaf node.
+
+Content is copied verbatim.
+
+@b{NOTE} currently no helper method is called, which means that extra
+resources held by the resource object can't be copied.
+For example, FILE can't create a copy (but it also shouldn't do that
+here, but rathen when the element is ``mounted'' into the tree).
+@end deftp
+
+@c
+
+@defun lookup-resource root-resource path
+@end defun
+
+
+@defun all-resources-under resource [prefix='()]
+Returns the given resource, and all its children in a flat list.
+
+Currently depth first, but that might change.
+The root resource is however guaranteed to be first.
+@end defun
+
+@c
+
+@c TODO
+ make-live-property
+ live-property?
+ property-getter
+
+ property-setter-generator
+ property-remover-generator
+
+ prepare-update-properties
+
+ live-properties
+ dead-properties
+
+ webdav-properties
diff --git a/doc/ref/webdav/util.texi b/doc/ref/webdav/util.texi
new file mode 100644
index 00000000..c45f8a72
--- /dev/null
+++ b/doc/ref/webdav/util.texi
@@ -0,0 +1,10 @@
+@node WebDAV Utilities
+@section Utilities
+@defun href->string href
+HREF's are represented as lists of strings. The root resource (``/'')
+is the empty list.
+@end defun
+
+@defun string->href string
+Return a href list back into a string. A leading slash will always be added.
+@end defun