evolution-data-server r9014 - trunk/camel
- From: fejj svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-data-server r9014 - trunk/camel
- Date: Sat, 21 Jun 2008 02:45:15 +0000 (UTC)
Author: fejj
Date: Sat Jun 21 02:45:15 2008
New Revision: 9014
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9014&view=rev
Log:
updated
Modified:
trunk/camel/camel-mime-filter-progress.c
trunk/camel/camel-mime-filter-progress.h
trunk/camel/camel-stream-null.h
Modified: trunk/camel/camel-mime-filter-progress.c
==============================================================================
--- trunk/camel/camel-mime-filter-progress.c (original)
+++ trunk/camel/camel-mime-filter-progress.c Sat Jun 21 02:45:15 2008
@@ -79,19 +79,16 @@
char **out, size_t *outlen, size_t *outprespace)
{
CamelMimeFilterProgress *progress = (CamelMimeFilterProgress *) filter;
- CamelOperation *operation;
double percent;
progress->count += len;
- if ((operation = camel_operation_registered ())) {
- if (progress->count < progress->total)
- percent = ((double) progress->count * 100.0) / ((double) progress->total);
- else
- percent = 100.0;
-
- camel_operation_progress (operation, (int) percent);
- }
+ if (progress->count < progress->total)
+ percent = ((double) progress->count * 100.0) / ((double) progress->total);
+ else
+ percent = 100.0;
+
+ camel_operation_progress (progress->operation, (int) percent);
*outprespace = prespace;
*outlen = len;
@@ -128,6 +125,7 @@
/**
* camel_mime_filter_progress_new:
+ * @operation: a #CamelOperation
* @total: total number of bytes to report progress on
*
* Create a new #CamelMimeFilterProgress object that will report
@@ -136,11 +134,12 @@
* Returns a new #CamelMimeFilter object
**/
CamelMimeFilter *
-camel_mime_filter_progress_new (guint32 total)
+camel_mime_filter_progress_new (CamelOperation *operation, size_t total)
{
CamelMimeFilter *filter;
filter = (CamelMimeFilter *) camel_object_new (camel_mime_filter_progress_get_type ());
+ ((CamelMimeFilterProgress *) filter)->operation = operation;
((CamelMimeFilterProgress *) filter)->total = total;
return filter;
Modified: trunk/camel/camel-mime-filter-progress.h
==============================================================================
--- trunk/camel/camel-mime-filter-progress.h (original)
+++ trunk/camel/camel-mime-filter-progress.h Sat Jun 21 02:45:15 2008
@@ -24,6 +24,7 @@
#ifndef __CAMEL_MIME_FILTER_PROGRESS_H__
#define __CAMEL_MIME_FILTER_PROGRESS_H__
+#include <camel/camel-operation.h>
#include <camel/camel-mime-filter.h>
#define CAMEL_MIME_FILTER_PROGRESS(obj) CAMEL_CHECK_CAST (obj, camel_mime_filter_progress_get_type (), CamelMimeFilterProgress)
@@ -38,8 +39,9 @@
struct _CamelMimeFilterProgress {
CamelMimeFilter parent;
- guint32 total;
- guint32 count;
+ CamelOperation *operation;
+ size_t total;
+ size_t count;
};
struct _CamelMimeFilterProgressClass {
@@ -50,7 +52,7 @@
CamelType camel_mime_filter_progress_get_type (void);
-CamelMimeFilter *camel_mime_filter_progress_new (guint32 total);
+CamelMimeFilter *camel_mime_filter_progress_new (CamelOperation *operation, size_t total);
G_END_DECLS
Modified: trunk/camel/camel-stream-null.h
==============================================================================
--- trunk/camel/camel-stream-null.h (original)
+++ trunk/camel/camel-stream-null.h Sat Jun 21 02:45:15 2008
@@ -43,9 +43,9 @@
CamelStreamClass parent_class;
};
-CamelType camel_stream_null_get_type (void);
+CamelType camel_stream_null_get_type (void);
-CamelStream *camel_stream_null_new (void);
+CamelStream *camel_stream_null_new (void);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]