aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/nntp/camel-nntp-store.h
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagrelease-0-2-91nobody2001-08-021-128/+0
| | | | | | 'release-0-2-91'. svn path=/tags/release-0-2-91/; revision=11578
* 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