diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-24 23:24:15 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-24 23:46:48 +0100 |
commit | ee1abd5ada9b670791f7dd2d306bdbf9228fa439 (patch) | |
tree | 67c530a4918506b3c0389ec403c3abbf0a606868 /module/vcalendar | |
parent | Set up better test for recurring events. (diff) | |
download | calp-ee1abd5ada9b670791f7dd2d306bdbf9228fa439.tar.gz calp-ee1abd5ada9b670791f7dd2d306bdbf9228fa439.tar.xz |
Add VIRTUAL vcomponents.
VIRTUAL vcomponents are vcomponents created without a source. Their
primiary purpose is for creating brand new events, which will later be
dumped to the proper files.
They can however also be used in testing for great effect.
Diffstat (limited to '')
-rw-r--r-- | module/vcalendar.scm | 7 | ||||
-rw-r--r-- | module/vcalendar/primitive.scm | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/module/vcalendar.scm b/module/vcalendar.scm index 3f7ba6ba..c978f3fc 100644 --- a/module/vcalendar.scm +++ b/module/vcalendar.scm @@ -42,7 +42,10 @@ ;; (set! (attr ev "KEY") 10) (define-public attr (make-procedure-with-setter get-attr set-attr!)) -(define-public type %vcomponent-type) +;; (define-public type %vcomponent-get-type) +(define-public type (make-procedure-with-setter + %vcomponent-get-type + %vcomponent-set-type!)) (define-public parent %vcomponent-parent) (define-public push-child! %vcomponent-push-child!) (define-public (attributes component) (map string->symbol (%vcomponent-attribute-list component))) @@ -71,7 +74,7 @@ (let* ((root (%vcomponent-make path)) (component (parse-dates! - (case (string->symbol (or (attr root "TYPE") "no-type")) + (case (string->symbol (or (attr root "X-HNH-SOURCETYPE") "no-type")) ;; == Single ICS file == ;; Remove the abstract ROOT component, ;; returning the wanted VCALENDAR component diff --git a/module/vcalendar/primitive.scm b/module/vcalendar/primitive.scm index b5eb9388..fed799f9 100644 --- a/module/vcalendar/primitive.scm +++ b/module/vcalendar/primitive.scm @@ -8,7 +8,8 @@ %vcomponent-parent %vcomponent-make - %vcomponent-type + %vcomponent-get-type + %vcomponent-set-type! %vcomponent-set-attribute! %vcomponent-get-attribute |