| GPE Manual: libtododb Reference | ||||
|---|---|---|---|---|
| Top | Description | ||||
enum item_state; #define PRIORITY_HIGH #define PRIORITY_STANDARD #define PRIORITY_LOW struct todo_item * todo_db_new_item (void); gboolean todo_db_push_item (struct todo_item *i); void todo_db_delete_item (struct todo_item *i); void todo_db_destroy_item (struct todo_item *i); GSList * todo_db_get_items_list (void); int todo_db_start (void); void todo_db_stop (void); int todo_db_refresh (void); struct todo_item * todo_db_find_item_by_id (guint uid);
typedef enum
{
NOT_STARTED,
IN_PROGRESS,
COMPLETED,
ABANDONED
} item_state;
Type to describe the progress status of a todo item.
struct todo_item * todo_db_new_item (void);
Create a new todo item and add it to list and database.
Returns : |
New todo item. |
void todo_db_delete_item (struct todo_item *i);
Deletes an item from the list and database.
|
Todo item to delete. |
void todo_db_destroy_item (struct todo_item *i);
Frees a todo list item struct.
|
Todo item to destroy. |
GSList * todo_db_get_items_list (void);
Get a list of all todo items. The returned list points to the internal list used by libtododb and doesn't need to be freed. It is a good idea to consider it to be read only.
Returns : |
List of todo items. |
int todo_db_start (void);
Initialises libtododb for use.
Returns : |
0 on success, -1 on failure. |
int todo_db_refresh (void);
Update list of todo items from database.
Returns : |
0 on success, -1 on failure. |