4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) version 3.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with the program; if not, see <http://www.gnu.org/licenses/>
19 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
20 #error "Only <camel/camel.h> can be included directly."
23 #ifndef CAMEL_IMAPX_JOB_H
24 #define CAMEL_IMAPX_JOB_H
26 #include "camel-imapx-server.h"
28 #define CAMEL_IS_IMAPX_JOB(job) \
29 (camel_imapx_job_check (job))
33 typedef struct _CamelIMAPXJob CamelIMAPXJob;
35 struct _uidset_state {
42 struct _CamelIMAPXJob {
43 GCancellable *cancellable;
46 /* Whether to pop a status message off the
47 * GCancellable when the job is finalized. */
48 gboolean pop_operation_msg;
50 void (*start) (CamelIMAPXJob *job,
51 CamelIMAPXServer *is);
52 gboolean (*matches) (CamelIMAPXJob *job,
56 guint noreply:1; /* dont wait for reply */
57 guint32 type; /* operation type */
58 gint pri; /* the command priority */
59 gshort commands; /* counts how many commands are outstanding */
64 CamelIMAPXJob * camel_imapx_job_new (GCancellable *cancellable);
65 CamelIMAPXJob * camel_imapx_job_ref (CamelIMAPXJob *job);
66 void camel_imapx_job_unref (CamelIMAPXJob *job);
67 gboolean camel_imapx_job_check (CamelIMAPXJob *job);
68 void camel_imapx_job_wait (CamelIMAPXJob *job);
69 void camel_imapx_job_done (CamelIMAPXJob *job);
70 gboolean camel_imapx_job_run (CamelIMAPXJob *job,
73 gboolean camel_imapx_job_matches (CamelIMAPXJob *job,
76 gpointer camel_imapx_job_get_data (CamelIMAPXJob *job);
77 void camel_imapx_job_set_data (CamelIMAPXJob *job,
79 GDestroyNotify destroy_data);
83 #endif /* CAMEL_IMAPX_JOB_H */