aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-filter-basic.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
commit8cb514d6dd9497893a35a089d07a132d51263ee7 (patch)
tree9f4e5d1f929da7e0be900919753d419fe4c9c61a /camel/camel-mime-filter-basic.c
parentbcbb63c59f80eb4e684036c5ef58ab141fb01b03 (diff)
downloadgsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.gz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.zst
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.zip
Merge with camel-async.
svn path=/trunk/; revision=4687
Diffstat (limited to 'camel/camel-mime-filter-basic.c')
-rw-r--r--camel/camel-mime-filter-basic.c86
1 files changed, 37 insertions, 49 deletions
diff --git a/camel/camel-mime-filter-basic.c b/camel/camel-mime-filter-basic.c
index 082fa209ad..4b351e4ff4 100644
--- a/camel/camel-mime-filter-basic.c
+++ b/camel/camel-mime-filter-basic.c
@@ -22,45 +22,57 @@
#include "camel-mime-utils.h"
+static void reset(CamelMimeFilter *mf);
+static void complete(CamelMimeFilter *mf, char *in, size_t len,
+ size_t prespace, char **out,
+ size_t *outlen, size_t *outprespace);
+static void filter(CamelMimeFilter *mf, char *in, size_t len,
+ size_t prespace, char **out,
+ size_t *outlen, size_t *outprespace);
+
static void camel_mime_filter_basic_class_init (CamelMimeFilterBasicClass *klass);
static void camel_mime_filter_basic_init (CamelMimeFilterBasic *obj);
static CamelMimeFilterClass *camel_mime_filter_basic_parent;
-enum SIGNALS {
- LAST_SIGNAL
-};
+static void
+camel_mime_filter_basic_class_init (CamelMimeFilterBasicClass *klass)
+{
+ CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
+
+ camel_mime_filter_basic_parent = CAMEL_MIME_FILTER_CLASS(camel_type_get_global_classfuncs (camel_mime_filter_get_type ()));
-static guint signals[LAST_SIGNAL] = { 0 };
+ filter_class->reset = reset;
+ filter_class->filter = filter;
+ filter_class->complete = complete;
+}
-guint
+static void
+camel_mime_filter_basic_init (CamelMimeFilterBasic *obj)
+{
+ obj->state = 0;
+ obj->save = 0;
+}
+
+
+CamelType
camel_mime_filter_basic_get_type (void)
{
- static guint type = 0;
+ static CamelType type = CAMEL_INVALID_TYPE;
- if (!type) {
- GtkTypeInfo type_info = {
- "CamelMimeFilterBasic",
- sizeof (CamelMimeFilterBasic),
- sizeof (CamelMimeFilterBasicClass),
- (GtkClassInitFunc) camel_mime_filter_basic_class_init,
- (GtkObjectInitFunc) camel_mime_filter_basic_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- type = gtk_type_unique (camel_mime_filter_get_type (), &type_info);
+ if (type == CAMEL_INVALID_TYPE) {
+ type = camel_type_register (camel_mime_filter_get_type (), "CamelMimeFilterBasic",
+ sizeof (CamelMimeFilterBasic),
+ sizeof (CamelMimeFilterBasicClass),
+ (CamelObjectClassInitFunc) camel_mime_filter_basic_class_init,
+ NULL,
+ (CamelObjectInitFunc) camel_mime_filter_basic_init,
+ NULL);
}
return type;
}
-static void
-finalise(GtkObject *o)
-{
- ((GtkObjectClass *)camel_mime_filter_basic_parent)->finalize (o);
-}
-
/* should this 'flush' outstanding state/data bytes? */
static void
reset(CamelMimeFilter *mf)
@@ -164,30 +176,6 @@ donothing:
*outprespace = prespace;
}
-static void
-camel_mime_filter_basic_class_init (CamelMimeFilterBasicClass *klass)
-{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
- CamelMimeFilterClass *filter_class = (CamelMimeFilterClass *) klass;
-
- camel_mime_filter_basic_parent = gtk_type_class (camel_mime_filter_get_type ());
-
- object_class->finalize = finalise;
-
- filter_class->reset = reset;
- filter_class->filter = filter;
- filter_class->complete = complete;
-
- gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-}
-
-static void
-camel_mime_filter_basic_init (CamelMimeFilterBasic *obj)
-{
- obj->state = 0;
- obj->save = 0;
-}
-
/**
* camel_mime_filter_basic_new:
*
@@ -198,7 +186,7 @@ camel_mime_filter_basic_init (CamelMimeFilterBasic *obj)
CamelMimeFilterBasic *
camel_mime_filter_basic_new (void)
{
- CamelMimeFilterBasic *new = CAMEL_MIME_FILTER_BASIC ( gtk_type_new (camel_mime_filter_basic_get_type ()));
+ CamelMimeFilterBasic *new = CAMEL_MIME_FILTER_BASIC ( camel_object_new (camel_mime_filter_basic_get_type ()));
return new;
}