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."
24 #ifndef CAMEL_IMAPX_JOB_H
25 #define CAMEL_IMAPX_JOB_H
27 #include "camel-imapx-server.h"
29 #define CAMEL_IS_IMAPX_JOB(job) \
30 (camel_imapx_job_check (job))
34 typedef struct _CamelIMAPXJob CamelIMAPXJob;
36 struct _uidset_state {
43 struct _CamelIMAPXJob {
44 GCancellable *cancellable;
47 /* Whether to pop a status message off the
48 * GCancellable when the job is finalized. */
49 gboolean pop_operation_msg;
51 void (*start) (CamelIMAPXJob *job,
52 CamelIMAPXServer *is);
53 gboolean (*matches) (CamelIMAPXJob *job,
57 guint noreply:1; /* dont wait for reply */
58 guint32 type; /* operation type */
59 gint pri; /* the command priority */
60 gshort commands; /* counts how many commands are outstanding */
65 CamelIMAPXJob * camel_imapx_job_new (GCancellable *cancellable);
66 CamelIMAPXJob * camel_imapx_job_ref (CamelIMAPXJob *job);
67 void camel_imapx_job_unref (CamelIMAPXJob *job);
68 gboolean camel_imapx_job_check (CamelIMAPXJob *job);
69 void camel_imapx_job_wait (CamelIMAPXJob *job);
70 void camel_imapx_job_done (CamelIMAPXJob *job);
71 gboolean camel_imapx_job_run (CamelIMAPXJob *job,
74 gboolean camel_imapx_job_matches (CamelIMAPXJob *job,
77 gpointer camel_imapx_job_get_data (CamelIMAPXJob *job);
78 void camel_imapx_job_set_data (CamelIMAPXJob *job,
80 GDestroyNotify destroy_data);
84 #endif /* CAMEL_IMAPX_JOB_H */