/*
- * Copyright (C) 2012 Andy Spencer <andy753421@gmail.com>
+ * Copyright (C) 2012-2013 Andy Spencer <andy753421@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
} status_t;
/* Calendar type */
-typedef struct {
- char *name;
- char *desc;
- void *data;
+typedef struct cal_t {
+ char *type;
+ char *name;
+ char *desc;
+ struct cal_t *next;
} cal_t;
/* Calendar item types */
typedef struct event_t {
- const char *name;
- const char *desc;
- const char *loc;
- const char *cat;
+ char *name;
+ char *desc;
+ char *loc;
+ char *cat;
date_t start;
date_t end;
const cal_t *cal;
} event_t;
typedef struct todo_t {
- const char *name;
- const char *desc;
- const char *cat;
+ char *name;
+ char *desc;
+ char *cat;
status_t status;
date_t start;
date_t due;
} todo_t;
/* Global data */
+extern cal_t *CALS;
extern event_t *EVENTS;
extern todo_t *TODOS;
/* Calendar functions */
void cal_init(void);
-
-/* Test fuctions */
-void ical_test(void);
+void cal_load(year_t year, month_t month, day_t day, int days);
+void cal_config(const char *group, const char *name, const char *key, const char *value);