aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-store.h
Commit message (Collapse)AuthorAgeFilesLines
* Kill dead filesJP Rosevear2005-01-111-114/+0
| | | | svn path=/trunk/; revision=28342
* kill cast as lvalue warning.Not Zed2004-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* only save the summary, don't update from server, thats what refresh infoNot Zed2004-06-031-15/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fixed distcheckJeffrey Stedfast2004-01-131-2/+0
| | | | svn path=/trunk/; revision=24192
* now based on discofolder, cache_message and append_message implemented,Meilof Veeningen2004-01-131-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* On connection failure, unref the tcp stream.Jeffrey Stedfast2002-05-281-15/+19
| | | | | | | | | | | | | | | | | | | | | | | 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
* Completely new implementation of NNTP.Not Zed2001-11-301-59/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* 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
* change a bunch of IS_CAMEL_* macros to CAMEL_IS_*Dan Winship2000-12-141-1/+1
| | | | | | | * Namespace cleanup: change a bunch of IS_CAMEL_* macros to CAMEL_IS_* svn path=/trunk/; revision=6972
* add camel-nntp-grouplist.h (libcamelnntp_la_SOURCES): addChris Toshok2000-10-061-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* care about response code. (get_HEAD_headers): same.Chris Toshok2000-09-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* use camel_remote_store_recv_line.Chris Toshok2000-09-011-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge with camel-async.Peter Williams2000-08-111-6/+5
| | | | svn path=/trunk/; revision=4687
* ignore test-newsrcChris Toshok2000-06-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* initial import of nntp store.Chris Toshok2000-04-151-0/+85
svn path=/trunk/; revision=2430