aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas/pas-backend-ldap.c
Commit message (Collapse)AuthorAgeFilesLines
* Various changes to merge in evolution-data-server reliance.JP Rosevear2003-11-071-3206/+0
| | | | svn path=/trunk/; revision=23206
* use the synchronous api for this. simplifies it a bunch.Chris Toshok2003-10-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-21 Chris Toshok <toshok@ximian.com> * tools/evolution-addressbook-abuse.c: use the synchronous api for this. simplifies it a bunch. 2003-10-21 Chris Toshok <toshok@ximian.com> * backend/pas/pas-book.c (impl_GNOME_Evolution_Addressbook_Book_remove): we can ill afford bad debug spew. (view_listener_died_cb): implement. (impl_GNOME_Evolution_Addressbook_Book_getBookView): hook up an ORBit_small connection listener on the view's listener. (pas_book_respond_create): use e_contact_get_const instead of e_contact_get here. fixes a leak. * backend/pas/pas-book-view.c (impl_GNOME_Evolution_Addressbook_BookView_stop): implement, call pas_backend_stop_book_view. (pas_book_view_get_listener): return the book view's listener. (pas_book_view_class_init): fill in epv->stop. (pas_book_view_init): use a #define for THRESHOLD_MAX instead of the constant. * backend/pas/pas-book-view.h: add prototype for pas_book_view_get_listener. * backend/pas/pas-backend.c (pas_backend_stop_book_view): implement. (pas_backend_remove_book_view): implement. * backend/pas/pas-backend.h: add prototype for stop_book_view and remove_book_view. * backend/pas/pas-backend-vcf.c (load_file): pass in the fd and use fdopen here. (foreach_build_list): don't creat EContacts here, because we'll just be converting them back to vcards anyway. (save_file): use char*'s instead of EContacts, and split entries with 2 blank lines. Also, hold the lock over the entire function. (do_create): hold the lock around uid generation and touching the hash table. (pas_backend_vcf_process_remove_contacts): same. (pas_backend_vcf_process_modify_contact): same. (pas_backend_vcf_stop_book_view): new function, but leave unimplemented for now. (pas_backend_vcf_load_uri): the uri contains the directory name, not the filename. (pas_backend_vcf_dispose): grab the lock here just for sanity's sake. Also reorder things a bit, and free the hashtable and mutex. (pas_backend_vcf_init): init the mutex. * backend/pas/pas-backend-summary.c (pas_backend_summary_add_contact): don't unref the contact here. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_stop_book_view): new function, but leave unimplemented for now. * backend/pas/pas-backend-file.c (build_summary): use an EContact for this call. (do_summary_query): nuke, the contents of this has been moved to start_book_view. (pas_backend_file_search_timeout): same. (pas_backend_file_search): same. (pas_backend_file_start_book_view): glom everything into here involving searching. This function could (and should) be renamed and reused from both this function and _get_contact_list. (pas_backend_file_stop_book_view): new function. (pas_backend_file_class_init): fill in backend->stop_book_view. * backend/pas/Makefile.am (LDAP_BACKEND): libpasldap.a -> libpasldap.la (noinst_LTLIBRARIES): *.a -> *.la. (libpas_la_SOURCES): same. (libpasfile_la_SOURCES): same. (libpasvcf_la_SOURCES): same. (libpasldap_la_SOURCES): same. * backend/idl/addressbook.idl: add BookView::stop. * backend/ebook/e-vcard.c (read_attribute_value): fix GString related leaks. (read_attribute_params): same. (parse): don't leak the EVCardAttributes corresponding to BEGIN/END:vCard. (free_gstring): new function (e_vcard_attribute_remove_values): free the decoded_values list, using free_gstring. * backend/ebook/e-book.c (e_book_response_get_book_view): ref the listener here. * backend/ebook/e-book-view.h: add prototype for e_book_view_stop. * backend/ebook/e-book-view.c (e_book_view_stop): new function. * backend/ebook/e-book-async.c (_get_book_view_response_dtor): unref the book view. svn path=/trunk/; revision=23000
* Merge new-ui-branch to the trunk.Ettore Perazzoli2003-10-221-881/+524
| | | | svn path=/trunk/; revision=22965
* Fix lots of leaks, update for correct use of g_object_get. Some cleanups.Larry Ewing2003-06-141-0/+3
| | | | | | | | | | | | | | | 2003-06-14 Larry Ewing <lewing@ximian.com> * gui/backend/ebook/e-card-simple.c: * gui/backend/ebook/e-card.c: * gui/backend/ebook/evolution-ldif-importer.c: * gui/backend/ebook/load-pine-addressbook.c: * gui/backend/ebook/test-card.c: * gui/backend/pas/pas-backend-card-sexp.c: * gui/backend/pas/pas-backend-ldap.c: Fix lots of leaks, update for correct use of g_object_get. Some cleanups. svn path=/trunk/; revision=21443
* i2003-05-19 Chris Toshok <toshok@ximian.com>Chris Toshok2003-05-201-1/+2
| | | | | | | | * backend/pas/pas-backend-ldap.c (func_beginswith): use the more convoluted (but more correct) query if evolutionPerson is supported. Fixes #42825. svn path=/trunk/; revision=21270
* reflect prior column additionJP Rosevear2003-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-03-04 JP Rosevear <jpr@ximian.com> * gui/component/select-names/e-select-names.etspec: reflect prior column addition * gui/component/select-names/e-select-names-bonobo.c (entry_get_property_fn): set the arg properly * gui/component/select-names/Evolution-Addressbook-SelectNames.idl: add Icscalendar to field list * backend/pas/pas-backend-ldap.c: add icscalendar to prop list * backend/ebook/e-card.h: add icscalendar data member * backend/ebook/e-card.c: add icscalendar to list and its parse routine (e_card_get_vobject): add icscalendar prop value (parse_icscalendar): parse routine (e_card_class_init): add icscalendar arg (e_card_destroy): destroy icscalendar member (e_card_set_arg): set icscalendar (e_card_init): init icscalendar (e_card_get_arg): return icscalendar * backend/ebook/e-card-simple.c (field_data): add icscalendar * backend/ebook/e-card-simple.h: ditto svn path=/trunk/; revision=20153
* gone. (match_initials): gone. (book_query_sexp): remove the primaryChris Toshok2003-02-101-4/+6
| | | | | | | | | | | | | | | | | | | | | | | 2003-02-09 Chris Toshok <toshok@ximian.com> * gui/component/select-names/e-select-names-completion.c (sexp_initials): gone. (match_initials): gone. (book_query_sexp): remove the primary handling. (book_query_score): same. * backend/ebook/e-card.c (e_card_set_property): g_value_get_pointer => g_value_get_object for "category_list". * backend/ebook/e-book.c (struct _EBookPrivate): add a comment. * backend/pas/pas-backend-ldap.c (func_beginswith): performance at the cost of a tiny bit of correctness. If the ldap server doesn't support evolutionPerson don't query on fileAs, use sn (since that's effectively what gets used in the display when fileAs isn't supported.) svn path=/trunk/; revision=19863
* [ huge change, all for 1 little performance problem :) fixes #18207 ] useChris Toshok2003-02-081-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-02-08 Chris Toshok <toshok@ximian.com> [ huge change, all for 1 little performance problem :) fixes #18207 ] * gui/widgets/e-addressbook-model.c (get_view): use e_book_check_static_capability here to make things a little prettier. (remove_card): complain about my life, and add code to use one "model_changed" signal if we get back a list of cards instead of multiple "card_removed" signals. * gui/widgets/e-addressbook-model.h: little clean up. * gui/widgets/e-addressbook-view.c (delete): write a bulk-remove case for this. if the backend supports it, send all the ids at once. otherwise loop over the ids. (e_addressbook_view_delete_selection): fake a CardAndBook structure and call delete, instead of duplicating the code in 2 places. * gui/component/addressbook.c (delete_contact_cb): don't call e_contact_editor_confirm_delete here, it's handled by the EAddressbookView. * backend/pas/pas-card-cursor.c (pas_card_cursor_construct): fix a compiler warning about a stupid crash. * backend/pas/pas-book.h (PASOperation): RemoveCard -> RemoveCards. (PASRemoveCardsReques): char *id -> GList *ids. (PASRequest): PASRemoveCardRequest -> PASRemoveCardsRequest. * backend/pas/pas-book.c (pas_book_queue_remove_cards): build up a GList from the id sequence. (pas_book_respond_remove): notifyCardRemoved -> notifyCardsRemoved. (impl_GNOME_Evolution_Addressbook_Book_removeCards): rename. (pas_book_free_request): free the idlist for RemoveCards. (pas_book_class_init): removeCard -> removeCards. * backend/pas/pas-book-view.h: change prototype for pas_book_view_notify_remove, and add prototype for pas_book_view_notify_remove_1. * backend/pas/pas-book-view.c (pas_book_view_notify_remove_1): build up a list and call pas_book_view_notify_remove. (pas_book_view_notify_remove): build up the corba id sequence and call BookViewListener::notifyCardsRemoved. * backend/pas/pas-backend.h: remove_card -> remove_cards. * backend/pas/pas-backend.c (pas_backend_remove_cards): rename from _remove_card. (process_client_requests): RemoveCard -> RemoveCards and _remove_card -> _remove_cards. * backend/pas/pas-backend-ldap.c (check_schema_support): g_strcasecmp -> g_ascii_strcasecmp. (remove_card_handler): _remove => _remove_1. (modify_card_modify_handler): same. (pas_backend_ldap_process_remove_cards): rename from _remove_card. (pas_backend_ldap_class_init): _remove_card -> _remove_cards. * backend/pas/pas-backend-file.c (pas_backend_file_class_init): remove_card -> remove_cards. (pas_backend_file_get_static_capabilities): add "bulk-removes". (pas_backend_file_process_remove_cards): rewrite this function largely, so that it handles lists of ids. first we loop through and for every successful deletion we build a list of deleted ECards. Then for each view we build a list (a subset of the deleted ECard list) and pass back that list to the view. (pas_backend_file_process_modify_card): use _remove_1 instead of _remove. (ecard_matches_search): new function. * backend/pas/pas-backend-card-sexp.c (pas_backend_card_sexp_match_vcard): rewrite in terms of _match_ecard. (pas_backend_card_sexp_match_ecard): new function, the guts from _match_vcard. * backend/pas/pas-backend-card-sexp.h: add prototype for pas_backend_card_sexp_match_ecard. * backend/idl/addressbook.idl: the card removal stuff now takes CardIdList. * backend/ebook/e-book.c (e_book_get_static_capabilities): cache successful capability queries (since they're static). (e_book_check_static_capability): new, convenience function to check if a particular capability is supported. (e_book_remove_card_by_id): build a single element GList and call e_book_remove_cards. (e_book_remove_cards): build up a CORBA sequence from the GList and call Book::removeCards. (e_book_dispose): free the cached capabilities string. * backend/ebook/e-book.h: add new prototypes for e_book_check_static_capability and e_book_remove_cards. * backend/ebook/e-book-view.h (struct _EBookViewClass): rename "card_removed" signal to "cards_removed". * backend/ebook/e-book-view.c (e_book_view_do_removed_event): id -> ids, and free the id list. (e_book_view_check_listener_queue): CardRemovedEvent -> CardsRemovedEvent. * backend/ebook/e-book-view-listener.c (e_book_view_listener_queue_response): free the id list. (e_book_view_listener_queue_idlist_event): new function, used for cards_removed. (e_book_view_listener_queue_status_event): id -> ids. (e_book_view_listener_queue_sequence_event): same. (e_book_view_listener_queue_message_event): same. (impl_BookViewListener_notify_cards_removed): call queue_idlist_event. (e_book_view_listener_dispose): free the id list. (e_book_view_listener_class_init): track change to idl call. * backend/ebook/e-book-view-listener.h (EBookViewListenerOperation): CardRemovedEvent -> CardsRemovedEvent. (EBookViewListenerResponse): char *id -> GList *ids. * backend/ebook/e-book-listener.c (impl_BookListener_respond_r svn path=/trunk/; revision=19854
* [ fixes bug #36375 ] use PHONE_OTHER_FAX instead of PHONE_OTHER forSean Gao2003-01-241-1/+1
| | | | | | | | | | 2003-01-23 Sean Gao <Sean.Gao@Sun.COM> [ fixes bug #36375 ] * backend/pas/pas-backend-ldap.c: use PHONE_OTHER_FAX instead of PHONE_OTHER for "other_fax". svn path=/trunk/; revision=19602
* [ fixes bug #31014, roll this in from the 1.2 branch ] use "categories"Chris Toshok2003-01-241-1/+1
| | | | | | | | | | | 2003-01-23 Chris Toshok <toshok@ximian.com> [ fixes bug #31014, roll this in from the 1.2 branch ] * backend/pas/pas-backend-ldap.c: use "categories" instead of "category" for the ECard field so the UI/get_supported_fields stuff actually thinks its usable in the contact editor.. svn path=/trunk/; revision=19599
* fix for bug 34883 broke ssl transactions (at least those where we wereChris Toshok2003-01-241-0/+11
| | | | | | | | | | 2003-01-23 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): fix for bug 34883 broke ssl transactions (at least those where we were connecting to port 636). Move it to after the SSL stanza. svn path=/trunk/; revision=19598
* doh, fix build error.Chris Toshok2003-01-101-2/+2
| | | | | | | | | 2003-01-09 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (query_ldap_root_dse): doh, fix build error. svn path=/trunk/; revision=19388
* build up the list of supported auth_methods.Chris Toshok2003-01-101-34/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-01-09 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (query_ldap_root_dse): build up the list of supported auth_methods. (pas_backend_ldap_process_get_supported_auth_methods): respond with the list of auth methods we've built up. (pas_backend_ldap_dispose): unref the auth_method list. (pas_backend_ldap_class_init): hook up pas_backend_ldap_process_get_supported_auth_methods. * backend/pas/pas-backend.c (pas_backend_get_supported_auth_methods): new function. (process_client_requests): add clause for GetSupportedAuthMethods. * backend/pas/pas-backend.h: add prototype for pas_backend_get_supported_auth_methods, and add it to the class vtable. * backend/pas/pas-book.h: add GetSupportedAuthMethods enum member and PASGetSupportedAuthMethodsRequest. and add prototype for pas_book_respond_get_supported_auth_methods. * backend/pas/pas-book.c (pas_book_queue_get_supported_auth_methods): new function. (impl_GNOME_Evolution_Addressbook_Book_getSupportedAuthMethods): new function. (pas_book_respond_get_supported_auth_methods): new function. (pas_book_free_request): add clause for GetSupportedAuthMethods. (pas_book_class_init): hook up getSupportedAuthMethods. * backend/ebook/e-book-listener.c (e_book_listener_queue_get_supported_fields_response): fields -> list. (e_book_listener_queue_get_supported_auth_methods_response): new function. (impl_BookListener_response_get_supported_auth_methods): new function. (e_book_listener_class_init): hook up epv->notifySupportedAuthMethods. * backend/ebook/e-book-listener.h: add GetSupportedAuthMethodsResponse enum member, and change the field name from "fields" to list (and use it for both GetSupportedFields and GetSupportedAuthMethods) * backend/ebook/e-book.c (e_book_get_supported_auth_methods): new function. (e_book_do_response_get_supported_auth_methods): new function. * backend/ebook/e-book.h: add prototype for e_book_get_supported_auth_methods. * backend/idl/addressbook.idl: add getSupportedAuthMethods IDL call. svn path=/trunk/; revision=19386
* Fix to build.Jeffrey Stedfast2003-01-091-1/+1
| | | | | | | | | 2003-01-08 Jeffrey Stedfast <fejj@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_authenticate_user): Fix to build. svn path=/trunk/; revision=19302
* make it buildJeffrey Stedfast2003-01-091-1/+1
| | | | svn path=/trunk/; revision=19297
* Move PASBook request handling into PASBackend itself since allDan Winship2003-01-091-192/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing backends do it exactly the same way. (Part of 32866). * backend/pas/pas-backend.h (PASBackendClass): add new methods for the various pas book requests. * backend/pas/pas-backend.c: Add a clients list to PASBackendPrivate. (pas_backend_create_card, etc): Add these to invoke the new methods. (process_client_requests, book_destroy_cb): Moved here and slightly rewritten from pas-backend-file. (last_client_gone): Now static. (add_client, remove_client): Default implementations, based on pas-backend-file, that add the client to/remove it from the backend's clients list and connect to its requests_queued signal. (pas_backend_init, pas_backend_dispose): Deal with the clients list. * backend/pas/pas-backend-file.c (struct _PASBackendFilePrivate): Remove GList *clients. (pas_backend_file_process_client_requests, pas_backend_file_book_destroy_db, pas_backend_file_add_client, pas_backend_file_remove_client): Gone. (pas_backend_file_class_init): Remove add_client/remove_client method initializations, add initializations for processing the various book requests. * backend/pas/pas-backend-ldap.c (struct _PASBackendLDAPPrivate): Remove GList *clients. (pas_backend_ldap_process_create_card, etc): Make these take the specific PAS*Request types rather than a generic PASRequest. (pas_backend_ldap_process_client_requests, pas_backend_ldap_book_destroy_db, pas_backend_ldap_add_client, pas_backend_ldap_remove_client): Gone. (pas_backend_ldap_class_init): Remove add_client/remove_client method initializations, add initializations for processing the various book requests. svn path=/trunk/; revision=19287
* g_strcasecmp -> g_ascii_strcasecmp. (FIND_INSERT): same.Chris Toshok2002-12-181-2/+2
| | | | | | | | | | | | | | | | | | | 2002-12-17 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (build_card_from_entry): g_strcasecmp -> g_ascii_strcasecmp. (FIND_INSERT): same. * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): g_dirname -> g_path_get_dirname. * backend/pas/Makefile.am (INCLUDES): add -DG_DISABLE_DEPRECATED. * backend/ebook/Makefile.am (INCLUDES): add -DG_DISABLE_DEPRECATED. svn path=/trunk/; revision=19156
* only enable the LDAPv3 stuff if TLS is being used. Also, deal with namingChris Toshok2002-12-031-30/+42
| | | | | | | | | | | | 2002-11-30 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): only enable the LDAPv3 stuff if TLS is being used. Also, deal with naming errors returned from query_ldap_root_dse, as some servers (older openldap servers among others i'm sure) don't have a root dse at all. svn path=/trunk/; revision=18989
* [ roll forward from the 1.2 branch. fixes #25540, part of #29630, as wellChris Toshok2002-11-251-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-23 Chris Toshok <toshok@ximian.com> [ roll forward from the 1.2 branch. fixes #25540, part of #29630, as well as other selection issues in the contact editor and ACL issues in the ldap backend ] * backend/pas/pas-backend-ldap.c (check_schema_support): reset the schema check state to FALSE if the read returned nothing (and the user had not authenticated). we'll requery if/when they auth. (query_ldap_root_dse): free the schema dn before assigning over it. (pas_backend_ldap_connect): added a diagnostic warning about the root dse query failing in anonymous mode (if it in fact did fail.) (pas_backend_ldap_process_authenticate_user): if we successfully authed, requery the root dse to pick up any attributes that might be protected, and retry the schema query if that failed before. * gui/contact-editor/e-contact-editor.c (full_name_clicked): set the dialog's editable state based on the new field "fullname_editable", and only do the Ok button handling if this flag is TRUE. (full_addr_clicked): set the dialog's editable state based on the editable state for the particular address (from editor->address_editable[]). also, only do the Ok button handling if this flag is TRUE. (_address_arrow_pressed): use the address_editable array to determine whether the address text and the mailing address checkbutton are sensitive. (enable_writable_fields): figure out if fullname_editable is TRUE/FALSE, also, init the address_editable flags based on the field list, and handle the address checkbutton. * gui/contact-editor/fulladdr.glade: change the label names to label-<name> to match {entry,combo}-<name>. * gui/contact-editor/fullname.glade: same. * gui/contact-editor/e-contact-editor-fullname.c (e_contact_editor_fullname_class_init): rename ARG_IS_READ_ONLY to ARG_EDITABLE, to reflect the correct sense of the flag. (e_contact_editor_fullname_set_arg): same, and make the labels sensitive/insensitive depending on the editable state of the dialog. * gui/contact-editor/e-contact-editor-address.c (e_contact_editor_address_class_init): rename ARG_IS_READ_ONLY to ARG_EDITABLE, to reflect the correct sense of the flag. (e_contact_editor_address_set_arg): same, and make the labels sensitive/insensitive depending on the editable state of the dialog. svn path=/trunk/; revision=18910
* guard against multiple invocations.Chris Toshok2002-11-121-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-11 Chris Toshok <toshok@ximian.com> * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): guard against multiple invocations. * backend/pas/pas-backend-ldap.c (view_destroy): change signature to that of a weak ref notify function. (cursor_destroy): same. (pas_backend_ldap_book_destroy_cb): same. (get_cursor_handler): ::destroy -> weak_ref. (pas_backend_ldap_process_get_book_view): same. (pas_backend_ldap_add_client): same. * backend/pas/pas-backend-file.c (cursor_destroy): change signature to that of a weak ref notify function. (view_destroy): same. (pas_backend_file_book_destroy_cb): same. (pas_backend_file_process_get_cursor): ::destroy -> weak_ref. (pas_backend_file_process_get_book_view): same. (pas_backend_file_process_get_completion_view): same. (pas_backend_file_process_get_changes): same. (pas_backend_file_add_client): same. * backend/ebook/test-client.c (get_cursor_cb): unref the book and exit here. (get_card_cb): pass a query string to get_cursor. * backend/ebook/e-book-view.c (e_book_view_class_init): correct marshaller for "card_added". svn path=/trunk/; revision=18720
* guard against multiple invocations.Chris Toshok2002-11-101-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-10 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-card-sexp.c (pas_backend_card_sexp_dispose): guard against multiple invocations. * backend/pas/pas-card-cursor.c (pas_card_cursor_dispose): same. * backend/pas/pas-book.c (pas_book_dispose): same. * backend/pas/pas-book-view.c (pas_book_view_dispose): same. * backend/pas/pas-book-factory.c (pas_book_factory_dispose): same. * backend/pas/pas-backend-summary.c (pas_backend_summary_dispose): same. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_dispose): same. * backend/pas/pas-backend-file.c (pas_backend_file_dispose): same. * backend/ebook/e-book-listener.c (e_book_listener_dispose): guard against multiple invocations. * backend/ebook/e-card.c (e_card_dispose): same. * backend/ebook/e-card-simple.c (e_card_simple_dispose): same. * backend/ebook/e-card-cursor.c (e_card_cursor_dispose): same. * backend/ebook/e-book.c (e_book_dispose): same. * backend/ebook/e-book-view-listener.c (e_book_view_listener_dispose): same. svn path=/trunk/; revision=18687
* use g_type_class_peek_parent.Chris Toshok2002-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-06 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-card-sexp.c (pas_backend_card_sexp_class_init): use g_type_class_peek_parent. * backend/pas/pas-card-cursor.c (pas_card_cursor_class_init): same. * backend/pas/pas-book-view.c (pas_book_view_class_init): same. * backend/pas/pas-book-factory.c (pas_book_factory_class_init): same. * backend/pas/pas-backend-summary.c (pas_backend_summary_class_init): same. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_class_init): same. * backend/pas/pas-backend-file.c (pas_backend_file_class_init): same. * backend/ebook/e-book-marshal.list: ENUM -> INT. * backend/ebook/e-book-view.c (e_book_view_dispose): guard against this being called multiple times. (e_book_view_class_init): ENUM -> INT in the sequence_complete signal. * backend/ebook/e-book.c (e_book_do_response_open): un-ifdef the component_died signal stuff. svn path=/trunk/; revision=18623
* copy a memleak fix from pas-backend-ad.Dan Winship2002-11-051-0/+1
| | | | | | | * backend/pas/pas-backend-ldap.c (send_pending_adds): copy a memleak fix from pas-backend-ad. svn path=/trunk/; revision=18552
* port to gnome 2.Chris Toshok2002-11-051-89/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-11-05 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-card-sexp.[ch]: port to gnome 2. * backend/pas/pas-backend-file.[ch]: same. * backend/pas/pas-backend-file.[ch]: same. * backend/pas/pas-backend-ldap.[ch]: same. * backend/pas/pas-backend-summary.[ch]: same. * backend/pas/pas-backend.[ch]: same. * backend/pas/pas-book-factory.[ch]: same. * backend/pas/pas-book-view.[ch]: same. * backend/pas/pas-book.[ch]: same. * backend/pas/pas-card-cursor.[ch]: same. * backend/pas/pas-marshal.list: list of marshallers. * backend/pas/Makefile.am (libpas_a_SOURCES): add pas-marshal.c also add the marshal building foo. * backend/pas/.cvsignore: ignore pas-marshal.[ch] svn path=/trunk/; revision=18544
* set the timeout to 30 seconds. (query_ldap_root_dse): same, and alsoChris Toshok2002-09-281-23/+33
| | | | | | | | | | | | | | 2002-09-27 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (check_schema_support): set the timeout to 30 seconds. (query_ldap_root_dse): same, and also return the ldap_error since this function is the one that actually causes openldap to connect() to the ldap host. (pas_backend_ldap_connect): check the return value of query_ldap_root_dse, and error out if it's not SUCCESS. svn path=/trunk/; revision=18251
* return NULL if the list is empty. (pas_backend_ldap_connect): always tryChris Toshok2002-08-291-17/+18
| | | | | | | | | | | 2002-08-29 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (category_ber): return NULL if the list is empty. (pas_backend_ldap_connect): always try to use ldapv3, not just when we want to use tls. svn path=/trunk/; revision=17916
* spew the filter we're using for the search.Chris Toshok2002-08-291-0/+2
| | | | | | | | | 2002-08-28 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_search): spew the filter we're using for the search. svn path=/trunk/; revision=17914
* [ fixes #20348 ] deprecate "categories" in favor of "category". evolutionChris Toshok2002-08-281-1/+81
| | | | | | | | | | | | | | | | | | | | 2002-08-28 Chris Toshok <toshok@ximian.com> [ fixes #20348 ] * backend/pas/evolutionperson.schema: deprecate "categories" in favor of "category". evolution no longer uses "categories". * backend/pas/pas-backend-ldap.c (category_populate): new function, "category" is the new name, and it's multivalued so we need the complex-prop stuff.. (category_ber): new function, same. (category_compare): new function, same. * gui/component/addressbook.c (addressbook_search_activated): the text is "Category is" so we should use "is" instead of "contains" for the query. svn path=/trunk/; revision=17885
* [ Fixes #14835 ] notify_complete with InvalidQuery if the parse fails.Chris Toshok2002-08-281-2/+2
| | | | | | | | | | 2002-08-27 Chris Toshok <toshok@ximian.com> [ Fixes #14835 ] * backend/pas/pas-backend-ldap.c (pas_backend_ldap_search): notify_complete with InvalidQuery if the parse fails. svn path=/trunk/; revision=17883
* [ Fixes (almost certainly) #24649, #25494, #27351, and other LDAP searchChris Toshok2002-08-271-74/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-26 Chris Toshok <toshok@ximian.com> [ Fixes (almost certainly) #24649, #25494, #27351, and other LDAP search crashes ] * backend/pas/pas-backend-ldap.c (view_destroy): use an EList instead of a GList to store the book_view's so we don't have weird issues with modifying the list while it's being traversed. (find_book_view): same. (create_card_handler): same. (remove_card_handler): same. (modify_card_modify_handler): same. (poll_ldap): same, and also ref the book_view before calling ldap_search_op_timeout (and therefore send_pending_adds). (ldap_search_handler): same. (ldap_op_add): warn about conflicting ldap msgid's (shouldn't ever happen..) (homephone_populate): make this a bit more robust (if values[0] == NULL, values[1] won't be valid). (business_populate): same. (build_card_from_entry): break out of the prop_info loop when we get a match, and only set the simple field if the value != NULL. (ldap_search_dtor): free all the pending adds stuff. (pas_backend_ldap_process_get_book_view): g_list_prepend => e_list_append. (pas_backend_ldap_remove_client): simplify the removing of the book (use g_list_remove instead of searching and then using g_list_remove_link.) (pas_backend_ldap_destroy): unref the book_views list. (pas_backend_ldap_init): initialize the EList for book_views. svn path=/trunk/; revision=17870
* take and pass the CallStatus to our listener.Chris Toshok2002-08-201-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-19 Chris Toshok <toshok@ximian.com> * backend/pas/pas-book-view.c (pas_book_view_notify_complete): take and pass the CallStatus to our listener. * backend/pas/pas-book-view.h: change the prototype for notify_complete to include the CallStatus. * gui/component/select-names/e-select-names-completion.c (e_select_names_completion_seq_complete_cb): add the status arg. * gui/widgets/e-addressbook-view.c (e_addressbook_view_class_init): init the search_result signal. (e_addressbook_view_init): connect to the model's search_result signal. (emit_search_result): emit our search_result signal. (search_result): call emit_search_result. * gui/widgets/e-addressbook-view.h (struct _EAddressbookViewClass): add the search_result signal. * gui/widgets/e-addressbook-model.c (sequence_complete): emit both a "search_result" as well as the "stop_state_changed" signal. (e_addressbook_model_class_init): init the search_result signal. * gui/widgets/e-addressbook-model.h: add search_result signal. * gui/component/addressbook.c (search_result): pop up a dialog telling the user why the search failed or was truncated. (addressbook_factory_new_control): connect to the "search_result" signal on the view. * conduit/address-conduit.c (sequence_complete): add the status parameter to sequence_complete. * backend/idl/addressbook.idl: add BookViewListener_CallStatus, and change notifySequenceComplete to take a CallStatus. * backend/pas/pas-backend-ldap.c (create_card_handler): pass status back in the notify_complete call. (remove_card_handler): same. (modify_card_modify_handler): same (ldap_search_handler): same, and parse out the ldap return code so we can report limits being properly. * backend/pas/pas-backend-file.c (do_summary_query): pass status back in the notify_complete call. (pas_backend_file_search): same, and get rid of the status_message, as the status is passed back properly. (pas_backend_file_search): pass status back in the notify_complete call. (pas_backend_file_changes): same. (pas_backend_file_process_create_card): same. (pas_backend_file_process_remove_card): same. (pas_backend_file_process_modify_card): same. * backend/ebook/e-book-util.c (simple_query_sequence_complete_cb): add status parameter. * backend/ebook/e-book-view-listener.c (e_book_view_listener_queue_status_event): change name from _queue_empty_event, and take a status arg. (e_book_view_listener_queue_id_event): init resp->status (to SUCCESS). (e_book_view_listener_queue_sequence_event): same. (e_book_view_listener_queue_message_event): same. (impl_BookViewListener_notify_sequence_complete): call queue_status_event, and convert the corba status to EBookViewStatus. (e_book_view_listener_convert_status): new function, conver the corba status to EBookViewStatus. * backend/ebook/e-book-view-listener.h: add a "status" slot to EBookViewListenerResponse. * backend/ebook/e-book-view.h: change prototype for sequence_complete signal. * backend/ebook/e-book-view.c (e_book_view_do_complete_event): sequence_complete takes a parameter now (EBookViewStatus). (e_book_view_class_init): add the enum arg to the signal. * backend/ebook/e-book-types.h: add EBookViewStatus enum. svn path=/trunk/; revision=17814
* add "cache-completions" here, since file completion results are blanketChris Toshok2002-08-201-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-19 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-file.c (pas_backend_file_get_static_capabilities): add "cache-completions" here, since file completion results are blanket cached (as they're generated from a summary). * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_get_cursor): there should be no search limit on the get_cursor_request, as it's meant to match every card it can. (ldap_search_handler): parse the ldap result in the RES_SEARCH_RESULT case. we'll want more here soon, so we can notify the front end if the result was truncated due to either the size or time limit being exceeded. (pas_backend_ldap_process_get_book_view): in the case of a completion view, we hardcode (yeah yeah, i know, but really) the search limit to MIN (100, user-specified-limit). (pas_backend_ldap_search): each view has its own limit now, defaulting from the user specified one for normal searches but possibly different for completion views. use the view's limit here. svn path=/trunk/; revision=17811
* new function to save a little typing. (find_book_view): same.Chris Toshok2002-08-161-96/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-08-16 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (book_view_notify_status): new function to save a little typing. (find_book_view): same. (pas_backend_ldap_connect): reorder things a bit - set the version to VERSION3 *before* doing TLS, as tls requires v3, and if we're doing ldaps://, do tls a little differently (not sure if this is strictly necessary, but the openldap source did it.. *shrug*). also, guard the schema check as this function can be called multiple times for the same server (if the server goes down or times us out.) (pas_backend_ldap_reconnect): new function, reconnect and if necessary reauth the user. (pas_backend_ldap_process_create_card): use find_book_view/book_view_notify_status/pas_backend_ldap_reconnect. (pas_backend_ldap_process_remove_card): same. (pas_backend_ldap_process_modify_card): same. (pas_backend_ldap_process_get_vcard): same. (pas_backend_ldap_process_get_cursor): same. (pas_backend_ldap_search): same. (poll_ldap): reconnect if ldap_result returns -1. (pas_backend_ldap_process_authenticate_user): ick ick ick save off the dn/passwd we auth with so we can use them to reauthenticate. svn path=/trunk/; revision=17785
* [ roll in the following change from the 1.0 branch.] change the CALURI andChris Toshok2002-08-011-27/+39
| | | | | | | | | | | | | | | 2002-07-31 Chris Toshok <toshok@ximian.com> [ roll in the following change from the 1.0 branch.] * backend/pas/pas-backend-ldap.c: (prop_info): change the CALURI and FBURL ecard attributes to map to the RFC 2739 specified attributes. (check_schema_support): check to see if calEntry is supported. (add_objectclass_mod): insert calEntry if it's supported. * backend/pas/evolutionperson.schema: deprecate freeBusyURI and calendarURI. svn path=/trunk/; revision=17657
* add Book.getCompletionView.Chris Toshok2002-07-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-07-10 Chris Toshok <toshok@ximian.com> * backend/idl/addressbook.idl: add Book.getCompletionView. * backend/ebook/e-book.c (e_book_get_completion_view): new function, basically c&p of e_book_get_book_view, but call getCompletionView. * backend/ebook/e-book.h: add prototype for e_book_get_completion_view. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_client_requests): add a GetCompletionView case here that just calls the same code as GetBookView (since we don't build summaries for the ldap backend.) * backend/pas/pas-backend-file.c (do_summary_query): add @completion_search. If it's TRUE, just create the vcards from the summary using pas_backend_summary_get_summary_vcard instead of looking them up from the db. (pas_backend_file_search): add @completion_search and pass it on to do_summary_query. (pas_backend_file_process_get_book_view): pass FALSE to pas_backend_file_search. (pas_backend_file_process_get_completion_view): new function, basically c&p pas_backend_file_process_get_book_view, but pass TRUE to pas_backend_file_search. (pas_backend_file_process_client_requests): add a case for GetCompletionView. (pas_backend_file_load_uri): track the change to the summary api - create the summary filename * backend/pas/pas-book.c (pas_book_queue_get_completion_view): new function, queue a GetCompletionView request to our queue. (impl_GNOME_Evolution_Addressbook_Book_getCompletionView): new function, call pas_book_queue_get_completion_view. (pas_book_respond_get_completion_view): new function, just call notifyViewRequested. (pas_book_free_request): add a case for GetCompletionView. (pas_book_get_epv): fill in epv->getCompletionView. * backend/pas/pas-book.h: add a GetCompletionView PASOperation, and a new structure (PASGetCompletionViewRequest). Also, add get_completion_view to PASRequest. * backend/pas/pas-backend-summary.c (clear_items): remove the items from the hash table. (pas_backend_summary_new): db_path -> summary_path. (pas_backend_summary_destroy): db_.path -> summary_path, and destroy the hash table. (pas_backend_summary_init): db_path = summary_path, and initialize the id_to_item hashtable. (pas_backend_summary_load_header): handle the upgrading from version 1.0 to version 2.0 (the addition of an mtime field in the header) (pas_backend_summary_load_item): version 1.0 and 2.0 have the same format for items. (pas_backend_summary_open): new function. open the summary so we can load the header (and get the mtime). (pas_backend_summary_load): rework this a bit since the header has already been loaded, and also add the items to the hashtable. (pas_backend_summary_add_card): add the new item to the hashtable. (pas_backend_summary_remove_card): remove the item from the hash table. (pas_backend_summary_is_up_to_date): new function, chekc @t against the summary's mtime. (pas_backend_summary_get_summary_vcard): create a vcard from the fields we have in the summary. * backend/pas/pas-backend-summary.h: add prorotypes for pas_backend_summary_is_up_to_date and pas_backend_summary_get_summary_vcard. svn path=/trunk/; revision=17402
* use ldap_unbind_ext. (create_card_handler): don't leak the new vcard.Chris Toshok2002-06-161-6/+15
| | | | | | | | | | | 2002-06-15 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): use ldap_unbind_ext. (create_card_handler): don't leak the new vcard. (pas_backend_ldap_process_authenticate_user): don't leak the dn. svn path=/trunk/; revision=17197
* fill in source->ssl. (addressbook_source_dialog_set_source): set upChris Toshok2002-04-191-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-18 Chris Toshok <toshok@ximian.com> * gui/component/ldap-config.c (addressbook_dialog_get_source): fill in source->ssl. (addressbook_source_dialog_set_source): set up auth/scope/ssl option menus properly. * gui/component/addressbook-storage.c (addressbook_storage_init_source_uri): always include the limit/ssl in the uri so we don't need to rely on defaults everywhere. (ldap_source_foreach): store the ssl option. * gui/component/addressbook-storage.h: reorder SSLType to match the UI. * backend/pas/pas-backend-ldap.c: (struct _PASBackendLDAPPrivate) add field for ldap_timeout. (pas_backend_ldap_connect): reorder things a bit - we need to start tls before the root dse query, if we can. (pas_backend_ldap_load_uri): track the way ssl parameters are given in the uri, and parse out the timeout. * gui/component/ldap-config.c (port_changed_func): use the symbolic SSL name instead of an integer constant. svn path=/trunk/; revision=16529
* fix memory leaks.Chris Toshok2002-04-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-04-18 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (get_ldap_library_info): fix memory leaks. * gui/component/GNOME_Evolution_Addressbook.oaf.in: remove the Addressbook_ConfigControl stuff to LDAP_ConfigControl. * gui/component/Makefile.am (evolution_addressbook_SOURCES): remove addressbook-config.* and add ldap-config.* (glade_DATA): same. (evolution_addressbook_LDADD): add LDAP_LIBS. * gui/component/addressbook-component.c (owner_set_cb): addressbook_config_register_factory => ldap_config_register_factory. * gui/component/addressbook.c (book_open_cb): remove source->type check - they're always LDAP. (load_uri_cb): same. * gui/component/addressbook-storage.c (ldap_unparse_ssl): new function. (ldap_parse_ssl): new function. (addressbook_storage_init_source_uri): use a more flexible scheme to build up the uri's, and add in the ssl parameter. (load_source_data): fill in source->ssl, and remove source->type assignment. (addressbook_source_copy): copy source->ssl, and remove source->type copy. (create_ldap_folder): addressbook_create_new_source => ldap_config_create_new_source. * gui/component/addressbook-storage.h: remove AddressbookSourceType (it was always LDAP), and add AddressbookLDAPSSLType. svn path=/trunk/; revision=16524
* Fix spelling of E_CARD_SIMPLE_PHONE_ID_TTYTDD andDan Winship2002-04-021-1/+1
| | | | | | | | | | | | * backend/ebook/e-card-simple.h: Fix spelling of E_CARD_SIMPLE_PHONE_ID_TTYTDD and E_CARD_SIMPLE_FIELD_PHONE_TTYTDD (they previously ended with "TTD" instead of "TDD") * backend/ebook/e-card-simple.c: Update for spelling fix. * backend/pas/pas-backend-ldap.c: Likewise svn path=/trunk/; revision=16321
* make sure to call ldap_value_free (values);, and ldap_msgfree (resp).Chris Toshok2002-03-281-12/+23
| | | | | | | | | | | | | | | | | | | | | 2002-03-27 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (check_schema_support): make sure to call ldap_value_free (values);, and ldap_msgfree (resp). (get_ldap_library_info): don't ask me why, but it appears we have to free each extension char*. (query_ldap_root_dse): make sure to free values in the subschemaSubentry code before overwriting it, and call ldap_msgfree(resp) when we're all done. (build_card_from_entry): don't leak the DN, ldap attributes, or the berval the ldap_*_attribute calls use to step through the attributes. the docs say this berval is freed when ldap_next_attribute returns NULL, but if we don't free it it leaks a substantial amount of memory. (pas_backend_ldap_search): make sure to only allocate *op once, and fix the g_warning since op isn't valid in its scope anymore. svn path=/trunk/; revision=16262
* add TLSNotAvailable to BookLister_CallStatus.Chris Toshok2002-03-101-16/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-03-09 Chris Toshok <toshok@ximian.com> * backend/idl/addressbook.idl: add TLSNotAvailable to BookLister_CallStatus. * backend/ebook/e-book-types.h: add TLS_NOT_AVAILABLE to the EBookStatus enum. * backend/ebook/e-book-listener.c (e_book_listener_convert_status): add TLS_NOT_AVAILABLE to the switch. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_get_static_capabilities): fix name. (pas_backend_ldap_class_init): fix name. (pas_backend_ldap_connect): change return type to CallStatus so we can return different errors from here. Also, do STARTTLS if the user has asked for it and the connection supports it, returning TLSNotAvailable (and close the connection) if they chose to require it. (pas_backend_ldap_load_uri): return pas_backend_ldap_connect. (func_beginswith): pull in change from evolution-1-0-branch to make full_name beginswith search both cn and sn. svn path=/trunk/; revision=16005
* track union/struct change. (pas_book_queue_remove_card): same.Chris Toshok2002-03-081-647/+937
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-03-07 Chris Toshok <toshok@ximian.com> * backend/pas/pas-book.c (pas_book_queue_create_card): track union/struct change. (pas_book_queue_remove_card): same. (pas_book_queue_modify_card): same. (pas_book_queue_get_cursor): same. (pas_book_queue_get_vcard): same. (pas_book_queue_authenticate_user): same. (pas_book_queue_get_book_view): same. (pas_book_queue_get_changes): same. (pas_book_free_request): new function - free everything we need to for each type of request. (pas_book_destroy): call pas_book_free_request here instead of just freeing 3 elements of the old struct. yay plugging memleaks. * backend/pas/pas-book.h: make PASRequest a union and split out members into structs, so it's a little clearer which fields are used by which requests. Also, add prototype for pas_book_free_request so backends can just free everything at once (usually in their requests_queued signal func.) * backend/pas/pas-backend-file.c (pas_backend_file_process_create_card): track struct/union change. (pas_backend_file_process_remove_card): same. (pas_backend_file_process_modify_card): same. (pas_backend_file_build_cards_list): same. (pas_backend_file_process_get_vcard): same. (pas_backend_file_process_get_cursor): same. (pas_backend_file_process_get_book_view): same. (pas_backend_file_process_get_changes): same. (pas_backend_file_process_check_connection): same. (pas_backend_file_process_authenticate_user): same. (pas_backend_file_process_get_supported_fields): same. (pas_backend_file_process_client_requests): case the union to the specific struct and pass it to the process_* functions. also, call pas_book_free_request here, instead of relying on each of the functions to free their stuff. svn path=/trunk/; revision=15987
* don't ref the view here, since it keeps the view alive until the search isChris Toshok2002-03-011-4/+0
| | | | | | | | | | | | | | | | 2002-02-28 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_search): don't ref the view here, since it keeps the view alive until the search is over, which we don't want. we want the view's death to cancel the search. This speeds up starting new searches after one is already active (since switching searches actually creates a new book view and destroys the old one.) (ldap_search_dtor): remove the matching unref here. The unref as it was was incorrect anyway, and caused a crash (we needed search_op->view, not op->view.) svn path=/trunk/; revision=15877
* [fixes bug #20690] the data arg is not GList** anymore, it'sChris Toshok2002-03-011-52/+65
| | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-27 Chris Toshok <toshok@ximian.com> [fixes bug #20690] * backend/pas/pas-backend-ldap.c (func_and): the data arg is not GList** anymore, it's PASBackendLDAPSExpData*, so use ldap_data->list instead of *list. (func_or): same. (func_not): same. (func_contains): same. (func_is): same. (func_endswith): same. (func_beginswith): same, but also special case the beginswith "fileAs" query type (the one used by the alphabet buttons on the right hand side, so we can deal with entries that don't have fileAs attributes, and return meaningful responses.) (pas_backend_ldap_build_query): initialize the PASBackendLDAPSExpData struct and pass that instead of &list. Also, take the PASBackendLDAP arg to add to the struct in case we need it at some point in the future. (ldap_search_handler): pass in the PASBackendLDAP. svn path=/trunk/; revision=15871
* [ Fixes bugs 20740, 16680, and god knows what else :) ] double theChris Toshok2002-02-231-41/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-22 Chris Toshok <toshok@ximian.com> [ Fixes bugs 20740, 16680, and god knows what else :) ] * gui/widgets/e-addressbook-model.c (create_card): double the allocated size every time we need more space instead of using a fixed size increment. this helps huge queries. Also, remove the gtk_object_get of "file_as", as it was dead code. (book_view_loaded): handle errors here (by popping up a dialog). * backend/pas/pas-backend-ldap.c (view_destroy): search_idle -> search_timeout. (build_card_from_entry): comment out some spew, and unref ecard when we're done to plug a memory leak. (send_pending_adds): send along to the client all the cards we've been saving up. (poll_ldap): use a timeout for ldap_result to keep the backend from blocking (and it turns out keep the frontend from hanging waiting on a ref to complete) on large db's with few matches. Also, add some fairly smart, self-tuning aggregating of cards. Keep track of the number of cards we've sent the last time through as well as this time, and estimate the number we want to aggregate the next time based on them (we average them at the moment), subject to maximum/minimum number of cards. also, we have a maximum aggregation time, after which we force a flush if there are pending cards and recalculate our target pending number. there's a minimum wait time to possibly keep outselves from spamming the ui, although it's 0 at the moment. Lastly, make sure to only notify the GUI of status messages when we need to. this results in a *huge* savings. (ldap_search_handler): initialize all the pending card stuff, and use a timeout instead of an idle function for poll_ldap. * backend/ebook/e-book-view-listener.c (e_book_view_listener_queue_response): performance optimization for large adds. If we're a CardAddedEvent and there's an existing CardAddedEvent at the end of the queue, just concat the lists of cards together. This is to keep the gui from falling further and further behind the ldap backend, which is merrily spewing updates at the gui. svn path=/trunk/; revision=15807
* track change to signature, and (for now) just change all the returnChris Toshok2002-02-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-02-20 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): track change to signature, and (for now) just change all the return FALSE's to _RepositoryOffline (what FALSE used to map to in pas_book_factory_process_request), and change TRUE to _Success. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_load_uri): track change to signature, and differentiate between pas_backend_ldap_connect failing (RepositoryOffline), and ldap_url_parse failing (OtherError). * backend/pas/pas-book-factory.c (pas_book_factory_process_request): since pas_backend_load_uri returns status now, use it to nodify the BookListener if there's a failure. * backend/pas/pas-backend.c (pas_backend_load_uri): track change to signature. * backend/pas/pas-backend.h: change return type of pas_backend_load_uri to GNOME_Evolution_Addressbook_BookListener_CallStatus to allow differentiation between failure types. * backend/ebook/e-book-listener.c (e_book_listener_convert_status): handle _AUTHENTICATION_FAILED. * backend/ebook/e-book-types.h (EBookStatus): add _AUTHENTICATION_FAILED. svn path=/trunk/; revision=15779
* escape commas in the dn, since they're used by ldap to specify the node'sChris Toshok2002-02-191-7/+22
| | | | | | | | | | | 2002-02-18 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (create_dn_from_ecard): escape commas in the dn, since they're used by ldap to specify the node's placement in the tree. (fixes bug 20089) (rfc2254_escape): just use sprintf and %02X instead. svn path=/trunk/; revision=15756
* [ fixes bug 16097 ] gui love for the new auth stuff.Chris Toshok2002-01-251-31/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-01-24 Chris Toshok <toshok@ximian.com> [ fixes bug 16097 ] * gui/component/addressbook-config.glade: gui love for the new auth stuff. * gui/component/addressbook.c (load_uri_cb): track change to auth, and offer up different prompt strings depending on which method (binddn or email) we're using. * gui/component/addressbook-storage.c (ldap_unparse_auth): use the new auth types for ldap. (ldap_parse_auth): same. (addressbook_storage_auth_type_to_string): new function. (load_source_data): get the binddn too. (ldap_source_foreach): store out binddn or emailaddr, depending on the auth type chosen. * gui/component/addressbook-storage.h: add the more detailed auth types, add "binddn" to the source structure, and add a prototype for addressbook_storage_auth_type_to_string. * gui/component/addressbook-config.c (auth_checkbutton_changed): set the auth stuff (in)sensitive. (auth_optionmenu_activated): new function. (addressbook_source_dialog_set_source): track UI change. (addressbook_source_dialog_get_source): same. (add_scope_activate_cb): rename add_activate_cb to this to distinguish it from the auth stuff. (add_auth_activate_cb): new function. (addressbook_source_dialog): track change to auth UI stuff. (addressbook_storage_auth_type_to_string): new function. * backend/ebook/e-book.h: add auth_method arg to e_book_authenticate_user. * backend/ebook/e-book.c (e_book_authenticate_user): track change to prototype - add auth_method arg, and pass it along to the CORBA call. * backend/ebook/test-client.c (book_open_cb): track api change - keep this building. * backend/pas/pas-book.h: add auth_method slot in PASRequest. * backend/pas/pas-book.c (pas_book_queue_authenticate_user): add auth_method arg and add it to the PASRequest. (impl_GNOME_Evolution_Addressbook_Book_authenticateUser): track idl change, add auth_method and pass it along to pas_book_queue_authenticate_user. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_authenticate_user): support both "ldap/simple-email" and "ldap/simple-binddn" auth methods. * backend/idl/addressbook.idl: add "in string authMethod" to authenticateUser. svn path=/trunk/; revision=15467
* Set the number of cards to return to the value specified in the ldap uri,Christopher James Lahey2002-01-211-2/+36
| | | | | | | | | | | | | | | | | | | 2002-01-21 Christopher James Lahey <clahey@ximian.com> * backend/pas/pas-backend-ldap.c (ldap_search_handler): Set the number of cards to return to the value specified in the ldap uri, leaving the default at 100. Fixes Ximian bug #13953. * gui/component/addressbook-config.c (addressbook_source_dialog), gui/component/addressbook-config.glade: Added a limit entry here to edit the limit field of the source. * gui/component/addressbook-storage.c, gui/component/addressbook-storage.h (addressbook_storage_init_source_uri): Added a limit field to this class and pass that value through in the uri that's generated. svn path=/trunk/; revision=15415
* move search_for_dn's contents here, and add an "existing_objectclasses"Chris Toshok2001-12-071-40/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-12-05 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (search_for_dn_with_objectclasses): move search_for_dn's contents here, and add an "existing_objectclasses" parameter that we pass on to build_card_from_entry. (search_for_dn): call search_for_dn_with_objectclasses with NULL for existing_objectclasses. (build_card_from_entry): if existing_objectclasses is non-NULL, fill it in with the list of existing objectclass values for this entry. (add_objectclass_mod): if existing_objectclasses is non-NULL, meaning we're modifying an entry, search in the existing objectclasses for the ones we want to be there, and only add what's missing. If none are missing, don't add objectclass_mod to the list of mods. (create_card_handler): track change to add_objectclass_mod (pass NULL). (modify_card_handler): use search_for_dn_with_objectclasses instead of search_for_dn, and pass the existing objectclasses to add_objectclass_mod. also, free the list when we're done. (poll_ldap): track change to build_card_from_entry (pass NULL). svn path=/trunk/; revision=14909
* we need to be able to disable non-labels here as well. since we're usingChris Toshok2001-12-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | 2001-12-05 Chris Toshok <toshok@ximian.com> * gui/contact-editor/e-contact-editor.c (enable_writable_fields): we need to be able to disable non-labels here as well. since we're using enable_widget and not gtk_widget_set_sensitive, it's okay to handle entries/text's, etc, here. (widget_field_mappings): add label-caluri and label-fburl here. * gui/contact-editor/contact-editor.glade: change the label names for the freebusy/calendar urls to have more descriptive names, since we use them in e-contact-editor.c now. * backend/pas/pas-backend-ldap.c: add support for caluri/calendarURI, fburl/freeBusyURI. * backend/pas/evolutionperson.schema: add calendarURI and freeBusyURI. svn path=/trunk/; revision=14908
* check against LDAP_SUCCESS as the return value, not -1.Chris Toshok2001-11-151-7/+9
| | | | | | | | | | | 2001-11-14 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (search_for_dn): check against LDAP_SUCCESS as the return value, not -1. (pas_backend_ldap_build_all_cards_list): same. (pas_backend_ldap_process_authenticate_user): same. svn path=/trunk/; revision=14724
* [ Fixes Ximian bug #14843 ] don't crash if a subexpression wasn't filledChris Toshok2001-11-131-8/+11
| | | | | | | | | | | | 2001-11-12 Chris Toshok <toshok@ximian.com> [ Fixes Ximian bug #14843 ] * backend/pas/pas-backend-ldap.c (func_and): don't crash if a subexpression wasn't filled in. * backend/pas/pas-backend-ldap.c (func_or): same. svn path=/trunk/; revision=14678
* [ Fixes Ximian bug #14687 ] backend/pas/pas-backend-file.cChris Toshok2001-11-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-11-09 Chris Toshok <toshok@ximian.com> [ Fixes Ximian bug #14687 ] * backend/pas/pas-backend-file.c * backend/pas/pas-book-factory.c (pas_book_factory_process_request): do load_uri before add_client, so we know if the load actually worked (add_client uses this information to respond to the new client.) before this change, the client would still think the book was in a useful state even if the load_uri failed. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client): if the we're not connected, say so. * backend/pas/pas-backend-file.c (pas_backend_file_add_client): same. (pas_backend_file_load_uri): don't report_writable here, add_client does it. was only needed before because of the improper ordering in pas-book-factory.c above. svn path=/trunk/; revision=14655
* overload this function for modifying objectclasses too, so we can makeChris Toshok2001-10-301-5/+16
| | | | | | | | | | | | | | | | | 2001-10-29 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (add_objectclass_mod): overload this function for modifying objectclasses too, so we can make sure evolutionPerson shows up in the objectclasses of an entry if it shows up in the schema for the server. (create_card_handler): add @replace = FALSE in the call to add_objectclass_mod. (modify_card_handler): call add_objectclass_mod with @replace = TRUE. (anniversary_compare): fix typo - return "equal", not "TRUE". (birthday_compare): same. svn path=/trunk/; revision=14402
* [ bug #12979 ] new function. (anniversary_ber): new function.Chris Toshok2001-10-281-19/+161
| | | | | | | | | | | | | | | 2001-10-27 Chris Toshok <toshok@ximian.com> [ bug #12979 ] * backend/pas/pas-backend-ldap.c (anniversary_populate): new function. (anniversary_ber): new function. (anniversary_compare): new function. (birthday_populate): new function. (birthday_ber): new function. (birthday_compare): new function. svn path=/trunk/; revision=14277
* unref the book after we pass it off to evolution-addressbook.Chris Toshok2001-10-161-0/+18
| | | | | | | | | 2001-10-15 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client): unref the book after we pass it off to evolution-addressbook. svn path=/trunk/; revision=13691
* make sure to unref the book_view here so we don't leak them.Chris Toshok2001-10-161-1/+4
| | | | | | | | | | 2001-10-15 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_get_book_view): make sure to unref the book_view here so we don't leak them. svn path=/trunk/; revision=13680
* use ldap_init. ldap_open is deprecated in openldap 2.x.Chris Toshok2001-09-141-1/+1
| | | | | | | | | 2001-09-13 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): use ldap_init. ldap_open is deprecated in openldap 2.x. svn path=/trunk/; revision=12820
* add -DEVOLUTION_IMAGESDIR.Chris Toshok2001-09-071-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-06 Chris Toshok <toshok@ximian.com> * gui/component/Makefile.am (INCLUDES): add -DEVOLUTION_IMAGESDIR. * gui/widgets/e-addressbook-view.c (card_deleted_cb): remove status messages from here. (e_addressbook_view_delete_selection): same. * gui/widgets/e-addressbook-model.c (sequence_complete): emit a NULL status message along with the stop_state_changed. The null status message will clear the status bar for this view. * gui/component/addressbook.c (set_status_message): use the EvolutionActivityClient stuff. * backend/pas/pas-backend-ldap.c (view_destroy): remove status message for abandoning a search. (ldap_op_process_current): wrap status messages in _(). (ldap_op_process): same. (create_card_handler): same, and remove the notify_status for "" and add a notify_complete call after the card is added. (remove_card_handler): same. (modify_card_handler): same. (poll_ldap): wrap status messages with _(), and remove the "Search Complete" message. (ldap_search_handler): wrap status message. * backend/pas/pas-backend-file.c (pas_backend_file_search): use _() on status messages, and make sure the last notify_* called is notify_complete. svn path=/trunk/; revision=12663
* Use e_card_get_vcard_assume_utf8 instead of e_card_get_vcard here sinceChristopher James Lahey2001-09-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-09-02 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-book.c (e_book_add_card, e_book_commit_card), backend/pas/pas-backend-file.c (do_create), backend/pas/pas-backend-ldap.c (create_card_handler, remove_card_handler, modify_card_handler, pas_backend_ldap_process_get_vcard, poll_ldap): Use e_card_get_vcard_assume_utf8 instead of e_card_get_vcard here since all internal communications and database storage are assumed to be utf8. * backend/ebook/e-card-simple.c, backend/ebook/e-card-simple.h (e_card_simple_duplicate): Simplified this function considerably. (e_card_simple_get_vcard_assume_utf8): Added this function. * backend/ebook/e-card.c, backend/ebook/e-card.h (e_card_new, e_card_load_cards_from_file, e_card_load_cards_from_string): Made these functions pay attention to charset attributes. (e_card_new_with_default_charset, e_card_load_cards_from_file_with_default_charset, e_card_load_cards_from_string_with_default_charset): New functions that let you change the default charset from UTF-8. (e_card_get_vcard): Made this write out charset attributes when necessary. (e_card_get_vcard_assume_utf8): New function that writes out a card without writing out charset attributes. * backend/ebook/evolution-vcard-importer.c (book_open_cb), backend/ebook/load-gnomecard-addressbook.c (book_open_cb), backend/ebook/test-card.c (main), gui/component/addressbook-component.c (destination_folder_handle_drop), gui/contact-editor/test-editor.c (main), gui/contact-list-editor/e-contact-list-editor.c (table_drag_data_received_cb), gui/widgets/e-addressbook-view.c (selection_received), gui/widgets/e-minicard-control.c (pstream_load): Changed the default charset to be used here to ISO-8859-1. * backend/ebook/load-gnomecard-addressbook.c (add_card_cb), backend/ebook/load-pine-addressbook.c (add_card_cb), backend/ebook/test-client-list.c (get_cursor_cb), backend/ebook/test-client.c (get_cursor_cb, get_card_cb): Use e_card_get_vcard_assume_utf8 to print out testing strings. * gui/component/select-names/e-select-names-model.c, gui/component/select-names/e-select-names-model.h (e_select_names_model_contains): Changed this to be const EDestination *dest to fix a warning. * gui/contact-editor/e-contact-editor.c (e_contact_editor_init): Translate window title here. svn path=/trunk/; revision=12558
* unref our card_sexp. (create_card_handler): make sure to set the id of theChris Toshok2001-08-171-34/+120
| | | | | | | | | | | | | | | | | | 2001-08-17 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (view_destroy): unref our card_sexp. (create_card_handler): make sure to set the id of the vcard so it gets properly transmitted back to the BookView, and notify all matching BookViews to add the created card. (remove_card_handler): notify all matching BookViews to remove the card. (modify_card_handler): notify all matching BookViews to modify the card. (pas_backend_ldap_process_get_book_view): init card_sexp based on the view's search. svn path=/trunk/; revision=12151
* implement using search_for_dn.Chris Toshok2001-08-151-4/+13
| | | | | | | | | | 2001-08-14 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_get_vcard): implement using search_for_dn. svn path=/trunk/; revision=12043
* Fix up to match the pas_book_new/get_vcard changes.Dan Winship2001-08-141-37/+22
| | | | | | | * backend/pas/pas-backend-ldap.c: Fix up to match the pas_book_new/get_vcard changes. svn path=/trunk/; revision=12009
* don't g_strdup the stuff we're passing into e_list_append, since it doesChris Toshok2001-08-141-8/+8
| | | | | | | | | | | | | | | | 2001-08-13 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (add_to_supported_fields): don't g_strdup the stuff we're passing into e_list_append, since it does the copy for us. (check_schema_support): don't initialize supported_fields list here, since there's a gross case where the programmer/user can bring up the contact editor before the connection stuff is finished, and we don't want to crash. (pas_backend_ldap_init): move it here to we can guarantee it's there. (bug #6546). svn path=/trunk/; revision=11989
* [ Fixes ximian bugs #5080, #6021, #6704, #6705 ]Chris Toshok2001-08-101-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-09 Chris Toshok <toshok@ximian.com> [ Fixes ximian bugs #5080, #6021, #6704, #6705 ] * gui/component/addressbook.c (book_open_cb): create our own dialog that prompts for both the email address and the password. the email address is stored in the source and filled in for the user after the first time they enter one and press OK. * gui/component/addressbook-storage.c (create_ldap_folder): has a return value, not a int* parameter. (create_ldap_folder): new function, we can create ldap servers from the File->New->Folder menu item now. (register_storage): hook up the "create_folder" signal. (addressbook_storage_init_source_uri): remove the file case, we only build ldap uris here. (load_source_data): remove the file source stuff, and handle "emailaddr". (save_source_data): call ldap_source_foreach directly. (addressbook_source_free): remove file source stuff. (addressbook_source_copy): same. * gui/component/addressbook-storage.h: get rid of all the file source stuff from AddressbookSource, since this is only being used for ldap servers. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_authenticate_user): look up the ldap entry based on the provided email address and use the resulting DN/passwd to authenticate. * gui/component/addressbook-config.c: pretty much gutted to make it work with the new UI. * gui/component/addressbook-config.glade: new version from anna. svn path=/trunk/; revision=11834
* escape *, \, (, and ), as per rfc2254. (func_contains): escape the string.Chris Toshok2001-08-081-4/+47
| | | | | | | | | | | | | 2001-08-08 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (rfc2254_escape): escape *, \, (, and ), as per rfc2254. (func_contains): escape the string. (func_is): same. (func_beginswith): same. (func_endswith): same. svn path=/trunk/; revision=11789
* use g_strcasecmp since ldap attribute names are not case sensitive.Chris Toshok2001-08-081-1/+1
| | | | | | | | | 2001-08-07 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (build_card_from_entry): use g_strcasecmp since ldap attribute names are not case sensitive. svn path=/trunk/; revision=11734
* change the way x-evolution-any-field is converted to an ldap query. itChris Toshok2001-07-261-14/+4
| | | | | | | | | | | | 2001-07-25 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (func_contains): change the way x-evolution-any-field is converted to an ldap query. it used to be we'd nest queries like: (|(|(|(foo=*x*))(bar=*x*))(baz=*x*)). now we build it like: (|(foo=*x*)(bar=*x*)(baz=*x*)). much more efficient (both in the building, and on the server side no doubt). svn path=/trunk/; revision=11407
* [ Fixes bugs #4611 - crash searching in the name field at Bigfoot for "\"Chris Toshok2001-07-181-6/+12
| | | | | | | | | | | | | | | | | 2001-07-17 Chris Toshok <toshok@ximian.com> [ Fixes bugs #4611 - crash searching in the name field at Bigfoot for "\" and #4554 - general ldap search crash ] * backend/pas/pas-backend-ldap.c (func_contains): the length of the big query string needs to take into account the length of the footer as well as the header - fix random memory corruption here. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_query): list can be NULL, specifically if there's a parsing error in the sexp, so deal with it. svn path=/trunk/; revision=11192
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-231-2/+2
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* rename ce_book_found_fields to this, remove the fetching of fields (theChris Toshok2001-06-201-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-19 Chris Toshok <toshok@ximian.com> * contact-editor/e-contact-quick-add.c (ce_have_book): rename ce_book_found_fields to this, remove the fetching of fields (the contact editor code handles that now.), and change the add_card signal to card_added. (card_added_cb): copied somewhat from merge_cb above. we don't need to do the merge here, just call the callback. * contact-editor/e-contact-editor.c (e_contact_editor_class_init): track signal change. add book arg, and is_read_only -> editable. (wants_html_changed): if the card isn't already changed, flag it as such (and update the commands.) (phone_entry_changed): same. (email_entry_changed): same. (address_text_changed): same. (name_entry_changed): same. (company_entry_changed): same. (full_name_clicked): is_read_only -> editable. (full_addr_clicked): same. (card_added_cb): new function, emit our card_added signal, and close the dialog if we're supposed to. properly deal with error status here. (card_modified_cb): same, modulo card_added -> card_modified. (save_card): actually call e_card_merging_book_{add/commit}_card instead of using a signal. Also, add a gboolean arg to tell whether or not to close the dialog after saving the card. (card_deleted_cb): new function, just emit our "card_deleted" signal. (delete_cb): actually call e_book_remove_card here, instead of using a signal. (tb_save_and_close_cb): call save_card with TRUE for should_close. (e_contact_editor_init): init changed = FALSE; (e_contact_editor_destroy): unref our book if we have one. (e_contact_editor_new): new signature, set the "book" arg, and call e_book_get_supported_fields here. (supported_fields_cb): new function, show the contact editor. (e_contact_editor_set_arg): initialize changed to FALSE when setting the card (but *after*, since the changed callbacks will set it to TRUE.) also, call command_state_changed if editable changes. also handle setting "book". oh, and is_read_only -> editable. (command_state_changed): new function - set the state of the commands we care about. (e_contact_editor_get_arg): add "book" handling, and is_read_only -> editable. (_phone_arrow_pressed): is_read_only -> editable. (_email_arrow_pressed): same. (_address_arrow_pressed): same. (enable_writable_fields): same. (set_editable): rename set_read_only to this, and is_read_only -> editable. * contact-editor/e-contact-editor.h (struct _EContactEditor): is_read_only -> editable, add a "changed" flag so we can sensitize commands correctly, and add an EBook* arg to e_contact_editor_new and to the EContactEditor struct. Also, change all the signals to past tense, and send the EBookStatus in them. * contact-editor/e-contact-editor-address.c (e_contact_editor_address_class_init): is_read_only -> editable. (e_contact_editor_address_set_arg): same. (e_contact_editor_address_get_arg): same. * contact-editor/e-contact-editor-address.h (struct _EContactEditorAddress): same. * contact-editor/e-contact-editor-fullname.c (e_contact_editor_fullname_class_init): same. (e_contact_editor_fullname_set_arg): same. (e_contact_editor_fullname_get_arg): same. * contact-editor/e-contact-editor-fullname.h (struct _EContactEditorFullname): same. * contact-editor/Makefile.am: don't build contact-editor-test now, until contact-editor gets moved to gui/ and we can more easily depend on the e_card_merging_* calls. * backend/pas/pas-backend-ldap.c (ldap_error_to_response): return CardIdAlreadyExists for LDAP_ALREADY_EXISTS. * backend/idl/addressbook.idl: Add CardIdAlreadyExists to the BookListener status enum. * backend/ebook/e-book-types.h: add E_BOOK_STATUS_CARD_ID_ALREADY_EXISTS. * backend/ebook/e-book-listener.c (e_book_listener_convert_status): add support for CardIdAlreadyExists. svn path=/trunk/; revision=10317
* implement this properly, using base and (objectclass=*).Chris Toshok2001-06-151-19/+9
| | | | | | | | | 2001-06-15 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (search_for_dn): implement this properly, using base and (objectclass=*). svn path=/trunk/; revision=10249
* Made this handle the "id" property in searches.Christopher James Lahey2001-06-111-1/+1
| | | | | | | | | | | | | | 2001-06-11 Christopher James Lahey <clahey@ximian.com> * backend/pas/pas-backend-file.c (entry_compare): Made this handle the "id" property in searches. (pas_backend_file_process_modify_card): Made id variable const here. * backend/pas/pas-backend-ldap.c (modify_card_handler): Made id variable const here. svn path=/trunk/; revision=10182
* fix strings such that ones that happening at the beginning or during anChris Toshok2001-05-231-8/+10
| | | | | | | | | | | | | | | | | | | | 2001-05-23 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (view_destroy): fix strings such that ones that happening at the beginning or during an operation are followed by "..." and those that stop the operation are followed by "." (create_card_handler): same. (ldap_op_process_current): same, and also call _notify_complete if we can't connect to ldap server. (poll_ldap): same, and change "Polling for LDAP search result" to "Receiving LDAP search results" * backend/pas/pas-backend-file.c (pas_backend_file_search): call notify_status_message at the beginning of this function, and whenever we call _notify_complete. svn path=/trunk/; revision=9941
* only check schema support if we've connected.Chris Toshok2001-05-121-4/+5
| | | | | | | | | 2001-05-11 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): only check schema support if we've connected. svn path=/trunk/; revision=9763
* Added the function e_book_view_listener_stop to tell the book viewChristopher James Lahey2001-04-151-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-14 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-book-view-listener.c, backend/ebook/e-book-view-listener.h: Added the function e_book_view_listener_stop to tell the book view listener to stop sending signals. * backend/ebook/e-book-view.c (e_book_view_destroy): Tell the EBookViewListener to stop when we're destroyed. * backend/pas/pas-backend-file.c (view_destroy, pas_backend_file_process_get_book_view, pas_backend_file_process_get_changes): Cleaned these up a bit using bonobo_object_ref and bonobo_object_unref. (pas_backend_file_process_get_book_view, pas_backend_file_process_get_changes): bonobo_object_release_unref the EBookListener here. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_get_book_view): Cleaned this up a bit using bonobo_object_ref. Make sure to unref the listener when we're done with it. Put the new book_view in the list before telling the book_listener that it's ready. * backend/pas/pas-book-view.c (pas_book_view_construct): Cleaned this up a bit using bonobo_object_dup_ref. (pas_book_view_destroy): Cleaned this up a bit using bonobo_object_release_unref. * backend/pas/pas-book.c (pas_book_queue_get_book_view, pas_book_queue_get_changes): bonobo_object_dup_ref here instead of just duplicating. svn path=/trunk/; revision=9313
* make sure to notify new clients to the writable status of an already openChris Toshok2001-04-091-2/+6
| | | | | | | | | | 2001-04-08 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client): make sure to notify new clients to the writable status of an already open (and authenticated) book. svn path=/trunk/; revision=9206
* Clean up #includes. Replace <gnome.h>, <bonobo.h> and <gtk/gtk.h> withKjartan Maraas2001-03-301-3/+4
| | | | | | | | | 2001-03-29 Kjartan Maraas <kmaraas@gnome.org> * *.*: Clean up #includes. Replace <gnome.h>, <bonobo.h> and <gtk/gtk.h> with more finegrained headers where needed. svn path=/trunk/; revision=9026
* new function. (impl_BookListener_report_writable): new function.Chris Toshok2001-03-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-17 Chris Toshok <toshok@ximian.com> * backend/ebook/e-book-listener.c (e_book_listener_queue_writable_status): new function. (impl_BookListener_report_writable): new function. (e_book_listener_get_epv): fill in epv->notifyWritable. * backend/ebook/e-book-listener.h: add writable status entries. * backend/ebook/e-book.c (e_book_do_writable_event): new function. (e_book_check_listener_queue): add WritableStatusEvent to the switch. (e_book_class_init): register writable_status signal. * backend/ebook/e-book.h: add writable_status signal. * backend/idl/addressbook.idl: add notifyWritable method to BookListener. * gui/widgets/e-minicard.c (e_minicard_class_init): add "editable" arg. (e_minicard_init): init editable. (e_minicard_set_arg): loop over the minicard fields setting their "editable". (e_minicard_get_arg): add editable. (supported_fields_cb): use editable when creating the contact_editor. (add_field): set "editable" when creatin the e_minicard. * gui/widgets/e-minicard.h (struct _EMinicard): add "editable". * gui/widgets/e-minicard-view.c (e_minicard_view_class_init): add editable arg. (e_minicard_view_init): init editable. (create_card): pass editable to e_minicard canvas item. (e_minicard_view_set_arg): bit of a hack - loop over all the canvas items setting their "editable." (e_minicard_view_get_arg): add editable. (supported_fields_cb): use editable when creating the contact editor. * gui/widgets/e-minicard-view.h (struct _EMinicardView): add "editable." * gui/widgets/e-minicard-view-widget.c (e_minicard_view_widget_class_init): add "editable" field. (e_minicard_view_widget_init): init editable to FALSE. (e_minicard_view_widget_set_arg): save editable, and pass it along the e-minicard-view. (e_minicard_view_widget_realize): same. (e_minicard_view_widget_get_arg): add editable. * gui/widgets/e-minicard-view-widget.h (struct _EMinicardViewWidget): add "editable" field. * gui/widgets/e-minicard-label.h (struct _EMinicardLabel): add "editable" field. * gui/widgets/e-minicard-label.c (e_minicard_label_class_init): add "editable" arg. (e_minicard_label_set_arg): editable, set it on the e_text too. (e_minicard_label_get_arg): editable. (e_minicard_label_construct): set the "editable" field when we create the e_text cavas item * gui/widgets/e-addressbook-view.c (e_addressbook_view_init): default editable to FALSE. (book_writable_cb): new function, set our editable field and gtk_object_set it on the active view. (e_addressbook_view_set_arg): set the active view's editable when we set the view's book, and connect the "writable_status" signal to book_writable_cb. (change_view_type): same. (supported_fields_cb): use our "editable" when creating the contact editor. * gui/widgets/e-addressbook-view.h (struct _EAddressbookView): add editable field. * gui/widgets/e-addressbook-model.c (e_addressbook_model_init): change the default of editable to FALSE. * backend/pas/pas-book.c (pas_book_report_writable): new function. * backend/pas/pas-book.h: prototype for pas_book_report_writable. * backend/pas/pas-backend-file.c (pas_backend_file_load_uri): if we open the file O_RDWR (or create it) report it as writable. if we can't open it as O_RDWR, try opening it read-only before we attempt to create it. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_authenticate_user): if we authenticate successfully, grant write permissions (this is lacking but there's really nothing we can do to determine the extent of the access afforded a user.) svn path=/trunk/; revision=8787
* add E_STRING_PROP for categories.Chris Toshok2001-03-131-0/+1
| | | | | | | | | | | | | | | | | 2001-03-12 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c: add E_STRING_PROP for categories. * backend/pas/evolutionperson.schema: add categories attribute. * backend/ebook/e-card-simple.c (field_data): add E_CARD_SIMPLE_FIELD_CATEGORIES. * backend/ebook/e-card-simple.h: add E_CARD_SIMPLE_FIELD_CATEGORIES. svn path=/trunk/; revision=8664
* doh, track renaming of objectclass from evolvePerson to evolutionPerson.Chris Toshok2001-03-031-14/+14
| | | | | | | | | 2001-03-02 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c: doh, track renaming of objectclass from evolvePerson to evolutionPerson. svn path=/trunk/; revision=8536
* rename evolveperson.schema to this, and add remaining attributes.Chris Toshok2001-03-031-6/+14
| | | | | | | | | | | | 2001-03-02 Chris Toshok <toshok@ximian.com> * backend/pas/evolutionperson.schema: rename evolveperson.schema to this, and add remaining attributes. * backend/pas/pas-backend-ldap.c: add remaining fields, and fix up ones that were incorrent (either the ldap_attr or the query prop). svn path=/trunk/; revision=8535
* add objectclasses for "person", "organizationalPerson", and "top" as well,Chris Toshok2001-03-021-38/+79
| | | | | | | | | | | | | | | | 2001-03-02 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (add_objectclass_mod): add objectclasses for "person", "organizationalPerson", and "top" as well, just to be complete. (check_schema_support): rename check_for_evolve_person to this, to reflect that we're doing more than just checking for that objectClass. (add_oc_attributes_to_supported_fields): new function. (add_to_supported_fields): new function. (pas_backend_ldap_destroy): unref supported_fields. svn path=/trunk/; revision=8517
* new function. (impl_GNOME_Evolution_Addressbook_Book_getSupportedFields):Chris Toshok2001-02-211-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-21 Chris Toshok <toshok@ximian.com> * backend/pas/pas-book.c (pas_book_queue_get_supported_fields): new function. (impl_GNOME_Evolution_Addressbook_Book_getSupportedFields): track change to idl. (pas_book_respond_get_supported_fields): new function. * backend/pas/pas-book.h: add GetSupportedFields to the PASOperation enum. Also, add a stringlist field to the PASRequest struct. lastly, add a prototype for pas_book_respond_get_supported_fields. * backend/pas/pas-backend.h: remove prototype for pas_backend_get_supported_fields, and remove it from the vtable. * backend/pas/pas-backend.c (pas_backend_get_supported_fields): remove. (pas_backend_class_init): no vtable entry for get_supported_fields anymore. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_get_supported_fields): new function. (pas_backend_ldap_process_client_requests): add case for GetSupportedFields. (pas_backend_ldap_class_init): get_supported_fields isn't in vtable anymore. * backend/pas/pas-backend-file.c (pas_backend_file_process_get_supported_fields): new function. (pas_backend_file_process_client_requests): add case for GetSupportedFields. (pas_backend_file_class_init): get_supported_fields isn't in vtable anymore. * backend/idl/addressbook.idl: Book::getSupportedFields now returns void and add BookListener::notifySupportedFields. * backend/ebook/test-client.c (get_fields_cb): new function. (auth_user_cb): track change to e_book_get_supported_fields. * backend/ebook/e-book.c (e_book_do_response_get_supported_fields): new function. (e_book_check_listener_queue): add case GetSupportedFieldsResponse. (e_book_get_supported_fields): switch to async model. * backend/ebook/e-book.h: switch e_book_get_supported_fields to an async model. * backend/ebook/e-book-listener.c (e_book_listener_queue_get_supported_fields_response): new function. (impl_BookListener_response_get_supported_fields): new function. (e_book_listener_get_epv): fill in epv's "notifySupportedFields" * backend/ebook/e-book-listener.h: add an async response for GetSupportedFields and add a stringlist member to the EBookListenerResponse struct. svn path=/trunk/; revision=8316
* add sequence<string> typedef, and add getSupportedFields method.Chris Toshok2001-02-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-17 Chris Toshok <toshok@ximian.com> * backend/idl/addressbook.idl: add sequence<string> typedef, and add getSupportedFields method. * backend/pas/pas-book.c (impl_GNOME_Evolution_Addressbook_Book_getSupportedFields): new function. * backend/pas/pas-backend.c (pas_backend_class_init): init get_supported_fields = NULL. (pas_backend_get_supported_fields): new function. * backend/pas/pas-backend.h: add prototype for pas_backend_get_supported_fields. * backend/pas/pas-backend-file.c (pas_backend_file_get_supported_fields): new function. (pas_backend_file_class_init): fill in get_supported_fields. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_get_supported_fields): new function. (pas_backend_ldap_class_init): fill in get_supported_fields. svn path=/trunk/; revision=8270
* Undefine E_STRING_PROP and E_LIST_PROP here.Christopher James Lahey2001-02-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-14 Christopher James Lahey <clahey@ximian.com> * backend/pas/pas-backend-ldap.c: Undefine E_STRING_PROP and E_LIST_PROP here. * contact-editor/e-contact-editor.c, contact-editor/e-contact-editor.h (e_contact_editor_raise): Added this function. * gui/widgets/e-minicard.c, gui/widgets/e-minicard.h (e_minicard_event): Added an editor field to the EMinicard object. Made it so that if you double click on the same card twice, it doesn't open a new window, but instead raises the old. 2001-02-08 Iain Holmes <iain@ximian.com> * gui/component/addressbook-storage.c (addressbook_source_free): Free the ldap.binddn. * gui/widgets/e-addressbook-view.c (e_addressbook_view_setup_menus): Free the dir strings. 2001-02-08 Christopher James Lahey <clahey@ximian.com> * contact-editor/e-contact-editor.c (categories_clicked): Set the header on the category dialog we pop up. svn path=/trunk/; revision=8234
* flesh out this check. #ifdef the entire thing OPENLDAP2, as it only worksChris Toshok2001-02-081-2/+46
| | | | | | | | | | | 2001-02-07 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (check_for_evolve_person): flesh out this check. #ifdef the entire thing OPENLDAP2, as it only works with the new schema stuff in openldap 2.x (both on server and client, so upgrade your server.) svn path=/trunk/; revision=8097
* only set the DEBUG_LEVEL if we're OPENLDAP2.Chris Toshok2001-02-081-0/+2
| | | | | | | | | 2001-02-07 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_connect): only set the DEBUG_LEVEL if we're OPENLDAP2. svn path=/trunk/; revision=8062
* return TRUE if equal, FALSE otherwise. (business_compare): same.Chris Toshok2001-02-071-40/+82
| | | | | | | | | | | | | | | | | 2001-02-06 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (email_compare): return TRUE if equal, FALSE otherwise. (business_compare): same. (homephone_compare): same. (email_ber): return NULL if there are no elements in our list. (homephone_ber): same. (business_ber): same. (build_mods_from_ecards): add smarts to handle list elements properly (like email, business_phone, home_phone.) now we'll properly send updates if any element in the list changes. svn path=/trunk/; revision=8047
* doh, didn't mean to commit this.Chris Toshok2001-02-071-3/+5
| | | | | | | | | 2001-02-06 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (create_card_handler): doh, didn't mean to commit this. svn path=/trunk/; revision=8029
* don't need the = NULL's since we g_new0. (check_for_evolve_person): newChris Toshok2001-02-071-58/+194
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-06 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_init): don't need the = NULL's since we g_new0. (check_for_evolve_person): new function. (pas_backend_ldap_connect): check to see if the evolvePerson objectclass is there. (build_mods_from_ecards): right now, just silently skip the extra attributes if we don't support evolvePerson. (add_objectclass_mod): new function, add both inetOrgPerson and (if it's available) evolvePerson as objectclasses. (pas_backend_ldap_process_authenticate_user): also check to see if evolvePerson is there, if we couldn't do it (due to auth reasons) in the connect method. (prop_info): change the telephoneNumber LDAP attribute to be used for evolution's business phone numbers. the primary phone number will be a single valued attribute on evolvePerson. (business_populate): new function. (business_ber): new function. (business_compare): new function. svn path=/trunk/; revision=8025
* err, allocate 2 char*s when i assign 2 char*s.Chris Toshok2001-02-061-1/+1
| | | | | | | | | 2001-02-05 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (create_card_handler): err, allocate 2 char*s when i assign 2 char*s. svn path=/trunk/; revision=8010
* switch to ldap_modify_ext_s if OPENLDAP2, as ldap_modify_s is deprecated.Chris Toshok2001-02-061-18/+132
| | | | | | | | | | | | | | | | 2001-02-05 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (modify_card_handler): switch to ldap_modify_ext_s if OPENLDAP2, as ldap_modify_s is deprecated. (build_mods_from_ecards): don't include the mod if the value is "" - this isn't valid on schema checking ldap servers. (homephone_populate): new function. (homephone_ber): new function. (homephone_compare): new function. (create_card_handler): add spew when adding cards so I can see what's going on. svn path=/trunk/; revision=8009
* add comment about the else block here. (prop_info): add home_address,Chris Toshok2001-01-261-10/+12
| | | | | | | | | | | 2001-01-25 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (build_mods_from_ecards): add comment about the else block here. (prop_info): add home_address, business_address, business_fax, assistant, and isdn. svn path=/trunk/; revision=7821
* esexp api change fixes.Not Zed2001-01-251-8/+8
| | | | | | | | | | | | 2001-01-25 Not Zed <NotZed@Ximian.com> * backend/pas/pas-backend-ldap.c: esexp api change fixes. * backend/pas/pas-backend-file.c (entry_compare): Fix for e_sexp api changes. (vcard_matches_search): esexp api fixes. (pas_backend_file_search): Ouch, unref the e-sexp properly (not gtk object). svn path=/trunk/; revision=7798
* make sure to add the lengths here (include the \0? anyone?).Chris Toshok2001-01-251-2/+5
| | | | | | | | | | | 2001-01-24 Chris Toshok <toshok@ximian.com> * backend/pas/pas-backend-ldap.c (email_ber_func): make sure to add the lengths here (include the \0? anyone?). (build_mods_from_ecards): if we're filling in mod->mod_bvalues, set mod_op |= LDAP_MOD_BVALUES. svn path=/trunk/; revision=7791
* get a book view from somewhere so we can give status messages - choose theChris Toshok2001-01-121-23/+89
| | | | | | | | | | | | | | | 2001-01-11 Chris Toshok <toshok@helixcode.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_process_create_card): get a book view from somewhere so we can give status messages - choose the first one in the list. (pas_backend_ldap_process_modify_card): same. (pas_backend_ldap_process_remove_card): same. (prop_info): add more properties, like home_phone, mobile, pager, uri, org_unit, office, title, and manager. svn path=/trunk/; revision=7404
* register our status_message signal. (status_message): new function, emitChris Toshok2001-01-101-74/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-09 Chris Toshok <toshok@helixcode.com> * gui/widgets/e-minicard-view-widget.c (e_minicard_view_widget_class_init): register our status_message signal. (status_message): new function, emit our status_message signal. (e_minicard_view_widget_realize): connect to the EMinicardView's status_message signal. * gui/widgets/e-minicard-view-widget.h: add status_message signal. * gui/widgets/e-minicard-view.c (e_minicard_view_class_init): register our status_message signal. (e_minicard_view_init): init status_message_id. (status_message): new function, emit our status_message signal. (book_view_loaded): connect to the EBookView's status_message signal. (disconnect_signals): disconnect status_message_id. * gui/widgets/e-minicard-view.h: add status_mesage_id, and status_message signal. * gui/widgets/e-addressbook-model.c (status_message): new function, emit our status_message. (e_addressbook_model_class_init): register our "status_message" signal. (book_view_loaded): connect to the EBookView's status_message signal, so we can chain it to our parent. (e_addressbook_model_init): init status_message_id. (remove_book_view): disconnect status_message_id. * gui/widgets/e-addressbook-model.h: add status_message_id, and status_message signal. * backend/pas/pas-backend-ldap.c change the objectclass we create objects with to "inetOrgPerson" as it encompasses the fields we use. (create_dn_from_ecard): remove the mail/org handling from here. we just prepend cn=$cn onto the base dn. (create_card_handler): remove the NULL that build_mods_from_ecards adds at the end, and insert our objectClass. (modify_card_handler): call search_for_dn to get the ECardSimple of the old card, since it might (and does in the current code) doing a brute force search. (search_for_dn): new function, to search for an entry by its dn. right now we brute force (objectclass=*) under the base dn and compare dn's. going to add a first pass that explodes the dn and searches that way, using (objectclass=*) as a last resort. also, here's where we'd put the extensibleMatch code if we want to go that route. * backend/ebook/e-card.c (e_card_set_arg): if we're setting the full name regenerate ecard->name. svn path=/trunk/; revision=7345
* new function. (impl_BookListener_respond_authentication_result): newChris Toshok2001-01-051-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-04 Chris Toshok <toshok@helixcode.com> * backend/ebook/e-book-listener.c (e_book_listener_queue_authentication_response): new function. (impl_BookListener_respond_authentication_result): new function. (e_book_listener_get_epv): fill in epv->notifyAuthenticationResult. * backend/ebook/e-book-listener.h: add AuthenticationResponse to EBookListenerOperation. * backend/ebook/e-book.c (e_book_authenticate_user): new function. * backend/ebook/e-book.h: add prototype for e_book_authenticate_user. * backend/idl/addressbook.idl (GNOME:Evolution:Addressbook:Book): add authenticateUser method. (GNOME:Evolution:Addressbook:BookListener): add AuthenticationFailed and AuthenticationRequired to CallStatus. also add notifyAuthenticationResult method. * backend/pas/pas-backend-file.c (pas_backend_file_process_authenticate_user): dummy authenticate_user function that always succeeds. (pas_backend_file_process_client_requests): respond to the AuthenticateUser request. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_query): gtk_object_unref(sexp) => s_exp_unref(sexp). (pas_backend_ldap_process_authenticate_user): fill in to use ldap_simple_bind_s. (pas_backend_ldap_process_client_requests): respond to the AuthenticateUser request. * backend/pas/pas-book.c (pas_book_queue_authenticate_user): new function. (impl_GNOME_Evolution_Addressbook_Book_authenticateUser): new function. (pas_book_respond_authenticate_user): new function. (pas_book_get_epv): fill in epv->authenticateUser. * backend/pas/pas-book.h: add AuthenticateUser operation type, and add user/passwd to the PASRequest struct. * gui/component/addressbook-storage.c (addressbook_storage_get_source_by_uri): new function. should use a hashtable, perhaps, but the lists will generally be small anyway. * gui/component/addressbook-storage.h: add prototype for addressbook_storage_get_source_by_uri. * gui/component/addressbook-config.c (addressbook_source_dialog_set_source): fill in the binddn if the auth page is shown. * gui/component/addressbook.c (book_open_cb): shoe-horn authentication in here. if the source was configured to use authentication, authenticate the user after opening the ebook. also, be paranoid and clear out the password after authenticating. (book_auth_cb): callback for auth. set the "book" arg on the view->view here. (passwd_cb): set the view's passwd that'll be used in book_open_cb. (addressbook_view_free): g_free view->passwd. svn path=/trunk/; revision=7265
* always use LDAP_NAME_ERROR (in the openldap1 case it's #defined toChris Toshok2000-12-191-19/+47
| | | | | | | | | | | | | | | | | | | 2000-12-18 Chris Toshok <toshok@helixcode.com> * backend/pas/pas-backend-ldap.c (ldap_error_to_response): always use LDAP_NAME_ERROR (in the openldap1 case it's #defined to NAME_ERROR). (build_card_from_entry): ldap_get_values can return NULL. also, openldap2 keeps us from getting at ldap->ld_errno, so we can't tell if there was a decoding error like we used to. the double free problem where ldap would free the ber if there was a decoding problem might be fixed now.. further investigation is needed. for now we leak in openldap2. (ldap_search_handler): the ldap structure is opaque, so use ldap_search_ext to give the extra information (the max responses, timeout, etc.) in the openldap2 case. svn path=/trunk/; revision=7073
* Test for the existance of LDAP_NAME_ERROR and if it exists as a macro, useChristopher James Lahey2000-12-141-0/+4
| | | | | | | | | | 2000-12-13 Christopher James Lahey <clahey@helixcode.com> * backend/pas/pas-backend-ldap.c (ldap_error_to_response): Test for the existance of LDAP_NAME_ERROR and if it exists as a macro, use it instead of NAME_ERROR. svn path=/trunk/; revision=6992
* Set view.change_context to NULL in pas_backend_file_process_get_book_view.Christopher James Lahey2000-11-231-1/+1
| | | | | | | | | | | | 2000-11-22 Christopher James Lahey <clahey@helixcode.com> * backend/pas/pas-backend-file.c: Set view.change_context to NULL in pas_backend_file_process_get_book_view. Changed pas_backend_file_book_view_copy a bit. * backend/pas/pas-backend-ldap.c: Got rid of a warning. svn path=/trunk/; revision=6654
* Fixed typo preventing compilation - NAME_ERROR should be LDAP_NAME_ERROR (I ↵Ross Golder2000-11-231-1/+1
| | | | | | think!) svn path=/trunk/; revision=6653
* A very, long, very tedious IDL API rename and re-scoping;Michael Meeks2000-11-111-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this script + some grunt approximates the work: s/Evolution_MessageList/GNOME_Evolution_MessageList/g; s/GNOME_Evolution_MessageList_select_message/GNOME_Evolution_MessageList_selectMessage/g; s/GNOME_Evolution_MessageList_open_message/GNOME_Evolution_MessageList_openMessage/g; s/Evolution_Folder([ \t])/GNOME_Evolution_Folder$1/g; s/Evolution_FolderTypeList/GNOME_Evolution_FolderTypeList/g; s/Evolution_FolderBrowser/GNOME_Evolution_FolderBrowser/g; s/GNOME_Evolution_FolderBrowser_get_message_list/GNOME_Evolution_FolderBrowser_getMessageList/g; s/Evolution_LocalStorage/GNOME_Evolution_LocalStorage/g; s/GNOME_Evolution_LocalStorage_update_folder/GNOME_Evolution_LocalStorage_updateFolder/g; s/Evolution_ShellView/GNOME_Evolution_ShellView/g; s/GNOME_Evolution_ShellView_set_message/GNOME_Evolution_ShellView_setMessage/g; s/GNOME_Evolution_ShellView_unset_message/GNOME_Evolution_ShellView_unsetMessage/g; s/GNOME_Evolution_ShellView_change_current_view/GNOME_Evolution_ShellView_changeCurrentView/g; s/Evolution_StorageSetViewListener/GNOME_Evolution_StorageSetViewListener/g; s/GNOME_Evolution_StorageSetViewListener_folder_selected/GNOME_Evolution_StorageSetViewListener_notifyFolderSelected/g; s/GNOME_Evolution_StorageSetViewListener_storage_selected/GNOME_Evolution_StorageSetViewListener_notifyStorageSelected/g; s/Evolution_StorageSetView/GNOME_Evolution_StorageSetView/g; s/GNOME_Evolution_StorageSetView_add_listener/GNOME_Evolution_StorageSetView_addListener/g; s/GNOME_Evolution_StorageSetView_remove_listener/GNOME_Evolution_StorageSetView_removeListener/g; s/Evolution_Shell/GNOME_Evolution_Shell/g; s/GNOME_Evolution_Shell_get_component_for_type/GNOME_Evolution_Shell_getComponentByType/g; s/GNOME_Evolution_Shell_user_select_folder/GNOME_Evolution_Shell_selectUserFolder/g; s/GNOME_Evolution_Shell_get_local_storage/GNOME_Evolution_Shell_getLocalStorage/g; s/GNOME_Evolution_Shell_create_storage_set_view/GNOME_Evolution_Shell_createStorageSetView/g; s/Evolution_FolderSelectionListener/GNOME_Evolution_FolderSelectionListener/g; s/GNOME_Evolution_FolderSelectionListener_selected/GNOME_Evolution_FolderSelectionListener_notifySelected/g; s/GNOME_Evolution_FolderSelectionListener_cancel/GNOME_Evolution_FolderSelectionListener_notifyCanceled/g; s/Evolution_Storage/GNOME_Evolution_Storage/g; s/GNOME_Evolution_Storage_add_listener/GNOME_Evolution_Storage_addListener/g; s/GNOME_Evolution_Storage_remove_listener/GNOME_Evolution_Storage_removeListener/g; s/GNOME_Evolution_StorageListener_destroyed/GNOME_Evolution_StorageListener_notifyDestroyed/g; s/GNOME_Evolution_StorageListener_new_folder/GNOME_Evolution_StorageListener_notifyFolderCreated/g; s/GNOME_Evolution_StorageListener_update_folder/GNOME_Evolution_StorageListener_notifyFolderUpdated/g; s/GNOME_Evolution_StorageListener_removed_folder/GNOME_Evolution_StorageListener_notifyFolderRemoved/g; s/GNOME_Evolution_StorageRegistry_register_storage/GNOME_Evolution_StorageRegistry_addStorage/g; s/GNOME_Evolution_StorageRegistry_unregister_storage/GNOME_Evolution_StorageRegistry_removeStorageByName/g; s/Evolution_ShellComponent/GNOME_Evolution_ShellComponent/g; s/GNOME_Evolution_ShellComponent_set_owner/GNOME_Evolution_ShellComponent_setOwner/g; s/GNOME_Evolution_ShellComponent_unset_owner/GNOME_Evolution_ShellComponent_unsetOwner/g; s/GNOME_Evolution_ShellComponent_create_view/GNOME_Evolution_ShellComponent_createView/g; s/GNOME_Evolution_ShellComponent_async_create_folder/GNOME_Evolution_ShellComponent_addFolderAsync/g; s/GNOME_Evolution_ShellComponent_async_remove_folder/GNOME_Evolution_ShellComponent_removeFolderAsync/g; s/GNOME_Evolution_ShellComponent_populate_folder_context_menu/GNOME_Evolution_ShellComponent_populateFolderContextMenu/g; s/GNOME_Evolution_ShellComponentListener_report_result/GNOME_Evolution_ShellComponentListener_notifyResult/g; s/Evolution_Session/GNOME_Evolution_Session/g; s/GNOME_Evolution_Session_save_configuration/GNOME_Evolution_Session_saveConfiguration/g; s/GNOME_Evolution_Session_load_configuration/GNOME_Evolution_Session_loadConfiguration/g; s/Evolution_Calendar_Cal/GNOME_Evolution_Calendar_Cal/g; s/GNOME_Evolution_Calendar_Cal_get_n_objects/GNOME_Evolution_Calendar_Cal_countObjects/g; s/GNOME_Evolution_Calendar_Cal_get_object/GNOME_Evolution_Calendar_Cal_getObject/g; s/GNOME_Evolution_Calendar_Cal_get_uids/GNOME_Evolution_Calendar_Cal_getUIds/g; s/GNOME_Evolution_Calendar_Cal_get_changed_uids/GNOME_Evolution_Calendar_Cal_getChangedUIds/g; s/GNOME_Evolution_Calendar_Cal_get_objects_in_range/GNOME_Evolution_Calendar_Cal_getObjectsInRange/g; s/GNOME_Evolution_Calendar_Cal_get_alarms_in_range/GNOME_Evolution_Calendar_Cal_getAlarmsInRange/g; s/GNOME_Evolution_Calendar_Cal_get_alarms_for_object/GNOME_Evolution_Calendar_Cal_getAlarmsForObject/g; s/GNOME_Evolution_Calendar_Cal_update_object/GNOME_Evolution_Calendar_Cal_updateObject/g; s/GNOME_Evolution_Calendar_Cal_remove_object/GNOME_Evolution_Calendar_Cal_removeObject/g; s/Evolution_Calendar_Listener/GNOME_Evolution_Calendar_Listener/g; s/GNOME_Evolution_Calendar_Listener_cal_loaded/GNOME_Evolution_Calendar_Listener_notifyCalLoaded/g; s/GNOME_Evolution_Calendar_Listener_obj_updated/GNOME_Evolution_Calendar_Listener_notifyObjUpdated/g; s/GNOME_Evolution_Calendar_Listener_obj_removed/GNOME_Evolution_Calendar_Listener_notifyObjRemoved/g; s/Evolution_Calendar_CalFactory/GNOME_Evolution_Calendar_CalFactory/g; s/GNOME_Evolution_Calendar_CalFactory_load/GNOME_Evolution_Calendar_CalFactory_load/g; s/GNOME_Evolution_Calendar_CalFactory_create/GNOME_Evolution_Calendar_CalFactory_create/g; s/Evolution_Composer/GNOME_Evolution_Composer/g; s/GNOME_Evolution_Composer_set_headers/GNOME_Evolution_Composer_setHeaders/g; s/GNOME_Evolution_Composer_set_body_text/GNOME_Evolution_Composer_setBodyText/g; s/GNOME_Evolution_Composer_attach_MIME/GNOME_Evolution_Composer_attachMIME/g; s/GNOME_Evolution_Composer_attach_data/GNOME_Evolution_Composer_attachData/g; s/GNOME_Evolution_Composer_show/GNOME_Evolution_Composer_show/g; s/Evolution_Addressbook_SelectNames/GNOME_Evolution_Addressbook_SelectNames/g; s/GNOME_Evolution_Addressbook_SelectNames_add_section/GNOME_Evolution_Addressbook_SelectNames_addSection/g; s/GNOME_Evolution_Addressbook_SelectNames_get_entry_for_section/GNOME_Evolution_Addressbook_SelectNames_getEntryBySection/g; s/GNOME_Evolution_Addressbook_SelectNames_activate_dialog/GNOME_Evolution_Addressbook_SelectNames_activateDialog/g; s/Evolution_CardCursor/GNOME_Evolution_Addressbook_CardCursor/g; s/GNOME_Evolution_Addressbook_CardCursor_get_length/GNOME_Evolution_Addressbook_CardCursor_getLength/g; s/GNOME_Evolution_Addressbook_CardCursor_get_nth/GNOME_Evolution_Addressbook_CardCursor_getNth/g; s/Evolution_BookViewListener/GNOME_Evolution_Addressbook_BookViewListener/g; s/GNOME_Evolution_Addressbook_BookViewListener_signal_card_added/GNOME_Evolution_Addressbook_BookViewListener_notifyCardAdded/g; s/GNOME_Evolution_Addressbook_BookViewListener_signal_card_removed/GNOME_Evolution_Addressbook_BookViewListener_notifyCardRemoved/g; s/GNOME_Evolution_Addressbook_BookViewListener_signal_card_changed/GNOME_Evolution_Addressbook_BookViewListener_notifyCardChanged/g; s/GNOME_Evolution_Addressbook_BookViewListener_signal_sequence_complete/GNOME_Evolution_Addressbook_BookViewListener_notifySequenceComplete/g; s/GNOME_Evolution_Addressbook_BookViewListener_signal_status_message/GNOME_Evolution_Addressbook_BookViewListener_notifyStatusMessage/g; s/Evolution_BookView/GNOME_Evolution_Addressbook_BookView/g; s/Evolution_Book/GNOME_Evolution_Addressbook_Book/g; s/GNOME_Evolution_Addressbook_Book_get_vcard/GNOME_Evolution_Addressbook_Book_getVCard/g; s/GNOME_Evolution_Addressbook_Book_can_write/GNOME_Evolution_Addressbook_Book_isWriteable/g; s/GNOME_Evolution_Addressbook_Book_can_write_card/GNOME_Evolution_Addressbook_Book_isCardWriteable/g; s/GNOME_Evolution_Addressbook_Book_create_card/GNOME_Evolution_Addressbook_Book_addCard/g; s/GNOME_Evolution_Addressbook_Book_remove_card/GNOME_Evolution_Addressbook_Book_removeCard/g; s/GNOME_Evolution_Addressbook_Book_modify_card/GNOME_Evolution_Addressbook_Book_modifyCard/g; s/GNOME_Evolution_Addressbook_Book_get_cursor/GNOME_Evolution_Addressbook_Book_getCursor/g; s/GNOME_Evolution_Addressbook_Book_get_book_view/GNOME_Evolution_Addressbook_Book_getBookView/g; s/GNOME_Evolution_Addressbook_Book_get_changes/GNOME_Evolution_Addressbook_Book_getChanges/g; s/GNOME_Evolution_Addressbook_Book_check_connection/GNOME_Evolution_Addressbook_Book_checkConnection/g; s/GNOME_Evolution_Addressbook_Book_get_static_capabilities/GNOME_Evolution_Addressbook_Book_getStaticCapabilities/g; s/GNOME_Evolution_Addressbook_Book_get_name/GNOME_Evolution_Addressbook_Book_getName/g; s/Evolution_BookListener/GNOME_Evolution_Addressbook_BookListener/g; s/GNOME_Evolution_Addressbook_BookListener_respond_create_card/GNOME_Evolution_Addressbook_BookListener_notifyCardCreated/g; s/GNOME_Evolution_Addressbook_BookListener_respond_remove_card/GNOME_Evolution_Addressbook_BookListener_notifyCardRemoved/g; s/GNOME_Evolution_Addressbook_BookListener_respond_modify_card/GNOME_Evolution_Addressbook_BookListener_notifyCardModified/g; s/GNOME_Evolution_Addressbook_BookListener_report_open_book_progress/GNOME_Evolution_Addressbook_BookListener_notifyOpenBookProgress/g; s/GNOME_Evolution_Addressbook_BookListener_respond_open_book/GNOME_Evolution_Addressbook_BookListener_notifyBookOpened/g; s/GNOME_Evolution_Addressbook_BookListener_respond_get_cursor/GNOME_Evolution_Addressbook_BookListener_notifyCursorRequested/g; s/GNOME_Evolution_Addressbook_BookListener_respond_get_view/GNOME_Evolution_Addressbook_BookListener_notifyViewRequested/g; s/GNOME_Evolution_Addressbook_BookListener_respond_get_changes/GNOME_Evolution_Addressbook_BookListener_notifyChangesRequested/g; s/GNOME_Evolution_Addressbook_BookListener_report_connection_status/GNOME_Evolution_Addressbook_BookListener_notifyConnectionStatus/g; s/Evolution_BookFactory/GNOME_Evolution_Addressbook_BookFactory/g; s/GNOME_Evolution_Addressbook_BookFactory_open_book/GNOME_Evolution_Addressbook_BookFactory_openBook/g; s/Evolution_SummaryComponent/GNOME_Evolution_Summary_Component/g; s/GNOME_Evolution_Summary_SummaryComponent_set_owner/GNOME_Evolution_Summary_Component_setOwner/g; s/GNOME_Evolution_Summary_SummaryComponent_unset_owner/GNOME_Evolution_Summary_Component_unsetOwner/g; s/GNOME_Evolution_Summary_SummaryComponent_create_view/GNOME_Evolution_Summary_Component_createView/g; s/GNOME_Evolution_Summary_SummaryComponent_destroy_view/GNOME_Evolution_Summary_Component_destroyView/g; s/Evolution_Summary([ \t])/GNOME_Evolution_Summary_ViewFrame$1/g; s/Evolution_Summary_set_title/GNOME_Evolution_Summary_ViewFrame_setTitle/g; s/Evolution_Summary_set_icon/GNOME_Evolution_Summary_ViewFrame_setIcon/g; s/Evolution_Summary_update_component/GNOME_Evolution_Summary_ViewFrame_updateComponent/g; s/GNOME_GNOME/GNOME/g; s/GNOME_GNOME/GNOME/g; s/GNOME_GNOME/GNOME/g; svn path=/trunk/; revision=6535
* Require gal 0.2.99.1.Christopher James Lahey2000-11-101-0/+4
| | | | | | | | | | | | | | | | | | | | 2000-11-09 Christopher James Lahey <clahey@helixcode.com> * configure.in: Require gal 0.2.99.1. From addressbook/ChangeLog: 2000-11-09 Christopher James Lahey <clahey@helixcode.com> * backend/pas/pas-backend-ldap.c: Fixed a warning. * gui/component/addressbook.c: Put in gal view menus for testing purposes. * printing/e-contact-print-envelope.c: Fixed up envelope printing a bit. Added code for printing return addresses. svn path=/trunk/; revision=6529
* i2000-10-25 Chris Toshok <toshok@helixcode.com>Chris Toshok2000-10-261-16/+49
| | | | | | | | | | | | | | | * backend/pas/pas-backend-ldap.c (ldap_op_process_current): only call the handler if the if we're connected, and if we fail to connect finish the op and post a message. (pas_backend_ldap_connect): add debug spew if DEBUG is defined. (modify_card_handler): LDAP_RES_SEARCH_ENTRY => LDAP_SUCCESS. (modify_card_handler): only perform the ldap_modify_s if we have a list of modifications. (get_cursor_handler): use ldap_error_to_response here. (pas_backend_ldap_load_uri): use LDAP_PORT instead of the constant 389. svn path=/trunk/; revision=6198
* lots of changes. flesh out the remove/modify/create functions. add anotherChris Toshok2000-09-231-111/+454
| | | | | | | | | | | | | | | | | | | | | | 2000-09-22 Chris Toshok <toshok@helixcode.com> * backend/pas/pas-backend-ldap.c: lots of changes. flesh out the remove/modify/create functions. add another flag for the property table, PROP_DN, which makes it easy for us to determine when we need to create a new DN for a record when we're modifying. also add a ber_func to the table for PROP_TYPE_LIST fields, which fills in the list of bvalues that we send to the ldap server. The add/modify/delete stuff hasn't been tested yet, and it hopelessly complex (yay ldap). (ldap_search_handler): act synchronous when ldap_search responds with -1. (view_destroy): use pas_book_view_notify_status_message. (ldap_op_process_current): same (ldap_op_process): same (poll_ldap): same (ldap_search_handler): same svn path=/trunk/; revision=5555
* Added evolution-addressbook-ldap.xml.Christopher James Lahey2000-09-221-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-22 Christopher James Lahey <clahey@helixcode.com> * ui/Makefile.am: Added evolution-addressbook-ldap.xml. * ui/evolution-addressbook-ldap.xml: New file. (A Variation on evolution-addressbook.xml) * ui/evolution-addressbook.xml: Added View All and Stop buttons. From addressbook/ChangeLog: 2000-09-22 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-book.c, backend/ebook/e-book.h, backend/idl/addressbook.idl, backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c, backend/pas-backend.c, backend/pas/pas-backend.h, backend/pas/pas-book.c, backend/pas/pas-book.h: Added a function to query static capabilities (capabilities that can be reported immediately) and implemented them in the 2 servers. * gui/component/addressbook.c: Added a View All button and a Stop button. Sorted out the new directory server stuff a bit. * gui/widgets/e-addressbook-model.c, gui/widgets/e-addressbook-model.h: Cleaned up a bit. Added a stop function. Check for capabilities before deciding whether to load all cards when initially viewed. * gui/widgets/e-addressbook-view.c, gui/widgets/e-addressbook-view.h: Added stop and view all functions. * gui/widgets/e-minicard-view-widget.c, gui/widgets/e-minicard-view-widget.h, gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h: Added a stop function. Check for capabilities before deciding whether to load all cards when initially viewed. svn path=/trunk/; revision=5547
* split all the ldap operations into 2 halves, a handler, and destructor,Chris Toshok2000-09-161-148/+460
| | | | | | | | | | | | | | | 2000-09-15 Chris Toshok <toshok@helixcode.com> * backend/pas/pas-backend-ldap.c: split all the ldap operations into 2 halves, a handler, and destructor, and create a structure containing two function pointers and any data they need. this allows us queue up pending operations (since the LDAP*'s are no longer view specific. there's one per backend.) also, add support for restarting async operations if the SERVER DOWN error isn't communicated until sometime after the handler is called (as is the case with the async search stuff.) svn path=/trunk/; revision=5468
* use x-evolution-any-field.Chris Toshok2000-08-091-37/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-08 Chris Toshok <toshok@helixcode.com> * gui/component/e-addressbook-model.c (e_addressbook_model_init): use x-evolution-any-field. * gui/component/addressbook.c (search_entry_activated): use x-evolution-any-field. (change_view_type): same. * gui/minicard/e-minicard-view.c (e_minicard_view_init): set query to x-evolution-any-field. * backend/pas/pas-backend-ldap.c (func_contains): support x-evolution-any-field for matching any evolution supported field. * backend/pas/pas-backend-file.c (compare_email): switch to using ECardSimple calls. (compare_phone): same. (compare_address): same. (entry_compare): switch to using ECardSimple calls, and support a 'x-evolution-any-field' wildcard field. (vcard_matches_search): use an ECardSimple. svn path=/trunk/; revision=4626
* wait to free the view until we've taken care of freeing its internals.Chris Toshok2000-07-271-51/+60
| | | | | | | | | | | | | | | | | | | | | 2000-07-26 Chris Toshok <toshok@helixcode.com> * backend/pas/pas-backend-ldap.c (view_destroy): wait to free the view until we've taken care of freeing its internals. also, close the ldap connection here. (pas_backend_ldap_connect): rename p_b_l_ensure_connected to this, since it's always called when we create a view. (pas_backend_ldap_build_all_cards_list): open an ldap connection in this function and close it at the end. (poll_ldap): make sure to call ldap_unbind to close the view's connection here. (pas_backend_ldap_search): call pas_backend_ldap_connect here - ldap_unbind will either be called from poll_ldap or from view_destroy. (pas_backend_ldap_get_vcard): the PASBackendLDAP no longer has an LDAP*. svn path=/trunk/; revision=4369
* add support for user settable scope. (pas_backend_ldap_search): same.Chris Toshok2000-07-271-5/+12
| | | | | | | | | | | 2000-07-26 Chris Toshok <toshok@helixcode.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_all_cards_list): add support for user settable scope. (pas_backend_ldap_search): same. (pas_backend_ldap_load_uri): same. svn path=/trunk/; revision=4360
* remove spew. (pas_backend_ldap_ensure_connected): duh, don't access aChris Toshok2000-06-271-21/+18
| | | | | | | | | | | | 2000-06-26 Chris Toshok <toshok@helixcode.com> * backend/pas/pas-backend-ldap.c (poll_ldap): remove spew. (pas_backend_ldap_ensure_connected): duh, don't access a pointer we know to be NULL. (query_prop_to_ldap): rename map_e_card_prop_to_ldap to this. easier to type. svn path=/trunk/; revision=3743
* Added "sequence_complete" signal.Christopher James Lahey2000-05-301-0/+1
| | | | | | | | | | | | | | | | 2000-05-30 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-book-view-listener.c, backend/ebook/e-book-view-listener.h, backend/ebook/e-book-view.c, backend/ebook/e-book-view.h, backend/idl/addressbook.idl, backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c, backend/pas/pas-book-factory.c, backend/pas/pas-book-view.c, backend/pas/pas-book-view.h: Added "sequence_complete" signal. * printing/e-contact-print.c: Made printing wait for "sequence_complete" signal and made it sort. svn path=/trunk/; revision=3279
* convert to use ECardSimple. (poll_ldap): same.Chris Toshok2000-05-171-38/+18
| | | | | | | * backend/pas/pas-backend-ldap.c (construct_email_list): convert to use ECardSimple. (poll_ldap): same. svn path=/trunk/; revision=3095
* add typedefs for the can_write functions, and add parameters toChris Toshok2000-05-171-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | * backend/pas/pas-book.h: add typedefs for the can_write functions, and add parameters to pas_book_new. * backend/pas/pas-book.c (pas_book_construct): add can_write/can_write_card params. (pas_book_new): same. (impl_Evolution_Book_can_write): new function. (impl_Evolution_Book_can_write_card): same. (pas_book_get_epv): assign the can_write/can_write_card slots in the epv. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_can_write): new function. (pas_backend_ldap_can_write_card): same. (pas_backend_ldap_add_client): add can_write/can_write_card to pas_book_new call. * backend/pas/pas-backend-file.c (pas_backend_file_can_write_card): new function, calls can_write. (pas_backend_file_can_write): same. (can_write): return TRUE if we can write to the addressbook file. (pas_backend_file_add_client): add can_write/can_write_card to pas_book_new call. * backend/idl/addressbook.idl (Evolution): add can_write and can_write_card permission requests. svn path=/trunk/; revision=3093
* Enabled a couple more fieldsChristopher James Lahey2000-05-091-2/+3
| | | | | | | | 2000-05-09 Christopher James Lahey <clahey@helixcode.com> * backend/pas/pas-backend-ldap.c: Enabled a couple more fields svn path=/trunk/; revision=2943
* Removed some code that was notifying too many clients at the wrong times.Christopher James Lahey2000-05-081-11/+1
| | | | | | | | | | | | | | 2000-05-07 Christopher James Lahey <clahey@helixcode.com> * backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c: Removed some code that was notifying too many clients at the wrong times. * gui/component/addressbook.c: Set view->book. Unreffed view->book. Unreffed the model instead of destroying it. Removed the /tmp/test.db stuff. svn path=/trunk/; revision=2876
* if a port isn't specified in the uri default to 389.Chris Toshok2000-05-071-0/+3
| | | | | | | * backend/pas/pas-backend-ldap.c (pas_backend_ldap_load_uri): if a port isn't specified in the uri default to 389. svn path=/trunk/; revision=2831
* Made uri slightly better managed.Christopher James Lahey2000-05-021-7/+6
| | | | | | | | | | | | | | | | 2000-05-01 Christopher James Lahey <clahey@helixcode.com> * backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c: Made uri slightly better managed. * backend/pas/pas-book-factory.c (pas_book_factory_process_request): Remove this CORBA_Object_release that causes things not to work. This is just a temporary fix until we figure out what's actually wrong. * backend/pas/pas-book.c: Fixed a copy and paste error in a warning. svn path=/trunk/; revision=2718
* fix a typo in the for loop.Larry Ewing2000-05-021-1/+1
| | | | | | | | | 2000-05-01 Larry Ewing <lewing@helixcode.com> * backend/pas/pas-backend-ldap.c (pas_backend_ldap_remove_client): fix a typo in the for loop. svn path=/trunk/; revision=2714
* Added new status values for the IDL stuff.Federico Mena Quintero2000-05-011-14/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-30 Federico Mena Quintero <federico@helixcode.com> * backend/ebook/e-book-types.h (EBookStatus): Added new status values for the IDL stuff. * backend/pas/pas-book-factory.h (PASBookFactoryClass): New "last_book_gone" signal. * backend/pas/pas-book-factory.c (pas_book_factory_launch_backend): Better error handling. (pas_book_factory_process_queue): Let pas_book_factory_process_request() free the request. (pas_book_factory_process_request): Free the request here. Perform better error handling. (free_active_server_map_entry): Free an active server map entry; free the URI key and unref the backend value. This function was renamed; the old one was trying to CORBA_Object_unref() a GTK+ object! (remove_backends_entry): Free a backend table entry; free the URI key. (backend_last_client_gone_cb): Remove the backend from the active server map and emit the "last_book_gone" signal if appropriate. (pas_book_factory_get_n_backends): New function to query the number of running backends in an addressbook factory. * backend/idl/addressbook.idl (BookListener::CallStatus): Added a ProtocolNotSupported code. This is for when the addressbook factory cannot find a provider for the requested URI. * backend/pas/pas-backend.h (PASBackendClass): New "last_client_gone" signal. (PASBackendClass): New get_uri virtual method. * backend/pas/pas-backend.c (pas_backend_load_uri): Return a gboolean success code. (pas_backend_add_client): Return a gboolean success code. (pas_backend_last_client_gone): New function used by backend implementations to notify upwards when the backend's last client is destroyed. (pas_backend_get_uri): New function to get the URI of a backend. * backend/pas/pas-backend-file.c (pas_backend_file_add_client): Pass the backend as the closure data to the "destroy" handler of the book. We cannot call pas_book_get_backend() in the callback since the book's private data has already been destroyed when the callback is invoked. Alternatively, we could move the private data destruction step to the book's ::finalize() method. (pas_backend_file_book_destroy_cb): Get the backend from the callback's data, not from the book. (pas_backend_file_remove_client): Remove the book from the list of clients. When all clients go away, call pas_backend_last_client_gone(). (PASBackendFilePrivate): Added an uri field. (pas_backend_file_get_uri): Implement the get_uri method. (pas_backend_file_load_uri): Return a gboolean success code. Also, store the URI in the private structure. (pas_backend_file_add_client): Return a gboolean success code. Also, call pas_backend_last_client_gone() if appropriate. (pas_backend_file_destroy): Free the bf->priv->uri. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_add_client): Pass the backend as the closure data to the "destroy" handler of the book. See above for rationale. (pas_backend_ldap_book_destroy_cb): Get the backend from the callback's data. (pas_backend_ldap_remove_client): Remove the book from the list of clients. When all clients go away, call pas_backend_last_client_gone(). (pas_backend_ldap_load_uri): Return a gboolean success code. (pas_backend_ldap_add_client): Return a gboolean success code. Also, call pas_backend_last_client_gone() if appropriate. (PASBackendLDAPPrivate): New uri field. (pas_backend_ldap_get_uri): Implement the get_uri method. (pas_backend_ldap_load_uri): Store the uri in the private structure. (pas_backend_ldap_destroy): Free the bl->priv->uri. svn path=/trunk/; revision=2705
* add support for a rootdn in the uri.Chris Toshok2000-04-301-3/+7
| | | | | | | | | | | | * backend/pas/pas-backend-ldap.c (pas_backend_ldap_ensure_connected): add support for a rootdn in the uri. (pas_backend_ldap_build_all_cards_list): make use of the rootdn in the call to ldap_search_s. (pas_backend_ldap_search): same. (pas_backend_ldap_load_uri): get the rootdn out of the passed in uri. svn path=/trunk/; revision=2688
* Use "e-minicard" as the log domain.Federico Mena Quintero2000-04-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-04-18 Federico Mena Quintero <federico@helixcode.com> * gui/minicard/Makefile.am (INCLUDES): Use "e-minicard" as the log domain. * gui/component/Makefile.am (INCLUDES): Use "evolution-addressbook" as the log domain. * backend/pas/Makefile.am: Build libpas.a, not a shared library. Do not install any header files. (INCLUDES): Remove spurious include paths. * backend/pas/*.[ch]: Fix includes. * backend/ebook/Makefile.am: Do not install the test programs. Fixed some include weirdness. * backend/ebook/*.[ch]: Fix includes. * contact-editor/Makefile.am (INCLUDES): Set the log domain to "contact-editor". (INCLUDES): Fix. * contact-editor/*.[ch]: Fix includes. * gui/minicard/*.[ch]: Fix includes. svn path=/trunk/; revision=2529
* Added a note field.Christopher James Lahey2000-04-151-1/+1
| | | | | | | | | | | | | | | | | | | 2000-04-14 Christopher James Lahey <clahey@helixcode.com> * addressbook/backend/ebook/e-card.c, addressbook/backend/ebook/e-card.h, addressbook/backend/pas/pas-backend-file.c, addressbook/backend/pas/pas-backend-ldap.c, addressbook/contact-editor/e-contact-editor.c: Added a note field. From shell/ChangeLog: 2000-04-14 Christopher James Lahey <clahey@helixcode.com> * e-shell-view.c: Made the left pane of the shell view not autoresize. svn path=/trunk/; revision=2444
* don't ldap_simple_bind_s if the ldap_open failed, and fix warnings.Chris Toshok2000-04-151-44/+52
| | | | | | | | | | | | | | | * addressbook/backend/pas/pas-backend-ldap.c (pas_backend_ldap_ensure_connected): don't ldap_simple_bind_s if the ldap_open failed, and fix warnings. (pas_backend_ldap_build_all_cards_list): don't do search if the ensure_connected failed, and fix warnings. (pas_backend_ldap_search): same. (poll_ldap): fix warnings. (pas_backend_ldap_process_get_book_view): same. (pas_backend_ldap_get_vcard): same. (pas_backend_ldap_load_uri): same. svn path=/trunk/; revision=2429
* add the title attribute.Chris Toshok2000-04-131-0/+1
| | | | | | * addressbook/backend/pas/pas-backend-ldap.c: add the title attribute. svn path=/trunk/; revision=2419
* make sure to g_source_remove the idle id.Chris Toshok2000-04-131-0/+2
| | | | | | | * addressbook/backend/pas/pas-backend-ldap.c (view_destroy): make sure to g_source_remove the idle id. svn path=/trunk/; revision=2415
* new function that polls ldap for more search responses.Chris Toshok2000-04-131-73/+99
| | | | | | | | | * addressbook/backend/pas/pas-backend-ldap.c (poll_ldap): new function that polls ldap for more search responses. (pas_backend_ldap_search): use the async search interface and register an idle call to poll for the responses. svn path=/trunk/; revision=2414
* rework this function to use a table mapping search field names to vcardChris Toshok2000-04-131-33/+88
| | | | | | | | | | | | | | | | | | | * addressbook/backend/pas/pas-backend-file.c (entry_compare): rework this function to use a table mapping search field names to vcard properties and extra information (such as whether or not the property is a list.) * addressbook/backend/pas/pas-backend-ldap.c (construct_email_list): new function, to build the ECardList for email addresses. (construct_phone_list): new function, to build the ECardList for phone numbers. (pas_backend_ldap_search): use a table mapping ldap attributes to ecard properties, and use the special list construction functions if the property calls for it. general cleanup. added a comment about not calling ber_free if there was a decoding error. svn path=/trunk/; revision=2411
* delay the setting of the ldap variable until we've ensured we wereChris Toshok2000-04-121-11/+31
| | | | | | | | | | | | | | * addressbook/backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_all_cards_list): delay the setting of the ldap variable until we've ensured we were connected. Also, set the search limit to LDAP_MAX_SEARCH_RESPONSES (we'll eventually want a user setting here i assume.) (pas_backend_ldap_search): same here, and also send back lists of CARDS_PER_VIEW_NOTIFICATION length in each pas_book_view_notify_add call. also, don't call ber_free if there was a decoding error, since the ldap library frees it for us. svn path=/trunk/; revision=2406
* add LDAP_LIBS here.Chris Toshok2000-04-121-85/+493
| | | | | | | | | | | | | | | | | | * wombat/Makefile.am (wombat_LDADD): add LDAP_LIBS here. * configure.in: check for -lldap and -llber and if both are present include ldap support in the pas/wombat. * addressbook/backend/pas/Makefile.am (libpas_la_SOURCES): include pas-backend.ldap.c if ENABLE_LDAP. * addressbook/backend/pas/pas-backend-ldap.c: get searching working (converting between the sexp and ldap stuff.) * wombat/wombat.c (setup_pas): register the ldap pas backend if HAVE_LDAP is defined. svn path=/trunk/; revision=2401
* new-file new fileChris Toshok2000-03-311-0/+519
* addressbook/backend/pas/pas-backend-ldap.h: new-file * addressbook/backend/pas/pas-backend-ldap.c: new file both still in the "do not enter" stage. svn path=/trunk/; revision=2263