aboutsummaryrefslogtreecommitdiff
path: root/vcal.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-01-17 00:20:06 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-01-17 00:20:06 +0100
commit649ade4fb2c588355e89aa060b4d5954f77579e5 (patch)
tree337943cf7e23069bcbfac4a973dee0a59784a0ba /vcal.h
parentFix memory leak. (diff)
downloadcalp-649ade4fb2c588355e89aa060b4d5954f77579e5.tar.gz
calp-649ade4fb2c588355e89aa060b4d5954f77579e5.tar.xz
Further work.
Diffstat (limited to 'vcal.h')
-rw-r--r--vcal.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/vcal.h b/vcal.h
new file mode 100644
index 00000000..06ec61f9
--- /dev/null
+++ b/vcal.h
@@ -0,0 +1,29 @@
+#ifndef VCAL_H
+#define VCAL_H
+
+#include <stdlib.h>
+
+#include "strbuf.h"
+
+typedef struct {
+ string dtstart;
+ string dtend;
+ string summary;
+ string description;
+} vevent;
+
+int copy_vevent(vevent* dest, vevent* src);
+int free_vevent(vevent* ev);
+
+typedef struct {
+ size_t n_events;
+ size_t alloc;
+ vevent* events;
+} vcalendar;
+
+int init_vcalendar(vcalendar* cal);
+int free_vcalendar(vcalendar* cal);
+
+int push_event(vcalendar* cal, vevent* ev);
+
+#endif /* VCAL_H */