aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@inria.fr>1999-04-18 18:44:38 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-04-18 18:44:38 +0800
commit0057293c1cb3f3d001ba3dd262ac3e715378452a (patch)
tree2f7899e813d6a8bf2237c18729889f45020e6632 /camel/camel-folder.c
parent8fcb90785fb673c5dc14c36b54af45502ae65b83 (diff)
downloadgsoc2013-evolution-0057293c1cb3f3d001ba3dd262ac3e715378452a.tar.gz
gsoc2013-evolution-0057293c1cb3f3d001ba3dd262ac3e715378452a.tar.zst
gsoc2013-evolution-0057293c1cb3f3d001ba3dd262ac3e715378452a.zip
some work log system for camel some utilities for GString objects
1999-04-18 bertrand <Bertrand.Guiheneuf@inria.fr> * camel/camel-folder.c: some work * camel/camel-log.c: log system for camel * camel/gstring-util.c: some utilities for GString objects Work on obmail translation. Bertrand svn path=/trunk/; revision=851
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c84
1 files changed, 82 insertions, 2 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index e7598b0d42..c1af6c7bbe 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -30,6 +30,11 @@ static void camel_folder_open(CamelFolder *folder);
static void camel_folder_close(CamelFolder *folder, gboolean expunge);
static void camel_folder_set_name(CamelFolder *folder, GString *name_string);
static GString *camel_folder_get_name(CamelFolder *folder);
+static gboolean camel_folder_can_hold_folders(CamelFolder *folder);
+static gboolean camel_folder_can_hold_messages(CamelFolder *folder);
+static gboolean camel_folder_exists(CamelFolder *folder);
+static gboolean camel_folder_is_open(CamelFolder *folder);
+static CamelFolder *camel_folder_get_folder(CamelFolder *folder, GString *folderName);
static void
camel_folder_class_init (CamelFolderClass *camel_folder_class)
@@ -41,7 +46,11 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class)
camel_folder_class->close = camel_folder_close;
camel_folder_class->set_name = camel_folder_set_name;
camel_folder_class->get_name = camel_folder_get_name;
-
+ camel_folder_class->can_hold_folders = camel_folder_can_hold_folders;
+ camel_folder_class->can_hold_messages = camel_folder_can_hold_messages;
+ camel_folder_class->exists = camel_folder_exists;
+ camel_folder_class->is_open = camel_folder_is_open;
+ camel_folder_class->get_folder = camel_folder_get_folder;
/* virtual method overload */
}
@@ -125,7 +134,7 @@ camel_folder_set_name(CamelFolder *folder, GString *name_string)
/**
- * getName : get the (short) name of the folder
+ * camel_folder_get_name : get the (short) name of the folder
*
* get the name of the folder. The fully qualified name
* can be obtained with the get_full_ame method (not implemented)
@@ -138,3 +147,74 @@ camel_folder_get_name(CamelFolder *folder)
{
return folder->name;
}
+
+
+/**
+ * camel_folder_can_hold_folders : tests if the folder can contain other folders
+ *
+ **/
+static gboolean
+camel_folder_can_hold_folders(CamelFolder *folder)
+{
+ return folder->can_hold_folders;
+}
+
+
+
+/**
+ * camel_folder_can_hold_messages : tests if the folder can contain messages
+ *
+ **/
+static gboolean
+camel_folder_can_hold_messages(CamelFolder *folder)
+{
+ return folder->can_hold_messages;
+}
+
+
+
+/**
+ * camel_folder_exists : tests if the folder object exists on the store.
+ *
+ **/
+static gboolean
+camel_folder_exists(CamelFolder *folder)
+{
+ return folder->exists_on_store;
+}
+
+
+
+/**
+ * camel_folder_is_open : test if the folder is open
+ *
+ **/
+static gboolean
+camel_folder_is_open(CamelFolder *folder)
+{
+ return (folder->open_state==FOLDER_OPEN);
+}
+
+
+
+
+/**
+ * camel_folder_get_folder: return the (sub)folder object that
+ * is specified.
+ *
+ * This method returns a folder objects. This folder
+ * is necessarily a subfolder of the current folder.
+ * It is an error to ask a folder begining with the
+ * folder separator character.
+ *
+ * @folderName: subfolder path. NULL if the subfolder object
+ * could not be created
+ **/
+static CamelFolder *
+camel_folder_get_folder(CamelFolder *folder, GString *folderName)
+{
+ g_warning("getFolder called on the abstract CamelFolder class\n");
+ return NULL;
+}
+
+
10-202-15/+23 * Fixes a deadlock. camel-vee-folder.c: (folder_changed_change): Ok, so dontMichael Zucci2001-10-202-2/+4 * Typo, srlen aint right.Michael Zucci2001-10-191-1/+1 * camel-vee-folder.c: (folder_changed_change_uid): Use alloca for vuid, andMichael Zucci2001-10-192-35/+94 * Lock the right lock for unmatched subfolder list stuff. If the sub folder92001-10-193-16/+110 * If a charset isn't specified or claims to be utf-8, check the validity ofJeffrey Stedfast2001-10-192-2/+37 * Added CAMEL_CFLAGS so we get the right iconv stuff, patch from Yanko82001-10-196-0/+11 * Make sure the cancel_fd isn't -1.Jeffrey Stedfast2001-10-192-1/+6 * Flush the stream here, not sure it really matters but it might (hopefully)Jeffrey Stedfast2001-10-192-0/+5 * Make user-cancellable.Jeffrey Stedfast2001-10-192-6/+37 * String cleanup for bug #6640.Jeffrey Stedfast2001-10-192-2/+5 * Fix my Cyrus imapd workaround...instead of checking to see if info->flagsJeffrey Stedfast2001-10-192-5/+11 * Use '.' as the inbox name for filter new messages test.72001-10-182-1/+5 * New function to clone a folderinfo tree.72001-10-183-1/+41 * Same as maildir and mbox append-message.Jeffrey Stedfast2001-10-183-6/+20 * Make sure the new description isn't the same as the old descriptionJeffrey Stedfast2001-10-183-9/+27 * Add an optimization for when destination folder is the same as the sourceJeffrey Stedfast2001-10-182-0/+8 * Patch from Danw, Use unread count of -1 to mark unflagged messages. Make72001-10-183-9/+23 * Set the DELETED flag on directly on the info if the source folder doesn'tJeffrey Stedfast2001-10-182-1/+7 * As below.Not Zed2001-10-173-4/+19 * Rearange the order of the gpg options slightly otherwise it might try toJeffrey Stedfast2001-10-172-5/+8 * If CAMEL_DEBUG is defined, print some useful ref/unref info.Jeffrey Stedfast2001-10-176-5/+60 * If no content, dont try and decode further and spit meaningless warnings.62001-10-172-0/+9 * Only perform the operation on the folder if the folder has summaryJeffrey Stedfast2001-10-172-3/+11 * Save the errno before calling fcntl so fcntl doesn't overwrite errno inJeffrey Stedfast2001-10-162-2/+13 * Replace the Bcc headers in a single location and don't flush the dataJeffrey Stedfast2001-10-142-21/+22 * oops, it should remove the bcc header, not the cc headerJeffrey Stedfast2001-10-131-8/+29 * Remove the stripheader filter from the build.Jeffrey Stedfast2001-10-135-245/+27 * Unhook from all events before removing folder.22001-10-132-1/+23 * convert the uids list to a subset appropriate for each subfolder before12001-10-122-8/+25 * Removed charset/locale charset lookup and iconv_open/close functions,12001-10-1215-361/+58 * Same.Jeffrey Stedfast2001-10-123-10/+23 * Same hack as below.Jeffrey Stedfast2001-10-114-1/+111 * Only re-build the folder if we're expunging. Also only clear out the02001-10-112-5/+13 * slight wording changes, mainly LGPL=>GPLMichael Zucci2001-10-111-6/+7 * Added a hack for Solaris systems.Jeffrey Stedfast2001-10-112-3/+11 * oops, we want get_unread_message_count, not get_message_count!02001-10-113-2/+15 * updatedJeffrey Stedfast2001-10-111-6/+4 * Another go at getting the logic right again. Make transients only update92001-10-102-5/+21 * Forgot a little bit of debug.Michael Zucci2001-10-101-1/+1 * Implement.92001-10-1011-160/+632 * replace the ever-growing list of gbooleans with a single guint32 forDan Winship2001-10-0912-49/+64 * Unlock the store before returning error. (noted by NotZed)Dan Winship2001-10-092-1/+8 * Fix a slight error in logic. Just because the last word was an encodedJeffrey Stedfast2001-10-072-9/+24 * Implemented uuencoding and decoding. (complete): Implemented uuencodingJeffrey Stedfast2001-10-065-3/+199 * Use a folder_subscribed event rather than a folder_created one.52001-10-063-8/+41 * Turn off warnings. (get_name): Same.Jeffrey Stedfast2001-10-066-55/+106 * Try harder to get broken names out of addresses. Unencoded ,'s in names52001-10-062-7/+46 * Change the order of execution slightly. We delete the folder first, then42001-10-063-14/+28 * tedfast <fejj@ximian.com>Jeffrey Stedfast2001-10-051-0/+5 * Unregister the operation before unreffing it.Jeffrey Stedfast2001-10-051-0/+4 * Remove now unused 'recents' array/freeing func.32001-10-043-11/+17 * Dont explicitly save metadata, its saved in summary_sync.32001-10-046-50/+43 * Added MATCH_NEWLINE flag, -> REG_NEWLINE.32001-10-045-7/+25 * Call camel_folder_delete() on the folder if it's "alive".Jeffrey Stedfast2001-10-044-23/+83 * Strange are the ways of alloca. Fixes 11543.Dan Winship2001-10-032-1/+9 * remove unused variableJeffrey Stedfast2001-10-031-1/+0 * Import the certificate if the user accepts it.Jeffrey Stedfast2001-10-032-20/+16 * for hashing/comparing local url's, we ignore trailing /'s in paths (maybe22001-10-032-12/+99 * Change to camel_charset_iconv_open/close.22001-10-038-22/+207 * Revert my x-unknown special-case hack - this may mask other problems.Jeffrey Stedfast2001-10-033-8/+24 * Go back to using the store url's path, not the toplevel_dir thing.22001-10-033-4/+10 * Change the lock to a recursive e-mutex. (camel_object_hook_event):22001-10-032-136/+89 * Shoo! Shoo!Dan Winship2001-10-031-6/+0 * Remove any cached messages that belonged to the deleted folder.Jeffrey Stedfast2001-10-022-6/+63 * If the charset is x-unknown, return the locale_charset.Jeffrey Stedfast2001-10-022-1/+10 * Fix up the provider flags to specify things more completely so we don'tDan Winship2001-10-024-9/+32 * Don't munge the URL; CamelSession's caching relies on it not changing.Dan Winship2001-10-027-42/+49 * if STAT returns 0, don't bother sending UIDL. Speeds things up slightlyDan Winship2001-10-012-0/+14 * Add --no-secmem-warning and --no-greeting to the gpg command-line options.Jeffrey Stedfast2001-09-302-0/+20 * Same here.Jeffrey Stedfast2001-09-293-14/+34 * Init the nntp url hash and url_equal functions.Jeffrey Stedfast2001-09-299-7/+59 * Oops, a CamelFolder is not a CamelFolderClass.Jeffrey Stedfast2001-09-292-3/+11 * Make this take an SSL * instead of a CamelTcpStreamSSL *, since it can getDan Winship2001-09-282-5/+12 * Grab the store's command_lock before grabbing the folder's cache_lock toDan Winship2001-09-282-2/+29 * Minor style change to operation_registered.Michael Zucci2001-09-281-6/+4 * Dont re-register the connect_op if we got it by calling72001-09-282-4/+12 * Fill the finalised data with nonsense, rather than 0's - more easily72001-09-283-28/+218 * CRLF decode the stream before parsing it into a MIME part. This fixes bugJeffrey Stedfast2001-09-283-3/+35 * Change "gboolean connected" to "CamelServiceConnectionStatus status",Dan Winship2001-09-278-29/+160 * If we get a search error, just abort, dont try and fall back and copy to62001-09-272-22/+63 * New function to convenience Larry ;-) (check_content_id): Oops, returnJeffrey Stedfast2001-09-272-4/+7 * fixed merge conflictsJeffrey Stedfast2001-09-271-1/+0 * New function to convenience Larry ;-)Jeffrey Stedfast2001-09-274-4/+64 * Emptied VeeStorePrivate, member wasn't used.62001-09-274-23/+38 * Fix Ettore's fix.Jeffrey Stedfast2001-09-272-6/+10 * No longer takes a remember argument. (pgp_sign): Only uncache theJeffrey Stedfast2001-09-263-24/+30 * [Patch for Automake 1.5 compatibility pointed out by RichardEttore Perazzoli2001-09-263-13/+12 * Only unref info if we got it.52001-09-262-4/+8 * Fix for !threads enabled not ccompiling. (camel_operation_ref): Assert52001-09-263-159/+166 * call SSL_read/write, looping on SSL_ERROR_WANT_READ/WRITE. I'm sureDan Winship2001-09-262-4/+41 * A "safe write" function that always writes out all data asked of it, till52001-09-262-31/+50 * Set the exception to FOLDER_INVALID rather than making out it worked. A42001-09-252-0/+12 * In the 'lose' case, free messages, not fetch_data twice!42001-09-252-1/+4 * If the type is encoded, get the fallback charset from the message42001-09-2512-140/+190 * fixed compile warningJeffrey Stedfast2001-09-241-3/+2 * Don't even try to alert the user if the session isn't interactive.Jeffrey Stedfast2001-09-243-27/+43 * Set the exception if create_folder isn't implemented.12001-09-222-0/+8 * Go back to not using camel_folder_info_build() here because this seems toJeffrey Stedfast2001-09-222-4/+18 * Force a refresh of vfolders before storing their count. This essentially12001-09-214-3/+101 * New function to just load the summary. Not much use yet, until unreadMichael Zucci2001-09-215-1/+96 * Setup unread count properly, and also setup the url properly.Michael Zucci2001-09-214-13/+36 * Build the path on the folderinfo.02001-09-2111-27/+73 * And finally here.Jeffrey Stedfast2001-09-217-27/+108 * Nuke debug warning.Dan Winship2001-09-212-2/+4 * Updated exception strings to be more clear.Jeffrey Stedfast2001-09-203-17/+23 * Oops, don't fail if `data' isn't a CamelService...cuz it's not supposed toJeffrey Stedfast2001-09-202-1/+7 * General cleanup of camel debug printfs.92001-09-1918-40/+76 * s/List-Owner/List-PostJeffrey Stedfast2001-09-191-1/+1 * Match mailing-list header List-Owner.Jeffrey Stedfast2001-09-192-0/+5 * If filter inbox is set on the store, and we're opening inbox '', then82001-09-1924-146/+544 * Virtualize this.Dan Winship2001-09-195-6/+56 * Added korean charset conversion.Jeffrey Stedfast2001-09-192-0/+5 * Don't process the ImapResponse data, we don't want to block forever onJeffrey Stedfast2001-09-182-3/+20 * Don't process the ImapResponse data, we don't want to block forever onJeffrey Stedfast2001-09-182-8/+9 * Reverted previous changes.Jeffrey Stedfast2001-09-183-35/+4 * Helpful install-exec-hook debugging outputJP Rosevear2001-09-182-0/+8 * New function to get the URI of a folder. (get_uri): DefaultJeffrey Stedfast2001-09-173-1/+42 * New function, set the complete list of folders on a vfolder, all at once.42001-09-157-33/+326 * Use g_datalist_set_data_full so that the data will be free'd when we clearJeffrey Stedfast2001-09-153-4/+9 * Don't claim failure when reading/writing the empty string.Dan Winship2001-09-152-2/+8 * use install hook instead of install rule to guarantee we run afterJP Rosevear2001-09-152-27/+30 * Don't reuse the exception if it has already been set.Jeffrey Stedfast2001-09-145-15/+49 * Do error-checking based on function return values rather than exceptionsJeffrey Stedfast2001-09-142-7/+12 * Pass an exception to the cache. (imap_append_online): Same.Jeffrey Stedfast2001-09-144-33/+72 * Convert the charset to the iconv-friendly name.Jeffrey Stedfast2001-09-143-3/+30 * Return -1 on failure.Jeffrey Stedfast2001-09-142-3/+8 * free the source url in the nonfailure case.Larry Ewing2001-09-132-0/+6 * Change the 'not' virtual method from an immediate e-sexp function to a22001-09-133-3/+87 * Unref the message info.Jeffrey Stedfast2001-09-132-1/+9 * Pass in a hashtalbe used for finding visited nodes. (inode_hash):02001-09-112-26/+80 * Progress reporting while moving messages.02001-09-114-7/+56 * Get rid of the g_warning, we no longer really need that.Jeffrey Stedfast2001-09-112-3/+10 * Forgot to return the newly allocated msg.02001-09-102-0/+7 * Likewise.Not Zed2001-09-084-12/+34 * #if 0 out the code that was hopefully going to fix bug #5325 because theJeffrey Stedfast2001-09-082-1/+9 * Disconnect from the service here otherwise the locks will be destroyed andJeffrey Stedfast2001-09-082-4/+20 * Make sure to unref the mime filters when we finish with them.Jeffrey Stedfast2001-09-082-0/+7 * s/Synchronising/Synchronizing/. (mbox_summary_sync_quick): Likewise.Ettore Perazzoli2001-09-082-4/+11 * constificationJeffrey Stedfast2001-09-083-5/+8 * Reuse the original boundary instead of generating our own.Jeffrey Stedfast2001-09-082-2/+11 * Thread function to perform filtering. (filter_free): Free the filter62001-09-074-3/+142 * Use camel_stream_buffer_read_line() instead of duplicationing theJeffrey Stedfast2001-09-072-28/+18 * Fix this to always set an exception if it returns POP3_FAIL, asDan Winship2001-09-073-6/+16 * Set an exception on POP3_FAIL as well.Jeffrey Stedfast2001-09-072-3/+10 * #ifdef out the "delete after N days" option in pop3_conf_entries, since itDan Winship2001-09-072-0/+8 * Too late to sync the folders here... if this is gonna happen at all itJeffrey Stedfast2001-09-052-4/+4 * Do a clean disconnect.Jeffrey Stedfast2001-09-053-3/+6 * Return the default folder (ie. INBOX) rather than saying we don't supportJeffrey Stedfast2001-08-312-3/+5 * #include pk11func.h. (ssl_bad_cert): Use CERT_GetDefaultCertDB.Jeffrey Stedfast2001-08-312-1/+7 * fix smime the same way...Jeffrey Stedfast2001-08-302-15/+34 * Special-case message/rfc822 mime parts - don't set an encoding on these,Jeffrey Stedfast2001-08-302-14/+39 * Add progress reporting to deleting messages. Dont change the calculationNot Zed2001-08-292-2/+15 * Initialize buf and diag_buf to NULL, hopefully this fixes the crash if theJeffrey Stedfast2001-08-292-39/+14 * Initialize buf and diag_buf to NULL, hopefully this fixes the crash if theJeffrey Stedfast2001-08-292-11/+17 * Whoops. Double-free and FMR = bad.Peter Williams2001-08-292-2/+6 * Don't reveal the user's IMAP password if their server supportsPeter Williams2001-08-292-1/+9 * If the user accepts the certificate, add it to the database as a trustedJeffrey Stedfast2001-08-292-3/+32 * Make the locking more fine-grained on destruction; specifically, don'tPeter Williams2001-08-292-0/+12 * Changed the description/names of some of the local providers to try andJeffrey Stedfast2001-08-283-15/+21 * s/IMAPv4/IMAPJeffrey Stedfast2001-08-283-3/+7 * re-read the iconv man page, and treat the return value properly. ItNot Zed2001-08-275-150/+135 * ["Summarising" and "Synchronising" are spelt with a "s" in ENGLISH]Not Zed2001-08-253-8/+19 * Use fseek instead of fseeko since we want to be portable and use ftellJeffrey Stedfast2001-08-252-8/+17 * Revert Not Zed's previous commits as they apparently can cause seriousPeter Williams2001-08-257-104/+97 * s/Synchronising/Synchronizing/.Ettore Perazzoli2001-08-252-3/+14 * Limit the maximum output buffer size. iconv bugs? returns E2BIG forever onNot Zed2001-08-242-1/+6 * Likewise.Not Zed2001-08-247-95/+140 * Add a missing \n to the end of a printf.Peter Williams2001-08-243-2/+9 * oops, don't need that extra statementJeffrey Stedfast2001-08-231-3/+0 * Oops. Fixed a mis-use of GPtrArray. If we set_size, then usingJeffrey Stedfast2001-08-232-2/+11 * Turn on --batch and reenable gpg keyserver lookups. (pgp_decrypt): DisableJeffrey Stedfast2001-08-223-11/+20 * Fix the duplicate message check so it doesn't mess up threading when aDan Winship2001-08-212-4/+13 * build a static camel for the addressbook conduitJP Rosevear2001-08-202-0/+8 * s/Synchronising/Synchronizing/. (mbox_summary_sync_quick): Likewise.Ettore Perazzoli2001-08-203-4/+13 * oops, commit the ChangeLogJeffrey Stedfast2001-08-201-0/+10 * Get the entire directory structure for the folder we just created, meaningJeffrey Stedfast2001-08-203-17/+98 * #include <sys/types.h> for mode_t on freebsd.Chris Toshok2001-08-202-0/+7 * Make sure the generated UID is non-NULL before appending it to the arrayJeffrey Stedfast2001-08-203-6/+9 * fixed a compile errorJeffrey Stedfast2001-08-201-50/+51 * Start scanning new messages at maxuid + 1 rather than uidval + 1? MaybeJeffrey Stedfast2001-08-182-35/+41 * If we are online and message flags have changed in the current folder,Jeffrey Stedfast2001-08-175-33/+61 * Don't ever send "STORE FLAGS.SILENT ()" since Cyrus imapd doesn't likeJeffrey Stedfast2001-08-172-9/+31 * Fix this again. Sigh. Problem of namespace = "" may not yet be completelyPeter Williams2001-08-172-1/+7 * New function. Try to approximate the SSL error into errno.Peter Williams2001-08-162-1/+58 * Oh crap, huge killer typo.Peter Williams2001-08-152-1/+6 * Canonicalize store->namespace to end in store->dir_sep, once both valuesPeter Williams2001-08-152-1/+18 * After talking to NotZed, it turns out I was wrong after all. (store_sync):Jeffrey Stedfast2001-08-152-3/+28 * We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-143-14/+18 * Fix a leak.Peter Williams2001-08-144-5/+34 * We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-142-1/+1 * We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-146-42/+50 * s/summarising/summarizing/. (summary_rebuild): Likewise.Ettore Perazzoli2001-08-123-7/+19 * Added an assert - at this point a backtrace would be more useful than aJeffrey Stedfast2001-08-113-7/+24 * Return FALSE here, not NULL.Jeffrey Stedfast2001-08-112-1/+4 * tedfast <fejj@ximian.com>Jeffrey Stedfast2001-08-111-4/+4 * Don't g_strdup() the uid into the trigger_event call.Jeffrey Stedfast2001-08-112-17/+20 * Set the total bytes expected to 0 if the response is empty too.Jeffrey Stedfast2001-08-112-3/+6 * Set the total bytes expected to 0 if the response is empty too.Jeffrey Stedfast2001-08-113-8/+11 * regfree the pattern before continue'ing. This was showing up quite a bitJeffrey Stedfast2001-08-103-9/+16 * A quoted string cannot contain \n's so check for those as well.Jeffrey Stedfast2001-08-10