aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-folder.c')
-rw-r--r--camel/camel-folder.c71
1 files changed, 62 insertions, 9 deletions
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index e7af6f6d37..0b1b92b982 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -77,6 +77,8 @@ static void set_message_user_flag (CamelFolder *folder, const char *uid,
static GPtrArray *get_subfolder_names (CamelFolder *folder,
CamelException *ex);
+static void free_subfolder_names (CamelFolder *folder,
+ GPtrArray *array);
static CamelFolder *get_subfolder (CamelFolder *folder,
const gchar *folder_name,
gboolean create,
@@ -162,7 +164,7 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class)
camel_folder_class->get_parent_folder = get_parent_folder;
camel_folder_class->get_parent_store = get_parent_store;
camel_folder_class->get_subfolder_names = get_subfolder_names;
- camel_folder_class->free_subfolder_names = free_uids;
+ camel_folder_class->free_subfolder_names = free_subfolder_names;
camel_folder_class->expunge = expunge;
camel_folder_class->get_message_count = get_message_count;
camel_folder_class->get_unread_message_count = get_unread_message_count;
@@ -532,6 +534,13 @@ camel_folder_get_subfolder_names (CamelFolder *folder, CamelException *ex)
}
+static void
+free_subfolder_names (CamelFolder *folder, GPtrArray *array)
+{
+ g_warning ("CamelFolder::free_subfolder_names not implemented "
+ "for `%s'", gtk_type_name (GTK_OBJECT_TYPE (folder)));
+}
+
/**
* camel_folder_free_subfolder_names:
* @folder: folder object
@@ -952,14 +961,8 @@ camel_folder_get_uids (CamelFolder *folder, CamelException *ex)
static void
free_uids (CamelFolder *folder, GPtrArray *array)
{
- int i;
-
- /* Default implementation: free all of the strings and
- * the array itself.
- */
- for (i = 0; i < array->len; i++)
- g_free (array->pdata[i]);
- g_ptr_array_free (array, TRUE);
+ g_warning ("CamelFolder::free_uids not implemented for `%s'",
+ gtk_type_name (GTK_OBJECT_TYPE (folder)));
}
/**
@@ -1285,3 +1288,53 @@ message_changed (CamelFolder *folder, const char *uid)
}
}
}
+
+
+/**
+ * camel_folder_free_nop:
+ * @folder: a folder
+ * @array: an array of uids, subfolder names, or CamelMessageInfo
+ *
+ * "Frees" the provided array by doing nothing. Used by CamelFolder
+ * subclasses as an implementation for free_uids, free_summary,
+ * or free_subfolder_names when the returned array is "static"
+ * information and should not be freed.
+ **/
+void
+camel_folder_free_nop (CamelFolder *folder, GPtrArray *array)
+{
+ ;
+}
+
+/**
+ * camel_folder_free_shallow:
+ * @folder: a folder
+ * @array: an array of uids, subfolder names, or CamelMessageInfo
+ *
+ * Frees the provided array but not its contents. Used by CamelFolder
+ * subclasses as an implementation for free_uids, free_summary, or
+ * free_subfolder_names when the returned array needs to be freed
+ * but its contents come from "static" information.
+ **/
+void
+camel_folder_free_shallow (CamelFolder *folder, GPtrArray *array)
+{
+ g_ptr_array_free (array, TRUE);
+}
+
+/**
+ * camel_folder_free_deep:
+ * @folder: a folder
+ * @array: an array of uids or subfolder names
+ *
+ * Frees the provided array and its contents. Used by CamelFolder
+ * subclasses as an implementation for free_uids or
+ * free_subfolder_names (but NOT free_summary) when the provided
+ * information was created explicitly by the corresponding get_ call.
+ **/
+void
+camel_folder_free_deep (CamelFolder *folder, GPtrArray *array)
+{
+ g_strfreev ((gchar **)array->pdata);
+ g_ptr_array_free (array, FALSE);
+}
>* Update PostgreSQL to latest versions.girgen2009-02-103-5/+6 * Update PostgreSQL to latest versions.girgen2008-11-074-9/+11 * Conversion from (now defunct) autoconf-2.61 to autoconf-2.62ade2008-08-201-1/+1 * Updates of the PostgreSQL portsgirgen2008-06-134-22/+18 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-1/+1 * fix SIZE for postgresql/pg-8015-icu-xx-2008-01-08.diff.gzedwin2008-03-251-1/+1 * - Remove USE_GETOPT_LONG which is a no-op since March 200pav2008-03-201-8/+0 * Fix bad ICU patch filegirgen2008-01-082-4/+4 * Fix bad distinfo sizesgirgen2008-01-081-1/+1 * Update all PostgreSQL ports to latest versions.girgen2008-01-074-26/+24 * Migration from bison 1.x to 2.xade2007-10-171-2/+2 * Remove always true/always false OSVERSION conditions.edwin2007-10-051-4/+0 * Switch autoconf dependencies from 2.53 or 2.59 to 2.61.linimon2007-09-301-2/+2 * Update PostgreSQL ports to the latest patch releases.girgen2007-09-183-14/+15 * - Welcome X.org 7.2 \o/.flz2007-05-203-31/+1 * Update PostgreSQL to 7.3.19, 7.4.17, 8.0.13, 8.1.9 and 8.2.4 respectively:girgen2007-04-243-470/+476 * Respect PTHREAD_CFLAGS/PTHREAD_LIBS.nork2007-03-191-1/+3 * Update PostgreSQL 8.x to 8.0.12, 8.1.8 and 8.2.3 respectively:girgen2007-02-072-13/+13 * Update PostgreSQL with, amongst other things, two security fixes:girgen2007-02-052-13/+13 * Update postgresql to 8.2.1, 8.1.6, 8.0.10, 7.4.15 and 7.3.17.girgen2007-01-106-116/+125 * Update PostgreSQL to latest versions: 8.1.5, 8.0.9, 7.4.14 and 7.3.16.girgen2006-11-0910-47/+52 * The update to handle different versions of ICU was not sufficient.girgen2006-09-272-4/+4 * Update the patch to be more agnostic with regards to the version of icu.girgen2006-09-202-5/+5 * There is no point in setting mode of rc.d file to be 554, set it to 555.sobomax2006-06-271-2/+2 * Update all PostgreSQL to fix a security flawgirgen2006-05-243-15/+15 * Remove the FreeBSD KEYWORD from all rc.d scripts where it appears.dougb2006-02-211-1/+1 * Security patch, update to version 8.0.7.girgen2006-02-182-14/+16 * Add missing ) around SIZE statements.edwin2006-01-301-4/+4 * eplace ugly "@unexec rmdir %D... 2>/dev/null || true" with @dirrmtryedwin2006-01-226-50/+50 * Update postgresql with latest patch release.girgen2006-01-103-19/+22 * Handle a change in rc.subr. nowadays, "faststart" is used instead ofgirgen2005-12-262-3/+3 * Update postgresql to 8.0.5girgen2005-12-232-9/+15 * Fix bad distro name for hier.girgen2005-11-291-1/+1 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1 * Let postgresql (libpq.so) only link with the Kerberos implementationsgirgen2005-11-151-18/+17 * Chase hier patch upgrade to version 0.5.5.girgen2005-11-092-4/+4 * Chase the update of icu. Don't update portrevision since the patch isgirgen2005-10-312-4/+4 * Upgrade to 8.0.4girgen2005-10-053-12/+16 * Fix building with the HIER option. It needs bison. [1]girgen2005-08-302-3/+4 * Fixing problems with the recent security patch: When bison was notgirgen2005-05-114-10/+29 * Update the ICU patch with some bug fixesgirgen2005-05-062-3/+3 * Update the link to the ICU patch.girgen2005-04-172-3/+3 * Upgrade PostgreSQL to 8.0.2. Here's the brief release note:girgen2005-04-145-185/+47 * Modify 8.0's startup script to simulate a full login (su -l) [1]. Alsogirgen2005-03-192-3/+4 * Fixing problems with the recent security patch: When bison was notgirgen2005-02-202-1/+92 * Fix security alert using a patch from PostgreSQL's CVS repository:girgen2005-02-192-15/+89 * The postgresql_* knobs from /etc/rc.conf where read too late togirgen2005-02-151-1/+1 * Let pkg-message reflect the renaming of the startup script.girgen2005-02-101-2/+2 * Add some forgotten manpages.girgen2005-02-071-3/+6 * In order to address a potential security hole recently identified withgirgen2005-02-034-16/+17 * Remove forgotten "beta" no_latest_link, and fix broken master_site_subdirgirgen2005-01-311-3/+1 * Say hello to postgresql-8.0. Some of the highlights of the new versiongirgen2005-01-3123-700/+1285 * Enter PostgreSQL 8.0.0. Given 4.11 is still being released, abuse -devel byseanc2005-01-231-1/+1 * PR ports/75344 - This needs testing and an probably experimentalgirgen2004-12-221-1/+1 * Add myself as committer, and use my @FreeBSD.org address.girgen2004-12-061-1/+1 * Another step along the road to the postgresql new world order.ade2004-11-2426-847/+1142 * Update postgresql 7.3.7 -> 7.3.8 and 7.4.5 -> 7.4.6 due to securityade2004-11-062-9/+9 * - update to version 7.4.5:eik2004-08-314-14/+13 * Upgrade to 7.4.3.vanilla2004-06-294-15/+28 * Add a note about changes in latest release of PostgreSQL.osa2004-03-301-0/+5 * Update to latest release 7.4.2.osa2004-03-113-6/+11 * Add WITHOUT_NLS knob. Move USE_GETTEXT to proper place.trevor2004-02-051-3/+3 * Add USE_GETTEXT and bump PORTREVISION.marcus2004-02-041-2/+2 * - Add note that the function "elog" has been removed fromkrion2004-02-011-3/+9 * Now gettext 0.12.1 is gettext-old.trevor2004-01-241-1/+1 * Update the PostgreSQL ports to use the KRB5_HOME variable instead ofseanc2004-01-18