aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2023-02-23 03:22:34 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2023-04-10 23:45:29 +0200
commitf82286eabe54ad58dc32df81fd3dcbb4e2bb2e65 (patch)
treec791ad35d990a8cc8e1b2f202ec86a426969bea2 /doc
parentMinor style change. (diff)
downloadcalp-f82286eabe54ad58dc32df81fd3dcbb4e2bb2e65.tar.gz
calp-f82286eabe54ad58dc32df81fd3dcbb4e2bb2e65.tar.xz
Put base for new store-load interface.
Diffstat (limited to 'doc')
-rw-r--r--doc/ref/guile.texi1
-rw-r--r--doc/ref/guile/save-load.texi63
2 files changed, 64 insertions, 0 deletions
diff --git a/doc/ref/guile.texi b/doc/ref/guile.texi
index 970e8dee..95f593a7 100644
--- a/doc/ref/guile.texi
+++ b/doc/ref/guile.texi
@@ -1,6 +1,7 @@
@node Guile
@chapter Guile
+@include guile/save-load.texi
@include guile/datetime.texi
@include guile/zic.texi
@include guile/srfi-41.texi
diff --git a/doc/ref/guile/save-load.texi b/doc/ref/guile/save-load.texi
new file mode 100644
index 00000000..f7d63ca6
--- /dev/null
+++ b/doc/ref/guile/save-load.texi
@@ -0,0 +1,63 @@
+@node Saving and Loading
+@section Saving and Loading
+
+@subsection Data Formats
+A data format is some way that an individual event may get serialized
+to disk. The default is iCalendar (TODO reference RFC 5545), but
+others might be available (TODO footnote and reference xcal).
+
+Each available format should be included as
+@code{(vcomponent formats @var{format-name})}.
+Which module corresponds to what file type is currently defined out of band.
+
+Each module should expose the following procedures.
+
+@deffn serialize component port
+Write a serialized representation of @var{component} to @var{port}.
+@end deffn
+
+@deffn deserialize port
+Read a serialized representation of a component from @var{port}, and
+return the deserialized instance of this object.
+@end deffn
+
+@subsubsection iCalendar
+RFC 5545
+
+@subsubsection xCal
+
+@subsection Data Stores
+Data stores are persistant stores for events, such as databases or the
+file system. Each data store can support any number of data formats,
+but which is an implementation detail of that format and shouldn't be
+needed information from the high level view.
+@footnote{It is however important for interoperability with other programs}.
+
+@c (make <calendar-store> #:path ``hello'')
+
+@deffn path store
+@end deffn
+
+@deffn get-calendar this
+Returns a vcomponent object of type @code{VCALENDAR}. Should contain
+all @code{VEVENT} components of this calendar.
+@end deffn
+
+@deffn get-by-uid this uid
+Return the event object with UID equal to the string @var{uid}.
+@end deffn
+
+@deffn queue-save this event
+Queue a save event of @var{event} to the store.
+@end deffn
+
+@deffn flush this
+Force write of all queued actions.
+@end deffn
+
+@subsubsection VDir
+[VDIR]: http://vdirsyncer.pimutils.org/en/latest/vdir.html
+
+@subsubsection File
+
+@subsubsection SQLite