summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-09-12 17:15:04 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-09-15 21:26:41 -0400
commit9de9d2de44d4723935176c71f8f09a90f15e678a (patch)
treeae39671955225c6457e7e5cf37d334cdc76e7168 /src
parent9ad227f5f57d93e86b8d7ecf5b73bdf3bdf6ced7 (diff)
[stream] Start vte stream design
New buffer coming!
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/vtestream.c55
-rw-r--r--src/vtestream.h32
3 files changed, 89 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 2dac6e4..97218f8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,6 +75,8 @@ libvte_la_SOURCES = \
vteseq-list.h \
vteskel.c \
vteskel.h \
+ vtestream.c \
+ vtestream.h \
vtetc.c \
vtetc.h \
vtetree.c \
diff --git a/src/vtestream.c b/src/vtestream.c
new file mode 100644
index 0000000..705384e
--- /dev/null
+++ b/src/vtestream.c
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Library 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 Library General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#include <config.h>
+
+#include "debug.h"
+#include "vtestream.h"
+
+#include <glib-object.h>
+
+/*
+ * VteStream: Abstract base stream class
+ */
+
+typedef GObject VteStream;
+
+typedef struct _VteStreamClass {
+ void (*add) (const char *data, gsize len);
+ void (*read) (gsize offset, char *data, gsize len);
+ void (*trunc) (gsize len);
+ void (*newpage) (void);
+} VteStreamClass;
+
+static GType _vte_stream_get_type (void);
+#define VTE_TYPE_STREAM _vte_stream_get_type ()
+
+G_DEFINE_ABSTRACT_TYPE (VteStream, _vte_stream, G_TYPE_OBJECT)
+
+static void
+_vte_stream_class_init (VteStreamClass *klass)
+{
+}
+
+static void
+_vte_stream_init (VteStream *stream)
+{
+}
+
diff --git a/src/vtestream.h b/src/vtestream.h
new file mode 100644
index 0000000..65fa892
--- /dev/null
+++ b/src/vtestream.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2009 Red Hat, Inc.
+ *
+ * This is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Library 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 Library General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Red Hat Author(s): Behdad Esfahbod
+ */
+
+#ifndef vtestream_h_included
+#define vtestream_h_included
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+
+G_END_DECLS
+
+#endif
+