aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/pop3/camel-pop3-store.c
Commit message (Collapse)AuthorAgeFilesLines
* Rescue the KPOP code from bit rot.Dan Winship2001-05-021-23/+16
| | | | | | | * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit rot. svn path=/trunk/; revision=9643
* Redo this a lot so that instead of having a class full of callbacks, weDan Winship2001-04-281-6/+4
| | | | | | | | | | | | | | | | | | | | | | * camel-session.c: Redo this a lot so that instead of having a class full of callbacks, we have a subclassable class. Also, replace the increasingly horrifying camel_session_query_authenticator with three new routines, camel_session_get_password, camel_session_forget_password, and camel_session_alert_user. * camel-pgp-context.c: * camel-pkcs7-context.c: * camel-smime-context.c: * providers/imap/camel-imap-store.c: * providers/pop3/camel-pop3-store.c: * providers/smtp/camel-smtp-transport.c: Use camel_session_get_password / camel_session_forget_password. * camel-tcp-stream-ssl.c (ssl_bad_cert): Use camel_session_alert_user. svn path=/trunk/; revision=9617
* Free base_url and storage_path.Dan Winship2001-04-191-2/+13
| | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (camel_imap_store_finalize): Free base_url and storage_path. * providers/pop3/camel-pop3-store.c (finalize): Free the implementation string. (camel_pop3_command): Clarify documentation to mention that @ex isn't set (and *@ret is) on CAMEL_POP3_ERR. (connect_to_server): Set @ex properly on CAMEL_POP3_ERR. * providers/pop3/camel-pop3-folder.c (pop3_refresh_info, pop3_get_message): Set @ex properly on CAMEL_POP3_ERR. svn path=/trunk/; revision=9450
* Move things around here to make this all work right again (so you don'tDan Winship2001-03-311-47/+28
| | | | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server, query_auth_types, pop3_connect): Move things around here to make this all work right again (so you don't get prompted for a password when checking the supported authtypes.) svn path=/trunk/; revision=9056
* Not quite finished but checking in for some local frobbing.Not Zed2001-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host name info when done ... blah blah. * camel-sasl-kerberos4.c (krb4_challenge): Free host name info after we're done with it. * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name info after we're done with it. * camel-remote-store.c (remote_connect): Free the host name info from get_host after we're finished with it. * camel-service.c (camel_get_host_byname): New function to lookup a name, and still be cancellable. (camel_free_host): And a function to free the structure returned. (camel_service_gethost): Call get_host_byname for this. svn path=/trunk/; revision=9033
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-301-1/+3
| | | | svn path=/trunk/; revision=9024
* Add an "extra_conf" field to CamelProvider with structures and defines andDan Winship2001-03-271-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-provider.h: Add an "extra_conf" field to CamelProvider with structures and defines and stuff, for providers to specify additional configuration options that they want. Also add a "supports ssl" flag to the provider flags. * camel-remote-store.c: add a "default_ssl_port" field. (remote_construct): If the URL has the "use_ssl" parameter, set the store's use_ssl flag. (remote_connect): If using SSL and no port specified, use the default_ssl_port rather than the default_port. * providers/smtp/camel-smtp-provider.c (smtp_provider): add CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config gui code knows that the ALLOW_USER and ALLOW_AUTH go together.) (ssmtp_provider): gone * providers/smtp/camel-smtp-transport.c (smtp_construct): Set a flag if "use_ssl" param is set. (smtp_connect): Check the CamelSmtpTransport use_ssl flag rather than checking if this is smtp or ssmtp. * providers/imap/camel-imap-provider.c (imap_conf_entries): Add a bunch of IMAP-specific configuration options, like "check for new mail in all folders" (default TRUE), "show only subscribed folders" (default TRUE), "ignore server-supplied namespace", and "apply filters to INBOX" (not yet implemented). (imap_provider): We support SSL and we no longer allow a path in the URL. (namespace is handled via extra_conf) (simap_provider): Gone * providers/imap/camel-imap-store.c (camel_imap_store_init): Set default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here (construct): remove simap stuff, deal with "use_lsub", "namespace", "check_all", and "filter" parameters. Set base_url to not include params. (imap_store_setup_online): Don't ask for the namespace if it was set explicitly. Don't get subscribed folders if !use_lsub. (imap_concat): Fix a bug. (get_folder_info): Support for not checking all folders. * providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep on server" (currently still implemented by the mailer code, not here), "delete after N days" (not yet implemented). (pop3_provider): we support SSL (spop_provider): gone * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set default_ssl_port (pop3_connect): Remove spop code svn path=/trunk/; revision=8968
* add a "GList *authtypes", so you can get the list of authtypes used by aDan Winship2001-03-221-78/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-provider.h: (CamelProvider) add a "GList *authtypes", so you can get the list of authtypes used by a provider without needing to have an actual CamelService object handy. (Will be needed by the new config druid.) (CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test the URL part stuff, since the way it works is too complicated and everyone always does it wrong. * camel-service.c (camel_service_query_auth_types): Remove the @connected arg again: if you don't want to connect, you can just get the list of authtypes off the provider. (camel_service_free_auth_types): Remove this. All existing implementations do authtypes the same way, so just say the caller should "g_list_free" the list. (Oh, look, removing this function doesn't actually cause the mailer to not build. How 'bout that.) (construct, get_path): Use the new URL part macros. * camel-remote-store.c (remote_query_auth_types): Update (remote_free_auth_types): Nuke (camel_remote_store_authtype_list): New function for use by subclasses. * providers/imap/camel-imap-provider.c: * providers/pop3/camel-pop3-provider.c: * providers/smtp/camel-smtp-provider.c: Update CamelProvider structures. (camel_provider_module_init): Put all the SSL parts together so there's only 1 #ifdef. Set up the provider authtypes field using the SASL, CamelRemoteStore, and standard authtypes, as appropriate. Copy that from the normal provider to the SSL provider. * providers/local/camel-local-provider.c: * providers/sendmail/camel-sendmail-provider.c: * camel-session.c: Update CamelProvider structures. * providers/imap/camel-imap-store.c (query_auth_types): * providers/pop3/camel-pop3-store.c (query_auth_types): Update * providers/smtp/camel-smtp-store.c (query_auth_types): Update. Remove the no_authtype, because that's what "ALLOW_AUTH" rather than "NEED_AUTH" means. (free_auth_types): Nuke. svn path=/trunk/; revision=8872
* Set the errbuf to NULL after freeing it? I don't think this should fix bugJeffrey Stedfast2001-03-191-0/+1
| | | | | | | | | | 2001-03-19 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf to NULL after freeing it? I don't think this should fix bug #1801 but I guess it can't hurt. svn path=/trunk/; revision=8818
* Check for "simap" instead of "imaps".Jeffrey Stedfast2001-03-151-2/+2
| | | | | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (imap_connect): Check for "simap" instead of "imaps". * providers/pop3/camel-pop3-store.c (pop3_connect): Change the port to be 995 for spop. * providers/pop3/libcamelpop3.urls: Change to "spop". * providers/imap/libcamelimap.urls: Change "imaps" to "simap" to correspond to /etc/services. svn path=/trunk/; revision=8724
* Check to see if we are using "pops" and then set the appropriate SSLJeffrey Stedfast2001-03-151-1/+9
| | | | | | | | | | | | | | 2001-03-14 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see if we are using "pops" and then set the appropriate SSL settings. * providers/pop3/libcamelpop3.urls: Add "pops" * providers/pop3/camel-pop3-provider.c: Defined the pops provider. (camel_provider_module_init): Register the pops provider. svn path=/trunk/; revision=8723
* Implement. (get_trash): Implement. (camel_pop3_store_class_init): OverrideJeffrey Stedfast2001-03-081-0/+19
| | | | | | | | | | | | | | | | 2001-03-07 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-store.c (init_trash): Implement. (get_trash): Implement. (camel_pop3_store_class_init): Override the default init_trash and get_trash virtual functions. Hopefully this should fix the problem of pop3 sotre's not disconnecting after the send&recv code finishes downloading mail. Wonder if I should override the default implementation for the mbox, mh, and maildir too? svn path=/trunk/; revision=8592
* Rewrite a bunch. Replace the existing folder cache stuff with much simplerDan Winship2001-02-101-24/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-store.c: Rewrite a bunch. Replace the existing folder cache stuff with much simpler code that still handles all the existing cases. Now the folder hash table is always created by the base class, using hash and compare functions provided by the class implementation. (If they are set to NULL, CamelStore won't cache folders.) lookup_folder, cache_folder, and uncache_folder are no longer class methods, and get_name is gone completely. (camel_store_get_inbox): Renamed from camel_store_get_default_folder, since that wasn't being used, and this is what we actually need. (camel_store_get_root_folder): Removed, since it's not needed for anything given get_folder_info. * camel-remote-store.c: * providers/local/camel-local-store.c: * providers/local/camel-mbox-store.c: * providers/local/camel-mh-store.c: * providers/local/camel-maildir-store.c: * providers/nntp/camel-nntp-store.c: * providers/pop3/camel-pop3-store.c: * providers/vee/camel-vee-store.c: Minor updates for CamelStore changes * providers/imap/camel-imap-store.c (camel_imap_store_class_init): Update for CamelStore changes. (hash_folder_name, compare_folder_name): treat INBOX case-insensitively, otherwise use g_str_hash and g_str_equal. * camel-service.c (camel_service_construct): Remove camel_service_new and create camel_service_construct (as a class method) in its place. * camel-session.c (camel_session_get_service): Use camel_object_new and camel_service_construct to replace camel_service_new. * providers/local/camel-local-store.c (construct): Append a '/' to the URL path if it doesn't end with one svn path=/trunk/; revision=8145
* Changed to push the operation into a status stack.Not Zed2001-02-081-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-02-07 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_start): Changed to push the operation into a status stack. (camel_operation_progress): Changed to only accept % complete. (camel_operation_reset): Free status stack as well. * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the octect count from the return line, and pass it to get_additional_data(). (pop3_refresh_info): Added status stuff. * providers/pop3/camel-pop3-store.c (camel_pop3_command_get_additional_data): Added a total bytes expected argument for progress reporting & fixed callers. (camel_pop3_command_get_additional_data): Added progress reporting. * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): (mbox_summary_sync_quick): (summary_rebuild): Added progress reporting stuff. svn path=/trunk/; revision=8095
* Updated.Jeffrey Stedfast2001-02-061-42/+46
| | | | | | | | | | | | | | | | | | | 2001-02-05 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (query_auth_types): Updated. * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): Updated. * providers/pop3/camel-pop3-store.c (query_auth_types): Updated. * providers/imap/camel-imap-store.c (query_auth_types): Updated. * camel-service.c (camel_service_query_auth_types): Now takes a boolean value to specify whether or not to connect when constructing a supported authtype list. svn path=/trunk/; revision=7979
* Kill off a long-hated Camel kludge: "empty" URLs andDan Winship2001-01-101-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | query_auth_types_generic. * camel-url.c: Remove "empty" from CamelURL. (camel_url_new): No longer set it. (camel_url_to_string): Treat "" as equivalent to NULL for authmech. (Unrelated change, but it simplifies some stuff with the new config dialog.) * camel-service.c (camel_service_new): Remove url->empty check: if the URL isn't valid, we don't create the service. (camel_service_query_auth_types): No longer need to switch between generic and connected variants. * providers/smtp/camel-smtp-transport.c (query_auth_types): * providers/pop3/camel-pop3-store.c (query_auth_types): * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): * providers/imap/camel-imap-store.c (query_auth_types): * camel-remote-store.c (remote_query_auth_types): Remove generic version, rename connected version. svn path=/trunk/; revision=7327
* Fix the APOP check to not crash on servers that don't return anyDan Winship2000-12-281-7/+9
| | | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server): Fix the APOP check to not crash on servers that don't return any information on the +OK greeting line. svn path=/trunk/; revision=7184
* Don't g_return_if_fail if the service is already disconnected. JustDan Winship2000-12-021-2/+4
| | | | | | | | | | | | * camel-service.c (camel_service_disconnect): Don't g_return_if_fail if the service is already disconnected. Just return. * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Return FALSE (don't try again) if we get CAMEL_POP3_FAIL. (pop3_connect): If we don't succeed, disconnect. svn path=/trunk/; revision=6756
* Unbreak this.Dan Winship2000-11-041-2/+2
| | | | | | | * providers/pop3/camel-pop3-store.c (camel_pop3_store_expunge): Unbreak this. svn path=/trunk/; revision=6381
* Add an "url_flags" field to CamelProvider. Move the CAMEL_SERVICE_URL_*Dan Winship2000-11-041-4/+0
| | | | | | | | | | | | | | | | | | | | * camel-provider.h: Add an "url_flags" field to CamelProvider. Move the CAMEL_SERVICE_URL_* defines here and remove the SERVICE_ part of the name. * camel-service.h: Remove CAMEL_SERVICE_URL_* flags and service->url_flags field. * camel-service.c (check_url, get_path): Get URL flags from service->provider, update for changed flag names. * providers/*/camel-*-provider.c: Add URL flags to provider structures. * providers/*/camel-*-{store,transport}.c, camel-remote-store.c: Remove service->url_flags initialization. svn path=/trunk/; revision=6370
* Add a new argument, clean, that says whether or not to try to disconnectDan Winship2000-11-011-6/+7
| | | | | | | | | | | | | | | | | | * camel-service.c (service_disconnect): Add a new argument, clean, that says whether or not to try to disconnect cleanly. * camel-remote-store.c (remote_send_string, remote_send_stream, remote_recv_line): disconnect uncleanly on failure to prevent infinite loops when providers would normally send commands from disconnect(). Remove some unneeded CamelException goo. * providers/smtp/camel-smtp-transport.c (smtp_disconnect): * providers/pop3/camel-pop3-store.c (pop3_disconnect): * providers/nntp/camel-nntp-store.c (nntp_store_disconnect): * providers/imap/camel-imap-store.c (imap_disconnect): Don't send QUIT/LOGOUT if !clean. svn path=/trunk/; revision=6303
* Remove md5-utils.h include since it's not part of Camel any more.Dan Winship2000-10-301-1/+3
| | | | | | | | | | | | | | | | | | | | * camel.h: Remove md5-utils.h include since it's not part of Camel any more. * camel-charset-map.c: Kill some warnings. * providers/nntp/camel-nntp-grouplist.c (camel_nntp_get_grouplist_from_file, camel_nntp_grouplist_save): Clean up warnings about time_t casts. * providers/smtp/camel-smtp-transport.c: Remove unused md5-utils.h include. * providers/pop3/camel-pop3-store.c: Undefine the "_" macro defined by krb4's des.h when compiling with krb support. Fix md5-utils.h include. svn path=/trunk/; revision=6253
* lots of i18n fixesDan Winship2000-10-241-48/+28
| | | | svn path=/trunk/; revision=6143
* No, we must not encode the headers here. These interfaces ARE rawNot Zed2000-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-18 Not Zed <NotZed@HelixCode.com> * camel-mime-part.c (add_header): No, we must not encode the headers here. These interfaces ARE raw interfaces as they are defined in camel_medium. Also removed a bogus/meaningless FIXME. (set_header): Likewise here, we must not. (process_header): Removed another bogus comment. * camel-object.c (shared_is_of_type): Comment out the spitting of a big warning when we're trying to determine types from code. * providers/mbox/camel-mbox-summary.c (message_info_new_from_parser): Only call ibex funcitons if we have an index. * providers/mh/camel-mh-summary.c (camel_mh_summary_add): Only call ibex functions if we have an index. (remove_summary): Likewise. (camel_mh_summary_check): Likewise. * providers/nntp/camel-nntp-store.c (nntp_store_get_folder): get_folder -> flags argument. * providers/vee/camel-vee-store.c (vee_get_folder): create->flags. * providers/pop3/camel-pop3-store.c (get_folder): Changed create -> flags. * providers/imap/camel-imap-store.c (get_folder): Added flags argument. * providers/mh/camel-mh-folder.c (camel_mh_folder_new): Added flags argument, and fixed code appropriately. * providers/mh/camel-mh-store.c (get_folder): Added flags argument. * camel-folder-search.c (message_body_contains): Perform a regex match on the contents of messages. This wont quite work yet as message contents are encoded when written to a stream. (build_match_regex): Converts a number of strings into a regex matching pattern, escaping special chars. (match_message): match a single message from a folder, by uid. Slow. (search_body_contains): Changed to support matching where no index is supplied. Matches are performed by retrieving message contents, etc. () WTF? camel should not be including any widget headers. * providers/mbox/camel-mbox-folder.c (camel_mbox_folder_new): Added flags argument. (mbox_refresh_info): Changed into a NOP, the refresh info code moved into the new function. (camel_mbox_folder_new): If we have an index requested, build one, otherwise, remove an old one, or just dont do anything. * providers/mbox/camel-mbox-store.c (get_folder): Changed create to flags, changed code to suit. * camel-store.c (camel_store_get_folder): Changed create to flags. (get_folder_internal): And here. (get_folder): And here too. * camel-store.h (camel_store_get_folder): Change the create argument to be a flags argument. svn path=/trunk/; revision=5978
* Remove default_ports.Dan Winship2000-10-031-1/+4
| | | | | | | | | | | | | | * camel-provider.h: Remove default_ports. * camel-remote-store.c (remote_connect): Get default_port from CamelRemoteStore rather than CamelProvider. * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize CamelRemoteStore::default_port * providers/*/camel-*-provider.c: Remove default_ports. svn path=/trunk/; revision=5669
* Make KPOP work again.Dan Winship2000-09-081-1/+2
| | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server): Make KPOP work again. svn path=/trunk/; revision=5232
* Cleanup of lots of exception handling ; bugfixesPeter Williams2000-09-061-200/+125
| | | | svn path=/trunk/; revision=5202
* CamelRemoteStore: a new generic store for stores that connect to servers. ↵Peter Williams2000-08-301-0/+21
| | | | | | Prepare for the ability to cancel operations (much better exception handling). Clean up IMAP like nobody's business svn path=/trunk/; revision=5103
* Fixed a small warning.Christopher James Lahey2000-08-231-3/+3
| | | | | | | | 2000-08-22 Christopher James Lahey <clahey@helixcode.com> * providers/pop3/camel-pop3-store.c: Fixed a small warning. svn path=/trunk/; revision=4969
* Automatically connect services when given a valid URL (should hopefully ↵Peter Williams2000-08-231-20/+41
| | | | | | disconnect, too); remove the old movemail folder correctly. svn path=/trunk/; revision=4965
* New function to do one round of attempted authentication. (pop3_connect):Dan Winship2000-08-131-105/+101
| | | | | | | | | * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New function to do one round of attempted authentication. (pop3_connect): Move a bunch of code out into pop3_try_authenticate and fix some bugs in the edge cases. svn path=/trunk/; revision=4785
* Merge with camel-async.Peter Williams2000-08-111-24/+14
| | | | svn path=/trunk/; revision=4687
* add a debugging macro for doing protocol tracing.Dan Winship2000-08-041-2/+24
| | | | | | | * providers/pop3/camel-pop3-store.c: add a debugging macro for doing protocol tracing. svn path=/trunk/; revision=4526
* Fix a bug in error-setting code. (pop3_connect): Don't re-prompt forDan Winship2000-07-031-22/+38
| | | | | | | | | | | | * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fix a bug in error-setting code. (pop3_connect): Don't re-prompt for password in the KPOP case. (pop3_get_response): New function, split out from camel_pop3_command. (connect_to_server): Use pop3_get_response to parse the greeting message, and error out appropriately if it's -ERR. svn path=/trunk/; revision=3869
* New method, to return an end-user-friendly name corresponding to aDan Winship2000-07-021-0/+15
| | | | | | | | | | | | | | | * camel-service.c (camel_service_get_name): New method, to return an end-user-friendly name corresponding to a service. (eg, "POP service for danw on trna.helixcode.com"). * providers/imap/camel-imap-store.c, providers/mbox/camel-mbox-store.c, providers/nntp/camel-nntp-store.c, providers/pop3/camel-pop3-store.c, providers/sendmail/camel-sendmail-transport.c, providers/smtp/camel-smtp-transport.c: Implement. svn path=/trunk/; revision=3851
* fix the CAPA-parsing code to not get into an infinite loop.Dan Winship2000-07-021-2/+4
| | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server): fix the CAPA-parsing code to not get into an infinite loop. svn path=/trunk/; revision=3849
* Changed to keep prompting user for a valid password until it eitherJeffrey Stedfast2000-06-291-71/+98
| | | | | | | | | | | | | | | | | 2000-06-28 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_connect): Changed to keep prompting user for a valid password until it either authenticates or until Canceled by the user. (camel_imap_command_extended): Improved speed (replaced the g_strjoinv call with a faster implementation) * providers/pop3/camel-pop3-store.c (camel_pop3_command_get_additional_data): Fixed. (pop3_connect): Changed to keep prompting the user for a password until it either works or until Canceled by the user. svn path=/trunk/; revision=3783
* Fix dumb bug.Dan Winship2000-06-221-1/+1
| | | | | | | * providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb bug. svn path=/trunk/; revision=3682
* flush the filter stream before unreffing it, so it willDan Winship2000-06-211-13/+15
| | | | | | | | | | | | | | | | | | | | | | * camel-mime-part.c (write_to_stream): flush the filter stream before unreffing it, so it will camel_mime_filter_complete. * camel-stream-filter.c (camel_stream_filter_class_init): Fix a braino so camel_stream_flush works here. * camel-stream-mem.c (stream_seek): Fix a bug that resulted in large attachments being silently dropped. * providers/pop3/camel-pop3-store.c (camel_pop3_command_get_additional_data): Don't use g_strjoinv here, since it is O(n^2) on the length of the output string, and we can do O(n). * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): add a CRLF decoder after the QP/B64 decoder if it's text. svn path=/trunk/; revision=3658
* Kill. Folders are now always open, and handle "closing" sorts ofDan Winship2000-06-161-32/+25
| | | | | | | | | | | | | | | | | | * camel-folder.c: (camel_folder_open, camel_folder_is_open, camel_folder_get_mode): Kill. Folders are now always open, and handle "closing" sorts of operations at sync or finalize time. (camel_folder_sync): renamed from camel_folder_close. Syncs state to the store but doesn't necessarily close/disconnect. * providers/*/camel-*-folder.c: Merge "open" methods into "init" methods. Rename close to sync and update appropriately. * providers/imap/camel-imap-store.c: Remove camel_imap_store_open and camel_imap_store_close, which should not have been copied from the POP provider (where the exist to work around limitations of the POP protocol). svn path=/trunk/; revision=3581
* Check server for various interesting extensions.Dan Winship2000-06-161-3/+48
| | | | | | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server): Check server for various interesting extensions. * providers/pop3/camel-pop3-folder.c (get_uids): If the server supports UIDL, use real UIDs rather than fake ones. (etc): Map uids back to numbers appropriately svn path=/trunk/; revision=3578
* Add another argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK orDan Winship2000-06-101-10/+16
| | | | | | | | | | | | * camel-session.c (camel_session_query_authenticator): Add another argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache bad info. * providers/pop3/camel-pop3-store.c (pop3_connect): uncache the password if it doesn't work. svn path=/trunk/; revision=3496
* Remove exists, create, delete. A CamelFolder now always references anDan Winship2000-06-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-folder.c: Remove exists, create, delete. A CamelFolder now always references an existing folder. Remove delete_messages too since it wasn't being used. Add a "create" flag to get_subfolder saying whether or not to create the subfolder if it doesn't yet exist. * camel-store.c (camel_store_get_folder): Add a "create" flag to say whether or not to create the folder if it doesn't yet exist. (camel_store_delete_folder): New method, moved from CamelFolder. (cache_folder, uncache_folder): Fix up a bit. (get_folder_name): Explain what this is for. * providers/mbox/camel-mbox-folder.c: * providers/mbox/camel-mbox-store.c: Update. Remove support for hierarchical folders to simplify this for now, since we're not using it, and it's not completely clear how they should work in an ELocalStorage world. Needs to be revisited. * providers/pop3/camel-pop3-folder.c (delete_messages): Remove. * providers/pop3/camel-pop3-store.c (get_folder): Update. * providers/vee/camel-vee-folder.c (exists): Remove. * providers/vee/camel-vee-store.c (vee_get_folder): Update. svn path=/trunk/; revision=3453
* Fun with purify.Dan Winship2000-06-021-0/+3
| | | | | | | | | | | | | | | | | | * providers/pop3/camel-pop3-store.c (pop3_connect): free msg on success as well as failure. (camel_pop3_command_get_additional_data): free buf after reading the last line ("."). * providers/pop3/camel-pop3-folder.c (get_message_by_uid): free body data after creating the memstream from it (which will copy the data). * providers/mbox/camel-mbox-folder.c (mbox_finalize): free summary and index paths. * camel-data-wrapper.c (finalize): unref the stream, if it exists. svn path=/trunk/; revision=3381
* diff -r1.206 ChangeLogMichael Zucci2000-05-301-1/+0
| | | | | | | | | | | | | | | | 2a3,9 > * camel-store.c (camel_store_init): Move it to here. If this > level is going to maintain it, it should set it up. Lets see what > caching folders breaks :( > > * providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Dont > init folder cache here. > 7a15,16 > (camel_mbox_summary_expunge): Remove some debug, and dont offset > frompos? svn path=/trunk/; revision=3274
* (connect_to_server): Remove port number from error message sinceDan Winship2000-05-291-4/+2
| | | | | | | it's not terribly useful and we were getting it from the wrong place anyway. svn path=/trunk/; revision=3252
* Split apart password and APOP auth, since some servers seem to do both,Dan Winship2000-05-291-122/+146
| | | | | | | | | | | | | | | | | * providers/pop3/camel-pop3-store.c: Split apart password and APOP auth, since some servers seem to do both, but don't really. (connect_to_server): Renamed from try_connect. Now actually does the connection up to the point of checking the greeting for APOP support. (query_auth_types): Return APOP, if appropriate. Call pop3_disconnect after connect_to_server since we don't really want to be connected. (pop3_connect): Use connect_to_server rather than duplicating code. Fix a one-byte buffer overrun in the APOP code. (pop3_disconnect): Make this able to clean up after a partial connect. svn path=/trunk/; revision=3250
* > searchpart = strchr(namepart, '?');NotZed2000-05-201-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-05-19 NotZed <NotZed@HelixCode.com> * camel-simple-data-wrapper.c (construct_from_stream): If we already have been constructed, unref our content. (write_to_stream): Check we've been constructued, and change for stream api changes. * camel-mime-parser.c: Removed exception stuff. * md5-utils.c (md5_get_digest_from_stream): repaired. * camel-mime-message.c: Remove exception from write_to_stream, and fix, and fix formatting. * providers/sendmail/camel-sendmail-transport.c (_send_internal): Fix for stream changes. * providers/pop3/camel-pop3-store.c (camel_pop3_command): Fixes for stream changes. * providers/mbox/camel-mbox-folder.c, and elsewhere, fix all stream api changes. (mbox_append_message): Use stream_close() now its back. (mbox_append_message): unref the from filter. * camel-stream-mem.c: And here. * camel-stream-fs.[ch]: Here too. * camel-stream-filter.c: Likewise. This is getting tedious. * camel-stream-buffer.c (stream_write): Fix a few little problems. (stream_close): Reimplmeent. (camel_stream_buffer_read_line): Slightly more efficient version, that also only allocates the right amount of memory for strings. * camel-seekable-substream.c: Likewise. * camel-seekable-stream.[ch]: Remove exceptions, fix formatting, changes for stream (re)fixes. set_bounds returns an error. * camel-stream.[ch]: Remove exceptions. Make flush and reset return an error code, repair all the screwed up formatting, and put back close. * camel-mime-part-utils.c (camel_mime_part_construct_content_from_parser): And here. * camel-mime-part.c (camel_mime_part_set_content): And this too. (write_to_stream): Fixed for stream changes. * camel.h: Fixed. * providers/vee/camel-vee-folder.c (vee_search_by_expression): Implement. Performs an intersection of the two searches. (camel_vee_folder_finalise): Unref search folders. (vee_append_message): Implement append. svn path=/trunk/; revision=3142
* Use CamelException to signal failure. (camel_stream_write_strings):Dan Winship2000-05-091-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-stream.c (camel_stream_read, camel_stream_write, camel_stream_flush, camel_stream_reset, camel_stream_printf, camel_stream_write_to_stream): Use CamelException to signal failure. (camel_stream_write_strings): Remove. camel_stream_printf is more useful in most of the places that used this. (camel_stream_write_string): Change from macro to function to prevent problems with double-evaluation. * camel-seekable-stream.c (camel_seekable_stream_seek, camel_seekable_stream_set_bounds): Use CamelException. (reset): Update. * camel-seekable-substream.c, camel-stream-buffer.c, camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c: Update. * camel-stream-fs.c: Remove the virtual init functions and move the code into the creator functions. Add CamelExceptions to creation functions that could fail. * camel-data-wrapper.c (camel_data_wrapper_write_to_stream): Use CamelException. * camel-mime-message.c, camel-mime-part.c, camel-multipart.c (write_to_stream): Update. * camel-mime-parser.c: add an exception to the mime parser private data and pass that to stream functions as needed. * gmime-content-field.c, md5-utils.c: Update (badly) for stream changes. * camel-exception.h (camel_exception_is_set): convenience macro. * providers/Makefile.am: disable SMTP for now * providers/mbox/camel-mbox-folder.c (mbox_append_message): Pass CamelException to the functions that now need it. Check the exception after calling camel_stream_flush, and fail if it fails. (mbox_get_message_by_uid): More updates. * providers/pop/camel-pop3-folder.c, providers/pop/camel-pop3-store.c, providers/sendmail/camel-sendmail/transport.c: Update. svn path=/trunk/; revision=2924
* Make camel not leak like a sieve.Dan Winship2000-05-081-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-object.c: New subclass of GtkObject which is now the base of the Camel object hierarchy. Currently the only difference between CamelObject and GtkObject is that CamelObjects don't start out floating. * *.h: Move a bunch of typedefs to camel-types.h. Standardize on using <camel/foo.h> in header files rather than <foo.h>, "foo.h", or "camel/foo.h". Remove some unneeded includes. * camel-address.c, camel-data-wrapper.c, camel-folder-search.c, camel-folder-summary.c, camel-folder.c, camel-mime-filter.c, camel-mime-parser.c, camel-service.c, camel-session.c, camel-stream.c: These are now subclasses of CamelObject. * camel-data-wrapper.c (set_output_stream): * camel-medium.c (set_content_object): * camel-seekable-substream.c (init_with_seekable_stream_and_bounds): * providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid): remove gtk_object_sink calls. * camel-stream-buffer.c (init_vbuf): * camel-stream-filter.c (camel_stream_filter_new_with_stream): ref the original stream. * camel-folder-summary.c (camel_folder_summary_finalise): unref the filters when finalizing. * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser, camel_mime_part_construct_content_from_parser): * camel-mime-part.c (camel_mime_part_set_content): Unref objects that are created only to be handed off to other objects. If they're going to be needed later, they will have been additionally ref'ed by the object that needs them. * providers/pop3/camel-pop3-folder.c (get_message_by_number): unref the message stream after creating the data from it. * camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c, camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close, since its semantics are dubious (what happens when you close a stream other people still have references on?). * providers/nntp/camel-nntp-store.c: * providers/smtp/camel-smtp-transport.c: * providers/pop3/camel-pop3-store.c: replace camel_stream_close calls with gtk_object_unref. * providers/mbox/camel-mbox-folder.c: * providers/nntp/camel-nntp-folder.c: * providers/sendmail/camel-sendmail-transport.c: replace camel_stream_close with camel_stream_flush + gtk_object_unref svn path=/trunk/; revision=2882
* A machine which serves neither POP nor KPOP is not a POP server.Dan Winship2000-05-071-0/+7
| | | | | | | | | | * providers/pop3/camel-pop3-store.c (query_auth_types): A machine which serves neither POP nor KPOP is not a POP server. * providers/smtp/camel-smtp-provider.c: Note in the description that this provider is not yet tested. svn path=/trunk/; revision=2843
* Make this compile again in the !KRB4 caseDan Winship2000-05-051-1/+1
| | | | svn path=/trunk/; revision=2800
* Don't fall back to plaintext passwords if APOP fails, since it should alsoDan Winship2000-05-051-18/+14
| | | | | | | | * providers/pop3/camel-pop3-store.c (pop3_connect): Don't fall back to plaintext passwords if APOP fails, since it should also fail. svn path=/trunk/; revision=2798
* New function to replace camel_provider_scan. Returns a list of either (a)Dan Winship2000-05-041-8/+125
| | | | | | | | | | | | | | | | | | | | | | | | | * camel-session.c (camel_session_list_providers): New function to replace camel_provider_scan. Returns a list of either (a) all currently-loaded providers, or (b) all available providers. * camel-url.[ch]: Add an "empty" flag to CamelURL (indicating that it contains only a protocol). * camel-service.c (camel_service_query_auth_types): Make this take a CamelException (since it may have to try to connect to the server, and it might not able to.) * providers/pop3/camel-pop3-store.c: add KPOP (Kerberized POP) support. This is mostly so I have two kinds of authmech to play with instead of just one. (But it does actually work.) * providers/smtp/camel-smtp-transport.c (query_auth_types): update for prototype change, but disable the functionality, since it doesn't really support any auth types yet. (camel_smtp_transport_get_type): add an object init function to set the service url_flags. svn path=/trunk/; revision=2797
* s/strcasecmp/g_strcasecamp/ everywhere except intl/, per michael'sJacob Leach2000-05-031-1/+1
| | | | | | request. svn path=/trunk/; revision=2776
* fix various bugs in APOP code (still untested) and some of the errorDan Winship2000-04-111-22/+30
| | | | | | | * providers/pop3/camel-pop3-store.c (pop3_connect): fix various bugs in APOP code (still untested) and some of the error cases. svn path=/trunk/; revision=2376
* (pop3_connect): Remember the password after asking for it theDan Winship2000-04-081-17/+12
| | | | | | first time. svn path=/trunk/; revision=2331
* Clarify error messages. (finalize): fix a bug in camel_exception usageDan Winship2000-04-081-11/+22
| | | | | | | | * providers/pop3/camel-pop3-store.c (pop3_connect): Clarify error messages. (finalize): fix a bug in camel_exception usage svn path=/trunk/; revision=2329
* Reorganize the folder-fetching methods and implement a folder cache soDan Winship2000-04-071-6/+25
| | | | | | | | | | | | | | | | | | | | | | | 2000-04-06 Dan Winship <danw@helixcode.com> * camel-store.[ch]: Reorganize the folder-fetching methods and implement a folder cache so that multiple requests for the same folder will yield the same CamelFolder object (as long as it remains active). Includes some code to remove no-longer-active folders from the cache, but it doesn't get used since nothing is ever unref'ed in Camel right now... * providers/mbox/camel-mbox-store.c: * providers/pop3/camel-pop3-store.c: update for CamelStore changes. * camel-folder.[ch]: Remove the (unused) CamelException argument from camel_folder_get_name and camel_folder_get_full_name. (camel_folder_set_name): make this go away since changing a folder's name after it has been created could result in it conflicting with a separately-issued folder. svn path=/trunk/; revision=2314
* the URL RFC says the port must be numeric, so we don't want to doDan Winship2000-04-061-6/+3
| | | | | | | | | | | * g_url_new really wanted to take a CamelException. So, rename Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new taking an exception), and url-util.[ch] to camel-url.[ch]. Also force url->port to be numeric and remove camel_service_getport. (I was confused before: the URL RFC says the port must be numeric, so we don't want to do getportbyname.) svn path=/trunk/; revision=2300
* Add a htons in the default_number case, and document the fact that theDan Winship2000-03-311-7/+2
| | | | | | | | | | | | * camel-service.c (camel_service_getport): Add a htons in the default_number case, and document the fact that the function returns the port in network byte order. * providers/pop3/camel-pop3-store.c (pop3_connect): Revert Miguel's change. The port number bug was actually somewhere else, and the IP address copying code was fine already. svn path=/trunk/; revision=2256
* Add htons (port), and only copy 4 bytes for the IP address to prevent aMiguel de Icaza2000-03-301-2/+7
| | | | | | | | | | 2000-03-29 Miguel de Icaza <miguel@gnu.org> * providers/pop3/camel-pop3-store.c (pop3_connect): Add htons (port), and only copy 4 bytes for the IP address to prevent a DNS attack. svn path=/trunk/; revision=2251
* convenience functions to canonicalize the host and port values of aDan Winship2000-03-291-21/+10
| | | | | | | | | * camel-service.c (camel_service_gethost, camel_service_getport): convenience functions to canonicalize the host and port values of a service's URL. * providers/pop3/camel-pop3-store.c: use them svn path=/trunk/; revision=2216
* add delete_message_by_{number,uid}.Dan Winship2000-03-281-5/+123
| | | | | | | | | | | | | | | | * camel-folder.[ch]: add delete_message_by_{number,uid}. * providers/pop3/camel-pop3-folder.[ch]: implement delete_message_by_uid. Add a close method to do expunging of deleted messages if requested. * providers/pop3/camel-pop3-store.[ch]: support for CamelPop3Folder::close. (You have to close the connection in order to expunge the folder, thus the store may be connected in the CamelService::is_connected sense when it is not actually connected to the server.) Also some bugfixes. svn path=/trunk/; revision=2203
* keep separate input and output streams so the output doesn't end up beingDan Winship2000-03-281-14/+42
| | | | | | | | | | | | * providers/pop3/camel-pop3-store.c: keep separate input and output streams so the output doesn't end up being buffered. * providers/pop3/camel-pop3-folder.c (get_message_by_number): finish implementing this. * providers/Makefile.am (SUBDIRS): Add pop3. svn path=/trunk/; revision=2196
* new routine to free the data allocated by camel_service_query_auth_types.Dan Winship2000-03-281-1/+8
| | | | | | | | | * camel-service.c (camel_service_free_auth_types): new routine to free the data allocated by camel_service_query_auth_types. * providers/pop3/camel-pop3-store.c (free_auth_types): implement svn path=/trunk/; revision=2190
* New function to query a service for the authentication protocols itDan Winship2000-03-231-0/+20
| | | | | | | | * camel-service.c (camel_service_query_auth_types): New function to query a service for the authentication protocols it supports. * providers/pop3/camel-pop3-store.c (query_auth_types): implement svn path=/trunk/; revision=2147
* fix compile errors. duh.Dan Winship2000-03-231-6/+5
| | | | svn path=/trunk/; revision=2144
* fill this in partially make camel_pop3_command return the text afterDan Winship2000-03-231-18/+56
| | | | | | | | | | | * providers/pop3/camel-pop3-folder.c: fill this in partially * providers/pop3/camel-pop3-store.c: make camel_pop3_command return the text after "+OK"/"-ERR" and add a separate camel_pop3_get_additional_data to get the message body or whatever. Also make them take a CamelPop3Store rather than a CamelStreamBuffer. svn path=/trunk/; revision=2143
* some initial bits of the POP3 provider, to make Matt happy. Incomplete,Dan Winship2000-03-221-0/+254
* providers/pop3: some initial bits of the POP3 provider, to make Matt happy. Incomplete, untested, etc. svn path=/trunk/; revision=2137