aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder-pt-proxy.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-09-18 04:34:22 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-09-18 04:34:22 +0800
commitacd6bafa58cf5fdea4814e51aac175a99894a373 (patch)
treebc215f1df9b512eee2823969a2b796650574eafd /camel/camel-folder-pt-proxy.c
parent63039bb99edd9f8c7aea9ef4ce8700d713b01354 (diff)
downloadgsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.gz
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.bz2
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.lz
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.xz
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.zst
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.zip
added notify io_channel. new func. run the next operation.
1999-09-17 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-folder-pt-proxy.c (_init_with_store): added notify io_channel. * (camel_op_queue_run_next_op): new func. run the next operation. svn path=/trunk/; revision=1236
Diffstat (limited to 'camel/camel-folder-pt-proxy.c')
-rw-r--r--camel/camel-folder-pt-proxy.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/camel/camel-folder-pt-proxy.c b/camel/camel-folder-pt-proxy.c
index 0d7bc3c957..d8031fb398 100644
--- a/camel/camel-folder-pt-proxy.c
+++ b/camel/camel-folder-pt-proxy.c
@@ -44,6 +44,9 @@
#include "camel-folder-pt-proxy.h"
#include "camel-log.h"
#include <pthread.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
/* needed for proper casts of async funcs when
* calling pthreads_create
@@ -132,6 +135,14 @@ camel_folder_proxy_class_init (CamelFolderPtProxyClass *camel_folder_pt_proxy_cl
+static void
+camel_folder_proxy_init (CamelFolderPtProxy *folder_pt_proxy)
+{
+
+
+ folder_pt_proxy->op_queue = camel_op_queue_new ();
+
+}
@@ -147,7 +158,7 @@ camel_folder_proxy_get_type (void)
sizeof (CamelFolderPtProxy),
sizeof (CamelFolderPtProxyClass),
(GtkClassInitFunc) camel_folder_proxy_class_init,
- (GtkObjectInitFunc) NULL,
+ (GtkObjectInitFunc) camel_folder_proxy_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
@@ -175,6 +186,13 @@ _finalize (GtkObject *object)
+static void
+_plan_op_for_exec (CamelOp *op)
+{
+
+
+}
+
/* folder->init_with_store implementation */
@@ -210,7 +228,23 @@ _init_with_store (CamelFolder *folder, CamelStore *parent_store)
CamelFolderPtProxy *proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
_InitStoreParam *param;
pthread_t init_store_thread;
+ int filedes[2];
+
+#warning Notify io_channel initialization should be elsewhere
+ /* it can not be in camel_folder_proxy_init
+ * because of the pipe error handling */
+ /* set up the notification channel */
+ if (!pipe (filedes)) {
+ CAMEL_LOG_WARNING ("could not create pipe in for camel_folder_proxy_init");
+ CAMEL_LOG_FULL_DEBUG ("Full error message : %s\n", strerror(errno));
+ return;
+ }
+
+ proxy_folder->pipe_client_fd = filedes [0];
+ proxy_folder->pipe_server_fd = filedes [1];
+ proxy_folder->notify_source = g_io_channel_unix_new (filedes [0]);
+
/* param will be freed in _async_init_with_store */
param = g_new (_InitStoreParam, 1);
param->folder = folder;