aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-private.h')
-rw-r--r--camel/camel-private.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/camel/camel-private.h b/camel/camel-private.h
index cdfe878edd..9be3a24209 100644
--- a/camel/camel-private.h
+++ b/camel/camel-private.h
@@ -144,6 +144,33 @@ struct _CamelFolderSummaryPrivate {
#define CAMEL_SUMMARY_UNLOCK(f, l)
#endif
+struct _CamelVeeStorePrivate {
+};
+
+#ifdef ENABLE_THREADS
+#define CAMEL_VEE_STORE_LOCK(f, l) (e_mutex_lock(((CamelVeeStore *)f)->priv->l))
+#define CAMEL_VEE_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelVeeStore *)f)->priv->l))
+#else
+#define CAMEL_VEE_STORE_LOCK(f, l)
+#define CAMEL_VEE_STORE_UNLOCK(f, l)
+#endif
+
+struct _CamelVeeFolderPrivate {
+ GList *folders; /* lock using subfolder_lock before changing/accessing */
+
+#ifdef ENABLE_THREADS
+ GMutex *summary_lock; /* for locking vfolder summary */
+ GMutex *subfolder_lock; /* for locking the subfolder list */
+#endif
+};
+
+#ifdef ENABLE_THREADS
+#define CAMEL_VEE_FOLDER_LOCK(f, l) (g_mutex_lock(((CamelVeeFolder *)f)->priv->l))
+#define CAMEL_VEE_FOLDER_UNLOCK(f, l) (g_mutex_unlock(((CamelVeeFolder *)f)->priv->l))
+#else
+#define CAMEL_VEE_FOLDER_LOCK(f, l)
+#define CAMEL_VEE_FOLDER_UNLOCK(f, l)
+#endif
#ifdef __cplusplus
}