aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-store.c
Commit message (Collapse)AuthorAgeFilesLines
* Kill dead filesJP Rosevear2005-01-111-1391/+0
| | | | svn path=/trunk/; revision=28342
* have our own so we don't need to link with glib.Not Zed2004-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-lock-helper.c (g_strerror): have our own so we don't need to link with glib. * providers/*/Makefile.am: Do not install ANY provider header files. No providers are subclassable. No providers are directly linkable. * camel.pc.in: create package config file. * tests/lib/folders.c (test_folder_message_ops): updated counts for delete also marking unread. * tests/lib/camel-test.c (camel_test_provider_init): new api for initialising test system 'in-build'. * camel-provider.c: remove the assertions, init if we need to,k use pthread_once stuff to serialise it. * tests/folder/test3.c (main): remove gtk stuff (???). * tests/*: Fix all the makefiles. Made make-check work 'in-build'. * tests/lib/folders.c (test_folder_counts): update for api changes. (test_message_info): similar. * providers/Makefile.am: removed groupwise from the build, this can't go in here anymore, not in its current state. * camel-net-utils.c (camel_gethostbyaddr_r) (camel_gethostbyname_r): the old e_gethost* calls from e-host-utils.c. 2004-11-15 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-utils.c (imap_path_to_physical): copied from e-path.c. (imap_path_find_folders): copied from e-path.c. * camel.h: remove the provider stuff from the header. * camel-provider.c: globalise provider_init variable, and asserton it in all functions that rely on it. * camel-service.c: removed getaddrinfo/etc. * camel-net-utils.[ch]: separate out camel_getaddrinfo etc. * Makefile.am: split camel into 2 libraries, libcamel and libcamel-store. * camel-multipart-signed.c (camel_multipart_signed_sign) (camel_multipart_signed_verify, prepare_sign): remove old deprecated api. * camel-multipart-encrypted.c (camel_multipart_encrypted_encrypt) (camel_multipart_encrypted_decrypt): remove old deprecated api. svn path=/trunk/; revision=28046
* Make debug run based on 'nntp' debug option.Not Zed2004-11-191-14/+25
| | | | | | | | | | | | | | | | | | | | | | | | | 2004-11-18 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-stream.c: * providers/nntp/camel-nntp-store.c: * providers/nntp/camel-nntp-summary.c: Make debug run based on 'nntp' debug option. * providers/nntp/camel-nntp-stream.c (stream_fill): if we get a 0 read, return ECONNRESET. This should really have been put on the stream for that imap hack fix. * providers/nntp/camel-nntp-store.c (camel_nntp_try_authenticate): retry if the password attempt failed. ** See bug #68556. * providers/nntp/camel-nntp-store.c (xover_setup): don't overwrite exception if we get a failure. (camel_nntp_command): if we continue, then set the return code to -1, so we re-loop rather than abort. svn path=/trunk/; revision=27946
* kill cast as lvalue warning.Not Zed2004-10-131-14/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-10-13 Not Zed <NotZed@Ximian.com> * providers/imap4/camel-imap4-folder.c (camel_imap4_folder_new) (imap4_sync_changes, imap4_sync): * providers/imap4/camel-imap4-summary.c (untagged_fetch_all): kill cast as lvalue warning. * camel-string-utils.h: add prototype for camel_toupper. * providers/imap4/camel-imap4-utils.c: * providers/imap4/camel-imap4-summary.c: * providers/imap4/camel-imap4-folder.c: * providers/imap4/camel-imap4-engine.c: * providers/imap4/camel-imap4-command.c: * providers/imap4/camel-imap4-store.c: include camel-i18n.h. 2004-10-12 Not Zed <NotZed@Ximian.com> ** See bug ??? * providers/nntp/camel-nntp-store.c (connect_to_server): if we have a username, try to authenticate before doing anything else. ** See bug #67895. * providers/nntp/camel-nntp-summary.c (add_range_xover) (add_range_head): use raw_command_auth since we might need auth here. * providers/nntp/camel-nntp-store.c (camel_nntp_raw_command_auth): new almost-raw command that also does auth. (xover_setup, connect_to_server, camel_nntp_command): use raw_command_auth since we might need auth here. 2004-10-12 Not Zed <NotZed@Ximian.com> ** See bug #67898 and probably others. * providers/imapp/camel-imapp-store.c (connect_to_server): * providers/pop3/camel-pop3-store.c (connect_to_server_wrapper): * providers/imap4/camel-imap4-store.c (connect_to_server_wrapper): * providers/imap/camel-imap-store.c (connect_to_server_wrapper): * providers/nntp/camel-nntp-store.c (connect_to_server_wrapper): * providers/smtp/camel-smtp-transport.c (connect_to_server_wrapper): Fallback to hard-coded port number if the name lookup fails and no port was supplied. svn path=/trunk/; revision=27562
* ** See bug #67170.Not Zed2004-10-111-3/+3
| | | | | | | | | | | | 2004-10-08 Not Zed <NotZed@Ximian.com> ** See bug #67170. * providers/nntp/camel-nntp-store.c (nntp_store_get_cached_folder_info): compare newsgroup names case sensitively. svn path=/trunk/; revision=27528
* ** See bug #66509.Not Zed2004-09-291-36/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | 2004-09-28 Not Zed <NotZed@Ximian.com> ** See bug #66509. * providers/nntp/camel-nntp-store.c (camel_nntp_command): if we get an error selecting the folder, disconnect/include it in the re-try loop. (camel_nntp_command): don't set the exception based on errno, exception processing is already done. don't clear it if we're on the 3rd retry. 2004-09-27 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-store.c (nntp_get_folder_info): don't do any locking here. (nntp_store_get_folder_info_all): move the locking here. (nntp_store_get_subscribed_folder_info): and some here too. * providers/nntp/camel-nntp-store.c: * providers/nntp/camel-nntp-folder.c: Remove nntp command_lock and just use the service connect lock for serialisation. svn path=/trunk/; revision=27419
* s/not/no/ in the error string. Fixes bug #65828.Jeffrey Stedfast2004-09-281-1/+1
| | | | | | | | | 2004-09-14 Jeffrey Stedfast <fejj@novell.com> * providers/nntp/camel-nntp-store.c (camel_nntp_try_authenticate): s/not/no/ in the error string. Fixes bug #65828. svn path=/trunk/; revision=27412
* Instead of doing a host-lookup ourselves, get it passed in to us as anJeffrey Stedfast2004-09-281-70/+60
| | | | | | | | | | | | | | | | | | | | | | 2004-09-22 Jeffrey Stedfast <fejj@novell.com> * providers/imap/camel-imap-store.c (connect_to_server): Instead of doing a host-lookup ourselves, get it passed in to us as an argument. Also simplified a bit (try_starttls is no longer an option). (connect_to_server_wrapper): Simplified (we no longer have fallback cases for SSL stuff). Also, perform host lookup here. * providers/imap4/camel-imap4-store.c: Same changes as above. * providers/pop3/camel-pop3-store.c: Same. * providers/smtp/camel-smtp-transport.c: Same. Other changes include making the code consistant with the other providers. * providers/nntp/camel-nntp-store.c: Same as pop/imap. svn path=/trunk/; revision=27398
* ** See bug #47821.Not Zed2004-09-241-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-09-13 Not Zed <NotZed@Ximian.com> ** See bug #47821. * camel-service.c: removed the old hostent based hostname interfaces. * camel-sasl-kerberos4.c (krb4_challenge): new hostname interfaces. * camel-sasl-gssapi.c (gssapi_challenge): new hostname interfaces. * camel-sasl-digest-md5.c (digest_md5_challenge): use new hostname interfaces. (generate_response): just take hostname directly, not hostent. * camel-mime-utils.c (camel_header_msgid_generate): use new hostname interfaces. * providers/smtp/camel-smtp-transport.c (connect_to_server): fixed to use new addrinfo apis. * providers/pop3/camel-pop3-store.c (connect_to_server): fixed to use new addrinfo apis. * camel-tcp-stream-ssl.c (stream_connect): try all addresses supplied. * camel-tcp-stream.c (camel_tcp_stream_get_remote_address) (camel_tcp_stream_get_local_address): return a sockaddr now, and also the address length. Fixed all implementations and callers. (camel_tcp_stream_connect): use addrinfo rather than hostent for host AND port info. Fixed all implementations and callers. svn path=/trunk/; revision=27352
* Merged notzed-eplugin-2-branch to head.Michael Zucci2004-09-201-1/+1
| | | | svn path=/trunk/; revision=27300
* ** See bug #64023.Not Zed2004-08-301-1/+4
| | | | | | | | | | | 2004-08-27 Not Zed <NotZed@Ximian.com> ** See bug #64023. * providers/nntp/camel-nntp-store.c (camel_nntp_try_authenticate): forget the password if it was wrong. svn path=/trunk/; revision=27071
* move the stream based checking into the loop, after we connect. Fixes aNot Zed2004-06-101-8/+8
| | | | | | | | | | 2004-06-10 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-store.c (camel_nntp_command): move the stream based checking into the loop, after we connect. Fixes a crash. svn path=/trunk/; revision=26272
* reset current folder. (connect_to_server): and here too just to make sure.Not Zed2004-06-031-1/+6
| | | | | | | | | | 2004-06-03 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-store.c (nntp_disconnect_online): reset current folder. (connect_to_server): and here too just to make sure. svn path=/trunk/; revision=26167
* disconnect if we get an io error or user cancellation.Not Zed2004-06-031-0/+1
| | | | | | | | | 2004-06-03 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-store.c (camel_nntp_command): disconnect if we get an io error or user cancellation. svn path=/trunk/; revision=26166
* only save the summary, don't update from server, thats what refresh infoNot Zed2004-06-031-154/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-06-03 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-folder.c (nntp_folder_sync_online): only save the summary, don't update from server, thats what refresh info does. (nntp_folder_download_message): fix exception handling. (nntp_folder_cache_message): same. (nntp_folder_get_message): ditto, plus major cleanup. (nntp_folder_download_message): take combined uid so it can cache and lookup properly. duh. * providers/nntp/camel-nntp-store.c (nntp_store_get_subscribed_folder_info): if not fast, then open the folder, and update it. Yeah i've given up trying to worry about performance vs usability. * providers/nntp/camel-nntp-summary.c (camel_nntp_summary_check): update the storesummary if we update the folder summary. Hmm, isn't duplicated data meant to be a bad thing? :P * providers/nntp/camel-nntp-store.c (camel_nntp_store_set_folder): removed, now handled by nntp_command. (nntp_connected): removed, now handled by nntp_command. * camel-string-utils.c (camel_tolower): added ascii to-lower function. (camel_toupper): and upper, for completeness. * camel-store-summary.c (CAMEL_STORE_SUMMARY_VERSION): bumped file version by 1. This is a mess, version 1 files treated the bitfield 'flags' with bit number values not bits. Messy. * providers/nntp/camel-nntp-store-summary.c (store_info_save): write last/first count. (CAMEL_NNTP_STORE_SUMMARY_VERSION): bump version to 1. (store_info_load): if we're loading >= version 1, then load last/first counts. * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info_all): pass the whole line to store_info_from_line, dont strip last/first info. (nntp_store_info_update): renamed from info_new_from_line. only add if not present. handle updates, try and handle unread counts and readonly status. 2004-06-02 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-store.c: setup xover once we've started. * providers/nntp/camel-nntp-summary.c: (xover_setup): moved to nntp store. * providers/nntp/camel-nntp-folder.c (folder_check) (folder_check_free, camel_nntp_folder_new): remove async summary stuff. * providers/nntp/camel-nntp-store.c (camel_nntp_command): take exception argument again, and folder argument. do retry logic and auth logic differently. (camel_nntp_raw_command): raw command interface, dont try reconnect or anything fancy. pass i/o errors straight out, etc. (camel_nntp_try_authenticate): change to return return codes & take exception. * providers/nntp/camel-nntp-summary.c (camel_nntp_summary_new): just take path argument. (camel_nntp_summary_check): take a store, and a folder name. (add_range_head, add_range_xover): remove the time based update events, they never had any effect anyway. Take store argument. (xover_setup): take store argument. * camel-folder-search.c (search_match_threads): remove debug. svn path=/trunk/; revision=26164
* removed.Not Zed2004-05-261-14/+9
| | | | | | | | | | | | 2004-05-25 Not Zed <NotZed@Ximian.com> * camel-store.c (camel_folder_info_build_path): removed. * camel-store.h (CamelFolderInfo): removed 'path', fixed all callers. (struct _CamelStore): removed 'dir_sep' fixed all uses. svn path=/trunk/; revision=26089
* added a 'domain' argument, and rearragned arguments to be prettier andNot Zed2004-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-05-21 Not Zed <NotZed@Ximian.com> * camel-session.c (camel_session_get_password): added a 'domain' argument, and rearragned arguments to be prettier and more consistent. Fixed all callers. (camel_session_forget_password): added a domain argument. Fixed all callers. ** See #58376. * camel-folder.c (set_message_flags): if system flags change, then don't trigger a folder changed event. * camel-folder-summary.h (CAMEL_MESSAGE_SYSTEM_MASK): added this to indicate which flags are internal/apps not interested in. * camel-folder.c (filter_free): rearrange and use some helpers. (folder_changed): if we're frozen, dont go firing off threads to do any processing on each change, wait until we're called unfrozen. Slight code rearragnement. (filter_filter): add progress to junk learn/unlearn, and separate them. svn path=/trunk/; revision=26029
* decode newsgroups header into a list of newsgroups.Not Zed2004-03-221-0/+5
| | | | | | | | | | | | | | | | | | 2004-03-22 Not Zed <NotZed@Ximian.com> * camel-mime-utils.c (camel_header_newsgroups_decode) (camel_header_newsgroups_free): decode newsgroups header into a list of newsgroups. ** See #55887. * providers/nntp/camel-nntp-summary.c (camel_nntp_summary_check): NOOP if we're offline. * providers/nntp/camel-nntp-store.c (nntp_connected): spit a warning if we try to do stuff whilst offline, rather than crash. svn path=/trunk/; revision=25142
* turn off NOINFERIORS always, translate to nochildren.Not Zed2004-03-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-03-11 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_one_folder_offline): (parse_list_response_as_folder_info): turn off NOINFERIORS always, translate to nochildren. 2004-03-08 Not Zed <NotZed@Ximian.com> * camel-vee-store.c (vee_get_folder_info): setup virtual/system flags as appropriate. (change_folder): setup flags properly. * providers/nntp/camel-nntp-store.c (nntp_store_get_subscribed_folder_info): mark all folders as system folders. * providers/local/camel-mh-store.c (fill_fi): add this to setup folderinfo. (folder_info_new): call fill_fi to fill unread/total. (recursive_scan, folders_scan): ahh yeah, so wtf was i thinking, store->flags != get_folder_info flags!!!! * providers/local/camel-maildir-store.c (camel_folder_info_new): remove unread count arg & setup total. (fill_fi): setup total field. (scan_dir): remove the code that checked the directory directly - use fill_fi instead. It will more accurately reflect what you get when you visit the folder. (camel_folder_info_new): mark "." as a system folder. (scan_dir): try to setup children/no children flags properly. * providers/local/camel-mbox-store.c (fill_fi): setup total field. (scan_dir): init total. (get_folder_info): " 2004-03-05 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): mark INBOX as a system folder. Can't be renamed/deleted. (fill_fi): setup total field. (get_folder_counts): ditto. * camel-store.c (add_special_info): set the system folder flag. * camel-store.h: time to fix up the camelfolderinfo mess. fix some member names, and add some type fields. Fixed all uses. svn path=/trunk/; revision=25019
* ** See bug #53269.Not Zed2004-01-291-4/+3
| | | | | | | | | | | | 2004-01-29 Not Zed <NotZed@Ximian.com> ** See bug #53269. * providers/nntp/camel-nntp-store.c (nntp_store_get_cached_folder_info): don't dereference last before checking if its null. svn path=/trunk/; revision=24514
* ** See bug #52817.Not Zed2004-01-201-1/+1
| | | | | | | | | | | | 2004-01-20 Not Zed <NotZed@Ximian.com> ** See bug #52817. * camel-session.c (camel_session_get_password): merged reprompt and secret into a flags field, and add more options. Fixed all callers. svn path=/trunk/; revision=24323
* now based on discofolder, cache_message and append_message implemented,Meilof Veeningen2004-01-131-136/+704
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-01-12 Meilof Veeningen <meilof@wanadoo.nl> * providers/nntp/camel-nntp-folder.[ch]: now based on discofolder, cache_message and append_message implemented, only retrieve messages when we are subscribed, some stubs * providers/nntp/camel-nntp-provider.c: newsgroup name display settings, password authentication, fix for check_equal where the protocols wouldn't be checked * providers/nntp/camel-nntp-store.[ch]: base on discostore with online/offline support, subscriptions, downloading changed parts of the newsgroup list, some stubs, authentication, automatic reconnect * providers/nntp/camel-nntp-store-summary.[ch]: NNTP store summary based on IMAP code * providers/nntp/camel-nntp-summary.c: save summary after xover * providers/nntp/camel-nntp-grouplist.h: added CamelNNTPGroupList structs * providers/nntp/Makefile.am: added store summary svn path=/trunk/; revision=24178
* Fix the code that creates a new ssl stream to pass the correct argumentsJeffrey Stedfast2003-09-221-2/+2
| | | | | | | | | | | | | | | | | | 2003-09-22 Jeffrey Stedfast <fejj@ximian.com> * providers/nntp/camel-nntp-store.c (connect_to_server): Fix the code that creates a new ssl stream to pass the correct arguments and the proper flags. * providers/imapp/camel-imapp-folder.c (imap_sync): Cast the CamelFolder to a CamelIMAPPFolder to hush some compiler warnings. * camel-mime-utils.h: Define a struct _CamelContentDisposition (allows the imapp code to compile) * providers/imapp/camel-imapp-driver.c: #include <string.h> svn path=/trunk/; revision=22635
* Get rid of the #ifdef ENABLE_THREADS since we no longer plan toJeffrey Stedfast2003-07-101-12/+8
| | | | | | | | | | | | | | | | | 2003-07-09 Jeffrey Stedfast <fejj@ximian.com> Get rid of the #ifdef ENABLE_THREADS since we no longer plan to support/maintain this. * providers/nntp/camel-nntp-store.c: Here. * providers/nntp/camel-nntp-newsrc.c: And here. * providers/nntp/camel-nntp-folder.c: Same. * providers/local/camel-local-folder.c: And here. svn path=/trunk/; revision=21778
* On connection failure, unref the tcp stream.Jeffrey Stedfast2002-05-281-62/+180
| | | | | | | | | | | | | | | | | | | | | | | 2002-05-27 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server): On connection failure, unref the tcp stream. * providers/pop3/camel-pop3-store.c (connect_to_server): On connection failure, unref the tcp stream. * providers/imap/camel-imap-store.c (connect_to_server): On connection failure, unref the tcp stream. * providers/nntp/camel-nntp-store.c (nntp_store_query_auth_types): Our parent class is no longer CamelRemoteStore. (nntp_store_init): Same. (camel_nntp_store_get_type): Here too. (nntp_connect): Rewritten to try to connect via SSL. Also remove code using CamelRemoteStore. (camel_nntp_command): Don't call camel_remote_store_connected(). svn path=/trunk/; revision=17022
* Added #include <sys/types.h> for dirent.h which needs it on MacOS X.Jeffrey Stedfast2002-04-151-0/+4
| | | | | | | | | | | | | | | | | | | 2002-04-14 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-spoold-store.c: Added #include <sys/types.h> for dirent.h which needs it on MacOS X. * providers/local/camel-maildir-store.c: Same. * providers/nntp/camel-nntp-store.c: Same. * providers/imap/camel-imap-message-cache.c: Same. * camel-provider.c: Same. * camel-data-cache.c: Same. svn path=/trunk/; revision=16466
* Completely new implementation of NNTP.Not Zed2001-11-301-648/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-11-30 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-*.c: Completely new implementation of NNTP. Doesn't support subscriptions yet (lists all folders), but should be more reliable (faster?), and has an integrated cache. * camel-exception.c (camel_exception_new): Use e_memchunks for exception blocks. (camel_exception_free): Same. * camel-data-cache.[ch]: New object for managing on-disk caches of anything that can be stored in a camel-stream. * camel-file-utils.c (camel_file_util_mkdir): New function, just a nicer place to put this (than camel-store), should be removed from camel-store. (camel_file_util_safe_filename): New function to url-encode a filename. * camel-mime-parser.c (drop_states): New func to drop the parser state to initial state. (folder_scan_init_with_fd): (folder_scan_init_with_stream): Call above func to reset state if the stream is changed on us so we can change streams to reuse a parser object. svn path=/trunk/; revision=14822
* If the uid doesn't have a ',' in it, fail to crash.Not Zed2001-11-281-1/+20
| | | | | | | | | | | | | | | | | | | | 2001-11-25 Not Zed <NotZed@Ximian.com> * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): If the uid doesn't have a ',' in it, fail to crash. * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_article_is_read): check group != NULL before scanning. (camel_nntp_newsrc_get_highest_article_read): " (camel_nntp_newsrc_get_num_articles_read): " (camel_nntp_newsrc_mark_range_read): " * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_overview_fmt): IF we dont have nntp_list_follows, dont try and get a list response. (nntp_store_get_folder_info): Set path part of folderinfo. svn path=/trunk/; revision=14799
* Fixing the license text.Ettore Perazzoli2001-10-281-1/+0
| | | | svn path=/trunk/; revision=14212
* Update the licensing information to require version 2 of the GPLEttore Perazzoli2001-10-271-2/+2
| | | | | | (instead of version 2 or any later version). svn path=/trunk/; revision=14190
* Add locking to camel_nntp_get_grouplist_from_server().Joe Shaw2001-07-061-1/+16
| | | | | | | | | | | | | | | | | | | | | | 2001-07-06 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-grouplist.c: Add locking to camel_nntp_get_grouplist_from_server(). * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_EXTENSIONS_SUPPORTED (202). * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions): Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes out of this, but that's what was already there...) Also, put some locking around it. (finalize): e_mutex_destroy() the command lock (camel_nntp_store_init): e_mutex_new() the command lock. * providers/nntp/camel-nntp-store.h: Add locking macros. svn path=/trunk/; revision=10838
* Added NNTP_NO_PERMISSION (502) to the list of response codes.Joe Shaw2001-07-041-1/+5
| | | | | | | | | | | | | 2001-07-03 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION (502) to the list of response codes. * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying to reconnect, get extensions, etc. Just give up and return FALSE. svn path=/trunk/; revision=10769
* Implemented nntp_folder_search_by_expression and nntp_folder_search_free.Sam Creasey2001-07-031-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-02 Sam Creasey <sammy@oh.verio.com> * providers/nntp/camel-nntp-folder.c: Implemented nntp_folder_search_by_expression and nntp_folder_search_free. Basic search functionality e.g. unread marking now works for NNTP folders. * camel_filter_search.c (get_size): Added get-size sexp directive to get the size of a message for filters. * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): Always check with the NNTP server after summary load -- this function now always expires old summary entries and syncs with the news server. * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers): Only fetch headers for articles not already logged in the summary file. * providers/nntp/camel-nntp-grouplist.c (camel_nntp_get_grouplist_from_*): change from g_list_append() to g_list_prepend() + g_list_reverse. Traversing 40,000 element linked lists sucks. * providers/nntp/camel-nntp-store.c (camel_nntp_command): Should the NNTP connection die with CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry attempt. Timing out the NNTP link is less painful this way. svn path=/trunk/; revision=10716
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-231-1/+1
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* Remove the EXTRA_GNOME_CFLAGS include.Jeffrey Stedfast2001-04-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include. * camel-store.c (camel_mkdir_hier): Convenience function that it seems a number of camel-store implementations used gal for. * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * providers/nntp/camel-imap-store.c: Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * camel-session.c (camel_session_get_storage_path): Don't depend on e_mkdir_heir() anymore, use the CamelStore version. * camel-folder-search.h: Removed gal dependency, why was this even there in the first place? * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h here, so remove it. * string-utils.c (strstrcase): New function, well more like old function brought back to life so we don't have to depend on gal. * providers/imap/camel-imap-store.c (imap_store_setup_online): Use strstrcase rather than e_strstrcase so we don't depend on gal. (get_unread_online): Same here. * providers/smtp/camel-smtp-transport.c (smtp_helo): Use strstrcase. svn path=/trunk/; revision=9383
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-301-1/+1
| | | | svn path=/trunk/; revision=9024
* Rewrite a bunch. Replace the existing folder cache stuff with much simplerDan Winship2001-02-101-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Updated.Jeffrey Stedfast2001-02-061-2/+2
| | | | | | | | | | | | | | | | | | | 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
* Mostly IMAP changes. Use the NAMESPACE extension (whereDan Winship2001-01-101-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | available). Deal with servers that don't return LIST flags in response to LSUB (like UW) to get rid of the "not a selectable folder" error messages in the UI. Take advantage of the \Marked and \Unmarked flags to try to speed up the folder scan by not doing STATUS on unmarked folders. Some further tweaks on the shape of the resulting folder tree in various situations... * camel-store.h: Remove the (read) message_count, since nothing uses it, and we can speed up IMAP a bit this way. * camel-store.c (camel_folder_info_build): Redo this a bit to make it more useful for IMAP since that's the only thing that uses it. * camel-remote-store.c (camel_remote_store_connected): Public function to check if the store is connected, and try to connect it if it's not. (remote_send_string, remote_send_stream, remote_recv_line): Use that. * providers/imap/camel-imap-store.c (camel_imap_store_finalize): fix up for changes. (camel_imap_store_init): Initialize subscribed_folders to NULL rather than an empty hash table. (imap_connect): Get the list of subscribed folders here. If the server doesn't claim that any of them are either Marked or Unmarked, then assume that it doesn't do that for LSUB and remember that for later. If the server supports the NAMESPACE extension and the user didn't specify a namespace, use the server-provided one. (imap_disconnect): Free the list of subscribed folders, and the namespace. (get_folder): check camel_remote_store_connected (get_folder_info): check camel_remote_store_connected. Add a bunch of new cleverness. If we learned that the server doesn't do LSUB usefully, do a bunch of LISTs by hand. Then, if we're getting unread counts, only do it for folders that weren't listed as Unmarked. Also, deal with namespaces that end with the separator character, and update for changes to camel_folder_info_build. (folder_subscribed): Add a g_return_val_if_fail. (subscribe_folder, unsubscribe_folder): check camel_remote_store_connected. * providers/nntp/camel-nntp-store.c (build_folder_info, build_folder_info_from_grouplist, nntp_store_get_folder_info): Don't fill in message_count since it doesn't exist any more. svn path=/trunk/; revision=7343
* Kill off a long-hated Camel kludge: "empty" URLs andDan Winship2001-01-101-12/+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
* Add an "url_flags" field to CamelProvider. Move the CAMEL_SERVICE_URL_*Dan Winship2000-11-041-5/+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-3/+4
| | | | | | | | | | | | | | | | | | * 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
* Add a "parent" field to CamelFolderInfo.Dan Winship2000-10-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | * camel-store.h: Add a "parent" field to CamelFolderInfo. * camel-store.c (camel_folder_info_build): Deal with "parent" (camel_store_folder_subscribed, camel_store_subscribe_folder, camel_store_unsubscribe_folder): Add g_return_if_fails checking that the folder supports subscriptions. * providers/imap/camel-imap-store.c (folder_subscribed, subscribe_folder, unsubscribe_folder): Remove "+ 1"s since the mail subscribe UI won't prepend / to the folder names now. (get_folder_info): Clear the "parent" field of the folderinfos when removing an empty top level. * providers/nntp/camel-nntp-store.c (nntp_store_folder_subscribed, nntp_store_subscribe_folder, nntp_store_unsubscribe_folder): Remove "+ 1"s since the mail subscribe UI won't prepend / to the folder names now. svn path=/trunk/; revision=6167
* lots of i18n fixesDan Winship2000-10-241-7/+7
| | | | svn path=/trunk/; revision=6143
* add function to build a tree from the nntp group names (using '.' as aChris Toshok2000-10-211-41/+138
| | | | | | | | | | | | | | | 2000-10-20 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-store.c (build_folder_info): add function to build a tree from the nntp group names (using '.' as a heirarchy separator.) #ifdefed INFO_AS_TREE only. (build_folder_info_from_grouplist): if INFO_AS_TREE is selected, call build_folder_info instead of appending a new CamelFolderInfo to our list. (ensure_news_dir_exists): use e_mkdir_hier instead of failing if a parent directory (~/evolution/news generally) isn't there. svn path=/trunk/; revision=6089
* No, we must not encode the headers here. These interfaces ARE rawNot Zed2000-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 the leading '/'. (nntp_store_subscribe_folder): same.Chris Toshok2000-10-121-3/+3
| | | | | | | | | | 2000-10-11 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-store.c (nntp_store_unsubscribe_folder): remove the leading '/'. (nntp_store_subscribe_folder): same. (nntp_store_folder_subscribed): same. svn path=/trunk/; revision=5868
* fill in message_count and unread_message_count properly.Chris Toshok2000-10-111-2/+4
| | | | | | | | | | | | | | | | | | | 2000-10-10 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-store.c (build_folder_info_from_grouplist): fill in message_count and unread_message_count properly. * providers/nntp/camel-nntp-newsrc.h: reformat. * providers/nntp/camel-nntp-grouplist.c (camel_nntp_get_grouplist_from_file): remove spew. * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_group_get_num_articles_read): new function. (camel_nntp_newsrc_group_get_highest_article_read): robustification. svn path=/trunk/; revision=5832
* write out the newsrc. (nntp_store_get_name): if @brief, just return host.Chris Toshok2000-10-101-11/+8
| | | | | | | | | | | | | 2000-10-09 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-store.c (finalize): write out the newsrc. (nntp_store_get_name): if @brief, just return host. * providers/nntp/camel-nntp-newsrc.c: robustification and bug fixes. svn path=/trunk/; revision=5808
* add camel-nntp-grouplist.h (libcamelnntp_la_SOURCES): addChris Toshok2000-10-061-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-10-06 Chris Toshok <toshok@helixcode.com> * providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): add camel-nntp-grouplist.h (libcamelnntp_la_SOURCES): add camel-nntp-grouplist.c * providers/nntp/camel-nntp-provider.c: add our own hash functions for nntp urls. * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_group_is_subscribed): new function. (camel_nntp_newsrc_subscribe_group): new function. (camel_nntp_newsrc_unsubscribe_group): new function. * providers/nntp/camel-nntp-newsrc.h: add prototypes for _group_is_subscribed, _subscribe_group, and _unsubscribe_group. * providers/nntp/camel-nntp-store.c (build_folder_info_from_grouplist): new function. (nntp_store_get_folder_info): add subscribed_only_parameter. if it's FALSE, load the grouplist and call build_folder_info_from_grouplist. (nntp_store_folder_subscribed): implement. (nntp_store_subscribe_folder): implement. (nntp_store_unsubscribe_folder): implement. (camel_nntp_store_init): add CAMEL_STORE_SUBSCRIPTIONS to the store's flags. * providers/mh/camel-mh-store.c (get_folder_info): add subscribed_only parameter. * providers/mbox/camel-mbox-store.c (get_folder_info): add subscribed_only parameter. * providers/imap/camel-imap-store.c (get_folder_info): add subscribed_only parameter. * camel-store.c (camel_store_supports_subscriptions): new function. (camel_store_folder_subscribed): new function. (camel_store_subscribe_folder): new function. (camel_store_unsubscribe_folder): new function. * camel-store.h: add prototypes and virtual functions for the subscribe implementation. also, add a subscribed_only argument to camel_store_get_folder_info. svn path=/trunk/; revision=5760
* revert to old method (only use XOVER if OVER is supported.)Chris Toshok2000-10-051-9/+19
| | | | | | | | | | | | | | 2000-10-04 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers): revert to old method (only use XOVER if OVER is supported.) * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_overview_fmt): handle the case where the OVER extension isn't listed but LIST OVERVIEW.FMT works (again, INN 2.2). enable the OVER extension in this case. svn path=/trunk/; revision=5739
* use "nntp:" instead of "news:" since "news:" urls aren't supposed to haveChris Toshok2000-10-051-2/+7
| | | | | | | | | | | 2000-10-04 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-store.c (nntp_store_get_folder_info): use "nntp:" instead of "news:" since "news:" urls aren't supposed to have host/user/port info in them. also, if there's a user defined in the url, put it in the urls for our folders. svn path=/trunk/; revision=5717
* borrow some code from the imap provider to query the user for theirChris Toshok2000-10-051-25/+72
| | | | | | | | | | | | | | | | | | 2000-10-04 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-auth.c (camel_nntp_auth_authenticate): borrow some code from the imap provider to query the user for their password, and pass the user/passwd to nntp. be extra paranoid and zero out the password before freeing it. * providers/nntp/camel-nntp-store.c (camel_nntp_store_init): add ALLOW_USER/ALLOW_PASSWORD/ALLOW_AUTH to the url flags. (nntp_store_query_auth_types_generic): return our list of auth_types. (nntp_store_query_auth_types_connected): broken, return same as in query_auth_types_generic. svn path=/trunk/; revision=5716
* Remove default_ports.Dan Winship2000-10-031-0/+2
| | | | | | | | | | | | | | * 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
* Remove camel_folder_{get,free}_subfolder_info, as we want to be able toDan Winship2000-10-031-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-folder.[ch]: Remove camel_folder_{get,free}_subfolder_info, as we want to be able to scan the whole subfolder tree without having to open any folders, so this needs to be in CamelStore. Remove can_hold_folders and can_hold_messages flags; things that don't hold messages are no longer considered CamelFolders. * camel-folder-summary.[ch]: Remove CamelFolderInfo stuff. * camel-store.[ch]: Add camel_store_{get,free}_folder_info, as well as camel_store_free_folder_info_full and ..._nop for default implementations, and camel_folder_info_free and camel_folder_info_build as convenience functions. Turn CamelFolderInfo into a tree structure and also add an "url" member. * providers/*/camel-*-folder.c: Remove subfolder_info and can_hold stuff. * providers/*/camel-*-store.c: Add folder_info stuff. * providers/imap/camel-imap-folder.c (imap_summary_free): Free the summary elements with camel_message_info_free, not camel_folder_info_free. Oops. * providers/imap/camel-imap-utils.c: const poison svn path=/trunk/; revision=5663
* Removed (camel_folder_init, camel_folder_construct): New object initDan Winship2000-09-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-folder.c: (init): Removed (camel_folder_init, camel_folder_construct): New object init function and public object constructor to replace the old init method in a more Gtk-like fashion. (get_parent_folder, camel_folder_get_parent_folder): Removed. No CamelFolder subclass was ever setting the parent_folder member, no code has ever needed to look at it, and fixing it would actually be pretty hard. (get_subfolder_info, camel_folder_get_subfolder_info): Renamed from ..._names. Deals in CamelFolderInfo now. (free_subfolder_info, camel_folder_free_subfolder_info): Likewise. (get_subfolder, camel_folder_get_subfolder): Removed. CamelFolderInfo contains the subfolder's full name, so this is unnecessary now, and removing it lets us get rid of the CamelFolder separator member, which is needed for the default implementation of this function, but not otherwise needed for most providers. Also, lots of code style fixes. * providers/*: Update CamelFolder subclasses for changes, although none of them fill in the message counts in the CamelFolderInfo yet. svn path=/trunk/; revision=5503
* care about response code. (get_HEAD_headers): same.Chris Toshok2000-09-061-80/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-09-05 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-utils.c (get_OVER_headers): care about response code. (get_HEAD_headers): same. (camel_nntp_get_headers): same. * providers/nntp/camel-nntp-store.h: get rid of CAMEL_NNTP_OK/ERR/FAIL. * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions): take CamelException arg and pass along to camel_nntp_command. (camel_nntp_store_get_overview_fmt): same. (nntp_store_connect): convert to using constants in camel-nntp-resp-codes.h (nntp_store_get_folder): make use of camel_nntp_folder_new. (camel_nntp_command_send_recv): new function to deal with auth challenge. (camel_nntp_command): split out most of this function into camel_nntp_command_send_recv. also, return the actual response code instead of CAMEL_NNTP_OK/ERR/FAIL. * providers/nntp/camel-nntp-resp-codes.h: new file. * providers/nntp/camel-nntp-folder.h: prototype for camel_nntp_folder_new. * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): new convenience function. (nntp_folder_get_message): care more about the actual response code. * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add camel-nntp-auth.c. (libcamelnntpinclude_HEADERS): add camel-nntp-auth.h. * providers/nntp/camel-nntp-auth.h: new file. * providers/nntp/camel-nntp-auth.c: new file. svn path=/trunk/; revision=5212
* Cleanup of lots of exception handling ; bugfixesPeter Williams2000-09-061-0/+6
| | | | svn path=/trunk/; revision=5202
* remove get_folder_name. (nntp_store_get_folder_name): remove.Chris Toshok2000-09-011-8/+0
| | | | | | | | | | 2000-08-31 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-store.c (camel_nntp_store_class_init): remove get_folder_name. (nntp_store_get_folder_name): remove. svn path=/trunk/; revision=5158
* use camel_remote_store_recv_line.Chris Toshok2000-09-011-175/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-31 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-utils.c (get_OVER_headers): use camel_remote_store_recv_line. * providers/nntp/camel-nntp-folder.c (nntp_folder_get_message): use camel_remote_store_recv_line to build message. also, free our buffer so we don't leak like mad. * providers/nntp/camel-nntp-store.c: (camel_nntp_store_get_additional_data) remove. (camel_nntp_store_get_extensions): use camel_remote_store_recv_line. (camel_nntp_store_get_overview_fmt): same. also, don't rely on _get_additional_data anymore since it's easier to parse without. (camel_nntp_command): use camel_remote_store_send_string and camel_remote_store_recv_line. * providers/nntp/camel-nntp-store.h: CamelRemoteStore is the parent class now. remove istream/ostream since CamelRemoteStore takes care of that for us. also remove the prototype for camel_nntp_store_get_additional_data. * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_write): make sure to clear dirty bit. (camel_nntp_newsrc_read_for_server): don't worry about continually trying to open the file - if it fails we just return an unpopulated .newsrc file. svn path=/trunk/; revision=5153
* make this a bit more robust. try to create an empty .newsrc file for theChris Toshok2000-09-011-11/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-08-31 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-newsrc.c (camel_nntp_newsrc_read_for_server): make this a bit more robust. try to create an empty .newsrc file for the server if we can't open it for reading. also, don't allocate everything until we've opened the file. * providers/nntp/camel-nntp-utils.c (get_OVER_headers): make use of our overview field indices. (camel_nntp_get_headers): only call get_OVER_headers if the extension is present. warn if it's not - since get_HEAD_headers needs work before it works. * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions): new function - query the server for it's extensions. (camel_nntp_store_get_overview_fmt): new function - query the server for the overview format and build our table of the indices we care about. support the "full" suffix on fields. (nntp_store_connect): call camel_nntp_store_get_extensions and camel_nntp_store_get_overview_fmt. * providers/nntp/camel-nntp-store.h: add codes for extensions found on news.mozilla.org. only one that we care about is OVER. also, add CamelNNTPOverField and an enum of the overview fields that we care about. svn path=/trunk/; revision=5152
* CamelRemoteStore: a new generic store for stores that connect to servers. ↵Peter Williams2000-08-301-9/+25
| | | | | | Prepare for the ability to cancel operations (much better exception handling). Clean up IMAP like nobody's business svn path=/trunk/; revision=5103
* Automatically connect services when given a valid URL (should hopefully ↵Peter Williams2000-08-231-7/+10
| | | | | | disconnect, too); remove the old movemail folder correctly. svn path=/trunk/; revision=4965
* Make sure respbuffer is not null before manipulating it. If it is null,JP Rosevear2000-08-221-3/+10
| | | | | | | | | | | 2000-08-21 JP Rosevear <jpr@helixcode.com> * providers/nntp/camel-nntp-store.c (camel_nntp_command): Make sure respbuffer is not null before manipulating it. If it is null, return CAMEL_NNTP_FAIL and a decent error message. svn path=/trunk/; revision=4906
* use g_get_home_dir, since evolution_dir isn't available in the providers.Chris Toshok2000-08-121-3/+2
| | | | | | | | | | 2000-08-11 Chris Toshok <toshok@helixcode.com> * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since evolution_dir isn't available in the providers. svn path=/trunk/; revision=4754
* Merge with camel-async.Peter Williams2000-08-111-28/+18
| | | | svn path=/trunk/; revision=4687
* don't add test-newsrc to the build since it needs libcamel (which isn'tChris Toshok2000-07-131-119/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-07-12 Chris Toshok <toshok@helixcode.com> * providers/nntp/Makefile.am: don't add test-newsrc to the build since it needs libcamel (which isn't built at the time test-newsrc needs linking.) * providers/nntp/camel-nntp-utils.c (get_HEAD_headers): fill in MessageInfo->message_id. (get_XOVER_headers): same. * providers/nntp/camel-nntp-folder.c (nntp_folder_init): move summary loading here. (nntp_folder_sync): summary/newsrc changes should be stored here. put a comment to that effect. (nntp_folder_set_message_flags): don't save the newsrc here. (nntp_folder_get_uids): use g_ptr_array_index instead of the cast/addition. (nntp_folder_get_summary): no need to check if we should generate the summary here. already done. (nntp_folder_get_message_info): implement. * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_toplevel_dir): use evolution_dir instead of computing it ourselves. (nntp_store_disconnect): call camel_nntp_newsrc_write. (ensure_news_dir_exists): new function to create the news/<news server> subdir. (camel_nntp_store_class_init): hook up connect/disconnect and finalize. (nntp_store_connect): if ensure_news_dir_exists fails throw an exception. svn path=/trunk/; revision=4113
* Update to reflect past changes in the Camel API. Use gtk macro castsJeffrey Stedfast2000-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2000-07-08 Jeffrey Stedfast <fejj@helixcode.com> * providers/nntp/camel-nntp-folder.c: * providers/nntp/camel-nntp-utils.c: * providers/nntp/camel-nntp-store.c: Update to reflect past changes in the Camel API. Use gtk macro casts wherever possible and use glib's memory functions instead of standard c's (since they are not compatable) * providers/smtp/camel-smtp-transport.c: * providers/imap/camel-imap-store.c: Wrap debug print statements in a macro * providers/imap/camel-imap-stream.c (stream_read): Make sure that we get up to and including the last \n of the mime part. * providers/imap/camel-imap-folder.c (imap_get_message): Make sure that we get up to and including the last \n of the mime part. Wrap debug print statements in a macro. svn path=/trunk/; revision=3984
* New method, to return an end-user-friendly name corresponding to aDan Winship2000-07-021-1/+10
| | | | | | | | | | | | | | | * 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
* ignore test-newsrcChris Toshok2000-06-231-45/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-06-22 Chris Toshok <toshok@helixcode.com> * providers/nntp/.cvsignore: ignore test-newsrc * providers/nntp/camel-nntp-store.c, providers/nntp/camel-nntp-store.h, providers/nntp/camel-nntp-folder.c, providers/nntp/camel-nntp-folder.h, providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a state where it builds and is usable with the current camel. there are still warts (semi-broken .newsrc file handling, and a lack of a subscribe ui -- in fact no way to add a new server, really), but it'll display news messages. * providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add camel-nntp-newsrc.c (libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h also, add test-newsrc stuff. * providers/nntp/test-newsrc.c: new file that tests the newsrc stuff by parsing and regurgitating a .newsrc file for a particular server. * providers/nntp/camel-nntp-newsrc.c, providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files. svn path=/trunk/; revision=3702
* get things working with new camel summary stuff.Chris Toshok2000-05-161-12/+25
| | | | | | | | | | | | | | | | * providers/nntp/camel-nntp-folder.c: * providers/nntp/camel-nntp-folder.h: * providers/nntp/camel-nntp-provider.c: * providers/nntp/camel-nntp-store.c: * providers/nntp/camel-nntp-utils.c: * providers/nntp/camel-nntp-utils.h: get things working with new camel summary stuff. * providers/nntp/camel-nntp-summary.c: * providers/nntp/camel-nntp-summary.h: removed files since camel-folder-summary does all we need. svn path=/trunk/; revision=3090
* Make camel not leak like a sieve.Dan Winship2000-05-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* kill camel-logDan Winship2000-04-191-5/+0
| | | | svn path=/trunk/; revision=2487
* add XXX so i can find this hardcoded string later.Chris Toshok2000-04-151-0/+1
| | | | svn path=/trunk/; revision=2433
* okay. working now.Chris Toshok2000-04-151-0/+14
| | | | svn path=/trunk/; revision=2432
* initial import of nntp store.Chris Toshok2000-04-151-0/+466
svn path=/trunk/; revision=2430