aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-operation.h
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-02-08 09:42:53 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-02-08 09:42:53 +0800
commit49f8a687a41e635cd83807d33c74afe8e55fb3df (patch)
tree4162f19a2db18ff787386c7c97a98e5e8a5e7744 /camel/camel-operation.h
parent1290da3f286a31745b1814610c16918c2e84e140 (diff)
downloadgsoc2013-evolution-49f8a687a41e635cd83807d33c74afe8e55fb3df.tar.gz
gsoc2013-evolution-49f8a687a41e635cd83807d33c74afe8e55fb3df.tar.zst
gsoc2013-evolution-49f8a687a41e635cd83807d33c74afe8e55fb3df.zip
Changed to push the operation into a status stack.
2001-02-07 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_start): Changed to push the operation into a status stack. (camel_operation_progress): Changed to only accept % complete. (camel_operation_reset): Free status stack as well. * providers/pop3/camel-pop3-folder.c (pop3_get_message): Get the octect count from the return line, and pass it to get_additional_data(). (pop3_refresh_info): Added status stuff. * providers/pop3/camel-pop3-store.c (camel_pop3_command_get_additional_data): Added a total bytes expected argument for progress reporting & fixed callers. (camel_pop3_command_get_additional_data): Added progress reporting. * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): (mbox_summary_sync_quick): (summary_rebuild): Added progress reporting stuff. svn path=/trunk/; revision=8095
Diffstat (limited to 'camel/camel-operation.h')
-rw-r--r--camel/camel-operation.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/camel/camel-operation.h b/camel/camel-operation.h
new file mode 100644
index 0000000000..4a61b40dfc
--- /dev/null
+++ b/camel/camel-operation.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Authors: Michael Zucchi <NotZed@Ximian.com>
+ *
+ * Copyright 2001 Ximian, Inc. (http://www.ximian.com/)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+
+#ifndef CAMEL_OPERATION_H
+#define CAMEL_OPERATION_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#pragma }
+#endif /* __cplusplus }*/
+
+/* cancellation helper stuff, not yet finalised */
+
+typedef struct _CamelOperation CamelOperation;
+
+typedef void (*CamelOperationStatusFunc)(struct _CamelOperation *op, const char *what, int pc, void *data);
+
+enum _camel_operation_status_t {
+ CAMEL_OPERATION_START = -1,
+ CAMEL_OPERATION_END = -2,
+};
+
+/* main thread functions */
+CamelOperation *camel_operation_new(CamelOperationStatusFunc status, void *status_data);
+void camel_operation_ref(CamelOperation *cc);
+void camel_operation_unref(CamelOperation *cc);
+void camel_operation_reset(CamelOperation *cc);
+void camel_operation_cancel(CamelOperation *cc);
+/* subthread functions */
+void camel_operation_register(CamelOperation *cc);
+void camel_operation_unregister(CamelOperation *cc);
+/* called internally by camel, for the current thread */
+void camel_operation_cancel_block(CamelOperation *cc);
+void camel_operation_cancel_unblock(CamelOperation *cc);
+int camel_operation_cancel_check(CamelOperation *cc);
+int camel_operation_cancel_fd(CamelOperation *cc);
+
+void camel_operation_start(CamelOperation *cc, char *what, ...);
+void camel_operation_progress(CamelOperation *cc, int pc);
+void camel_operation_progress_count(CamelOperation *cc, int sofar);
+void camel_operation_end(CamelOperation *cc);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* CAMEL_OPERATION_H */
h=mate-1.16&id=a2ea915bb8193c976b747792d3f088b792290746'>- Mark BROKEN for upcoming xorg 7.5miwi2010-05-011-0/+2 * - This port needs Perl (which used to be provided by gtk12)pav2010-05-012-0/+2 * Fix pkg-plistkevlo2010-04-291-0/+5 * Initial import of gbrainy 1.41.kevlo2010-04-295-0/+185 * - Update to patchlevel 32sylvio2010-04-282-4/+4 * - Add glew to the list of supported USE_GL variablesgahr2010-04-287-17/+10 * - Attach knights-kde4 to the buildfluffy2010-04-271-0/+1 * - Update to 0.3.0amdmi32010-04-264-33/+46 * - Update Knights to KDE4 version, 2.0fluffy2010-04-266-511/+36 * - Update to 20100421amdmi32010-04-262-4/+4 * - Update to 113amdmi32010-04-263-10/+12 * Brain Party is a fun, free puzzle game for all the family that'samdmi32010-04-257-0/+537 * Update to 0.9.2.1makc2010-04-256-10/+42 * - Update to 0.9.8083makc2010-04-2510-485/+134 * - Update to 0.78amdmi32010-04-242-4/+4 * - Update to 0.81.2.1amdmi32010-04-243-98/+19 * - Release maintainership of some ports I'm not interested inamdmi32010-04-241-1/+1 * Chase audio/libmodplug update.ehaupt2010-04-242-2/+2 * Update to 0.9.2 release.ale2010-04-233-5/+5 * Switch to use newer GMP version.ale2010-04-191-2/+2 * - Update to 4.0.4sylvio2010-04-183-6/+7 * Attempt to fix plisterwin2010-04-182-1/+2 * Paintown is an open source fighting game in the same genredecke2010-04-1611-0/+3061 * - Update to 20100309amdmi32010-04-163-38/+40 * - Fix build WITHOUT_TORRENTamdmi32010-04-161-5/+13 * - Mark BROKEN on 7.X toopav2010-04-161-2/+2 * Add amd64 to the list of supported architectures.scf2010-04-161-1/+1 * - Remove a mirror, as it doesn't have latest distfiles and also confuses port...amdmi32010-04-161-1/+0 * - Update to 1.5.0amdmi32010-04-154-22/+14 * - Forgot to remove unneeded patchamdmi32010-04-151-21/+0 * - Fix build on < 8.xamdmi32010-04-152-28/+1 * - Update to 0.68amdmi32010-04-152-6/+6 * - Update to v.20100328wen2010-04-148-51/+44 * - Update to 0.2.9amdmi32010-04-143-30/+132 * - Update to 20100320amdmi32010-04-144-26/+72 * - Fix build after openal updateamdmi32010-04-123-21/+46 * - Mark BROKEN: does not compilepav2010-04-121-0/+2 * - Fix build with new ocaml-images.stas2010-04-092-6/+4 * - Fix build with new openalamdmi32010-04-071-0/+29 * Mark various ports as ignore or broken on ia64.linimon2010-04-061-1/+1 * - Update to 1.36.s1782amdmi32010-04-062-4/+4 * Sigh. I _meant_ to say powerpc. But since it invokes i386 asm, it'slinimon2010-04-051-4/+2 * Also broken on ia64 and powerpc.linimon2010-04-051-2/+2 * - Fix build on STABLE & CURRENTamdmi32010-04-053-0/+72 * - Update to 0.9.13amdmi32010-04-053-78/+589 * Update to 4.4.3johans2010-04-053-5/+19 * re-assign back to ports@pgollucci2010-04-051-1/+1 * Mark BROKEN: does not build.erwin2010-04-051-0/+2 * Mark as broken on ia64: gets bus error.linimon2010-04-041-0/+4 * Chase the ftp/curl shlib version bump.roam2010-04-0326-47/+49 * - Update 23.2miwi2010-04-033-13/+14 * - fix build for png-1.4.1dinoex2010-04-011-0/+4 * - fix build for png-1.4.1dinoex2010-04-011-0/+4 * - fix build for png-1.4.1dinoex2010-04-011-0/+4 * - fix build for png-1.4.1dinoex2010-04-012-0/+40 * - fix build for png-1.4.1dinoex2010-03-311-0/+8 * - Update to 102.2.2amdmi32010-03-314-14/+50 * - fix build for jpeg-8dinoex2010-03-311-1/+6 * - fix build for png-1.4.1dinoex2010-03-301-0/+5 * - fix build for png-1.4.1dinoex2010-03-301-0/+6 * - fix build for png-1.4.1dinoex2010-03-302-0/+12 * - fix build for png-1.4.1dinoex2010-03-302-0/+16 * - fix build for png-1.4.1dinoex2010-03-301-0/+2 * - fix build for png-1.4.1dinoex2010-03-302-0/+14 * - fix build for png-1.4.1dinoex2010-03-304-1/+14 * - fix build for png-1.4.1dinoex2010-03-304-6/+28 * - fix build for png-1.4.1dinoex2010-03-306-2/+41 * - fix build for png-1.4.1dinoex2010-03-301-1/+2 * - fix build for png-1.4.1dinoex2010-03-291-0/+2 * - update to 1.4.1dinoex2010-03-28