/* * Copyright (C) 2002, 2003, 2004 Philip Blundell * Documentation: 2005 Florian Boor * * 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 the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #define _GNU_SOURCE #define _XOPEN_SOURCE #include #include #include #include #include #include #include #include #include #include #include #include /* define own sqlite3 equivalent of sqlite3_exec_printf */ #define sqlite3_exec_printf(handle_, query_, cb_, cookie_, err_, args_...) \ ({ char *q_ = sqlite3_mprintf (query_ , ## args_); \ int ret_ = sqlite3_exec (handle_, q_, cb_, cookie_, err_); \ sqlite3_free (q_); \ ret_; }) static sqlite3 *sqliteh; static GSList *todo_db_items; static unsigned long dbversion; static const char *fname = "/.gpe/todo"; extern gboolean convert_old_db (int oldversion, sqlite3 *); extern void migrate_old_categories (sqlite3 * db); /** * todo_db_make_todoid: * * Makes a globally unique identifier, with which an todo item * can be referenced in a vcal. * * Returns: An id of the format