aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/libicalss/icalspanlist_cxx.h
diff options
context:
space:
mode:
authorHans Petter <hansp@src.gnome.org>2003-09-12 06:04:44 +0800
committerHans Petter <hansp@src.gnome.org>2003-09-12 06:04:44 +0800
commit697761cc337aa77a47140c8df50ed84bc25e23f6 (patch)
treeb785830f72e9938cceaa016a419c7b6d9892bada /libical/src/libicalss/icalspanlist_cxx.h
parent733d77e657516f9a59b5c1a7b62acb87b03ec86f (diff)
downloadgsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.gz
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.bz2
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.lz
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.xz
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.tar.zst
gsoc2013-evolution-697761cc337aa77a47140c8df50ed84bc25e23f6.zip
Import new libical from mainline HEAD and make appropriate changes to
Evolution. svn path=/trunk/; revision=22538
Diffstat (limited to 'libical/src/libicalss/icalspanlist_cxx.h')
-rw-r--r--libical/src/libicalss/icalspanlist_cxx.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/libical/src/libicalss/icalspanlist_cxx.h b/libical/src/libicalss/icalspanlist_cxx.h
new file mode 100644
index 0000000000..fce901c3db
--- /dev/null
+++ b/libical/src/libicalss/icalspanlist_cxx.h
@@ -0,0 +1,53 @@
+/* -*- Mode: C++ -*- */
+
+/**
+ * @file icalspanlist_cxx.h
+ * @author Critical Path
+ * @brief C++ class wrapping the icalspanlist data structure
+ *
+ * This class wraps the icalspanlist routines in libicalss
+ *
+ * Errors within libicalss are propagated via exceptions of type
+ * icalerrorenum. See icalerror.h for the complete list of exceptions
+ * that might be thrown.
+ */
+
+#ifndef ICALSPANLIST_CXX_H
+#define ICALSPANLIST_CXX_H
+
+#include "ical.h"
+#include "icalss.h"
+#include "vcomponent.h"
+#include <vector> /* For as_matrix.. */
+
+class ICalSpanList {
+ public:
+ /** Construct an ICalSpanList from an icalset */
+ ICalSpanList(icalset *set, icaltimetype start, icaltimetype end) throw(icalerrorenum);
+
+ /** Construct an ICalSpanList from the VFREEBUSY chunk of a icalcomponent */
+ ICalSpanList(icalcomponent *comp) throw(icalerrorenum);
+
+ /** Construct an ICalSpanList from the VFREEBUSY chunk of a vcomponent */
+ ICalSpanList(VComponent &comp) throw(icalerrorenum);
+
+ /** Destructor */
+ ~ICalSpanList();
+
+ /** Return a VFREEBUSY icalcomponent */
+ VComponent* get_vfreebusy(const char *organizer, const char *attendee) throw(icalerrorenum);
+
+ /** Return the base data when casting */
+ operator icalspanlist*() {return data;}
+
+ /** Return a vector of the number of events over delta t */
+ std::vector<int> as_vector(int delta_t) throw(icalerrorenum);
+
+ /** Dump the spanlist to stdout */
+ void dump() {icalspanlist_dump(data);}
+
+ private:
+ icalspanlist *data;
+};
+
+#endif