2004-04-02  JP Rosevear  <jpr@ximian.com>

	* backends/groupwise/Makefile.am: fix includes for builddir != srcdir

2004-03-31  Chris Toshok  <toshok@ximian.com>

	* libebook/e-contact.c (e_contact_get_first_attr): ignore the
	attribute's group.
	(e_contact_set_property): same.
	(e_contact_find_attribute_with_types): same.
	(e_contact_get_property): same.
	(e_contact_get_attributes): same.

	* libebook/e-vcard.c (e_vcard_to_string_vcard_30): ignore the
	attribute's group when looking for VERSION attributes.

2004-03-30  Chris Toshok  <toshok@ximian.com>
 
	[ backend portion of fix for #51977 ]
	* libedata-book/e-book-backend-sexp.c (prop_info_table): category
	-> category_list.

	* libebook/e-contact.c (e_contact_get_property): LIST fields (of
	which there is one, "category_list"), need to duplicate both the
	list and the list elements before returning from ::get_property.
	
2004-03-30  Chris Toshok  <toshok@ximian.com>
 
	[ backend portion of fix for #54528 ]
	* libebook/e-vcard.c (read_attribute_params): deal with vcards
	that specify the encoding as "BASE64", even though this isn't the
	proper encoding type for vcard 3.0 cards (that's 'b').
	
2004-03-30  Chris Toshok  <toshok@ximian.com>

	[ backend portion of fix for #48665 ]
	* libedata-book/e-data-book.c
	(impl_GNOME_Evolution_Addressbook_Book_getBookView): pass
	max_results to e_data_book_view_new.

	* backends/ldap/e-book-backend-ldap.c
	(e_book_backend_ldap_search): pass the book view's @max_results as
	the ldap search limit.

	* libedata-book/e-data-book-view.c (e_data_book_view_new): add
	@max_results and pass it to ::construct.
	(e_data_book_view_construct): add @max_results.
	(e_data_book_view_get_max_results): new function.

	* libedata-book/e-data-book-view.h: add max_results arg to ::new,
	and add prototype for e_data_book_view_get_max_results.

2004-03-30  Chris Toshok  <toshok@ximian.com>

	[ looks like this fixes #55527 ]
	* libedata-book/e-data-book-view.c (e_data_book_view_construct):
	use bonobo_object_dup_ref instead of CORBA_Object_duplicate here.

2004-03-28  Sivaiah Nallagatla <snallagatla@novell.com>

	* backends/groupwise/e-book-backend-groupwise.c : added new functions
	set_categories_in_gw_item and set_categories_changes to store contact 
	categories in gw contacts 

2004-03-19  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-view-listener.c (main_thread_get_response):
	don't unref the listener in the loop.
	(e_book_view_listener_queue_response): don't ref the listener for
	every request.
	(e_book_view_listener_dispose): add some debug spew.

2004-03-18  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/Makefile.am (noinst_PROGRAMS): add test-stress-bookviews.

	* tests/ebook/test-stress-bookviews.c: create and dispose of a ton of
	EBookViews very quickly.  designed to flush out races/problems in
	the way we use bonobo/orbit (and at the time of its writing it
	does show a problem).

2004-03-17  Chris Toshok  <toshok@ximian.com>

	* backends/vcf/e-book-backend-vcf.c (closure_destroy): new
	function, mostly lifted from EBookBackendFile.
	(init_closure): same.
	(get_closure): same.
	(e_book_backend_vcf_start_book_view): mostly copy the file
	backend's start/stop race fixing code.
	(e_book_backend_vcf_stop_book_view): same.
	(e_book_backend_vcf_load_source): create the directory before
	trying to open the database if !only_if_exists.

2004-03-15  Chris Toshok  <toshok@ximian.com>

	* libedata-book/e-data-book.c (e_data_book_respond_create): only
	look up the contact's UID if status == Success.  otherwise, send
	"".

2004-03-15  Rodney Dawes  <dobey@ximian.com>

	* libebook/libebook-1.0.pc.in:
	* libedata-book/libedata-book-1.0.pc.in: Add @LIBBONOBO_REQUIRED@ for
	the libbonobo dependency

2004-03-14  Harish K <kharish@novell.com>
	*  backends/groupwise/e-book-backend-groupwise.c :
	Update calls to e_gw_connection_get_items with the new prototype.

2004-03-12  Chris Toshok  <toshok@ximian.com>

	* libedata-book/e-data-book-view.h: add prototype for
	e_data_book_view_get_mutex.

	* libedata-book/e-data-book-view.c (e_data_book_view_get_mutex):
	new function, return the book view's mutex.
	(e_data_book_view_dispose): free priv->mutex.
	(e_data_book_view_init): init priv->mutex.

	* backends/file/e-book-backend-file.c (closure_destroy):
	GDestroyNotify to clear up the search closure.
	(init_closure): initialize the object data we use to store search
	information (just a "stopped" flag at the moment)
	(get_closure): return the object data.
	(e_book_backend_file_start_book_view): add code to deal with the
	race between start and stop, locking the book_view's mutex around
	the initial get/set of the closure.  also, switch from using
	g_object_ref to bonobo_object_ref on the book_view, and don't do
	any freeing of the search closure here.  it's handled
	automatically for us by virtue of the GDestroyNotify.
	(e_book_backend_file_stop_book_view): flesh this out to fix the
	race between start/stop.

2004-03-12  Chris Toshok  <toshok@ximian.com>

	* libebook/e-contact.c (e_contact_set_property): in the CATEGORIES
	case when we're adding a new attribute to the vcard, make sure to
	call e_vcard_add_attribute after creating it.  also, use
	EVC_CATEGORIES instead of hardcoding the string.
	(e_contact_get_property): use EVC_CATEGORIES.
	
2004-03-12  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/test-categories.c (main): test setting CATEGORIES as
	well as CATEGORY_LIST.

2004-03-09 Sivaioah Nallagatla <snallagatla@novell.com>

	* backends/groupwise/e-book-backend-groupwise.[ch] : added 
	code to compare two e-gw-items and get the changes 
	nd did some code formatting 

2004-03-02  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-query.h (EBookQueryTest): comment out the
	unsupported query types.

2004-02-26  Chris Toshok  <toshok@ximian.com>

	* libebook/e-contact.h: add
	E_CONTACT_IM_GROUPWISE_{HOME,WORK}_{1,2,3}.

	* libebook/e-contact.c: add attributes
	E_CONTACT_IM_GROUPWISE_{HOME,WORK}_{1,2,3}.

2004-02-25  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.c (e_vcard_attribute_is_single_valued):
	predicate returning TRUE if there's only one value for the
	attribute.
	(e_vcard_attribute_get_value): return the first value in the list,
	if there is one.  also, warn if called on a multi-valued
	attribute.
	(e_vcard_attribute_get_value_decoded): same, but return a GString.
	(e_vcard_attribute_has_type): predicate to check for TYPE=@typestr
	in the parameter list for an attribute.

	* libebook/e-vcard.h: add prototypes for
	e_vcard_attribute_is_single_valued and
	e_vcard_attribute_get_value{_decoded}.  Also, add
	e_vcard_attribute_has_type.

	* libebook/e-contact.h: add prototypes for
	e_contact_{get,set}_attributes, and e_contact_vcard_attribute.

	* libebook/e-contact.c (e_contact_vcard_attribute): new function,
	return the vcard attribute for a given EContactField id.
	(e_contact_get_attributes): get a GList* of EVCardAttributes for
	the given EContactField.  This allows you to get at the parameters
	to the attribute, which you can't get with e_contact_get.
	(e_contact_set_attributes): an analogous setter for
	e_contact_get_attributes.

2004-02-25  Sivaiah Nallagatla  <snallagatla@novell.com>

	* libebook/e-vcard.h : added EVC_X_GROUPWISE definition 
	* libebook/e-contact.[ch] : added E_CONTACT_IM_GROUPWISE field to EContact 
	to store groupwise im ids

2004-02-24  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-book-async.c (_default_book_response_dtor): Don't
	unref the *new* book after returning it to user. This was causing
	hard to trace crashes.

	* libebook/e-book.c (e_book_get_default_addressbook): Correctly
	assert the pointer-to-pointer, not the pointed-to pointer.

2004-02-23  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.c (parse): wrap spew in "#define d(x)".
	(e_vcard_attribute_add_value_decoded): same.
	(_evc_base64_encode_close): same.
	(_evc_base64_encode_step): same.

	* libebook/e-contact.c (e_contact_set_property): wrap spew in
	"#define d(x)".
	(e_contact_set): same.
	(e_contact_get_email_list): nuke dead function.

	* libebook/e-book.c (e_book_add_contact): wrap spew in "#define
	d(x)" and reindent.
	(e_book_response_add_contact): same.
	(e_book_response_get_contact): same.
	(e_book_response_get_book_view): same.
	(e_book_response_get_contacts): reindent.
	(e_book_response_get_changes): same.
	(e_book_response_generic): same.
	(e_book_response_open): same.
	(e_book_response_remove): same.

	* libebook/e-book-view-listener.c
	(impl_BookViewListener_notify_contacts_added): wrap spew in
	"#define d(x)".
	(impl_BookViewListener_notify_contacts_removed): same.
	(impl_BookViewListener_notify_contacts_changed): same.
	(impl_BookViewListener_notify_sequence_complete): same.
	(impl_BookViewListener_notify_progress): same.

	* libebook/e-book-listener.c (impl_BookListener_respond_get_view):
	wrap spew in "#define d(x)".

2004-02-23  JP Rosevear <jpr@ximian.com>

	* tests/vcard/Makefile.am: add extra includes for srcdir !=
	builddir

	* tests/ebook/Makefile.am: ditto

	* libedata-book/Makefile.am: ditto

	* libebook/Makefile.am: ditto

	* backends/vcf/Makefile.am: ditto

	* backends/ldap/Makefile.am: ditto

	* backends/file/Makefile.am: ditto

2004-02-23  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/test-search.c: add a utility so we can perform
	searches against addressbooks without having to bring up a gui.

	* tests/ebook/Makefile.am (test_search_LDADD): add.
	(noinst_PROGRAMS): add test-search

2004-02-20  Chris Toshok  <toshok@ximian.com>

	[ fixes bug #53994 ]
	
	* libebook/e-book-query.c (e_book_query_get_type): new function,
	supply e_book_query_copy as the CopyFunc, and e_book_query_unref
	as the FreeFunc.
	(e_book_query_copy): new function, just convert @q to a string and
	reparse it, ala the EVCard copy function.

	* libebook/e-book-query.h: add prototypes for
	e_book_query_get_type and e_book_query_copy.  also add
	E_TYPE_BOOK_QUERY.

	* libebook/e-contact.h: add
	E_TYPE_CONTACT_{DATE,NAME,PHOTO,CERT,ADDRESS}.


2004-02-20 Sivaiah Nallagatla <snallagatla@novell.com>
	
	* backends/groupwise/create-account.c : new file to create an acoount
   
2004-02-20 Sivaiah Nallagatla  <snallagatla@novell.com>
	
	* backends/Makefile.am : added groupwise to SUBDIRs
	* backends/groupwise/Makefile.am
	* backends/groupwise/e-book-backend-groupwise.[ch] : new 
	groupwise address book backend class


2004-02-12  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-listener.c
	(impl_BookListener_respond_get_contact_list): unref the contacts
	and free the response.list.

	* libebook/e-book.c (e_book_response_get_contacts): copy the GList
	and ref the contacts in it.

2004-02-12  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-listener.c (e_book_listener_new): use
	ORBIT_THREAD_HINT_ON_CONTEXT, and specify _ebook_context.

	* libebook/e-book.c (e_book_activate): init _ebook_context.
	(startup_mainloop): fun the mainloop on _ebook_context.

2004-02-11  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-listener.c (e_book_listener_new): fix typo.

2004-02-11  Chris Toshok  <toshok@ximian.com>

	* libedata-book/e-data-book.c (view_listener_died_cb): nuke, moved
	to e-data-book-view.c.
	(impl_GNOME_Evolution_Addressbook_Book_getBookView): remove the
	call to ORBit_small_listen_for_broken.  That's handled in
	e-data-book-view.c too, and don't g_object_unref the view (it's a
	BonoboObject anyway, and we can't unref it after the oneway corba
	call like we could before when it wasn't oneway.)
	(view_destroy): just call e_book_backend_remove_book_view.

	* libedata-book/e-data-book-view.c (view_listener_died_cb): move
	this here from e-data-book.c.
	(e_data_book_view_construct): call ORBit_small_listen_for_broken
	here.
	(impl_GNOME_Evolution_Addressbook_BookView_dispose): call
	ORBit_small_unlisten_for_broken, and unref the view.
	(e_data_book_view_get_card_query): add arg check.
	(e_data_book_view_get_backend): same.
	(e_data_book_view_get_listener): same.
	(e_data_book_view_class_init): fill in epv->dispose.

	* libedata-book/e-book-backend.c (e_book_backend_get_book_views):
	FALSE => NULL.
	(e_book_backend_add_book_view): add a arg check.
	(e_book_backend_remove_book_view): same.
	(e_book_backend_init): don't use ref/unref for the EList
	functions, since we use a weakref to manage the contents of the
	list elsewhere.

	* libebook/e-book-listener.c (impl_BookListener_respond_get_view):
	release_unref after the signal.  the callee must ref to keep the
	book_view alive.

	* libebook/e-book-view.c (e_book_view_do_added_event): don't free
	up the response stuff here, it's handled in the listener code now.
	(e_book_view_do_modified_event): same.
	(e_book_view_do_removed_event): same.
	(e_book_view_do_status_message_event): same.
	(e_book_view_handle_response): add a comment about a useless (imo)
	check.  also, don't g_free (resp).
	(e_book_view_construct):
	(e_book_view_dispose): call BookView::dispose before we
	release_unref it.

	* libebook/e-book-view-listener.c (free_response): new method.
	free up an EBookViewListenerResponse*.
	(main_thread_get_response): call free_response on the response
	after emitting the signal.
	(e_book_view_listener_queue_response): just call free_response
	here instead of duplicating its code.

	* libebook/e-book.c (e_book_response_get_book_view): we don't want
	to ref the listener here.  *unref* it.
	(e_book_get_addressbooks): check addressbook_sources, not
	*addressbook_sources, in the precondition.

	* idl/Evolution-DataServer-Addressbook.idl (BookView): add dispose
	call.

2004-02-09  Michael Meeks  <michael@ximian.com>

	* libedata-book/e-data-book.c (view_destroy): tolerate NULL
	book views.

2004-02-08  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/Makefile.am (noinst_PROGRAMS): build
	test-ebook-async

	* tests/ebook/test-ebook-async.c: async version of test-ebook.c

	* tests/ebook/test-ebook.c (main): remove the call to
	bonobo_main_quit here - we don't need it.

2004-02-08  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-async.c (main_thread_get_response): lock the
	idle mutex around this function, reset it to -1, and return FALSE.
	(push_response): abstract out all the g_async_queue_push stuff
	from the various handlers.  do proper locking, and register the
	main thread idle handler if we need to.
	(e_book_async_load_local_addressbook): new function.  async
	version of e_book_load_local_addressbok.
	(*_handler): use push_response instead of g_async_queue_push.
	(init_async): remove the timeout stuff.  we register idle handlers
	when we need to.  no more polling the async queue.

	* libebook/e-book-async.h: add prototype for
	e_book_async_load_local_addressbook.

	* libebook/e-book-view-listener.c (main_thread_get_response): new
	function to read responses from the CORBA request threads.
	(e_book_view_listener_queue_response): don't just emit a signal
	here, as that causes the response to be handled on the request
	thread, and hoists re-entrancy requirements on calling code.
	instead, push the response onto the async queue.
	(e_book_view_listener_new): initialize the
	queue/idle_mutex/idle_id.
	(e_book_view_listener_dispose): dispose of the idle foo/queue.

2004-02-08  Chris Toshok  <toshok@ximian.com>

	* backends/file/e-book-backend-file.c
	(e_book_backend_file_start_book_view): don't free the
	closure/mutex inside the loop, then access it again right after
	the loop.  Should fix crashes when doing repeated searches (while
	stopping them often), like when autocompleting.



2004-02-06  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-address-western.c (e_address_western_extract_region):
	Don't allow end index to go below start index when extracting the
	region. Also handle the case where there is no whitespace after comma
	more gracefully.

2004-02-06  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book.c (e_book_activate): if bonobo hasn't been
	initialized, do it here.  This should be enough to get
	evolution-sharp based programs up and running.
	(activate_factories_for_uri): include the bonobo exception text in
	the console spew.
	
2004-02-05  Chris Toshok  <toshok@ximian.com>

	[ along with previous fixes, this fixes #53129 ]
	
	* backends/ldap/e-book-backend-ldap.c (find_book_view): we no
	longer use EBookBackendLDAPBookView.

2004-02-05  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book.c (startup_mainloop): switch from using
	bonobo_main to using a separate GMainLoop attached to the default
	context.

2004-02-04  Chris Toshok  <toshok@ximian.com>

	* backends/file/e-book-backend-file.c
	(e_book_backend_file_remove_contacts): there's no reason to search
	for the card before removing it.  the error condition is the same
	anyway, and it'll slow us down.

2004-02-04  Chris Toshok  <toshok@ximian.com>

	[ fixes bug #53130 ]
	
	* libedata-book/e-data-book-view.c (MAKE_REALLOC): this might end
	up being a bad assumption, but since it's only used for string
	sequences, assume it always will be.  We need to make a deep copy
	of the sequence.  a memcpy isn't enough, as freeing the buffer
	causes the child strings to be freed.

2004-02-04  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book.c (e_book_op_free): remove the misleading "XXX
	more here" comment from here - there's nothing else to free here.

2004-02-04  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book.c (e_book_load_source): lock the book's mutex
	before checking load_state.  Also, set the load_state to
	E_BOOK_URI_LOADING before we relinquish the lock.  It will be
	reset to URI_NOT_LOADED in fetch_corba_book if there's a problem.
	(e_book_load_uri): remove the e_return_error_if_fail about
	load_state.  It'll be handled by e_book_load_source.
	(fetch_corba_book): reset load_state to E_BOOK_URI_NOT_LOADED in
	all the cases where we return FALSE.

	* libebook/e-contact.c (e_contact_set_property): for GETSET
	properties that aren't STRUCT's, it's a string, not a pointer.
	(e_contact_get_property): same.

2004-02-04  Michael Meeks  <michael@ximian.com>

	* libebook/e-book-async.c (_get_book_view_handler):
	g_new0 so we don't have a bogus uninitialized pointer
	to segv on in _get_book_view_response_dtor.

2004-02-03  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.c (e_vcard_to_string_vcard_30): use "VCARD"
	instead of "vCard" because gnome-vfs is busted and doesn't use a
	case insensitive string check.

2004-02-02  Chris Toshok  <toshok@ximian.com>

	* libebook/e-contact.c (GETSET_FIELD): these are also of type
	STRING.  if you want a GETSET field that's a struct, use
	STRUCT_FIELD.  Fixes a problem with FULL_NAME reflection for
	evolution-sharp.

2004-02-02  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.c (e_vcard_attribute_remove_params): clear
	attr->encoding_set and attr->encoding, since that is just cached
	information from the attribute parameters.  Fixes a spurious
	g_warning.

2004-02-02  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.c (e_vcard_attribute_remove_values): make sure
	to set attr->decoded_values to NULL as well.  fixes oddness when
	overwriting the PHOTO attribute.

2004-02-02  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-contact.c (photo_getter): Return NULL if image length is
	zero.
	(photo_setter): Warn and don't set photo if image length is zero.

2004-02-02  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-contact.c (photo_setter): Handle NULL.
	(fn_setter): Handle NULL.
	(n_setter): Handle NULL.
	(adr_setter): Handle NULL.
	(date_getter): Return NULL if attr present, but no value.
	(date_setter): Handle NULL.
	(cert_setter): Handle NULL.
	(e_contact_set_property): Don't pass NULL data to setters, remove the
	attribute (if present) instead.

2004-02-02  Michael Meeks  <michael@ximian.com>

	* backends/file/e-book-backend-file.c
	(e_book_backend_file_stop_book_view): unlock after
	taking a lock.

2004-01-30  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-book-async.c (e_book_async_load_source)
	(e_book_async_load_uri)
	(e_book_async_get_default_addressbook)
	(e_book_async_get_supported_fields)
	(e_book_async_get_supported_auth_methods)
	(e_book_async_authenticate_user)
	(e_book_async_get_contact)
	(e_book_async_remove_contact)
	(e_book_async_remove_contact_by_id)
	(e_book_async_remove_contacts)
	(e_book_async_add_contact)
	(e_book_async_commit_contact)
	(e_book_async_get_book_view)
	(e_book_async_get_contacts): Add argument preconditions.

	* libebook/e-contact.c (e_contact_new_from_vcard)
	(e_contact_duplicate)
	(e_contact_name_from_string)
	(e_contact_name_copy)
	(e_contact_date_from_string): Add argument preconditions.

2004-01-30  Chris Toshok  <toshok@ximian.com>

	* libedata-book/e-book-backend.c (e_book_backend_remove_client):
	add ref/unref around this function body so that we don't get
	unreffed by something below last_client_gone.

2004-01-29  Chris Toshok  <toshok@ximian.com>

	* libedata-book/ximian-vcard.h (XIMIAN_VCARD): update for new
	office location, and change the FILE-AS/ORG fields to say Novell
	Ximian Group.

2004-01-30  Radek Doulik  <rodo@ximian.com>

	* backends/ldap/e-book-backend-ldap.c (contact_list_dtor): don't
	g_object_unref contact list, it contains strings which are freed
	in e_data_book_respond_get_contact_list, the list is freed there
	as well
	(category_compare): make sure categories != NULL before calling
	strcmp
	(build_mods_from_contacts): make sure we don't introduce new empty
	fields
	(build_mods_from_contacts): make sure the ber_func and
	compare_func are non NULL before calling them

2004-01-29  Chris Toshok  <toshok@m198-139.dsl.rawbw.com>

	* backends/file/e-book-backend-file.c
	(e_book_backend_file_load_source): honor the @only_if_exists arg
	before creating the db or directory.  i.e. fix this so it's not
	completely broken.

2004-01-28  Radek Doulik  <rodo@ximian.com>

	* libebook/e-contact.c (e_contact_set_property): use "CATEGORIES"
	instead of null vcard_field_name
	(e_contact_set_property): check for NULL string value, test for
	single category

2004-01-27  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-async.h: nuke the prototype for
	e_book_async_unload_uri.

	* libebook/e-book-async.c (e_book_async_unload_uri): nuke.

2004-01-27  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book.h: remove the prototype for e_book_unload_uri.
	If you want to unload the uri, unref the book and create a new
	one.

	* libebook/e-book.c (e_book_cancel): add some preconditions.
	(e_book_load_local_addressbook): same.
	(e_book_get_source): same.
	(e_book_get_static_capabilities): same.  also, set the GError
	instead of generating a g_warning.  This should probably return
	NULL in the error cases instead of g_strdup(""), but i'm not sure
	if that'll break things.
	(e_book_check_static_capability): add some preconditions.
	(e_book_is_writable): same.
	(e_book_set_self): same.
	(e_book_is_self): same.
	(e_book_set_default_addressbook): same.
	(e_book_set_default_source): same.
	(e_book_get_addressbooks): same.
	(e_book_unload_uri): make this static.
	
	* libebook/e-book-types.h (EBookStatus): add
	E_BOOK_ERROR_NO_SUCH_SOURCE.

2004-01-27  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book.c (e_book_load_local_addressbook): change the
	local addressbook path to .evolution/addressbook/local/system, and
	pass FALSE for @only_if_exists, so it'll always be created if it's
	not there already.

2004-01-27  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-book.c (e_book_unload_uri): If the load_state is
	E_BOOK_URI_LOADING, don't try to kill the book, just cancel the op
	and let fetch_corba_book() take care of it.
	(fetch_corba_book): Handle cancellation properly.

2004-01-26  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/Makefile.am (noinst_PROGRAMS): add
	test-untyped-phones.
	(test_untyped_phones_LDADD): new variable.

	* tests/ebook/test-untyped-phones.c: new test for 40013.

2004-01-26  Chris Toshok  <toshok@ximian.com>

	[ fixes bug #53228 ]
	
	* tests/ebook/test-categories.c: new test.

	* tests/ebook/Makefile.am (noinst_PROGRAMS): add test-categories.

	* libebook/e-vcard.c (e_vcard_to_string_vcard_30): this is really
	gross.  We don't escape the ,'s if we're generating the value for
	a CATEGORIES attribute.  I can't believe the RFC specifies commas
	for use as a toplevel list separator for CATEGORIES.  That's what
	;'s are for.
	(read_attribute_value): split the CATEGORIES attribute up like a
	normal list would be, only use ','s for it.

	* libebook/e-contact.c (e_contact_set_property): implement the
	setter portion of CATEGORIES support.
	(e_contact_get_property): implement the CATEGORIES getter.

2004-01-26  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book.c (e_book_get_default_addressbook): implement
	this the right way by searching for the "default" property over
	all sources, and returning that source, or the local addressbook
	if there isn't a default source.
	(e_book_set_default_addressbook): new function.
	(e_book_set_default_source): new function.

	* libebook/e-book.h: add prototypes for
	e_book_set_default_addressbook/e_book_set_default_source.

2004-01-23  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.c (e_vcard_unescape_string): make public.
	(e_vcard_escape_string): same.
	(e_vcard_to_string_vcard_30): use the public escape_string
	function.
	(e_vcard_dump_structure): same.

	* libebook/e-vcard.h (e_vcard_unescape_string): expose this
	(e_vcard_escape_string): and this.

	* libebook/e-contact.h: rearrange the enum again, to keep
	strings/structs separate.

	* libebook/e-book.c (e_book_get_default_addressbook): might as
	well switch this to the new folder layout.
	(e_book_load_local_addressbook): same.

	* libebook/e-contact.c (e_contact_find_attribute_with_types): only
	find the attribute that matches the types explicitly.  this is the
	only way to implement "other phone/fax" currently.
	(e_contact_set_property): same.

2004-01-21  Nat Friedman <nat@novell.com>

	* libedata-book/e-book-backend-sexp.c (compare_im): New function
	to allow searching of IM fields.
	* libedata-book/e-book-backend-sexp.c (compare_im_aim): Likewise.
	* libedata-book/e-book-backend-sexp.c (compare_im_msn): Likewise.
	* libedata-book/e-book-backend-sexp.c (compare_im_icq): Likewise.
	* libedata-book/e-book-backend-sexp.c (compare_im_yahoo):
	Likewise.
	* libedata-book/e-book-backend-sexp.c (compare_im_jabber):
	Likewise.
	* libedata-book/e-book-backend-sexp.c (prop_info_table): Added
	entries for IM field searching.

2004-01-20  Hans Petter Jansson  <hpj@ximian.com>

	* libedata-book/e-data-book-view.c (e_data_book_view_new): Pass a
	threaded POA policy to g_object_new (). Fixes deadlocks.

2004-01-16  JP Rosevear <jpr@ximian.com>

	* libebook/e-book.c (e_book_idle_writable): idle handler to emit
	the writable signal on the main thread
	(e_book_handle_response): use above
	
2003-01-11  Christian Hammond <chipx86@gnupdate.org>
 
 	* addressbook/libebook/e-contact.[ch]: Changed the IM account field
 	types from LIST_FIELD to MULTI_LIST_FIELD, as discussed with Chris
 	Toshok. Added convenience fields for WORK and HOME entries for each
 	IM account list. Add support for setting LIST_FIELD types.
 
2004-01-09  Jeffrey Stedfast  <fejj@ximian.com>

	* tests/ebook/test-date.c (main): Don't let control reach the end
	of a non-void function

	* backends/ldap/e-book-backend-ldap.c (find_book_view): Don't let
	control reach the end of a non-void function

	* libebook/e-contact.c (cert_getter): Don't let control reach the
	end of a non-void function

	* tests/ebook/test-string.c: Same as below.

	* tests/ebook/test-photo.c: #include <string.h> for strlen and
	memcmp.
	(main): Don't let control reach the end of a non-void function

2004-01-09  Ross Burton  <ross@burtonini.com>

	* libebook/e-book-async.h:
	* libebook/e-book-async.c:
	Change the API of e_book_async_get_book_view and
	e_book_async_get_contacts to match e-book.h.

2004-01-08  Ross Burton  <ross@burtonini.com>

	* libebook/e-contact.c:
	* libebook/e-contact.h:
	Add a video conferencing URL field.

2004-01-07  JP Rosevear <jpr@ximian.com>

	* libedata-book/Makefile.am: remove DISABLE_DEPRECATED flags

	* libebook/Makefile.am: ditto
	
2004-01-06  Chris Toshok  <toshok@ximian.com>

	* backends/file/e-book-backend-file.c
	(e_book_backend_file_load_source): use e_util_mkdir_hier here
	instead of mkdir.
	(do_create): add the db_error to the spew.
	(e_book_backend_file_load_source): don't use mkdir here, use
	e_util_mkdir_hier.

2004-01-05  Christian Neumair  <chris@gnome-de.org>

	* libebook/e-book.c: Generalize some strings.

2003-12-29  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/test-undefinedfield.c: new test - make sure we
	return NULL for undefined/unimplemented fields.

	* tests/ebook/Makefile.am (noinst_PROGRAMS): add
	test-undefinedfield.

2003-12-29  Chris Toshok  <toshok@ximian.com>

	* libebook/e-contact.c (e_contact_get_property): reset the GValue
	if there's a problem getting it (will force it to NULL).

2003-12-29  Chris Toshok  <toshok@ximian.com>

	* libebook/e-contact.c (e_contact_get): initialize value to NULL
	so that if the field is unknown (meaning we haven't gotten around
	to implementing it yet, like the category list stuff), we don't
	return an invalid pointer.

2003-12-19  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.h: add lots more #defines, some EVC_X ones for
	attribute TYPE's, as well as the vcard specified "KEY" attribute.

	* libedata-book/e-book-backend.c (e_book_backend_remove_client):
	reorder some code so we hold the lock up until we're done with
	backend->priv->clients.

	* backends/ldap/e-book-backend-ldap.c (prop_info): add an entry
	for E_CONTACT_X509_CERT, and map it to the userCertificate ldap
	attribute.  not sure if this is strictly correct... the
	inetOrgPerson schema mentions using userSMIMECertificate (which
	contains the full certificate chain in pkcs#7 form) in favor of
	userCertificate for S/MIME applications.

	* libebook/e-contact.h: add the CERT field types, the EContactCert
	struct type, and prototypes for e_contact_cert_get_type and
	e_contact_cert_free.

	* libebook/e-contact.c (field_info): add E_CONTACT_X509_CERT
	(cert_getter, cert_setter): new functions, implement
	getting/setting of certs.
	(e_contact_cert_free): new function.
	(e_contact_cert_copy): same.
	(e_contact_cert_get_type): same.

2003-12-17  Chris Toshok  <toshok@ximian.com>

	* libebook/e-book-async.c (_get_book_view_response_dtor): if
	there's a crash in the wombat and we're left with an invalid
	EBook, resp->book_view will be NULL here.  don't unref it.

2003-12-16  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-book.c (fetch_corba_book): Ref and keep the loaded
	ESource around. Unref old source if present.
	(e_book_get_source): Implement.
	(e_book_init): Init source pointer.
	(e_book_dispose): Unref source, if any.

2003-12-15  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-contact.c (adr_getter): Initialize the address_format
	field. Absence of this was causing crashes.
	(e_contact_set_property): For synthetic attr_type fields, add a
	case for struct/get_set alongside strings. This makes addresses work.
	(e_contact_get_property): For multi_elem strings, count the matching
	attributes instead of trying to get a list from the first attribute
	encountered (which is what list_elem does). This makes e-mail
	addresses work.

2003-12-10  Hans Petter Jansson  <hpj@ximian.com>

	* backends/ldap/e-book-backend-ldap.c
	(e_book_backend_ldap_load_source): Get attributes from source, not URI.

2003-12-09  Chris Toshok  <toshok@ximian.com>

	* backends/file/e-book-backend-file.c (select_changes): change to
	return gboolean and take the filename, not the struct dirent *.
	(e_book_backend_file_remove): switch from using scandir to
	g_dir_*.

2003-12-07  JP Rosevear  <jpr@ximian.com>

	* libedata-book/e-data-book-factory.c: version the OAFIID

	* libebook/e-book.c (activate_factories_for_uri): update repo id
	
2003-12-07  JP Rosevear  <jpr@ximian.com>

	* libebook/e-book.c (activate_factories_for_uri): use the
	versioned repo id

2003-12-05  Chris Toshok  <toshok@ximian.com>

	* libebook/e-contact.c (e_contact_get_const): make this only work
	for strings, since really that's all it works for now.

2003-12-05  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-contact.c (e_contact_get_property): Return boxed type
	for struct.
	(e_contact_name_from_string): Never pass NULL to
	e_name_western_parse ().

2003-12-04  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/test-ebook.c (print_email): print out the
	NAME_OR_ORG of the contact too.

	* libebook/e-contact.h (EContactField): add NAME_OR_ORG.

	* libebook/e-contact.c (field_info): add NAME_OR_ORG.
	(e_contact_get_property): handle NAME_OR_ORG.

2003-12-01  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-book.c (e_book_unload_uri): When clearing the cached
	capabilities, also clear the cap_queried flag.

2003-12-01  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-book.c (fetch_corba_book): If the book failed to load,
	set load_state to E_BOOK_URI_NOT_LOADED, so _unload () won't crash.

2003-12-01  Hans Petter Jansson  <hpj@ximian.com>

	* libebook/e-book-async.c (_load_uri_response_handler)
	(_load_uri_response_dtor)
	(_load_uri_handler)
	(_load_uri_dtor)
	(_default_book_response_handler)
	(_default_book_response_dtor): Pass source instead of URI, and
	s/uri/source/.
	(e_book_async_load_source): Implement.
	(e_book_async_load_uri): Create a source and pass that to worker.

2003-11-28  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/Makefile.am (test_ebook_view_LDADD): new variable.
	(noinst_PROGRAMS): add test-ebook-view

	* tests/ebook/test-ebook-view.c: new test for ebook view's.

2003-11-26  Hans Petter Jansson  <hpj@ximian.com>

	* backends/file/e-book-backend-file.c (e_book_backend_file_load_uri):
	Rename to e_book_backend_file_load_source () and take an ESource
	instead of an URI.
	(e_book_backend_file_dispose): Don't free URI anymore.
	(e_book_backend_file_class_init): load_uri -> load_source.
	(e_book_backend_file_init): Don't init URI anymore.

	* backends/ldap/e-book-backend-ldap.c (e_book_backend_ldap_load_uri):
	Rename to e_book_backend_ldap_load_uri () and take an ESource instead
	of an URI.
	(e_book_backend_ldap_dispose): Don't free URI anymore.
	(e_book_backend_ldap_class_init): load_uri -> load_source.

	* backends/vcf/e-book-backend-vcf.c (e_book_backend_vcf_load_uri):
	Rename to e_book_backend_vcf_load_source () and take an ESource
	instead of an URI.
	(e_book_backend_vcf_dispose): Don't free URI anymore.
	(e_book_backend_vcf_class_init): load_uri -> load_source.
	(e_book_backend_vcf_init): Don't init URI anymore.

	* idl/Evolution-DataServer-Addressbook.idl (getBook): In parameter
	"uri" renamed to "source". Takes standalone source XML.

	* libebook/e-book.c (fetch_corba_book): Implement, taking ESource.
	(e_book_load_source): Implement.
	(e_book_load_uri): Create a source based on the URI and use
	e_book_load_source () to load that.

	* libedata-book/e-book-backend.c (e_book_backend_load_uri): Renamed
	to e_book_backend_load_source () and takes ESource instead of URI.
	(e_book_backend_get_uri): Renamed to e_book_backend_get_source ()
	and returns ESource instead of URI.
	(e_book_backend_open): Use e_book_backend_load_source ().
	(e_book_backend_init): Don't init URI anymore.
	(e_book_backend_dispose): Don't free URI anymore.

	* libedata-book/e-data-book-factory.c (backend_last_client_gone_cb):
	Get URI from backend's ESource.
	(impl_GNOME_Evolution_Addressbook_BookFactory_getBook): Take
	standalone source XML, construct an ESource, and fetch a backend
	with that.

	* libedata-book/e-data-book.c (e_data_book_get_uri): Renamed to
	e_data_book_get_source () and return ESource.
	(e_data_book_construct): Take ESource instead of URI.
	(e_data_book_new): Take ESource instead of URI.
	(e_data_book_dispose): Don't free URI. Instead, unref ESource.

2003-11-25  Chris Toshok  <toshok@ximian.com>

	* tests/ebook/test-self.c: new file/test, print out the current
	self contact.

	* tests/ebook/test-ebook.c (print_email): fix the email printing.

	* libebook/e-vcard.c (parse): if the vcard doesn't begin with a
	"begin" attribute, we still want to add the attribute to the
	vcard.

	* libebook/e-contact.c (field_info): add GETSET_FIELD for fields
	that don't have a structured type associated with them (such as
	FN) but that need getter/setter methods for some reason.  add a
	GType getter function to STRUCT_FIELD, and fill in the getter
	(e_contact_class_init): use boxed types for STRUCT fields.
	(adr_setter): implement.
	(e_contact_set_property): use g_value_get_boxed for STRUCT types.
	(e_contact_get_property): implement GETSET getter.
	(e_contact_name_get_type): implement.
	(e_contact_date_copy): same.
	(e_contact_date_get_type): same.
	(e_contact_date_new): same.
	(e_contact_photo_copy): same.
	(e_contact_photo_get_type): same.
	(e_contact_address_copy): same.
	(e_contact_address_get_type): same.

	* libebook/e-contact.h: add prototypes for
	e_contact_{date,name,photo,address}_get_type.

	* libebook/e-book-types.h: add E_BOOK_ERROR_NO_SELF_CONTACT.

	* libebook/e-book.c (e_book_get_self): implement.
	(e_book_set_self): same.
	(e_book_is_self): same.
	(e_book_get_default_addressbook): add more to the comment telling
	how this *really* should be implemented.
	(e_book_get_addressbooks): implement.

	* libebook/e-book.h: add prototype for e_book_is_self, change
	e_book_set_self to take an EContact instead of just the uid.
	Also, unifdef the prototype for e_book_get_addressbooks.

2003-11-23  Chris Toshok  <toshok@ximian.com>

	* backends/file/e-book-backend-file.c
	(e_book_backend_file_load_uri): remove the db3 version checks, and
	add the extra transaction arg to db->open.

	* backends/file/Makefile.am (INCLUDES): use the embedded db4.

2003-11-22  Chris Toshok  <toshok@ximian.com>

	* backends/ldap/e-book-backend-ldap.c (contact_list_handler,
	contact_list_dtor, e_book_backend_ldap_get_contact_list):
	implement get_contact_list for the ldap backend.
	(category_populate): un-ifdef this.
	(category_ber): same.
	(category_compare): same.
	(e_book_backend_ldap_class_init): fill in
	EBookBackendClass::get_contact_list.

2003-11-11  Chris Toshok  <toshok@ximian.com>

	* tests/vcard/dump-vcard.c (main): convert the vcard to a string
	and print it out as well.  also fix the evcard leak.

	* tests/vcard/README: add blurb about 10.vcf.

	* tests/vcard/Makefile.am (EXTRA_DIST): add 10.vcf

	* tests/vcard/10.vcf: new quotted attribute parameter value test.

	* tests/vcard/[1-9].vcf: add these back in.

2003-11-10  JP Rosevear <jpr@ximian.com>

	* libebook/e-book-listener.c: remove construct method, it did
	nothing and should use construct time args in future if needed

2003-11-10  Dan Winship  <danw@ximian.com>

	* libebook/e-contact.c (e_contact_date_equal): New utility
	function to compare two (possibly NULL) EContactDates

	* backends/ldap/e-book-backend-ldap.c (anniversary_compare,
	birthday_compare): Use it

	* libedata-book/e-book-backend-summary.c
	(e_book_backend_summary_check_contact): New utility function to
	check if an id is in the summary (without doing any additional
	work beyond that).

2003-11-10  Dan Winship  <danw@ximian.com>

	* libedata-book/e-book-backend.h:
	s/E_TYPE_BACKEND/E_TYPE_BOOK_BACKEND/
	s/E_IS_BACKEND/E_IS_BOOK_BACKEND/

	* libedata-book/e-book-backend-sync.h: Likewise
	* backends/file/e-book-backend-file.h: Likewise
	* backends/vcf/e-book-backend-vcf.h: Likewise
	* backends/ldap/e-book-backend-ldap.h: Likewise

	* libedata-book/e-book-backend.c: Update for that. Also simplify
	some redundant g_return_if_fail tests and reindent a bunch of
	lines that were indented wrong after the pas->e_book renaming.

	* libedata-book/e-book-backend-sync.c: Likewise
	* backends/file/e-book-backend-file.c: Likewise
	* backends/vcf/e-book-backend-vcf.c: Likewise
	* backends/ldap/e-book-backend-ldap.c: Likewise

2003-11-08  Chris Toshok  <toshok@ximian.com>

	* libebook/e-vcard.c (skip_until): implement.
	(read_attribute_params): implement quoted parameter values, in our
	trademark overly accepting way.  it'll accept "hi" as well as
	"hi"and"bye" as parameter values (with the values being "hi" and
	"hiandbye" respectively).
	(e_vcard_to_string_vcard_30): hardcode VERSION:3.0 here, since
	we're outputing a version 3.0 card.  also, ignore any VERSION
	attributes that may be in the vcard we parsed in.  lastly, search
	parameter values for whitespace before outputting them, and wrap
	them in quotes if they have any.

	* libebook/e-book-async.c (e_book_async_add_contact): use
	e_contact_duplicate here so if the caller modifies the contact
	after calling us we use the original copy.
	(e_book_async_commit_contact): same.

2003-11-07  Dan Winship  <danw@ximian.com>

	* libebook/e-address-western.c: 
	* libebook/e-name-western.c: Move these here.

	* libebook/e-contact.c: Update e-name-western include

	* libebook/Makefile.am (libebook_la_SOURCES): Add
	e-address-western.c and e-name-western.c.
	(libebookinclude_HEADERS): and their headers
	(libebook_la_LDFLAGS): Remove -no-undefined

	* libedata-book/Makefile.am (libedata_book_la_LDFLAGS): Likewise

2003-11-06  Dan Winship  <danw@ximian.com>

	* backends/ldap/e-book-backend-ldap.c: Remove the word "process"
	from method names, which hasn't really made sense since 1.2.

	* backends/vcf/e-book-backend-vcf.c: Likewise

2003-11-06    <jpr@ximian.com>

	* libebook/Makefile.am: don't add libename

2003-11-06  JP Rosevear <jpr@ximian.com>

	* libebook/e-book.c: replace e_mutex stuff with gthread stuff

2003-11-06  JP Rosevear <jpr@ximian.com>

	* Makefile.am: build new subdirs

	* backends/*: build the file, vcf and ldap backends here

	* libedata-cal/Makefile.am: no longer build them here	
	
2003-11-05  JP Rosevear <jpr@ximian.com>

	* rename libedatabook to libedata-book
	
2003-11-05  JP Rosevear  <jpr@ximian.com>

	* libebook/Makefile.am: use privincludedir

	* libedatabook/Makefile.am: ditto

	* libedatabook/libedatabook-1.0.pc.in: use privincludedir; remove
	gal

	* libebook/libebook-1.0.pc.in: ditto

2003-11-05  Rodrigo Moya <rodrigo@ximian.com>

	* libedatabook/e-book-backend-sexp.c:
	* libedatabook/e-book-backend-summary.c:
	* libedatabook/e-book-backend-vcf.c:
	* libedatabook/e-book-backend-file.c: removed GAL dependency.

2003-11-04  JP Rosvear <jpr@ximian.com>

	* libedatabook/e-data-book-factory.c: use properly name spaced
	default id

	* libebook/e-book.c: kill unneccesary define

2003-11-04  JP Rosevear <jpr@ximian.com>

	* libedatabook/e-data-book-factory.c: remove corbe header include

	* libedatabook/e-data-book.h: include corba header correctly

	* libedatabook/e-data-book-view.h: ditto

	* libedatabook/e-data-book-factory.h: ditto

	* libedatabook/e-book-backend.h: ditto

	* libedatabook/e-book-backend-sync.h: ditto

	* libedatabook/Makefile.am: reflect idl name change

	* libebook/e-book-view.c: remove corba header include

	* libebook/e-book.c: ditto
	
	* libebook/e-book.h: include corba header correctly

	* libebook/e-book-view.h: ditto

	* libebook/e-book-view-listener.h: ditto

	* libebook/e-book-listener.h: ditto

	* idl/Makefile.am (idl_DATA): rename idl to
	Evolution-DataServer-Addressbook.idl

	* libebook/Makefile.am: reflect idl name change

