]> Pileus Git - lackey/blobdiff - src/cal.h
Add todo view
[lackey] / src / cal.h
index 3191733f24b70451cbdd4638aa8e4763a43dd223..ea5b9586f3bea253fc0120cc01c4f5653bfc9ba5 100644 (file)
--- a/src/cal.h
+++ b/src/cal.h
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/* Calendar types */
+/* Cal status types */
+typedef enum {
+       NEW  = 0,
+       DONE = 100,
+} status_t;
+
+/* Calendar type */
 typedef struct {
        char *name;
        char *desc;
        void *data;
 } cal_t;
 
-/* Calendar items */
+/* Calendar item types */
 typedef struct event_t {
-       const cal_t    *cal;
        const char     *name;
        const char     *desc;
        const char     *loc;
        const char     *cat;
        date_t          start;
        date_t          end;
+       const cal_t    *cal;
        struct event_t *next;
 } event_t;
 
+typedef struct todo_t {
+       const char    *name;
+       const char    *desc;
+       const char    *cat;
+       status_t       status;
+       date_t         start;
+       date_t         due;
+       cal_t         *cal;
+       struct todo_t *next;
+} todo_t;
+
 /* Global data */
 extern event_t *EVENTS;
+extern todo_t  *TODOS;
 
 /* Calendar functions */
 void cal_init(void);
 event_t *cal_events(year_t year, month_t month, day_t day, int days);
+todo_t  *cal_todos(year_t year, month_t month, day_t day, int days);
 
 /* Calendar event functions */
 event_t *dummy_events(cal_t *cal, year_t year, month_t month, day_t day, int days);
 event_t *ical_events(cal_t *cal, year_t year, month_t month, day_t day, int days);
 
+/* Calendar todo functions */
+todo_t  *dummy_todos(cal_t *cal, year_t year, month_t month, day_t day, int days);
+todo_t  *ical_todos(cal_t *cal, year_t year, month_t month, day_t day, int days);
+
 /* Test fuctions */
 void ical_test(void);