aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-uid-cache.c
Commit message (Collapse)AuthorAgeFilesLines
* #include camel-file-utils.h for camel_read()Dan Winship2003-07-231-2/+0
| | | | | | | | | | | | | | * camel-block-file.c: #include camel-file-utils.h for camel_read() * camel-uid-cache.c (camel_uid_cache_save): Remove unused variable and label. * camel-url.c: #include camel-string-utils.h for camel_strdown * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Cast an (unsigned char *) to (char *) to fix a warning svn path=/trunk/; revision=21902
* Use camel_mkdir().Jeffrey Stedfast2003-07-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-07 Jeffrey Stedfast <fejj@ximian.com> * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): Use camel_mkdir(). * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Use camel_mkdir(). * camel-session.c (get_storage_path): Use camel_mkdir(). * camel-store.c (camel_mkdir_hier): Removed. * camel-data-cache.c (camel_data_cache_new): Updated to use camel_mkdir(). (data_cache_path): Same. * camel-file-utils.c (camel_mkdir): Renamed and documented. (camel_file_util_safe_filename): Documented. (camel_read): Moved here from camel-io.c (camel_write): Same. * camel-io.[c,h]: Removed. * camel-uid-cache.c (camel_uid_cache_new): Use the camel-file-utils.c version of mkdir. svn path=/trunk/; revision=21753
* some days you just wish you had that subatomic 100 megaton kill-o-zap bomb.Jeffrey Stedfast2003-06-121-52/+121
| | | | | | | | | | | | | | | | | | | | | | | | 2003-06-04 Jeffrey Stedfast <fejj@ximian.com> * camel-uid-cache.c (camel_uid_cache_new): Create the directory with mode 0777 and the cache file itself with mode 0666. Let the user's umask filter the permissions. Instead of saving the fd on the Cache object, instead save the filename. Use camel_read() instead of expecting read() to just always work without getting an EINTR/etc. (maybe_write_uid): Don't do anything if cache->fd == -1, this means an error has occured in a previous callback. Replace the 2 calls to write() with camel_write() and check their return values. If either of them fails, set cache->fd to -1 (GHashTable doesn't give us a way to abort foreach'ing thru the table). (camel_uid_cache_save): Save to a temp file instead of overwriting the original. Do proper error checking, etc. Also added some smarts about whether to try and overwrite the old cache even if we haven't successfully saved all the uids in the cache. (camel_uid_cache_destroy): Free the cache->filename, no longer need to close (cache->fd). svn path=/trunk/; revision=21416
* Use g_path_get_dirname since g_dirname has been deprecated.Jeffrey Stedfast2002-11-021-1/+1
| | | | | | | | | 2002-11-01 Jeffrey Stedfast <fejj@ximian.com> * camel-uid-cache.c (camel_uid_cache_new): Use g_path_get_dirname since g_dirname has been deprecated. svn path=/trunk/; revision=18497
* 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
* If CAMEL_DEBUG is defined, print some useful ref/unref info.Jeffrey Stedfast2001-10-171-1/+30
| | | | | | | | | | | | | | | | 2001-10-16 Jeffrey Stedfast <fejj@ximian.com> * camel-object.[c,h]: If CAMEL_DEBUG is defined, print some useful ref/unref info. * providers/imap/camel-imap-store.c (delete_folder): Fixed an assignment warning. * camel-uid-cache.c (camel_uid_cache_new): Make sure that the parent directory exists before trying to open the filename, if it doesn't, create it. svn path=/trunk/; revision=13707
* Removed charset/locale charset lookup and iconv_open/close functions,12001-10-121-2/+2
| | | | | | | | | 2001-10-11 <NotZed@Ximian.com> * camel-charset-map.[ch]: Removed charset/locale charset lookup and iconv_open/close functions, moved to gal. Fixed all callers. svn path=/trunk/; revision=13602
* We now use a structure as the bucket data rather than just a cache levelJeffrey Stedfast2001-07-131-20/+68
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-13 Jeffrey Stedfast <fejj@ximian.com> * camel-uid-cache.c (camel_uid_cache_new): We now use a structure as the bucket data rather than just a cache level so set the save state to TRUE. (maybe_write_uid): We only save the uid if the cache levels are the same *and* if the save state is TRUE. (free_uid): Free the state value. (camel_uid_cache_get_new_uids): New uids that get added to the cache start with a save state of FALSE. (camel_uid_cache_save_uid): Set the save state of the uid to TRUE. What should we do if the uid isn't already in the cache? Currently I make it add the uid, but maybe it shouldn't? * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update to reflect CamelFilterDriver API changes. * camel-filter-driver.c (camel_filter_driver_filter_folder): Take a cache argument so we can tell the cache whether or not the uid should be saved (meaning we have successfully filtered it). svn path=/trunk/; revision=11084
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-231-2/+2
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* Plug leaks.Dan Winship2001-04-141-2/+5
| | | | | | | | | | | | | | | | * camel-object.c (camel_object_hook_event): * camel-uid-cache.c (camel_uid_cache_get_new_uids): * camel-url.c (camel_url_new_with_base): Plug leaks. * camel-remote-store.c (camel_remote_store_init): Don't re-initialize the folders hash table. * providers/imap/camel-imap-store.c (imap_disconnect): Free authtypes since they'll be re-read on re-connect. (get_folder_info): Free folderinfos that we're discarding from the list. svn path=/trunk/; revision=9302
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-301-2/+5
| | | | svn path=/trunk/; revision=9024
* New code to keep an on-disk cache of what UIDs have been seen in a folder.Dan Winship2000-08-091-0/+186
* camel-uid-cache.c: New code to keep an on-disk cache of what UIDs have been seen in a folder. * camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE (you can work with mail directly without needing to copy it local). * providers/*/camel-*-provider.c: Add flags as needed: imap and mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is just SOURCE. * camel-mime-message.c (process_header): Add another subject g_strstrip that fejj's earlier commit missed. svn path=/trunk/; revision=4616