gboolean scalix_account_synch_run (ScalixAccountSynch * sxas, gboolean wait) { ScalixAccountSynchPrivate *priv; struct account_synch_msg *m; #ifdef HAVE_MAILMSG m = mail_msg_new (&account_synch_info); #else m = mail_msg_new (&account_synch_op, NULL, sizeof (*m)); #endif if (m == NULL) { return FALSE; } priv = SCALIX_ACCOUNT_SYNCH_GET_PRIVATE (sxas); m->sxas = g_object_ref (sxas); m->success = FALSE; m->sversion = NULL; #ifdef HAVE_MAILMSG mail_msg_unordered_push (m); #else e_thread_put (mail_thread_new, (EMsg *) m); #endif return TRUE; }
static gboolean receive_update_got_folderinfo(CamelStore *store, CamelFolderInfo *info, void *data) { if (info) { GPtrArray *folders = g_ptr_array_new(); struct _refresh_folders_msg *m; struct _send_info *sinfo = data; m = mail_msg_new(&refresh_folders_info); m->store = store; camel_object_ref(store); m->folders = folders; m->info = sinfo; m->finfo = info; mail_msg_unordered_push (m); /* do not free folder info, we will free it later */ return FALSE; } else { receive_done ("", data); } return TRUE; }
/* Start the main import operation */ void org_gnome_evolution_readdbx_import (EImport *ei, EImportTarget *target, EImportImporter *im) { DbxImporter *m; m = mail_msg_new (&dbx_import_info); g_datalist_set_data (&target->data, "dbx-msg", m); m->import = ei; g_object_ref (m->import); m->target = target; m->parent_uri = NULL; m->folder_name = NULL; m->folder_uri = NULL; m->status_timeout_id = e_named_timeout_add (100, dbx_status_timeout, m); g_mutex_init (&m->status_lock); m->cancellable = camel_operation_new (); g_signal_connect ( m->cancellable, "status", G_CALLBACK (dbx_status), m); mail_msg_unordered_push (m); }
void mail_importer_import_mbox_sync(const char *path, const char *folderuri, CamelOperation *cancel) { struct _import_mbox_msg *m; m = mail_msg_new(&import_mbox_info); m->path = g_strdup(path); m->uri = g_strdup(folderuri); if (cancel) { m->cancel = cancel; camel_operation_ref(cancel); } import_mbox_exec(m); import_mbox_done(m); mail_msg_unref(m); }
static gint mail_shell_view_setup_search_results_folder (CamelFolder *folder, GList *stores, GCancellable *cancellable) { SearchResultsMsg *msg; gint id; g_object_ref (folder); msg = mail_msg_new (&search_results_setup_info); msg->folder = folder; msg->cancellable = cancellable; msg->stores_list = stores; id = msg->base.seq; mail_msg_slow_ordered_push (msg); return id; }
/* uri should be a camel uri */ static gint vfolder_adduri (EMailBackend *backend, const gchar *uri, GList *folders, gint remove) { struct _adduri_msg *m; gint id; m = mail_msg_new (&vfolder_adduri_info); m->backend = g_object_ref (backend); m->folders = folders; m->uri = g_strdup (uri); m->remove = remove; id = m->base.seq; mail_msg_slow_ordered_push (m); return id; }
static int mail_importer_elm_import(EImport *ei, EImportTarget *target) { struct _elm_import_msg *m; int id; m = mail_msg_new(&elm_import_info); g_datalist_set_data(&target->data, "elm-msg", m); m->import = ei; g_object_ref(m->import); m->target = (EImportTargetHome *)target; m->status_timeout_id = g_timeout_add(100, elm_status_timeout, m); m->status_lock = g_mutex_new(); m->status = camel_operation_new(elm_status, m); id = m->base.seq; mail_msg_fast_ordered_push (m); return id; }
int mail_importer_import_mbox(const char *path, const char *folderuri, CamelOperation *cancel, void (*done)(void *data, CamelException *), void *data) { struct _import_mbox_msg *m; int id; m = mail_msg_new(&import_mbox_info); m->path = g_strdup(path); m->uri = g_strdup(folderuri); m->done = done; m->done_data = data; if (cancel) { m->cancel = cancel; camel_operation_ref(cancel); } id = m->base.seq; mail_msg_fast_ordered_push (m); return id; }
/* sources_uri should be camel uri's */ static gint vfolder_setup (EMailSession *session, CamelFolder *folder, const gchar *query, GList *sources_uri, GList *sources_folder) { struct _setup_msg *m; gint id; m = mail_msg_new (&vfolder_setup_info); m->session = g_object_ref (session); m->folder = g_object_ref (folder); m->query = g_strdup (query); m->sources_uri = sources_uri; m->sources_folder = sources_folder; id = m->base.seq; mail_msg_slow_ordered_push (m); return id; }