2009-09-14  Graham Cobb  <g+770@cobb.uk.net>

	* sqlite.c (event_db_readonly): do not close the database by hand as
	it is closed automatically when unref'ing
	(event_db_new): do not close the database by hand as
	it is closed automatically when unref'ing
	(sqlite_db_finalize): only close DB if it has been opened

2008-10-22  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_duplicate): New declaration.
	* event.c (event_duplicate): New function.

2008-07-15  Graham Cobb  <g+770@cobb.uk.net>

	* event.c (event_flush): Do not crash when event is not modified,
	only if database is readonly.

2008-07-12  Florian Boor <florian@linuxtogo.org>

	* event-db.c, event.h, event-db.h:
	Replace macros LIVE, RW, SIGNAL_ERROR, SIGNAL_ERROR_GERROR
	with inline functions. Fixes #156

2008-06-23  Graham Cobb  <g+770@cobb.uk.net>

	* Makefile.am (libeventdb_la_LDFLAGS): Increase version to 2.1.0.

	* sqlite.c (do_list_unacknowledged_alarms): Remove unacknowledged alarms
	if start time is wrong (as acknowledgement will never work in that case)

	* sqlite.c (do_set_default_calendar): Add g_assert checks that no updates
	are made to readonly databases.

	* event-db.c, event.c, event.h: Handle readonly databases

	* event-db.h (struct _EventDB): Add readonly flag to _EventDB

	* gpe/event-db.h: Add event_db_readonly to open event database as read only.

2008-05-02  Graham Cobb  <g+770@cobb.uk.net>

	* sqlite.c (event_db_new): remove extra rows from alarms_fired_through after
	we read it.

2008-05-01  Graham Cobb  <g+770@cobb.uk.net>

	* event-db.c (buzzer): update alarms_fired_through on all paths through buzzer, otherwise
	it doesn't get updated when an event goes off and the event can get repeated

	* sqlite.c (event_db_new): make alarms_fired_through_callback find the maximum time
	from the rows in the table

2008-02-05  Graham Cobb  <g+770@cobb.uk.net>

	* sqlite.c (event_load_callback): correctly handle NULL values
	in columns such as byday (bug 35).  Note that existing events
	will have '(NULL)' in the field, new events will have NULL (i.e. '').
	The code must handle both.

2007-10-25  Graham Cobb  <g+770@cobb.uk.net>

	* event-db.c (buzzer): Simplify previous fix avoiding explicit handling of event source

2007-10-22  Graham Cobb  <g+770@cobb.uk.net>

	* event-db.c (buzzer): Resolve clone to handle alarms for recurring events correctly.
	Unref event before deallocating pointer to it.

2007-09-07  Graham Cobb  <g+770@cobb.uk.net>

	* event.c (event_source_finalize): Unfortunately, 
	if event_db_find_by_uid cannot find the specified UID
	it creates an event with the UID (but no data).  
	This means that the removal from the hash table can fail.  
	The check can be re-instated when the event_db_find_by_uid bug is fixed

