chiark / gitweb /
calendar headers
authorThomas Thurman <tthurman@gnome.org>
Tue, 26 Oct 2010 06:12:28 +0000 (02:12 -0400)
committerThomas Thurman <tthurman@gnome.org>
Tue, 26 Oct 2010 06:12:28 +0000 (02:12 -0400)
breviary/calendar.h [new file with mode: 0644]

diff --git a/breviary/calendar.h b/breviary/calendar.h
new file mode 100644 (file)
index 0000000..2cae5f6
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef CALENDAR_H
+#define CALENDAR_H 1
+
+#include <time.h>
+
+typedef struct _Breviary Breviary;
+
+/**
+ * The seasons of the church year.  The quirky
+ * numbering is in order to fit in with the
+ * facets system.
+ */
+typedef enum _Season {
+  SEASON_NONE = 0,
+  SEASON_ADVENT = 31000,
+  SEASON_CHRISTMAS = 32000,
+  SEASON_EPIPHANY = 33000,
+  SEASON_LENT = 34000,
+  SEASON_EASTER = 35000,
+  SEASON_PENTECOST = 36000,
+} Season;
+
+struct _Breviary* breviary_new (time_t when);
+
+void breviary_set_flag (Breviary *breviary,
+                       const char *flag,
+                       int value);
+
+const int* breviary_get_facets (Breviary *breviary);
+
+char *breviary_explain_facet (int facet);
+
+void breviary_free_string (char *string);
+
+void breviary_free (Breviary *breviary);
+
+/**
+ * Dumps the date of a given movable feast to
+ * standard output.  Used for testing.  This
+ * function has no access to the feasts
+ * table, and only knows about two feasts.
+ *
+ * \param feast  The feast we want.  (Document
+ *               this further!)
+ */
+int breviary_test_dump_feast (unsigned int feast);
+
+#endif /* !CALENDAR_H */