aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-stream.c')
-rw-r--r--camel/camel-stream.c177
1 files changed, 177 insertions, 0 deletions
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
new file mode 100644
index 0000000000..9af57c5485
--- /dev/null
+++ b/camel/camel-stream.c
@@ -0,0 +1,177 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* camel-stream.c : abstract class for a stream */
+
+
+/*
+ *
+ * Copyright (C) 1999 Bertrand Guiheneuf <Bertrand.Guiheneuf@inria.fr> .
+ *
+ * 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
+ */
+
+#include "camel-stream.h"
+
+static CamelStreamClass *parent_class=NULL;
+
+
+/* Returns the class for a CamelMimeMessage */
+#define CS_CLASS(so) CAMEL_STREAM_CLASS (GTK_OBJECT(so)->klass)
+
+static gint _read (CamelStream *stream, gchar **buffer, gint n);
+static gint _write (CamelStream *stream, gchar *buffer, gint n);
+static void _flush (CamelStream *stream);
+static gint _available (CamelStream *stream);
+static gboolean _eos (CamelStream *stream);
+static void _close (CamelStream *stream);
+
+
+static void
+camel_stream_class_init (CamelStreamClass *camel_stream_class)
+{
+
+ parent_class = gtk_type_class (gtk_object_get_type ());
+
+ /* virtual method definition */
+ camel_stream_class->read = _read;
+ camel_stream_class->write = _write;
+ camel_stream_class->flush = _flush;
+ camel_stream_class->available = _available;
+ camel_stream_class->eos = _eos;
+ camel_stream_class->close = _close;
+
+ /* virtual method overload */
+
+}
+
+
+
+GtkType
+camel_stream_get_type (void)
+{
+ static GtkType camel_stream_type = 0;
+
+ if (!camel_stream_type) {
+ GtkTypeInfo camel_stream_info =
+ {
+ "CamelMimeMessage",
+ sizeof (CamelStream),
+ sizeof (CamelStreamClass),
+ (GtkClassInitFunc) camel_stream_class_init,
+ (GtkObjectInitFunc) NULL,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
+ };
+
+ camel_stream_type = gtk_type_unique (gtk_object_get_type (), &camel_stream_info);
+ }
+
+ return camel_stream_type;
+}
+
+
+
+/**
+ * _read: read bytes from a stream
+ * @stream: stream
+ * @buffer: buffer where bytes are stored
+ * @n: max number of bytes to read
+ *
+ *
+ *
+ * Return value: number of bytes actually read.
+ **/
+static gint
+_read (CamelStream *stream, gchar **buffer, gint n)
+{
+
+}
+
+
+/**
+ * _write: read bytes to a stream
+ * @stream: the stream
+ * @buffer: byte buffer
+ * @n: number of bytes to write
+ *
+ *
+ *
+ * Return value: the number of bytes actually written
+ * in the stream.
+ **/
+static gint
+_write (CamelStream *stream, gchar *buffer, gint n)
+{
+
+}
+
+
+
+/**
+ * _flush: flush pending changes
+ * @stream: the stream
+ *
+ *
+ **/
+static void
+_flush (CamelStream *stream)
+{
+
+}
+
+
+
+/**
+ * _available: return the number of bytes available for reading
+ * @stream: the stream
+ *
+ * Return the number of bytes available without blocking.
+ *
+ * Return value: the number of bytes available
+ **/
+static gint
+_available (CamelStream *stream)
+{
+
+}
+
+
+/**
+ * _eos: test if there are bytes left to read
+ * @stream: the stream
+ *
+ *
+ *
+ * Return value: true if all stream has been read
+ **/
+static gboolean
+_eos (CamelStream *stream)
+{
+
+}
+
+
+/**
+ * _close: close a stream
+ * @stream: the stream
+ *
+ *
+ **/
+static void
+_close (CamelStream *stream)
+{
+
+}
6:28:57 +0800'>2004-02-122-3/+2 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-0/+1 * Upgrade to 0.28.obraun2003-12-082-2/+2 * Upgrade to 0.27.obraun2003-06-012-2/+2 * De-pkg-comment.knu2003-02-212-1/+1 * Ports needed pod2man, that means USE_PERL5=yesedwin2002-11-051-0/+1 * upgrade to 0.26ijliao2002-06-263-7/+11 * Upgrade to 0.25.2brian2001-09-052-2/+2 * Update to version 0.25kevlo2001-09-022-4/+4 * Add {BUILD,RUN}_DEPENDS on the abook and gnupg ports and update pkg-pliststeve2001-02-262-0/+7 * update 0.22 to 0.24mharo2001-02-123-2/+6 * Spaces->tabs in the mail category.olgeni2001-02-051-2/+2 * Update to version 0.22kevlo2000-11-192-2/+2 * Update to version 0.20.1kevlo2000-10-043-2/+5 * Update MD5 for version 0.19.5jedgar2000-07-281-1/+1 * Update port to 0.19.5jedgar2000-07-223-2/+3 * Update lbdb to 0.19.4, to escape fennerism.nbm2000-06-223-7/+11 * Add binary and manpage for lbdb_dotlock.asami2000-06-072-1/+2 * Update to use PORTNAME/PORTVERSIONcpiazza2000-04-141-3/+3