2007-06-09  Florian Boor <florian@linuxtogo.org>

	* Release version 0.90
	* doc/libeventdb-docs.sgml: Fix org and addreess.
	* configure.ac, Makefile.am, doc/*am: Several changes
          and fixes to pass distcheck.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Change version to 0.90.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* configure.ac: Update email address.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* Makefile.am (libeventdb_la_LDFLAGS): Bump SO.
	* configure.ac: Bump to version 0.9.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* sqlite.c (do_event_mark_unacknowledged): Don't add the same
	entry to the database multiple times.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_calendar_get_uid): Don't take a GError.
	* event-cal.c (event_calendar_get_uid): Update.
	* event-db.c (event_db_find_calendar_by_uid): Likewise.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_db_error_punt): Fix documentation.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_db_error_punt): New prototype.
	* event-db.c (event_db_error_punt): New function.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	* event.c (event_remove): Return success.
	* gpe/event-db.h (event_remove): Return a boolean indicating
	success.

2007-02-13  Neal H. Walfield  <neal@gnu.org>

	Closes #14.
	* configure.ac: Remove libgpewidget dependency.  Add gobject-2.0
	dependency.
	* event-cal.c: Change functions to use GErrors.
	* event-cal.c: Likewise.
	* event-cal.h: Likewise.
	* event-db.c: Likewise.
	* event-db.h: Likewise.
	* event.c: Likewise.
	* event.h: Likewise.
	* gpe/event-db.h: Likewise.
	* sqlite.c: Likewise.
	* event-db.c: Don't include <gpe/errorbox.h>.
	* event.c: Likewise.
	* alarms.c: Update to new API.
	* event-list.c: Likewise.
	* eventid.c: Likewise.
	* find-by-uid.c: Likewise.
	* recur-daily.c: Likewise.
	* recur-monthly.c: Likewise.
	* recur-weekly-2.c: Likewise.
	* recur-weekly.c: Likewise.
	* test-eventid.expected: Update.

	* event.h (STAMP): Don't unnecessarily call event_details.
	* event.c (event_get_color): Unref EC.

2007-02-12  Neal H. Walfield  <neal@gnu.org>

	Closes #6.
	* event-db.c (event_db_finalize): Pass NULL as the data parameter
	to g_object_remove_toggle_ref.
	* sqlite.c (sqlite_db_finalize): Call finalize after the parent
	class's.

2007-02-12  Neal H. Walfield  <neal@gnu.org>

	Closes #5.
	* event-db.h (event_load_t): Change return type from void to
	gboolean.
	* event-db.c (event_load): If event does not exist, return NULL.
	* sqlite.c (do_event_load): Return a boolean.  If no row is
	returned, return FALSE, otherwise, TRUE.
	* Makefile.am (check_PROGRAMS): Add test-find-by-uid.
	(TESTS): Likwise.
	(test_find_by_uid_SOURCES): New.
	(test_find_by_uid_LDADD): Likewise.
	(test-find-by-uid.c): New file.
	(test-find-by-uid.expected): Likewise.

2007-02-12  Neal H. Walfield  <neal@gnu.org>

	* test-eventid.c (do_test): Check that if event_db_find_by_eventid
	is passed an eventid corresponding to a non-existent event, that
	NULL is returned.
	* test-eventid.expected: Update.

2007-02-12  Neal H. Walfield  <neal@gnu.org>

	* sqlite.c [USE_SQLITE3]: Map sqlite2 functions to their sqlite3
	counterparts.
	(event_db_new) [USE_SQLITE3]: Add stubs to detect if DB is in
	sqlite2 format.

2007-01-09  Graham Cobb  <g+gpe@cobb.uk.net>

	* configure.ac: Increment version to 0.31 so gpesyncd can depend
	on new event_calendar_get_event_db function.

2006-12-29  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_calendar_list_events_modified_between):
	New prototype.
	* event-db.h (event_calendar_list_events_t): Take two additional
	arguments, modified_after and modified_before.  Update callers.
	* sqlite.c (do_event_calendar_list_events): Take two additional
	arguments, modified_after and modified_before.  Implement
	semantics.
	* event-cal.c (event_calendar_list_events_modified_between): New
	function.

2006-12-28  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_calendar_get_event_db): New prototype.
	* event-cal.c (event_calendar_get_event_db): New function.

2006-12-28  Neal H. Walfield  <neal@gnu.org>

	* event-db.c: Include <string.h>.

2006-12-28  Neal H. Walfield  <neal@gnu.org>

	* po: New directory.
	* autogen.sh: Just use autoreconf and intltoolize.

2006-12-21  Neal H. Walfield  <neal@gnu.org>

	* event.c (event_flush): Jump to the error handling if an error
	occured.

2006-12-14  Joe McCarthy <mccarthy@granular.che.pitt.edu>

	* event-db.c (buzzer): Change EVENT_DB_CLASS to EVENT_DB_GET_CLASS to
	fix crashing with unacknowledged alarms.
			
2006-08-28  Neal H. Walfield  <neal@gnu.org>

	* sqlite.c (event_load_callback): Correctly copy the day of the
	week specification.
	Reported by Joseph J. McCarthy <mccarthy@engrng.pitt.edu>.

2006-08-28  Neal H. Walfield  <neal@gnu.org>

	* Makefile.am (check_PROGRAMS): Add test-recur-weekly-2.
	(TESTS): Likewise.
	(test_recur_weekly_2_SOURCES): New.
	(test_recur_weekly_2_LDADD): Likewise.
	* test-recur-weekly-2.c: New file.
	* test-recur-weekly-2.expected: Likewise.

2006-08-08  Neal H. Walfield  <neal@gnu.org>

	* sqlite.c: New file.
	* Makefile.am (libeventdb_la_SOURCES): Add sqlite.c.
	* event-db.h: Don't include <sqlite.h>.  Include "event-cal.h" and
	"event.h".
	(events_enumerate_t): New typedef.
	(eventid_to_uid_t): Likewise.
	(set_default_calendar_t): Likewise.
	(event_new_t): Likewise.
	(event_load_t): Likewise.
	(event_load_details_t): Likewise.
	(event_flush_t): Likewise.
	(event_remove_t): Likewise.
	(list_unacknowledged_alarms_t): Likewise.
	(event_mark_unacknowledged_t): Likewise.
	(event_mark_acknowledged_t): Likewise.
	(acknowledge_alarms_through_t): Likewise.
	(event_calendar_new_t): Likewise.
	(event_calendar_flush_t): Likewise.
	(event_calendar_delete_t): Likewise.
	(event_calendar_list_events_t): Likewise.
	(event_calendar_list_deleted_t): Likewise.
	(event_calendar_flush_deleted_t): Likewise.
	(EventDBClass): Add fields events_enumerate, eventid_to_uid,
	set_default_calendar, event_new, event_load, event_load_details,
	event_flush, event_remove, list_unacknowledged_alarms,
	event_mark_unacknowledged, event_mark_acknowledged,
	acknowledge_alarms_through, event_calendar_new,
	event_calendar_flush, event_calendar_delete,
	event_calendar_list_events, event_calendar_list_deleted and
	event_calendar_flush_deleted.  Rename field event_new to
	event_new_func and update users.
	(struct _EventDB): Remove field sqliteh.
	(SQLITE_TRY): Move define from here...
	* sqlite.c (SQLITE_TRY): ... to here.
	* event-cal.h: Don't include "event-db.h".  Include
	"gpe/event-db.h".
	* event-cal.c (event_calendar_flush): Move sql code from here...
	* sqlite.c (do_event_calendar_flush): ... to here.
	* event-cal.c (event_db_calendar_new): Move from here...
	* sqlite.c (do_event_calendar_new): ... to here.
	* event-cal.c (event_calendar_new): Call event_db_calendar_new
	indirectly via EC->EDB->EVENT_CALENDAR_NEW.
	(event_calendar_new_full): Likewise.
	* event-cal.c (event_calendar_delete): Move sql code from here...
	* sqlite.c (do_event_calendar_delete): ... to here.
	* event-cal.c (event_calendar_list_events): Move sql code from
	here...
	* sqlite.c (do_event_calendar_list_events): ... to here.
	* event-cal.c (event_calendar_list_deleted): Move sql code from
	here...
	* sqlite.c (do_event_calendar_list_deleted): ... to here.
	* event-cal.c (event_calendar_flush_deleted): Move sql code from
	here...
	* sqlite.c (do_event_calendar_flush_deleted): ... to here.
	* event-db.c: Don't include <sqlite.h>, <unistd.h> or <obstack.h>.
	(obstack_chunk_alloc): Don't define.
	(obstack_chunk_free): Likewise.
	(event_db_finalize): Don't close EDB->SQLITEH.
	(event_db_set_alarms_fired_through): Move sql code from
	here...
	* sqlite.c (acknowledge_alarms_through): ... to here.
	* event-db.c (event_mark_unacknowledged): Move from here...
	* sqlite.c (do_event_mark_unacknowledged): ... to here.
	* event-db.c (buzzer): Call event_mark_unacknowledged indirectly
	via EV->EDB->EVENT_MARK_UNACKNOWLEDGED.
	* event-db.c (event_db_list_unacknowledged_alarms): Move sqlite
	code from here...
	* sqlite.c (do_list_unacknowledged_alarms): ... to here.
	* event-db.c (events_enumerate): Move sql code from here...
	* sqlite.c (do_events_enumerate): ... to here.
	* event-db.c (event_db_new): Move from here...
	* sqlite.c (event_db_new): ... to here.
	* event-db.c (event_load): Move sql code from here...
	* sqlite.c (do_event_load): ... to here.
	* event-db.c (event_db_find_by_eventid): Move sql code from here...
	* sqlite.c (do_eventid_to_uid): ... to here.
	* event-db.c (event_db_set_default_calendar): Move sql code from
	here...
	* sqlite.c (do_set_default_calendar): ... to here.
	* event.h: Don't include <sqlite.h>, "event-db.h" or
	"event-cal.h".  Include "gpe/event-db.h".
	(event_load): Remove declaration.
	(event_load_callback): Likewise.
	* event.c: Include <unistd.h>.
	(event_init): Don't initialize fields to 0.
	(event_finalize): Don't set EVENT->DEAD.
	(event_source_finalize): Don't call event_write.  Call
	EV->EDB->EVENT_FLUSH.
	(event_flush): Likewise.
	(event_flush): Move from here...
	* sqlite.c (do_event_flush): ... to here.
	* event.c (event_remove): Move sql code from here...
	* sqlite.c (do_event_remove): ... to here.
	* event.c (event_new): Move sql code from here...
	* sqlite.c (do_event_new): ... to here.
	* event.c (event_acknowledge): Move sql code from here...
	* sqlite.c (do_event_mark_acknowledged): ... to here.
	* event.c (parse_date): Move from here...
	* sqlite.c (parse_date): ... to here.
	* event.c (event_load_callback): Move from here...
	* sqlite.c (event_load_callback): ... to here.
	* event.c (event_load): Move from here...
	* sqlite.c (do_event_load): ... to here.
	* event.c (load_details_callback): Move this...
	(event_details): ... and the sql code from here...
	* sqlite.c (do_event_load_details): ... to here.

	* test-eventid.c: New file.
	* test-eventid.expected: Likewise.
	* Makefile.am (check_PROGRAMS): Add test-eventid.
	(TESTS): Add test-eventid.
	(test_eventid_SOURCES): New primary.
	(test_eventid_LDADD): Likewise.

2006-08-08  Neal H. Walfield  <neal@gnu.org>

	* event-cal.c: New file.
	* event-cal.h: Likewise.
	* event-db.h: Likewise.
	* event.c: Likewise.
	* event.h: Likewise.
	* event-db.c: Redistribute code across the new files.
	* gpe/event-db.h: Add comments.

2006-08-07  Florian Boor <florian.boor@kernelconcepts.de>

    * evend_db.c/h (event_get_last_modification): New function.

2006-07-26  Florian Boor <florian.boor@kernelconcepts.de>

    * event-db.c (event_remove): Don't insert uid, the database will care 
    about this.
    (event_db_new): Make uid in events_deleted primary key.
    (event_calendar_list_deleted): Make uid negative to avoid conficts with
    uids from main table.

2006-07-25  Florian Boor <florian.boor@kernelconcepts.de>

    * event-db.c (event_calendar_list_deleted): Increment db reference.
    (event_remove): Use negative ids for the deleted table.

2006-07-24  Florian Boor <florian.boor@kernelconcepts.de>

    *evend_db.c: (event_load_deleted_callback): Removed.
    (event_load_deleted): Removed.
    (event_calendar_list_deleted): Make more efficient.
    * event-db.c, event-db.h (event_db_find_calendar_by_name): New function.
    (event_db_find_calendar_by_name): New function.

2006-07-24  Florian Boor <florian.boor@kernelconcepts.de>

    * event-db.c (event_db_new): Introduce version 4 database, create
    table for deleted events.
    (event_load_deleted_callback): New function.
    (event_load_deleted): New function.
    (event_calendar_list_deleted): New method.
    (event_calendar_flush_deleted): New method.
    (event_remove): Add record to deleted event table. Return FALSE on failure.
    * event-db.h: Add new methods.

2006-07-19  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_load_callback): Add exceptions to
	EV->EXCEPTIONS, not EV->BYDAY.

2006-07-18  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_db_new): Move rows from the calendar table to
	the event table.  Bump format version to 3.
	(event_load.callback): Move function from here...
	(event_load_callback): ... to here.  Load additional rows.
	(event_load): Just use event_load_callback.
	(load_details_callback): Also load the sequence number.
	(event_db_find_by_eventid): Search for the eventid in the events
	table.
	(events_enumerate): Change the callback argument to only pass an
	EventSource *.  Update users.  Select all columns, not just the
	uid.  Load the event and then call the callback function.
	(event_write): Convert the byday list into a string.  Likewise for
	the exception list.  Save eventid, rcount, rincrement, modified,
	byday and rexceptions in the event table, not the calendar table.
	Only save the sequence number if EV->DETAILS is TRUE.  Remove any
	records in the calendar table with EV->UID.
	(GET): Take additional argument, details.  Load EV's details from
	disk if TRUE.  Update users.
	(GET_SET): Likewise.

2006-07-03  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_db_finalize): Flush each event on the cache
	list and set its EV->EDB to NULL.  Don't assert that the hash
	table is empty.
	(event_load): Don't grab a reference to EV->EDB.
	(event_new): Likewise.
	(event_source_finalize): Don't release a reference to EV->EDB.

2006-06-27  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (SQLITE_TRY): New macro.
	(event_db_set_alarms_fired_through): Use it.
	(event_mark_unacknowledged): Likewise.
	(event_acknowledge): Likewise.
	(event_db_list_unacknowledged_alarms): Likewise.
	(event_db_new): Likewise.
	(event_load): Likewise.
	(event_details): Likewise.
	(event_db_find_by_eventid): Likewise.
	(events_enumerate): Likewise.
	(event_db_set_default_calendar): Likewise.
	(event_db_calendar_new): Likewise.
	(event_calendar_flush): Likewise.
	(event_calendar_delete): Likewise.
	(event_calendar_list_events): Likewise.
	(event_flush): Likewise.
	(event_remove): Likewise.
	(event_new): Likewise.

2006-06-25  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_db_finalize): Use g_hash_table_destroy to be
	compatible with versions of glib prior to 2.10.

2006-06-23  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (struct _EventDB): Add fields cache_list and
	cache_buzzer.
	(struct _EventSource): Add field dead_time.
	(event_db_finalize): Remove EDB->CACHE_BUZZER and clean up
	EDB->CACHE_LIST.
	(flush_cache): New function.
	(event_source_toggle_ref_notify): Likewise.
	(event_source_init): Add a toggle reference to INSTANCE.

2006-06-23  Neal H. Walfield  <neal@gnu.org>

	* event-db.c: Include <obstack.h>.
	(obstack_chunk_alloc): Define.
	(obstack_chunk_free): Define.
	(event_db_new): Create an index for the events table.
	(obstack_grow_string): Specialize the code to reduce the amount of
	SQL to compile.  Use julian dates as intermediaries rather than
	date strings.

2006-06-22  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (struct _EventDB): Remove fields dbversion and uid.
	Change events to a GHashTable.
	(struct event_details): Remove structure.  Move contents from
	here...
	(struct _EventSource): ... to here renaming field modified to
	last_modified.  Update users.  Add field details.
	(event_db_init): Create a hash table and save in EDB->EVENTS.
	(event_db_finalize): Don't iterate over the now non-existent event
	list.  Just unref the hash table.
	(event_db_add_internal): Remove function.  Update users.
	(event_db_remove_internal): Likewise.
	(event_source_finalize): Remove EVENT from EV->EDB->EVENTS.
	Dereference EV->EDB.
	(parse_date): Take into account the seconds field if present.
	(event_db_new): Don't load the events into core.  More elegantly
	upgrade a verion 0 table to a version 1 table.  Add a new table,
	events.  Upgrade a version 1 table to a version 2 table.
	(event_load): New function.
	(load_details_callback): Don't load the modified field.  That is
	loaded by default.
	(event_details): Don't look for the modified field.  Set
	EV->DETAILS to true.
	(event_db_find_by_uid): Just call event_load.
	(event_db_find_by_eventid): Use an SQL statement to map the
	eventid to a uid and then call event_db_find_by_uid.
	(event_list): Correctly increment the week for a week recurrence.
	(events_enumerate): New function.
	(event_db_next_alarm): Use events_enumerate.
	(event_db_list_for_period_internal): Likewise.
	(event_db_set_default_calendar): Don't delete and insert, use
	insert or replace.
	(event_calendar_delete): Use event_calendar_list_events to list
	the events in the calendar.  Update SQL code to new DB format.
	(event_calendar_list_events): Query the SQL db to enumerate the
	UIDs in EC.
	(insert_values): Remove define.
	(event_write): Rewrite to simplify writing and not require loading
	the details or deleting the event first.  Include seconds when
	writing dates.
	(event_flush): Don't load the details.  Don't delete the event
	first.
	(do_laundry): Remove the buzzer and disconnect the list before
	iterating over the events.
	(event_remove): Update SQL code to new DB format.
	(event_new): Take a reference to EDB.  Update SQL code to new DB
	format.  Insert into EDB->EVENTS.
	(event_set_calendar): If EC is NULL then use the default calendar.
	
	* Makefile.am (TESTS_ENVIRONMENT): New variable.  Invoke tests
	using the test.sh script.
	* test-event-list.c (do_test): Don't try to programmatically check
	the results.  Just print out the events found in a deterministic
	order.
	* test-recur-daily.c (do_test): Likewise.
	* test-recur-monthly.c (do_test): Likewise.
	* test-recur-weekly.c (do_test): Likewise.
	* test-alarms.c (do_test): Likewise and also check
	event_db_next_alarm.
	* test.sh: New file.
	* test-event-list.expected: Likewise.
	* test-recur-daily.expected: Likewise.
	* test-recur-monthly.expected: Likewise.
	* test-recur-weekly.expected: Likewise.
	* test-alarms.expected: Likewise.
	
	* gpe/event-db.h (enum event_recurrence_type): Add RECUR_COUNT.
	(event_get_event_db): New declaration.
	* event-db.c (event_get_event_db): New function.

2006-06-16  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_db_new): Use strcmp, not strcasecmp.
	(load_details_callback): Likewise.

2006-06-13  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_set_recurrence_daymask): Remove
	declaration.
	(event_set_recurrence_daymask): Likewise.
	(event_get_recurrence_byday): New declaration.
	(event_set_recurrence_byday): Likewise.
	(event_recurrence_byday_free): New function.
	* event-db.c: Don't include <math.h>.  Include <errno.h>.
	(struct _EventSource): Remove field daymask.  Add field byday.
	(event_source_finalize): Free EVENT->BYDAY.
	(dbinfo_callback): Make a local function to...
	(event_db_new): ... this function.  Set the default calendar after
	reading the list of calendars.
	(event_db_new): Convert any "rdaymask" field to a byday
	representation.  Read the "byday" field.  Remove any rdaymask
	records fields.
	(event_list): Update to understand byday in the context of a
	month.
	(event_write): Insert EV->BYDAY.  Don't insert "daymask".
	(event_set_recurrence_daymask): Remove function..
	(event_set_recurrence_daymask): Likewise.
	(event_get_recurrence_byday): New function.
	(event_set_recurrence_byday): Likewise.

	(do_laundry): Remove EDB->LAUNDRY_BUZZER.
	(event_db_finalize): Don't remove the EDB->LAUNDRY_BUZZER.
	(add_to_laundry_pile): Actually save the idle source to
	EDB->LAUNDRY_BUZZER.

	(event_db_make_eventid): Only get hostname once.  If ERRNO is
	ENAMETOOLONG, just NULL terminate the result.

	(event_details): More precisely refine the search.

	(days_in_month): Remove function.  Update users to use
	g_date_get_days_in_month instead.

	(event_calendar_finalize): Free EC->USERNAME and EC->PASSWORD.

	(event_flush): Load the record's details.

2006-06-06  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (EventNew): New typedef.
	(EventRemoved): Likewise.
	(EventModified): Likewise.
	* event-db.c (struct): Rename event_changed to event_modified.
	Update users.
	(event_flush): Emit the "event-modified" signal.
	(event_remove): Emit the "event-removed" signal.
	(event_new): Emit the "event-new" signal.

	(event_set_duration): Call STAMP after the change.
	(GET_SET): Likewise.
	(event_set_recurrence_start): Likewise.
	(GET_SET_STRING): Likewise
	(event_add_category): Likewise.
	(event_set_categories): Likewise.
	(event_add_recurrence_exception): Likewise.

2006-05-28  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (EventCalendarChanged): Update comment.
	(EventCalendarModified): New typedef.
	* event-db.c (EventDBClass): Add fields calendar_modified_signal,
	calendar_modified and changed.
	(MODIFIED): New marco.
	(STAMP): Call MODIFIED on the EV's calendar.
	(event_db_class_init): Initialize
	EDB_CLASS->CALENDAR_MODIFIED_SIGNAL.
	(GET_SET): Take new parameter is_modification, if true, then set
	EC->MODIFIED.  Always set EC->CHANGED.  Update users.
	(GET_SET_STRING): Likewise.
	(event_calendar_set_parent): Avoid a modification if P is the EC's
	current calendar.  Set EC->LAST_MODIFIED and EC->CHANGED.
	(event_calendar_set_visible): Don't set EC->MODIFIED.  Set
	EC->CHANGED.
	(event_calendar_set_color): Set EC->CHANGED.
	(do_laundry): If EC->MODIFIED, emit a "calendar-modified" signal.
	If EC->CHANGED, emit a "calendar-changed" signal.

	(event_calendar_delete): Don't set the EV's calendar to EC.  Set
	it to NEW_PARENT.
	(event_calendar_get_parent): Get a reference for EC->PARENT.

	* gpe/event-db.h (event_calendar_get_modification): Rename from
	this...
	(event_calendar_get_last_modification): ... to this.
	* event-db.c (event_calendar_get_last_modified): Rename from
	this...
	(event_calendar_get_last_modification): ... to this.

	* gpe/event-db.h (event_calendar_list_events): New declaration.
	(event_calendar_list_calendars): Likewise.
	* event-db.c (event_calendar_list_events): New function.
	(event_calendar_list_calendars): Likewise.

	* gpe/event-db.h (event_new): Accept additional parameter, the
	calendar into which this event should be placed.
	* event-db.c (event_new): Expect an additional parameter, the
	calendar to put the event in.

2006-05-26  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_get_duration): If duration is 0 and the event
	is untimed, return a duration of 24 hours.  Update all user of
	EVENT->DURATION to use this function instead.

	(GET_SET): If EVENT->FIELD is identical to VALUE then don't do
	anything.
	(GET_SET_STRING): Likewise for EVENT->DETAILS->FIELD and FIELD.

2006-05-24  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (struct _GdkColor): New structure.
	(EVENT_TYPE): Rename from this...
	(TYPE_EVENT): ... to this.  Update users.
	(IS_EVENT): New macro.
	(IS_EVENT_CLASS): New macro.
	(EVENT_GET_CLASS): New macro.

	(struct _EventCalendar): New structure.
	(EventCalendar): New typedef.
	(TYPE_EVENT_CALENDAR): New macro.
	(EVENT_CALENDAR): Likewise.
	(EVENT_CALENDAR_CLASS): Likewise.
	(IS_EVENT_CALENDAR): Likewise.
	(IS_EVENT_CALENDAR_CLASS): Likewise.
	(EVENT_CALENDAR_GET_CLASS): Likewise.
	(event_calendar_get_type): New function.
	(event_db_find_calendar_by_uid): Likewise.
	(event_db_list_event_calendars): Likewise.
	(event_db_get_default_calendar): Likewise.
	(event_db_set_default_calendar): Likewise.
	(EventCalendarNew): New typedef.
	(EventCalendarDeleted): New typedef.
	(EventCalendarReparented): New typedef.
	(EventCalendarChanged): New typedef.
	(event_calendar_new): New function.
	(event_calendar_new_full): Likewise.
	(event_calendar_delete): Likewise.
	(event_calendar_get_uid): Likewise.
	(event_calendar_set_visible): Likewise.
	(event_calendar_valid_parent): Likewise.
	(event_calendar_get_parent): Likewise.
	(event_calendar_set_parent): Likewise.
	(event_calendar_get_title): Likewise.
	(event_calendar_set_title): Likewise.
	(event_calendar_get_description): Likewise.
	(event_calendar_set_description): Likewise.
	(event_calendar_get_url): Likewise.
	(event_calendar_set_url): Likewise.
	(event_calendar_get_username): Likewise.
	(event_calendar_set_username): Likewise.
	(event_calendar_get_password): Likewise.
	(event_calendar_set_password): Likewise.
	(event_calendar_get_mode): Likewise.
	(event_calendar_set_mode): Likewise.
	(event_calendar_get_color): Likewise.
	(event_calendar_set_color): Likewise.
	(event_calendar_get_sync_interval): Likewise.
	(event_calendar_set_sync_interval): Likewise.
	(event_calendar_get_last_pull): Likewise.
	(event_calendar_set_last_pull): Likewise.
	(event_calendar_get_last_push): Likewise.
	(event_calendar_set_last_push): Likewise.
	(event_calendar_get_modification): Likewise.
	(event_get_calendar): Likewise.
	(event_get_color): Likewise.
	(event_get_visible): Likewise.
	* event-db.c: New structure.
	(EventDBClass): Add fields calendar_new_signal, calendar_new,
	calendar_deleted_signal, calendar_deleted,
	calendar_reparented_signal, calendar_reparented,
	calendar_changed_signal and calendar_changed.
	(struct _EventDB): Add fields default_calendar and calendars.
	(EventCalendarClass): New structure.
	(struct _EventCalendar): New structure.
	(struct _EventSource): Add field calendar.
	(STAMP): Cast ev to a G_OBJECT.
	(event_db_class_init): Initialize EDB_CLASS->CALENDAR_NEW_SIGNAL,
	EDB_CLASS->CALENDAR_DELETED_SIGNAL,
	EDB_CLASS->CALENDAR_REPARENTED_SIGNAL and
	EDB_CLASS->CALENDAR_CHANGED_SIGNAL.
	(event_db_finalize): Free EDB->CALENDARS.
	(event_source_finalize): Free EVENT->EXCEPTIONS.
	(event_db_make_eventid): Add a random number to the generated
	string.
	(event_db_new): Don't request an error message from sqlite_exec
	when we don't use it.  Create table default_calendar and use it to
	initialize EDB->DEFAULT_CALENDAR.  Create table calendars and use
	it to initialize EDB->CALENDARS.
	(event_db_new): If ARGV[0] is "calendar" then initialize
	EV->CALENDAR.
	(event_db_find_calendar_by_uid): New function.
	(event_db_get_default_calendar)
	(event_db_set_default_calendar): Likewise.
	(event_db_list_event_calendars): Likewise.
	(event_db_calendar_new): Likewise.
	(event_calendar_parent_class): New variable.
	(event_calendar_get_type): New function.
	(event_calendar_class_init): Likewise.
	(event_calendar_init): Likewise.
	(event_calendar_dispose): Likewise.
	(event_calendar_flush): Likewise.
	(event_calendar_finalize): Likewise.
	(event_calendar_new): Likewise.
	(event_calendar_new_full): Likewise.
	(event_calendar_valid_parent): Likewise.
	(event_calendar_delete): Likewise.
	(GET): New macro.
	(GET_SET): Likewise.
	(event_calendar_get_uid): New function.
	(event_calendar_set_uid): Likewise.
	(event_calendar_get_parent): Likewise.
	(event_calendar_set_parent): Likewise.
	(event_calendar_get_visible): Likewise.
	(event_calendar_set_visible): Likewise.
	(GET_SET_STRING): New macro.
	(event_calendar_get_title): Likewise.
	(event_calendar_set_title): Likewise.
	(event_calendar_get_description): Likewise.
	(event_calendar_set_description): Likewise.
	(event_calendar_get_url): Likewise.
	(event_calendar_set_url): Likewise.
	(event_calendar_get_username): Likewise.
	(event_calendar_set_username): Likewise.
	(event_calendar_get_password): Likewise.
	(event_calendar_set_password): Likewise.
	(event_calendar_get_mode): Likewise.
	(event_calendar_set_mode): Likewise.
	(event_calendar_get_color): Likewise.
	(event_calendar_set_color): Likewise.
	(event_calendar_get_sync_interval): Likewise.
	(event_calendar_set_sync_interval): Likewise.
	(event_calendar_get_last_pull): Likewise.
	(event_calendar_set_last_pull): Likewise.
	(event_calendar_get_last_push): Likewise.
	(event_calendar_set_last_push): Likewise.
	(event_calendar_get_last_modified): Likewise.
	(event_write): Save EV->CALENDAR.
	(do_laundry): If L->DATA is an EventCalendar, flush it to disk.
	(add_to_laundry_pile): Don't take an EventSource but a GObject
	which is either an EventSource or an EventCalendar.
	(event_get_calendar): New function.
	(event_set_calendar): Likewise.
	(event_get_color): Likewise.
	(event_get_visible): Likewise.
	(GET): Undef before defining.
	(GET_SET): Likewise.
	(GET_SET_STRING): Likewise.

	* gpe/event-db.h (event_get_eventid): Change to return a malloc'd
	string, not a const.
	(event_get_summary): Likewise.
	(event_get_description): Likewise.
	(event_get_location): Likewise.
	(event_get_categories): Change to return a new list, not a const.
	* event-db.c (event_get_eventid): Don't return a const.  Dup the
	string.
	(GET_SET_STRING): Likewise.
	(event_get_categories): Don't return a const, copy the list first.

	(EventDBClass): Remove field parent_class.  Add
	fields
	(struct _EventClass): Remove field parent_class.
	(struct _EventSourceClass): Likewise.

	(event_acknowledge): Don't use LIVE, just return if EVENT->DEAD is
	true.
	(event_flush): Likewise.
	(event_remove): Likewise.
	(event_get_start): Don't call LIVE.
	(GET): Likewise.
	(GET_SET): Likewise.
	(event_set_recurrence_start): Likewise.
	(GET_SET_STRING): Likewise.
	(event_add_category): Likewise.
	(event_set_categories): Likewise.
	(event_add_recurrence_exception): Likewise.

2006-05-22  Florian Boor <florian@kernelconcepts.de>

	* Release version 0.30
	* configure.ac: Version to 0.30
	* doc/gtk-doc.make: Allow "make dist" without gtk-doc.

2006-05-15  Neal H. Walfield  <neal@gnu.org>

	* test-event-list.c (do_test): Fix off by one error.
	* test-alarms.c (do_test): Don't use depreciated recur_t but the
	appropriate getter and setter functions.
	* test-recur-daily.c (do_test): Likewise.
	* test-recur-monthly.c (do_test): Likewise and fix off by one
	error.
	* test-recur-weekly.c (do_test): Don't use depreciated recur_t but
	the appropriate getter and setter functions.  Avoid DST problem.

2006-05-15  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_list): It's spelt g_slist_prepend.
	(event_sort_func): Remove function.  Update users to use
	event_compare_func instead.

2006-05-12  Florian Boor <florian@kernelconcepts.de>

	* event-db.c (event_db_find_by_eventid): Avoid fault if an
	id is NULL. 

2006-05-11  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_list): RECUR_END is the first invalid second,
	not the last valid second.

2006-05-11  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_db_new): Don't add 12 hours to untimed events.
	(parse_date): If date is untimed, return the corresponding start
	of the day in the current timezone.
	(event_write): If date in untimed, save the corresponding start of
	the date in UTC.

2006-05-10  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (struct _Event): Rip the majority of this structure
	out...
	(struct _EventSource): ... and place it in this new structure.
	Update all users.
	(EventSourceClass): New typedef.
	(EventSource): New typedef.
	(event_source_get_type): New function.
	(TYPE_EVENT_SOURCE): New marco.
	(EVENT_SOURCE): Likewise.
	(EVENT_SOURCE_CLASS): Likewise.
	(IS_EVENT_SOURCE): Likewise.
	(IS_EVENT_SOURCE_CLASS): Likewise.
	(EVENT_SOURCE_GET_CLASS): Likewise.
	(struct _EventSourceClass): New structure.
	(RESOLVE_CLONE): There is no need to loop when resolving clones.
	(event_source_parent_class): New variable.
	(event_source_get_type): New function.
	(event_source_class_init): Likewise.
	(event_source_init): Likewise.
	(event_source_dispose): Likewise.
	(event_source_finalize): Likewise.
	(event_clone): Don't memcpy the contents of the structure!  Just
	point N->CLONE_SOURCE at EV.

	(STAMP): Don't at a reference to EV here...
	(add_to_laundry_pile): ... add it here.

2006-05-10  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (event_finalize): Only free the various fields if EV
	is not a clone.
	(event_db_add_internal): Call NO_CLONE.

2006-05-09  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_db_find_by_uid): New declaration.
	(event_db_find_by_eventid): Likewise.
	(event_get_sequence): Likewise.
	(event_set_sequence): Likewise.
	* event-db.c (struct event_details): Move field sequence from
	here...
	(struct _Event): ... to here.  Update users.
	(event_db_find_by_eventid): New function.
	(event_list): RECUR_START + EV->DURATION names the first invalid
	second, not the last valid second.  If EV->TYPE is invalid,
	return.
	(event_new): Check that EVENTID is unique.
	(event_get_sequence): New function.
	(event_set_sequence): Likewise.

2006-05-09  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (recur_s): Remove structure and relocate
	fields from here...
	* event-db.c (struct _Event): ... to here.  Update users.
	* gpe/event-db.h (event_get_recurrence): Remove declaration.
	(event_clear_recurrence): Likewise.
	(event_is_recurrence): Replace declaration with define.
	(event_get_recurrence_type): New declaration.
	(event_set_recurrence_type): Likewise.
	(event_get_recurrence_count): Likewise.
	(event_set_recurrence_count): Likewise.
	(event_get_recurrence_increment): Likewise.
	(event_set_recurrence_increment): Likewise.
	(event_get_recurrence_daymask): Likewise.
	(event_set_recurrence_daymask): Likewise.
	(event_add_exception): Rename from this...
	(event_add_recurrence_exception): ... to this.
	* event-db.c (recur_chunk): Remove variable.
	(event_db__alloc_recur): Don't define.
	(event_db__free_recur): Don't define.
	(event_get_recurrence): Remove function.
	(event_is_recurrence): Likewise.
	(event_clear_recurrence): Likewise.
	(event_get_recurrence_count): Likewise.
	(event_set_recurrence_count): Likewise.
	(event_get_recurrence_increment): Likewise.
	(event_set_recurrence_increment): Likewise.
	(event_get_recurrence_daymask): Likewise.
	(event_set_recurrence_daymask): Likewise.
	(event_add_exception): Rename from this...
	(event_add_recurrence_exception): ... to this.

2006-05-09  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h: Note that none of the functions which return a
	GSList return a sorted list.
	(event_compare_func): New declaration.
	(event_alarm_compare_func): Likewise.

	* event-db.c (event_compare_func): New function.
	(event_alarm_compare_func): Likewise.

2006-05-09  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_set_start): Remove declaration.
	* event-db.c (event_set_recurrence_start): Remove function.
	(event_set_start): Rename from this...
	(event_set_recurrence_start): ... to this.

	* test-alarms.c (do_test): Don't call event_set_start but
	event_set_recurrence_start.
	* test-event-list.c (do_test): Likewise.
	* test-recur-daily.c (do_test): Likewise.
	* test-recur-monthly.c (do_test): Likewise.
	* test-recur-weekly.c (do_test): Likewise.

2006-05-08  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (EVENT_TYPE_DB): Rename from this...
	(TYPE_EVENT_DB): ... to this.  Update users.
	(IS_EVENT_DB): New macro.
	(IS_EVENT_DB_CLASS): New macro.
	(EVENT_DB_GET_CLASS): New macro.
	(EventDBAlarmFiredFunc): New typedef.
	(event_db_next_alarm): New declaration.
	(event_db_list_unacknowledged_alarms): New declaration.
	(event_acknowledge): New declaration.
	* event-db.c (EventDBClass): Add fields alarm_fired_signal and
	alarm_fired.
	(struct _EventDB): Add fields upcoming_alarms, period_end, alarm
	and alarms_fired_through.
	(RESOLVE_CLONE): Don't use a local variable named e, use _e to
	avoid possible name conflicts.
	(event_db_class_init): Initialize EDB_CLASS->ALARM_FIRED_SIGNAL.
	(event_db_finalize): Cancel EDB->ALARM and EDB->LAUNDRY_BUZZER as
	required.  Call do_laundry if EDB->LAUNDRY_BUZZER was set.  Clean
	up EDB->UPCOMING_ALARMS.
	(event_db_set_alarms_fired_through): New function.
	(event_mark_unacknowledged): Likewise.
	(event_acknowledge): Likewise.
	(event_remove_upcoming_alarms): Likewise.
	(event_add_upcoming_alarms): Likewise.
	(buzzer): Likewise.
	(event_db_list_unacknowledged_alarms): Likewise.
	(event_db_new): Read EDB->ALARMS_FIRED_THROUGH from new table
	alarms_fired_through.  Create new table alarms_unacknowledged.
	(event_db_list_for_period_internal): Break the body of this
	function into...
	(event_list): ... this function.  Provide parameter to limit the
	number of instances returned.  Update callers.
	(event_db_next_alarm): New function.
	(event_write): If there is no recurrence data, save recur as
	RECUR_NONE.
	(event_remove): Acknowledge any outstanding alarm and remove from
	the upcoming alarm list.
	(event_set_start): Before changing EV->START, acknowledge any
	outstanding alarm and remove from upcoming alarm list.  After
	changing, call event_add_upcoming_events.
	(GET_SET): Add new parameter alarm_hazard.  If TRUE, before
	changing EV->FIELD, acknowledge any outstanding alarm and remove
	from upcoming alarm list.  After changing, call
	event_add_upcoming_events.  Update users.

2006-05-06  Phil Blundell  <pb@reciva.com>

	* configure.ac: Set version to 0.29.

2006-04-25  Neal H. Walfield  <neal@gnu.org>

	* event-db.c: Correctly list alarms.
	* Makefile.am (check_PROGRAMS): Add test-alarms.
	(TESTS): Likewise.
	(test_alarms_SOURCES): New.
	(test_alarms_LDADD): Likewise.

	* event-db.c (event_db_list_for_period_internal): An event is
	untimed if EV->UNTIMED is set, not if EV->DURATION is 0.

2006-04-25  Neal H. Walfield  <neal@gnu.org>

	* event-db.c (struct _EventDB): Add fields laundry_list and
	laundry_buzzer.
	(STAMP): If EV->MODIFIED is not true, add a reference and add to
	the laundry pile.
	(event_write): On success, set EV->MODIFIED to FALSE.
	(do_laundry): New function.
	(add_to_laundry_pile): New function.

2006-04-25  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (event_is_untimed, event_set_untimed,
	event_clear_untimed): Removed declarations.
	(event_get_untimed, event_set_untimed): New declarations.
	* event-db.c (FLAG_UNTIMED): Remove define.
	(struct _Event): Remove field flags, add field untimed.  Update
	users.
	(GET_SET): Break the getter code into...
	(GET): ... this define.  Use this to implement event_get_uid and
	event_get_eventid.
	(GET_SET_FLAG): Remove define.
	(event_is_untimed, event_set_untimed, event_clear_untimed):
	Removed functions.
	(event_get_untimed, event_set_untimed): New functions.

	(event_db_new.load_callback0): Simply use parse_date.

2006-04-24  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h (recur_type_t): Rename from this...
	(enum event_recurrence_type): ... to this.  Update users.
	(event_get_recurrence_type): New declaration.
	(event_set_recurrence_type): Likewise.
	(event_get_recurrence_start): Likewise.
	(event_set_recurrence_start): Likewise.
	(event_get_recurrence_end): Likewise.
	(event_set_recurrence_end): Likewise.
	* event-db.c (GET_SET): Don't reuse field as the variable name,
	take a new parameter instead.
	(event_get_recurrence_type): New function.
	(event_set_recurrence_type): Likewise.
	(event_get_recurrence_start): Likewise.
	(event_set_recurrence_start): Likewise.
	(event_get_recurrence_end): Likewise.
	(event_set_recurrence_end): Likewise.

2006-04-23  Neal H. Walfield  <neal@gnu.org>

	* Makefile.am (INCLUDES): Rename from this...
	(AM_CPPFLAGS): ... to this.
	(libeventdb_la_LDFLAGS): Bump the so version.
	(check_PROGRAMS): New.
	(test_event_list_SOURCES): Likewise.
	(test_event_list_LDADD): Likewise.
	(test_recur_daily_SOURCES): Likewise.
	(test_recur_daily_LDADD): Likewise.
	(test_recur_weekly_SOURCES): Likewise.
	(test_recur_weekly_LDADD): Likewise.
	(test_recur_monthly_SOURCES): Likewise.
	(test_recur_monthly_LDADD): Likewise.
	* test-event-list.c: New file.
	* test-recur-daily.c: Likewise.
	* test-recur-monthly.c: Likewise.
	* test-recur-weekly.c: Likewise.
	* test-skeleton.c: Likewise.  Imported revision 1.30 from glibc
	(http://sourceware.org/cgi-bin/cvsweb.cgi/libc/test-skeleton.c?cvsroot=glibc).

	* gpe/event-db.h (event_db_list_for_future): Remove declaration.
	(event_db_untimed_list_for_period): Remove parameter yes.
	* event-db.c (event_db_list_for_period_internal): Rewrite.  Remove
	parameters untimed_significant and max.  Update callers.
	(event_db_list_alarms_for_period): Simply use
	event_db_list_for_period_internal.
	(event_db_untimed_list_for_period): Likewise and remove parameter
	yes.
	(event_db_list_for_future): Remove function.
	
	* event-db.c (schema_str): Use value directly and remove variable.
	(schema2_str): Likewise.
	(schema_info): Likewise.
	(load_data_callback): Make a nested function in event_db_new.
	(load_callback): Likewise.
	(event_db_new): Don't fail if we can't read a version 0 database.
	
	* gpe/event-db.h (EventClass): Move from here...
	* event-db.c: (EventClass): ... to here.
	* gpe/event-db.h (struct _EventDB): Move from here...
	* event-db.c: (struct _EventDB): ... to here.  Remove fields
	one_shot_events and recurring_events.  Add field events.  Update
	callers.
	* gpe/event-db.h (EventDBClass): Move from here...
	* event-db.c: (EventDBClass): ... to here.
	(event_details_t): Remove typedef.

	* event-db.c (recur_chunk): Mark static.

	* event-db.c (event_get_categories): Remove const.
	* gpe/event-db.h (event_get_categories): Remove const.

2006-04-13  Neal H. Walfield  <neal@gnu.org>

	* gpe/event-db.h: Include <glib-object.h>.
	(struct _EventDB): New struct.
	(EventDB): New typedef.
	(struct event_details_s): Move from here...
	* event-db.c (struct event_details): ... to here.
	* gpe/event-db.h (event_details_t): Remove tyepdef, update users
	to use struct event_details * instead.
	(FLAG_UNTIMED): Move from here...
	* event-db.c (FLAG_UNTIMED): ... to here.
	* gpe/event-db.h (FLAG_ALARM, FLAG_TENTATIVE, FLAG_CLONE,
	FLAG_RECUR): Remove.
	(struct calendar_time_s): Remove struct.
	(calendar_time_t): Remove typedef, update users to use time_t
	directly.
	(struct event_s): Move from here...
	* event-db.c (struct _Event): ... to here.  Remove field mark.
	Rename cloned_ev to clone_source.  Remove field list.  Add fields
	modified and dead.
	* gpe/event-db.h (EVENT_DB_USE_MEMCHUNK, 
	event_db__alloc_recur and event_db__free_recur): Move defines from
	here...
	* event-db.c: ... to here.
	* gpe/event-db.h (recur_chunk, event_chunk): Remove declarations.
	(EVENT_TYPE): New define.
	(EVENT): Likewise.
	(EVENT_CLASS): Likewise.
	(EventClass): New typedef.
	(struct _Event): New structure.
	(event_t): Rename from this...
	(Event): ... to this.  Update all users.
	(event_get_type): New declaration.
	* event-db.c (dbversion, sqliteh, recurring_events,
	one_shot_events, uid): Move global variables from here...
	(struct _EventDB): ... to this new structure.  Update users.
	(EventDBClass): New typedef.
	(EVENT_DB_TYPE): New macro.
	(EVENT_DB): Likewise.
	(EVENT_DB_CLASS): Likewise.
	(event_db_get_type): New declaration.
	(event_db_start): Remove declaration.
	(event_db_refresh): Likewise.
	(event_db_stop): Likewise.
	(event_db_add): Likewise.
	(event_db_remove): Rename from this...
	(event_remove): ... to this.  Update callers.
	(event_db_flush): Rename from this...
	(event_flush): ... to this.  Update callers.
	(event_db_clone): Remove declaration.
	(event_db_new): Rename from this...
	(event_new): ... to this and take two additional parameters: an
	EventDB and an optional event id.  Update callers.
	(event_db_destroy): Remove declaration.
	(event_db_alloc_details): Remove declaration.
	(event_db_get_details): Remove declaration.
	(event_db_forget_details): Remove declaration.
	(event_db_list_for_period): Take an additional parameter, an
	EventDB.  Update callers.
	(event_db_list_alarms_for_period): Likewise.
	(event_db_list_for_future): Likewise.
	(event_db_untimed_list_for_period): Likewise.
	(event_db_find_by_uid): Likewise.
	(event_db_list_destroy): Rename from this...
	(event_list_unref): ... to this.
	(event_db_new): New declaration.
	(event_is_recurrence): Likewise.
	(event_db_get_recurrence): Rename from this...
	(event_get_recurrence): ... to this.  Update callers.
	(event_db_clear_recurrence): Rename from this...
	(event_clear_recurrence): ... to this.  Update callers.
	(event_get_start): New declartion.
	(event_set_start): Likewise.
	(event_get_duration): Likewise.
	(event_set_duration): Likewise.
	(event_get_alarm): Likewise.
	(event_set_alarm): Likewise.
	(event_is_untimed): Likewise.
	(event_set_untimed): Likewise.
	(event_clear_untimed): Likewise.
	(event_get_uid): Likewise.
	(event_get_eventid): Likewise.
	(event_get_summary): Likewise.
	(event_set_summary): Likewise.
	(event_get_description): Likewise.
	(event_set_description): Likewise.
	(event_get_location): Likewise.
	(event_set_location): Likewise.
	(event_get_categories): Likewise.
	(event_add_category): Likewise.
	(event_set_categories): Likewise.
	(event_add_exception): Likewise.
	* event-db.c: Include <libintl.h> and <glib-object.h>.
	(fname): Remove variable.
	(LIVE, STAMP, NO_CLONE, RESOLVE_CLONE): New macros.
	(event_db_class_init): New declaration.
	(event_db_init): Likewise.
	(event_db_dispose): Likewise.
	(event_db_finalize): Likewise.
	(event_db_parent_class): New variable.
	(event_db_get_type): New function.
	(event_db_class_init): New function.
	(event_db_init): New function.
	(event_db_dispose): New function.
	(event_db_finalize): New function.
	(event_class_init): New declaration.
	(event_init): Likewise.
	(event_dispose): Likewise.
	(event_finalize): Likewise.
	(event_parent_class): New variable.
	(event_get_type): New function.
	(event_class_init): Likewise.
	(event_init): Likewise.
	(event_dispose): Likewise.
	(event_details): New declaration.
	(event_write): Likewise.
	(event_db_remove_internal): Likewise.
	(event_finalize): New function.
	(convert_old_db): Remove declaration.
	(event_chunk): Remove definition.
	(recur_chunk): Mark static.
	(event_sort_func): Make parameters void *.  Always sort by the
	event's start time.
	(event_db_add_internal): Use event_is_recurrence to determine if
	an event is a recurring event.  Add asserts.
	(event_db_remove_internal): Likewise.
	(load_callback): Get the EventDB from ARG.  Don't use
	event_db__alloc_event to allocate a new event, use g_object_new.
	Initialize EV->EDB to EDB.  Don't use event_db__free_event to free
	EV, use g_object_unref.  After adding EV to EDB's table, get a
	reference.
	(event_db_new): New function.
	(event_db_get_details): Rename from this...
	(event_details): ... to this.  Take a new parameter,
	fill_from_disk.  Update callers.
	(event_db_forget_details): Remove function.
	(event_db_stop): Remove function.
	(event_db_find_by_uid): Add a reference to EV before returning it.
	(event_db_list_destroy): Rename from this...
	(event_list_unref): ... to this.  Don't call event_db__free_event,
	call g_object_unref.
	(event_db_clone): Rename from this...
	(event_clone): ... to this.  Mark static.  Don't use
	event_db__alloc_event to allocate a new Event, use g_object_new.
	Add a reference to EV.	Don't set FLAG_CLONE.  Update callers.
	(event_db_list_for_period_internal): Use event_clone only when we
	need to modify the event.  Otherwise, just add a reference to EV.
	Check if EV has an alarm not by checking for FLAG_ALARM but
	checking if EV->ALARM is non-zero.  Don't mark recurring events
	with FLAG_RECUR.
	(event_db_list_for_period): Take new parameter, the EventDB to
	use.
	(event_db_list_alarms_for_period): Likewise.
	(event_db_untimed_list_for_period): Likewise.
	(event_db_list_for_future): Likewise.
	(event_db_write): Rename from this...
	(event_write): ... to this.  Update callers.  Don't assume that
	EV->DETAILS is non-NULL.  Don't use the current time as the modify
	value, use EV->MODIFIED.  Always write EV->ALARM.  Don't update
	the list: we know that the order has not changed.
	(event_db_flush): Rename from this...
	(event_flush): ... to this.
	(event_db_remove): Rename from this...
	(event_remove): ... to this.  Mark EV->DEAD as TRUE.
	(event_db_new): Rename from this...
	(event_new): ... to this and take two additional parameters: an
	EventDB and an optional event id.  Use g_object_new to allocate a
	new Event, not event_db__alloc_event.  Only create an event id if
	EVENTID is NULL.  Add a reference for EDB.
	(event_db_get_recurrence): Rename from this...
	(event_get_recurrence): ... to this.
	(event_is_recurrence): New function.
	(event_db_clear_recurrence): Rename from this...
	(event_clear_recurrence): ... to this.  Modify the underlying
	event.  Change the modification time.
	(event_db_alloc_details): Remove function.
	(event_get_start): New function.
	(event_set_start): New function.
	(GET_SET): New macro.  Use it to create the getters and setters
	for duration and alarm.
	(GET_SET_FLAG): New macro.  Use it to create the is, get and clear
	methods for FLAG_UNTIMED.
	(event_get_uid): New function.
	(event_get_eventid): New function.
	(GET_SET_STRING): New macro.  Use it to create the getters and
	setters for summary, location and description.
	(event_get_categories): New function.
	(event_add_category): New function.
	(event_set_categories): New function.
	(event_add_exception): New function.
	(event_db_refresh): Remove function.
	* old-db.c: Remove file.
	(load_callback0): Move from here...
	* event-db.c (event_db_new): ... to here.
	* old-db.c: (convert_old_db): Move from here...
	* event-db.c (event_db_new): ... to here.
	* Makefile.am (libeventdb_la_SOURCES): Remove old-db.c.

2006-04-09  Phil Blundell  <pb@reciva.com>

	* event-db.c (event_db_list_for_period_internal): Examine
	potential recurrences more closely to work around limitations in
	checking logic.

2006-04-09  Phil Blundell  <pb@reciva.com>

	* event-db.c (event_db_list_for_period_internal): Expand
	recurrence of events that occur multiple times in the period.

2006-02-12  Phil Blundell  <pb@reciva.com>

	* Version 0.21 released.

2006-02-12  Phil Blundell  <pb@reciva.com>

	* event-db.c (event_sort_func): Improve sorting.
	(event_db_list_for_period_internal): Correct handling of maximum
	event count.

2006-02-11  Florian Boor <florian@kernelconcepts.de>

	* Version 0.20 released.
    * event-db.c, event-db.h: Add documentation.
    * event-db.c (event_db_make_eventid): Make static.
    * event-db.h: Make all parameters named to avoid confusing gtk-doc.
	* doc/libeventdb-docs.sgml: Change documentation license to 
	become LGPL.
    * doc/tmpl/event-db.sgml: Add proper section titles.

2006-02-05  Phil Blundell  <pb@reciva.com>

	* Version 0.19 released.

2006-02-05  Phil Blundell  <pb@reciva.com>

	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Enable gtk-doc.

2006-02-04  Phil Blundell  <pb@reciva.com>

	* event-db.c (event_db_clear_recurrence): Don't crash if no
	recurrence was set.

2006-02-01  Phil Blundell  <pb@reciva.com>

	* event-db.c (event_db_clear_recurrence): New function.
	(event_sort_func): Handle both recurring and non recurring events.
	(event_sort_func_recur): Deleted.
	(recurring_events, one_shot_events): Change from GSList to GList.
	All uses updated.
	(event_db_add_internal): Set ev->list.
	(event_db_write): Move event between lists if required; just
	re-sort if not.
	(event_db_list_for_period_internal): Remove unnecessary scanning
	of returned list.
	* gpe/event-db.h (event_db_clear_recurrence): Add prototype.
	(struct event_s): Add list.

2006-01-01  Phil Blundell  <pb@reciva.com>

	* doc/Makefile.am (GTKDOC_CC, GTKDOC_LD): Delete duplicated
	definitions to stop automake freaking out.

2005-12-31  Florian Boor <florian@kernelconcepts.de>

    * Release version 0.18.
    * Makefile.am: Set library version, incompatible to older version.
    * configure.ac: New version.

2005-12-30  Florian Boor <florian@kernelconcepts.de>

    * event-db.c: Fix warning.
    * Makefile.am: Define _XOPEN_SOURCE to avoid build time warnings.
    * event-db.c: Add support for event location information.
    * event-db.h: Add location field to event details.

2005-11-22  Florian Boor <florian@kernelconcepts.de>

	* Release Version 0.17
	* event-db.c: Minor formating changes.

2005-11-11  Florian Boor <florian@kernelconcepts.de>
\
	* libeventdb.pc.in: Correct prefix variable.

2005-08-24  Martin Felis <martin@silef.de>

	* event-db.c, gpe/event-db.h: Added eventid tag.

2005-08-01  Florian Boor <florian@kernelconcepts.de>

	* doc/*, Makefile.am, configure.ac: Add documentation framework support
	                                    and basic information about this library.

2005-07-29  Florian Boor  <florian@kernelconcepts.de>

	* Version 0.16 released.

2005-05-28  Florian Boor  <florian@kernelconcepts.de>

	* configure.ac: Add missing dependency to libgpewidget.
	* Add support for autotools.
	* configure.ac, Makefile.am, gpe-dist.am: New files.
	* configure.ac: Push version to 0.16.

2004-09-21  Florian Boor  <florian@kernelconcepts.de>

	* event-db.c (event_db_write): Added re-sorting of lists.

2004-03-25  Philip Blundell  <philb@gnu.org>

	* Version 0.15 released.
	
2004-03-25  Philip Blundell  <philb@gnu.org>

	* Makefile: Bring up to modern standards vis-a-vis PACKAGE_CFLAGS,
	etc.
	(install-devel): Correct path to headers.

2004-03-06  Philip Blundell  <philb@gnu.org>

	* Version 0.14 released.

2004-03-05  Philip Blundell  <philb@gnu.org>

	* event-db.c (event_db_write): Only write out description and
	summary if not NULL.

2004-02-23  Joseph J. McCarthy <mccarthy@engrng.pitt.edu>
                                                                                
        * Version 0.13 released.
                                                                                
2004-02-23  Joseph J. McCarthy <mccarthy@engrng.pitt.edu>
                                                                                
        * event-db.c: once again, rework recur slightly 
                                                                                
2004-02-22  Phil Blundell  <pb@nexus.co.uk>

	* Version 0.12 released.

2004-02-21  Phil Blundell  <pb@nexus.co.uk>

	* event-db.c (event_db_write): Write out categories.
	(load_details_callback): Read in categories;
	* gpe/event-db.h (struct event_details_s): Add categories.

2004-02-21  Joseph J. McCarthy <mccarthy@engrng.pitt.edu>
                                                                                
        * Version 0.11 released.
                                                                                
2004-02-21  Joseph J. McCarthy <mccarthy@engrng.pitt.edu>
                                                                                
        * event-db.h: re-add SECONDS_IN_DAY to fix daily recur
                                                                                
2004-02-20  Joseph J. McCarthy <mccarthy@engrng.pitt.edu>
                                                                                
        * Version 0.09 released. 
                                                                                
2004-02-20  Joseph J. McCarthy <mccarthy@engrng.pitt.edu>
	
	* event-db.c: change to modulo method of recur checking
	* event-db.h: add SECONDS_IN_DAY definition 
                                                                                
2003-10-19  Luis Oliveira  <luis@handhelds.org>

	* Makefile: Generate .pc files.
	* libeventdb.pc.in: New file.
	* libeventdb-uninstalled.pc.in: New file.

2003-09-05  Philip Blundell  <philb@gnu.org>

	* familiar/control (Source): Added.

2003-09-05  Philip Blundell  <philb@gnu.org>

	* Version 0.08 released.

2003-09-05  Philip Blundell  <philb@gnu.org>

	* event-db.c (load_data_callback): Add 12 hours to notional start
	time for untimed events in attempt to avoid problems with
	timezones.

2003-04-25  Philip Blundell  <philb@gnu.org>

	* Version 0.07 released.

2003-04-20  Philip Blundell  <philb@gnu.org>

	* event-db.c (event_db_write): Write out "modified" tag as Unix time.
	(load_details_callback): Tolerate either this or the older format.

2003-04-11  Philip Blundell  <philb@gnu.org>

	* Makefile (VERSION): Set to 0.06.

2003-04-04 Joe McCarthy <jjmcc@pitt.edu>

        * event-db.c: erase destroy_clone and stop checking FLAG_CLONE in
	list_destroy since all in list are now clones
	* event-db.h: erase destroy_clone

2003-04-03 Joe McCarthy <jjmcc@pitt.edu>

        * event-db.c: implement exceptions to recurrence in db, change
	list_for_period to check for exceptions and to use clones for *all*
	lists (changed names so its obvious they are clones), change the way
	alarms are looked up for simplicity
	* event-db.h: add a pointer to event_t so that clones know who their
	momma is and a GSList so that we can implement exceptions

2003-03-30  Philip Blundell  <philb@gnu.org>

	* Makefile (install-program): Use install -d and install -s in
	place of mkdir and strip.

2003-03-22  Colin Marquardt  <colin@marquardt-home.de>

	* Makefile (install-program): New name for 'install' ('install' is
	now provided by Makefile.dpkg_ipkg).  
	(CVSBUILD): New variable.
	(BUILD): New variable.
	Use variable PACKAGE where possible. 

2003-03-03 Joe McCarthy <jjmcc@pitt.edu>

        * version 0.05

2003-03-03 Joe McCarthy <jjmcc@pitt.edu>

        * event-db.c (event_db_stop): Use g_slist_free() instead of destroy. 

2003-02-16  Philip Blundell  <philb@gnu.org>

	* event-db.c (event_db_get_details): Use g_malloc0.
	(event_db_alloc_details): Likewise.

	* gpe/event-db.h (EVENT_DB_USE_MEMCHUNK): Define.

	* Makefile (CFLAGS): Build with -DG_DISABLE_DEPRECATED.
	(LDFLAGS): Link with libgpewidget.

2003-01-18  Philip Blundell  <philb@gnu.org>

	* Version 0.02 released.

2003-01-13  Joseph J. McCarthy  <mccarthy@engrng.pitt.edu>

	* event-db.c: add event_db_list_alarms_for_period + flag
	* event-db.h: same

2003-01-08  Joseph J. McCarthy  <mccarthy@engrng.pitt.edu>

	* event-db.c: Change "event-db.h" for <gpe/event-db.h>

2003-01-06  Philip Blundell  <philb@gnu.org>

	* event-db.c, event-db.h: Move latest version here from
	gpe-calendar.

2003-01-06  Luis Oliveira  <luis@handhelds.org>

	* First import.
