From bf9f54f9615c1b7b5c8ce5c434d0f78a99f5845b Mon Sep 17 00:00:00 2001 From: bertrand Date: Wed, 13 Oct 1999 21:16:55 +0000 Subject: A lot of changes. The thread proxy mechanism is now functional. The signal proxy needs to be tested though. The thread proxy folder is being implemented. A rough summary : 1999-10-13 bertrand * camel/camel-folder.c (camel_folder_close): the folder->close method is now asynchronous. * camel/camel-folder-pt-proxy.c (_folder_open_cb): (_open): (_folder_open_cb): (_open): open/close method implemented in the thread proxy folder. More to come. * camel/camel-exception.c (camel_exception_xfer): new utility func. * camel/camel-marshal-utils.c: some new marshallers * camel/camel-folder-pt-proxy.c: Some explanations on the thread proxy system. 1999-10-11 bertrand * camel/camel-marshal-utils.c: camel/camel-marshal-utils.h: Handles operation marshalling. * camel/camel-thread-proxy.c: camel/camel-thread-proxy.h: new files. Generic proxy system. * camel/camel-folder-pt-proxy.c moved all proxy related code in dedicated files. (camel_folder_pt_proxy_init): removed proxy initialisation code (_finalize): removed proxy finalization code * camel/camel-exception.c (camel_exception_new): (camel_exception_set): (camel_exception_free): New funcs. svn path=/trunk/; revision=1328 --- camel/camel-folder-pt-proxy.h | 54 ++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'camel/camel-folder-pt-proxy.h') diff --git a/camel/camel-folder-pt-proxy.h b/camel/camel-folder-pt-proxy.h index e540c78d4b..285306af71 100644 --- a/camel/camel-folder-pt-proxy.h +++ b/camel/camel-folder-pt-proxy.h @@ -28,8 +28,15 @@ #ifndef CAMEL_FOLDER_PT_PROXY_H #define CAMEL_FOLDER_PT_PROXY_H 1 + +#ifdef __cplusplus +extern "C" { +#pragma } +#endif /* __cplusplus }*/ + #include "camel-folder.h" #include "camel-op-queue.h" +#include "camel-thread-proxy.h" #define CAMEL_FOLDER_PT_PROXY_TYPE (camel_folder_pt_proxy_get_type ()) @@ -37,47 +44,42 @@ #define CAMEL_FOLDER_PT_PROXY_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), CAMEL_FOLDER_PT_PROXY_TYPE, CamelFolderPtProxyClass)) #define IS_CAMEL_FOLDER_PT_PROXY(o) (GTK_CHECK_TYPE((o), CAMEL_FOLDER_PT_PROXY_TYPE)) -typedef struct { - guint signal_id; - GtkArg *args; -} PtProxySignaData; - - +typedef struct _CamelFolderPtProxy CamelFolderPtProxy; typedef struct { + CamelFolderAsyncCallback real_callback; + CamelFolderPtProxy *proxy_folder; + CamelException *ex; + gpointer real_user_data; +} _ProxyCbUserData; + +struct _CamelFolderPtProxy { CamelFolder parent; - gchar *real_url; + /* private fields */ CamelFolder *real_folder; - - CamelOpQueue *op_queue; - gint pipe_client_fd; - gint pipe_server_fd; - GIOChannel *notify_source; - - /* used for signal proxy */ - GMutex *signal_data_mutex; - GCond *signal_data_cond; - PtProxySignaData signal_data; -} CamelFolderPtProxy; + CamelThreadProxy *proxy_object; + CamelException *thread_ex; + _ProxyCbUserData *pud; + +}; typedef struct { CamelFolderClass parent_class; + /* functions and callbacks definition (for marshalling) */ CamelFuncDef *open_func_def; + CamelFuncDef *open_cb_def; + CamelFuncDef *close_func_def; + CamelFuncDef *close_cb_def; } CamelFolderPtProxyClass; -/* some marshallers */ -void camel_marshal_NONE__POINTER_INT (CamelFunc func, - GtkArg *args); - -void camel_marshal_NONE__POINTER_INT_POINTER (CamelFunc func, - GtkArg *args); - - +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif /* CAMEL_FOLDER_PT_PROXY_H */ -- cgit v1.2.3