[libgsf] Include and header cleanup.



commit be98c1dae0e018f4e034db4b1437aa44d0c90812
Author: Morten Welinder <terra gnome org>
Date:   Sat Feb 23 16:39:23 2013 -0500

    Include and header cleanup.
    
    This introduces gsf/gsf.h as the one-stop include file for libgsf.
    As-of the next 1.14.26, this will be the single header for application
    use.  For compatibility, loading the old single header files still
    ought to work.
    
    The file existed previously, but only defined forwarded basic
    types.

 NEWS                         |    1 +
 gsf/Makefile.am              |    8 ++-
 gsf/gsf-blob.c               |    8 +--
 gsf/gsf-blob.h               |    4 +-
 gsf/gsf-clip-data.c          |    8 +-
 gsf/gsf-clip-data.h          |    2 +-
 gsf/gsf-command-context.c    |    2 +-
 gsf/gsf-command-context.h    |    3 +-
 gsf/gsf-doc-meta-data.c      |    4 +-
 gsf/gsf-doc-meta-data.h      |    4 +-
 gsf/gsf-docprop-vector.c     |    3 +-
 gsf/gsf-docprop-vector.h     |    3 +-
 gsf/gsf-fwd.h                |  121 ++++++++++++++++++++++++++++++++++++
 gsf/gsf-infile-ar.c          |    5 +-
 gsf/gsf-infile-ar.h          |    4 +-
 gsf/gsf-infile-impl.h        |    2 +-
 gsf/gsf-infile-msole.c       |    6 +--
 gsf/gsf-infile-msole.h       |    4 +-
 gsf/gsf-infile-msvba.c       |   11 +---
 gsf/gsf-infile-msvba.h       |    4 +-
 gsf/gsf-infile-stdio.c       |    9 +---
 gsf/gsf-infile-stdio.h       |    4 +-
 gsf/gsf-infile-tar.c         |    5 +-
 gsf/gsf-infile-tar.h         |    4 +-
 gsf/gsf-infile-zip.c         |    5 +-
 gsf/gsf-infile-zip.h         |    4 +-
 gsf/gsf-infile.c             |    4 +-
 gsf/gsf-infile.h             |    3 +-
 gsf/gsf-input-bzip.c         |    7 +--
 gsf/gsf-input-bzip.h         |    4 +-
 gsf/gsf-input-gio.c          |    6 +-
 gsf/gsf-input-gio.h          |    3 +-
 gsf/gsf-input-gzip.c         |    5 +-
 gsf/gsf-input-gzip.h         |    1 +
 gsf/gsf-input-http.c         |    4 +-
 gsf/gsf-input-http.h         |    1 +
 gsf/gsf-input-impl.h         |    4 +-
 gsf/gsf-input-iochannel.c    |    2 +-
 gsf/gsf-input-iochannel.h    |    4 +-
 gsf/gsf-input-memory.c       |    9 +--
 gsf/gsf-input-memory.h       |    1 +
 gsf/gsf-input-proxy.c        |    4 +-
 gsf/gsf-input-proxy.h        |    1 +
 gsf/gsf-input-stdio.c        |    8 +--
 gsf/gsf-input-stdio.h        |    2 +
 gsf/gsf-input-textline.c     |    3 +-
 gsf/gsf-input-textline.h     |    1 +
 gsf/gsf-input.c              |    6 +-
 gsf/gsf-input.h              |    4 +-
 gsf/gsf-io-context.c         |    2 +-
 gsf/gsf-io-context.h         |    2 +-
 gsf/gsf-libxml.c             |    8 +--
 gsf/gsf-libxml.h             |   14 +---
 gsf/gsf-msole-impl.h         |    5 +-
 gsf/gsf-msole-utils.c        |   10 +---
 gsf/gsf-msole-utils.h        |    3 +-
 gsf/gsf-open-pkg-utils.c     |    6 +-
 gsf/gsf-open-pkg-utils.h     |    3 +-
 gsf/gsf-opendoc-utils.c      |    8 +--
 gsf/gsf-opendoc-utils.h      |    3 +-
 gsf/gsf-outfile-impl.h       |    4 +-
 gsf/gsf-outfile-msole.c      |    6 +--
 gsf/gsf-outfile-msole.h      |    4 +-
 gsf/gsf-outfile-stdio.c      |    7 +--
 gsf/gsf-outfile-stdio.h      |    3 +-
 gsf/gsf-outfile-zip.c        |    4 +-
 gsf/gsf-outfile-zip.h        |    4 +-
 gsf/gsf-outfile.c            |    4 +-
 gsf/gsf-outfile.h            |    3 +-
 gsf/gsf-output-bzip.c        |    7 +--
 gsf/gsf-output-bzip.h        |    1 +
 gsf/gsf-output-csv.h         |    1 +
 gsf/gsf-output-gio.c         |    4 +-
 gsf/gsf-output-gio.h         |    3 +-
 gsf/gsf-output-gzip.c        |    5 +-
 gsf/gsf-output-gzip.h        |    1 +
 gsf/gsf-output-iconv.c       |    6 +-
 gsf/gsf-output-iconv.h       |    1 +
 gsf/gsf-output-impl.h        |    4 +-
 gsf/gsf-output-iochannel.c   |    3 +-
 gsf/gsf-output-iochannel.h   |    1 +
 gsf/gsf-output-memory.c      |    4 +-
 gsf/gsf-output-memory.h      |    1 +
 gsf/gsf-output-stdio.c       |    6 +-
 gsf/gsf-output-stdio.h       |    1 +
 gsf/gsf-output-transaction.c |    5 +-
 gsf/gsf-output-transaction.h |    3 +
 gsf/gsf-output.c             |    5 +-
 gsf/gsf-output.h             |    3 +-
 gsf/gsf-shared-memory.c      |    2 +-
 gsf/gsf-shared-memory.h      |    3 +-
 gsf/gsf-structured-blob.c    |    8 +--
 gsf/gsf-structured-blob.h    |    3 +-
 gsf/gsf-timestamp.c          |    3 +-
 gsf/gsf-timestamp.h          |    3 +-
 gsf/gsf-utils.c              |   42 +------------
 gsf/gsf-utils.h              |    3 +-
 gsf/gsf-zip-impl.h           |    3 +-
 gsf/gsf-zip-utils.c          |    3 +-
 gsf/gsf.h                    |  140 +++++++++++++++++++-----------------------
 thumbnailer/main.c           |   13 +---
 tools/gsf.c                  |   16 +----
 102 files changed, 344 insertions(+), 391 deletions(-)
---
diff --git a/NEWS b/NEWS
index 411dd6a..9f8112d 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ Morten:
        * Clean out mistaken null checks from g_object_new.
        * Clean out old glib tests.
        * Speed up ole writing a bit.
+       * Header cleanup.  gsf/gsf.h is now main header.  [#684608]
 
 Paolo Bonzini:
        * Fix gsf_input_dep for msole streams.  [#689706]
diff --git a/gsf/Makefile.am b/gsf/Makefile.am
index da44062..5d940d1 100644
--- a/gsf/Makefile.am
+++ b/gsf/Makefile.am
@@ -24,12 +24,10 @@ libgsf_1_la_SOURCES =               \
        gsf-libxml.c            \
        gsf-doc-meta-data.c     \
        gsf-docprop-vector.c    \
-       gsf-msole-impl.h        \
        gsf-msole-utils.c       \
        gsf-open-pkg-utils.c    \
        gsf-opendoc-utils.c     \
        gsf-timestamp.c         \
-       gsf-zip-impl.h          \
        gsf-zip-utils.c         \
        \
        gsf-input.c             \
@@ -79,6 +77,7 @@ libgsf_1_la_SOURCES =         \
 libgsf_1_includedir = $(includedir)/libgsf-1/gsf
 libgsf_1_include_HEADERS =     \
        gsf.h                   \
+       gsf-fwd.h               \
        gsf-utils.h             \
        gsf-libxml.h            \
        gsf-impl-utils.h        \
@@ -135,6 +134,11 @@ libgsf_1_include_HEADERS =         \
 #      gsf-command-context.h   \
 #      gsf-io-context.h
 
+noinst_HEADERS = \
+       gsf-msole-impl.h        \
+       gsf-zip-impl.h
+
+
 CPP_CFLAGS = -DGLIB_CHECK_VERSION\(x,y,z\)
 LIB_PUBLIC_HDRS = $(libgsf_1_include_HEADERS)
 
diff --git a/gsf/gsf-blob.c b/gsf/gsf-blob.c
index d22f751..7a6c641 100644
--- a/gsf/gsf-blob.c
+++ b/gsf/gsf-blob.c
@@ -19,11 +19,9 @@
  * USA
  */
 
-#include "gsf-config.h"
-#include "gsf-blob.h"
-
-#include "gsf-utils.h"
-#include "gsf-impl-utils.h"
+#include <gsf-config.h>
+#include <gsf/gsf-blob.h>
+#include <gsf/gsf.h>
 
 #include <glib/gi18n-lib.h>
 #include <string.h>
diff --git a/gsf/gsf-blob.h b/gsf/gsf-blob.h
index 961e8c4..90664db 100644
--- a/gsf/gsf-blob.h
+++ b/gsf/gsf-blob.h
@@ -1,8 +1,7 @@
 #ifndef GSF_BLOB_H
 #define GSF_BLOB_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
@@ -16,7 +15,6 @@ G_BEGIN_DECLS
 /* Deprecated old typo */
 #define GSF_TYPE_BLOB                  (gsf_blob_get_type ())
 
-typedef struct _GsfBlob GsfBlob;
 typedef struct _GsfBlobClass GsfBlobClass;
 typedef struct _GsfBlobPrivate GsfBlobPrivate;
 
diff --git a/gsf/gsf-clip-data.c b/gsf/gsf-clip-data.c
index 63a5f5f..69f106a 100644
--- a/gsf/gsf-clip-data.c
+++ b/gsf/gsf-clip-data.c
@@ -19,11 +19,11 @@
  * USA
  */
 
-#include "gsf-config.h"
+#include <gsf-config.h>
+#include <gsf/gsf-clip-data.h>
+#include <gsf/gsf.h>
+
 #include <glib/gi18n-lib.h>
-#include "gsf-clip-data.h"
-#include "gsf-utils.h"
-#include "gsf-impl-utils.h"
 
 /**
  * GsfClipFormatWindows:
diff --git a/gsf/gsf-clip-data.h b/gsf/gsf-clip-data.h
index 6c2927c..42528d3 100644
--- a/gsf/gsf-clip-data.h
+++ b/gsf/gsf-clip-data.h
@@ -1,7 +1,7 @@
 #ifndef GSF_CLIP_DATA_H
 #define GSF_CLIP_DATA_H
 
-#include <gsf/gsf-blob.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-command-context.c b/gsf/gsf-command-context.c
index b7ad7e5..a25f380 100644
--- a/gsf/gsf-command-context.c
+++ b/gsf/gsf-command-context.c
@@ -19,8 +19,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-impl-utils.h>
 #include <gsf/gsf-command-context.h>
+#include <gsf/gsf.h>
 
 static void gsf_command_context_class_init (GsfCommandContextClass *klass);
 static void gsf_command_context_init       (GsfCommandContext *cc, GsfCommandContextClass *klass);
diff --git a/gsf/gsf-command-context.h b/gsf/gsf-command-context.h
index 260430d..23bad0e 100644
--- a/gsf/gsf-command-context.h
+++ b/gsf/gsf-command-context.h
@@ -21,8 +21,7 @@
 #ifndef GSF_COMMAND_CONTEXT_H
 #define GSF_COMMAND_CONTEXT_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-doc-meta-data.c b/gsf/gsf-doc-meta-data.c
index c51c0ce..faab9ef 100644
--- a/gsf/gsf-doc-meta-data.c
+++ b/gsf/gsf-doc-meta-data.c
@@ -22,8 +22,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-doc-meta-data.h>
-#include <gsf/gsf-docprop-vector.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 #include <stdlib.h>
 
diff --git a/gsf/gsf-doc-meta-data.h b/gsf/gsf-doc-meta-data.h
index 2b996eb..d6229f5 100644
--- a/gsf/gsf-doc-meta-data.h
+++ b/gsf/gsf-doc-meta-data.h
@@ -23,9 +23,7 @@
 #ifndef GSF_DOC_META_DATA_H
 #define GSF_DOC_META_DATA_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
-#include <sys/types.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-docprop-vector.c b/gsf/gsf-docprop-vector.c
index 492ef59..e84fb95 100644
--- a/gsf/gsf-docprop-vector.c
+++ b/gsf/gsf-docprop-vector.c
@@ -21,8 +21,7 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-docprop-vector.h>
-#include <gsf/gsf-impl-utils.h>
-#include <stdio.h>
+#include <gsf/gsf.h>
 
 struct _GsfDocPropVector {
        GObject      parent;
diff --git a/gsf/gsf-docprop-vector.h b/gsf/gsf-docprop-vector.h
index 20592c6..d87ab0a 100644
--- a/gsf/gsf-docprop-vector.h
+++ b/gsf/gsf-docprop-vector.h
@@ -22,8 +22,7 @@
 #ifndef GSF_DOCPROP_VECTOR_H
 #define GSF_DOCPROP_VECTOR_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-fwd.h b/gsf/gsf-fwd.h
new file mode 100644
index 0000000..0cfc4e3
--- /dev/null
+++ b/gsf/gsf-fwd.h
@@ -0,0 +1,121 @@
+/*
+ * gsf-fwd.h:
+ *
+ * Copyright (C) 2002-2006 Jody Goldberg (jody gnome org)
+ * Copyright (C) 2013 Morten Welinder (terra gnome org)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2.1 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * 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 Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
+ * USA
+ */
+
+#ifndef GSF_FWD_H
+#define GSF_FWD_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GsfInput:
+ *
+ * Class representing an input stream.
+ */
+typedef struct _GsfInput       GsfInput;
+
+/**
+ * GsfInfil:
+ *
+ * Class representing an input file.
+ */
+typedef struct _GsfInfile      GsfInfile;
+
+/**
+ * GsfOutput:
+ *
+ * Class representing an output stream, counterpart to #GsfInput.
+ */
+typedef struct _GsfOutput      GsfOutput;
+
+/**
+ * GsfOutfile:
+ *
+ * Class representing an output file, counterpart to #GsfInfile.
+ */
+typedef struct _GsfOutfile     GsfOutfile;
+
+/**
+ * GsfDocProp:
+ *
+ * Class representing a properties of a document.
+ */
+typedef struct _GsfDocProp     GsfDocProp;
+
+/**
+ * GsfDocMetaData:
+ *
+ * Class representing information about a document, such as creator and time of
+ * last modification.
+ */
+typedef struct _GsfDocMetaData GsfDocMetaData;
+
+/**
+ * GsfTimestamp:
+ * @date :     #GDate in local timezone
+ * @seconds :  #glong number of seconds since @date.
+ * @time_zone :        possibly blank #GString of the timezone
+ * @timet : as from mktime.
+ *
+ * A point in time.
+ */
+typedef struct _GsfTimestamp   GsfTimestamp;
+
+/**
+ * gsf_off_t:
+ *
+ * Data type to represent offsets (positions) within a data stream.
+ *
+ * FIXME:
+ * gsf_off_t is really supposed to be the widest type off_t can be configured
+ * to on the platform
+ */
+typedef gint64 gsf_off_t;
+
+/**
+ * GSF_OFF_T_FORMAT:
+ *
+ * The printf(3) conversion specifier to be used for printing values of type
+ * #gsf_off_t.
+ */
+#define GSF_OFF_T_FORMAT       G_GINT64_FORMAT
+
+typedef struct _GsfXMLIn               GsfXMLIn;
+typedef struct _GsfXMLInDoc            GsfXMLInDoc;
+typedef struct _GsfXMLInNode           GsfXMLInNode;
+typedef struct _GsfXMLInNS             GsfXMLInNS;
+typedef struct _GsfXMLBlob             GsfXMLBlob;
+typedef struct _GsfXMLOut              GsfXMLOut;
+typedef struct GsfXMLOutClass_         GsfXMLOutClass;
+
+typedef struct _GsfBlob GsfBlob;
+
+#if GLIB_CHECK_VERSION(2,32,0)
+#define GSF_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f)
+#else
+#define GSF_DEPRECATED_FOR(f)
+#endif
+
+G_END_DECLS
+
+#endif /* GSF_H */
diff --git a/gsf/gsf-infile-ar.c b/gsf/gsf-infile-ar.c
index 1697446..cf945d2 100644
--- a/gsf/gsf-infile-ar.c
+++ b/gsf/gsf-infile-ar.c
@@ -26,10 +26,9 @@
 /*** TODO *** DOES COMPILE. DOES NOT WORK *** TODO ***/
 
 #include <gsf-config.h>
-#include <gsf/gsf-infile-impl.h>
 #include <gsf/gsf-infile-ar.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 #undef G_LOG_DOMAIN
diff --git a/gsf/gsf-infile-ar.h b/gsf/gsf-infile-ar.h
index 7a8458b..3bebe1a 100644
--- a/gsf/gsf-infile-ar.h
+++ b/gsf/gsf-infile-ar.h
@@ -22,8 +22,8 @@
 #ifndef GSF_INFILE_AR_H
 #define GSF_INFILE_AR_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-infile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-infile-impl.h b/gsf/gsf-infile-impl.h
index 87f90d4..80df3e3 100644
--- a/gsf/gsf-infile-impl.h
+++ b/gsf/gsf-infile-impl.h
@@ -22,7 +22,7 @@
 #ifndef GSF_INFILE_IMPL_H
 #define GSF_INFILE_IMPL_H
 
-#include <gsf/gsf.h>
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-input-impl.h>
 #include <gsf/gsf-infile.h>
 
diff --git a/gsf/gsf-infile-msole.c b/gsf/gsf-infile-msole.c
index b6ca923..4990fcd 100644
--- a/gsf/gsf-infile-msole.c
+++ b/gsf/gsf-infile-msole.c
@@ -25,13 +25,9 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-infile-impl.h>
 #include <gsf/gsf-infile-msole.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
 #include <gsf/gsf-msole-impl.h>
-#include <gsf/gsf-msole-utils.h>
-#include <gsf/gsf-input-proxy.h>
 
 #include <string.h>
 #include <stdio.h>
diff --git a/gsf/gsf-infile-msole.h b/gsf/gsf-infile-msole.h
index 8131590..c82a32b 100644
--- a/gsf/gsf-infile-msole.h
+++ b/gsf/gsf-infile-msole.h
@@ -22,8 +22,8 @@
 #ifndef GSF_INFILE_MSOLE_H
 #define GSF_INFILE_MSOLE_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-infile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-infile-msvba.c b/gsf/gsf-infile-msvba.c
index 5256120..c187d59 100644
--- a/gsf/gsf-infile-msvba.c
+++ b/gsf/gsf-infile-msvba.c
@@ -29,17 +29,8 @@
  */
 #include <gsf-config.h>
 #include <gsf/gsf-infile-msvba.h>
-#include <gsf/gsf-infile-impl.h>
-#include <gsf/gsf-input-memory.h>
-#include <gsf/gsf-input-proxy.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-msole-utils.h>
-#include <gsf/gsf-infile-msole.h>
-#include <gsf/gsf-infile-zip.h>
-#include <gsf/gsf-open-pkg-utils.h>
-#include <gsf/gsf-utils.h>
-
-#include <stdio.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 static GObjectClass *parent_class;
diff --git a/gsf/gsf-infile-msvba.h b/gsf/gsf-infile-msvba.h
index 9cb5371..7144aaa 100644
--- a/gsf/gsf-infile-msvba.h
+++ b/gsf/gsf-infile-msvba.h
@@ -22,8 +22,8 @@
 #ifndef GSF_INFILE_MSVBA_H
 #define GSF_INFILE_MSVBA_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-infile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-infile-stdio.c b/gsf/gsf-infile-stdio.c
index 69b5389..a2dab7f 100644
--- a/gsf/gsf-infile-stdio.c
+++ b/gsf/gsf-infile-stdio.c
@@ -21,14 +21,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-infile.h>
-#include <gsf/gsf-infile-impl.h>
-#include <gsf/gsf-infile-stdio.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-input-stdio.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
-
-#include <stdio.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 #include <errno.h>
 #ifdef HAVE_UNISTD_H
@@ -36,7 +30,6 @@
 #endif
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <glib.h>
 #include <string.h>
 
 static GObjectClass *parent_class;
diff --git a/gsf/gsf-infile-stdio.h b/gsf/gsf-infile-stdio.h
index 5addac9..bc7ecc6 100644
--- a/gsf/gsf-infile-stdio.h
+++ b/gsf/gsf-infile-stdio.h
@@ -22,8 +22,8 @@
 #ifndef GSF_INFILE_STDIO_H
 #define GSF_INFILE_STDIO_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-infile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-infile-tar.c b/gsf/gsf-infile-tar.c
index 0cd76be..649ab3b 100644
--- a/gsf/gsf-infile-tar.c
+++ b/gsf/gsf-infile-tar.c
@@ -24,11 +24,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-infile-impl.h>
 #include <gsf/gsf-infile-tar.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
-#include <gsf/gsf-input-proxy.h>
+#include <gsf/gsf.h>
 
 #include <string.h>
 
diff --git a/gsf/gsf-infile-tar.h b/gsf/gsf-infile-tar.h
index e624c19..0c09dfa 100644
--- a/gsf/gsf-infile-tar.h
+++ b/gsf/gsf-infile-tar.h
@@ -21,8 +21,8 @@
 #ifndef GSF_INFILE_TAR_H
 #define GSF_INFILE_TAR_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-infile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-infile-zip.c b/gsf/gsf-infile-zip.c
index 4649c46..267211c 100644
--- a/gsf/gsf-infile-zip.c
+++ b/gsf/gsf-infile-zip.c
@@ -21,12 +21,9 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-infile-impl.h>
 #include <gsf/gsf-infile-zip.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
 #include <gsf/gsf-zip-impl.h>
-#include <gsf/gsf-input-proxy.h>
 
 #include <string.h>
 #include <zlib.h>
diff --git a/gsf/gsf-infile-zip.h b/gsf/gsf-infile-zip.h
index 3cb42d0..ca8c0a9 100644
--- a/gsf/gsf-infile-zip.h
+++ b/gsf/gsf-infile-zip.h
@@ -22,8 +22,8 @@
 #ifndef GSF_INFILE_ZIP_H
 #define GSF_INFILE_ZIP_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-infile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-infile.c b/gsf/gsf-infile.c
index 99e219f..550bce9 100644
--- a/gsf/gsf-infile.c
+++ b/gsf/gsf-infile.c
@@ -20,8 +20,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-infile-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf-infile.h>
+#include <gsf/gsf.h>
 
 #include <stdarg.h>
 
diff --git a/gsf/gsf-infile.h b/gsf/gsf-infile.h
index d6e7cec..a6d0d15 100644
--- a/gsf/gsf-infile.h
+++ b/gsf/gsf-infile.h
@@ -22,8 +22,7 @@
 #ifndef GSF_INFILE_H
 #define GSF_INFILE_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-input-bzip.c b/gsf/gsf-input-bzip.c
index 350e92a..9a2d83e 100644
--- a/gsf/gsf-input-bzip.c
+++ b/gsf/gsf-input-bzip.c
@@ -21,14 +21,11 @@
 
 #include <gsf-config.h>
 #include <gsf-input-bzip.h>
-#include <gsf-input-memory.h>
-#include <gsf-output-memory.h>
-#include <gsf-input-impl.h>
+#include <gsf.h>
+
 #include <string.h>
 
 #ifdef HAVE_BZ2
-/* For getting FILE.  Don't ask.  */
-#include <stdio.h>
 #include <bzlib.h>
 #define BZ_BUFSIZ 1024
 #endif
diff --git a/gsf/gsf-input-bzip.h b/gsf/gsf-input-bzip.h
index 4160f36..1bae9d9 100644
--- a/gsf/gsf-input-bzip.h
+++ b/gsf/gsf-input-bzip.h
@@ -22,8 +22,8 @@
 #ifndef GSF_INPUT_BZIP_H
 #define GSF_INPUT_BZIP_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-input-gio.c b/gsf/gsf-input-gio.c
index 43037d4..617ffd4 100644
--- a/gsf/gsf-input-gio.c
+++ b/gsf/gsf-input-gio.c
@@ -21,10 +21,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-input-gio.h>
-#include <gsf/gsf-input-memory.h>
-#include <gsf/gsf-output-memory.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 struct _GsfInputGio {
diff --git a/gsf/gsf-input-gio.h b/gsf/gsf-input-gio.h
index 5cff3d7..a98d021 100644
--- a/gsf/gsf-input-gio.h
+++ b/gsf/gsf-input-gio.h
@@ -22,8 +22,9 @@
 #ifndef GSF_INPUT_GIO_H
 #define GSF_INPUT_GIO_H
 
-#include <gsf/gsf-input.h>
+#include <gsf/gsf-fwd.h>
 #include <gio/gio.h>
+#include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-input-gzip.c b/gsf/gsf-input-gzip.c
index c842471..b6849c5 100644
--- a/gsf/gsf-input-gzip.c
+++ b/gsf/gsf-input-gzip.c
@@ -22,12 +22,9 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-input-gzip.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
 
 #include <zlib.h>
-#include <stdio.h>
 #include <string.h>
 
 #define Z_BUFSIZE 0x100
diff --git a/gsf/gsf-input-gzip.h b/gsf/gsf-input-gzip.h
index bd72cbc..c60690d 100644
--- a/gsf/gsf-input-gzip.h
+++ b/gsf/gsf-input-gzip.h
@@ -22,6 +22,7 @@
 #ifndef GSF_INPUT_GZIP_H
 #define GSF_INPUT_GZIP_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-input-http.c b/gsf/gsf-input-http.c
index a8afeb2..c1068b6 100644
--- a/gsf/gsf-input-http.c
+++ b/gsf/gsf-input-http.c
@@ -21,8 +21,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-input-http.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
+
 #include <libxml/nanohttp.h>
 
 struct _GsfInputHTTP {
diff --git a/gsf/gsf-input-http.h b/gsf/gsf-input-http.h
index c6b10de..367b35a 100644
--- a/gsf/gsf-input-http.h
+++ b/gsf/gsf-input-http.h
@@ -22,6 +22,7 @@
 #ifndef __GSF_INPUT_HTTP_H__
 #define __GSF_INPUT_HTTP_H__
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-input-impl.h b/gsf/gsf-input-impl.h
index 7c05e9a..36ce3ba 100644
--- a/gsf/gsf-input-impl.h
+++ b/gsf/gsf-input-impl.h
@@ -22,9 +22,7 @@
 #ifndef GSF_INPUT_IMPL_H
 #define GSF_INPUT_IMPL_H
 
-#include <gsf/gsf.h>
-#include <gsf/gsf-input.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-input-iochannel.c b/gsf/gsf-input-iochannel.c
index fd4f00b..b12be30 100644
--- a/gsf/gsf-input-iochannel.c
+++ b/gsf/gsf-input-iochannel.c
@@ -22,7 +22,7 @@
 
 #include <gsf-config.h>
 #include <gsf-input-iochannel.h>
-#include <gsf-input-memory.h>
+#include <gsf.h>
 
 /**
  * gsf_input_memory_new_from_iochannel:
diff --git a/gsf/gsf-input-iochannel.h b/gsf/gsf-input-iochannel.h
index 8f73869..4d2f2ea 100644
--- a/gsf/gsf-input-iochannel.h
+++ b/gsf/gsf-input-iochannel.h
@@ -22,8 +22,8 @@
 #ifndef GSF_INPUT_IOCHANNEL_H
 #define GSF_INPUT_IOCHANNEL_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-input-memory.c b/gsf/gsf-input-memory.c
index 7b71a72..6f72f7b 100644
--- a/gsf/gsf-input-memory.c
+++ b/gsf/gsf-input-memory.c
@@ -20,14 +20,13 @@
  */
 
 #include <gsf-config.h>
-#include <string.h>
 #include <gsf/gsf-input-memory.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
-#include <gsf/gsf-shared-memory.h>
+#include <gsf/gsf.h>
+
 #include <glib/gstdio.h>
 
+#include <string.h>
+
 #ifdef G_OS_WIN32
 #include <windows.h>
 #include <sys/types.h>
diff --git a/gsf/gsf-input-memory.h b/gsf/gsf-input-memory.h
index a1222f1..52a3ed4 100644
--- a/gsf/gsf-input-memory.h
+++ b/gsf/gsf-input-memory.h
@@ -22,6 +22,7 @@
 #ifndef GSF_INPUT_MEMORY_H
 #define GSF_INPUT_MEMORY_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-input-proxy.c b/gsf/gsf-input-proxy.c
index 15c0578..e28ef17 100644
--- a/gsf/gsf-input-proxy.c
+++ b/gsf/gsf-input-proxy.c
@@ -21,9 +21,7 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-input-proxy.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
 
 static GObjectClass *parent_class;
 
diff --git a/gsf/gsf-input-proxy.h b/gsf/gsf-input-proxy.h
index 461af03..b4df482 100644
--- a/gsf/gsf-input-proxy.h
+++ b/gsf/gsf-input-proxy.h
@@ -22,6 +22,7 @@
 #ifndef GSF_INPUT_PROXY_H
 #define GSF_INPUT_PROXY_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-input-stdio.c b/gsf/gsf-input-stdio.c
index a5496fa..5c9ed13 100644
--- a/gsf/gsf-input-stdio.c
+++ b/gsf/gsf-input-stdio.c
@@ -21,14 +21,10 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-input-stdio.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
-#include <gsf/gsf-input-memory.h>
-#include <gsf/gsf-output-memory.h>
+#include <gsf/gsf.h>
+
 #include <glib/gstdio.h>
 
-#include <stdio.h>
 #include <errno.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
diff --git a/gsf/gsf-input-stdio.h b/gsf/gsf-input-stdio.h
index 7ccb661..a9797f2 100644
--- a/gsf/gsf-input-stdio.h
+++ b/gsf/gsf-input-stdio.h
@@ -22,7 +22,9 @@
 #ifndef GSF_INPUT_STDIO_H
 #define GSF_INPUT_STDIO_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-input.h>
+
 #include <stdio.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-input-textline.c b/gsf/gsf-input-textline.c
index 4e44f0b..15b4cb6 100644
--- a/gsf/gsf-input-textline.c
+++ b/gsf/gsf-input-textline.c
@@ -21,8 +21,7 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-input-textline.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
 
 #include <string.h>
 
diff --git a/gsf/gsf-input-textline.h b/gsf/gsf-input-textline.h
index 0da5305..4baaaa0 100644
--- a/gsf/gsf-input-textline.h
+++ b/gsf/gsf-input-textline.h
@@ -22,6 +22,7 @@
 #ifndef GSF_INPUT_TEXTLINE_H
 #define GSF_INPUT_TEXTLINE_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-input.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-input.c b/gsf/gsf-input.c
index ee093cf..9d20d05 100644
--- a/gsf/gsf-input.c
+++ b/gsf/gsf-input.c
@@ -20,10 +20,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-input-impl.h>
-#include <gsf/gsf-input-gzip.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-input-bzip.h>
+#include <gsf/gsf-input.h>
+#include <gsf/gsf.h>
 
 #include <string.h>
 
diff --git a/gsf/gsf-input.h b/gsf/gsf-input.h
index 469e278..66cb41d 100644
--- a/gsf/gsf-input.h
+++ b/gsf/gsf-input.h
@@ -22,10 +22,8 @@
 #ifndef GSF_INPUT_H
 #define GSF_INPUT_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 #include <sys/types.h>
-#include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-io-context.c b/gsf/gsf-io-context.c
index 9af65e6..5534a90 100644
--- a/gsf/gsf-io-context.c
+++ b/gsf/gsf-io-context.c
@@ -20,8 +20,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-impl-utils.h>
 #include <gsf/gsf-io-context.h>
+#include <gsf/gsf.h>
 
 struct _GsfIOContext {
        GsfCommandContext object;
diff --git a/gsf/gsf-io-context.h b/gsf/gsf-io-context.h
index 2de887c..e15e09b 100644
--- a/gsf/gsf-io-context.h
+++ b/gsf/gsf-io-context.h
@@ -22,7 +22,7 @@
 #ifndef GSF_IO_CONTEXT_H
 #define GSF_IO_CONTEXT_H
 
-#include <gsf/gsf-command-context.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-libxml.c b/gsf/gsf-libxml.c
index 4e74ad6..73b82b6 100644
--- a/gsf/gsf-libxml.c
+++ b/gsf/gsf-libxml.c
@@ -21,12 +21,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-libxml.h>
-#include <gsf/gsf-input.h>
-#include <gsf/gsf-output.h>
-#include <gsf/gsf-input-gzip.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
-#include <gsf/gsf-timestamp.h>
+#include <gsf/gsf.h>
+
 #include <glib/gi18n-lib.h>
 
 #include <math.h>
diff --git a/gsf/gsf-libxml.h b/gsf/gsf-libxml.h
index e9ab640..bfe2812 100644
--- a/gsf/gsf-libxml.h
+++ b/gsf/gsf-libxml.h
@@ -22,8 +22,7 @@
 #ifndef GSF_LIBXML_H
 #define GSF_LIBXML_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 #include <libxml/tree.h>
 
 G_BEGIN_DECLS
@@ -53,11 +52,6 @@ gboolean gsf_xml_probe (GsfInput *input,
 
 /****************************************************************************/
 /* Simplified wrapper to SAX based xml import */
-typedef struct _GsfXMLIn               GsfXMLIn;
-typedef struct _GsfXMLInDoc            GsfXMLInDoc;
-typedef struct _GsfXMLInNode           GsfXMLInNode;
-typedef struct _GsfXMLInNS             GsfXMLInNS;
-typedef struct _GsfXMLBlob             GsfXMLBlob;
 
 /**
  * GsfXMLContent:
@@ -155,9 +149,7 @@ GType            gsf_xml_in_ns_get_type (void);
 /****************************************************************************/
 /* Simplified GSF based xml export (does not use libxml) */
 
-typedef struct _GsfXMLOut              GsfXMLOut;
-
-typedef struct {
+struct GsfXMLOutClass_ {
        GObjectClass  base;
 
        /*< private >*/
@@ -166,7 +158,7 @@ typedef struct {
        void (*_gsf_reserved2) (void);
        void (*_gsf_reserved3) (void);
        void (*_gsf_reserved4) (void);
-} GsfXMLOutClass;
+};
 
 struct _GsfXMLOut {
        GObject    base;
diff --git a/gsf/gsf-msole-impl.h b/gsf/gsf-msole-impl.h
index bbe6512..dae562e 100644
--- a/gsf/gsf-msole-impl.h
+++ b/gsf/gsf-msole-impl.h
@@ -1,4 +1,5 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* THIS IS NOT INSTALLED */
+
 /*
  * gsf-msole-impl.h:
  *
@@ -22,7 +23,7 @@
 #ifndef GSF_MSOLE_IMPL_H
 #define GSF_MSOLE_IMPL_H
 
-#include <gsf/gsf.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-msole-utils.c b/gsf/gsf-msole-utils.c
index 3aa535b..2090ade 100644
--- a/gsf/gsf-msole-utils.c
+++ b/gsf/gsf-msole-utils.c
@@ -22,20 +22,12 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-docprop-vector.h>
 #include <gsf/gsf-msole-utils.h>
-#include <gsf/gsf-input.h>
-#include <gsf/gsf-output.h>
-#include <gsf/gsf-utils.h>
-#include <gsf/gsf-timestamp.h>
-#include <gsf/gsf-meta-names.h>
-#include <gsf/gsf-doc-meta-data.h>
-#include <gsf/gsf-clip-data.h>
+#include <gsf/gsf.h>
 
 #include <locale.h>
 #include <stdlib.h>
 #include <string.h>
-#include <stdio.h>
 #include <time.h>
 #include <glib/gi18n-lib.h>
 
diff --git a/gsf/gsf-msole-utils.h b/gsf/gsf-msole-utils.h
index ccf7e38..57675b5 100644
--- a/gsf/gsf-msole-utils.h
+++ b/gsf/gsf-msole-utils.h
@@ -22,8 +22,7 @@
 #ifndef GSF_MSOLE_UTILS_H
 #define GSF_MSOLE_UTILS_H
 
-#include <gsf/gsf.h>
-#include <gsf/gsf-doc-meta-data.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-open-pkg-utils.c b/gsf/gsf-open-pkg-utils.c
index d975268..cad01e0 100644
--- a/gsf/gsf-open-pkg-utils.c
+++ b/gsf/gsf-open-pkg-utils.c
@@ -22,12 +22,10 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-open-pkg-utils.h>
-#include <gsf/gsf-input.h>
-#include <gsf/gsf-infile.h>
-#include <gsf/gsf-outfile-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
 
 #include <glib/gi18n-lib.h>
+
 #include <string.h>
 
 #undef G_LOG_DOMAIN
diff --git a/gsf/gsf-open-pkg-utils.h b/gsf/gsf-open-pkg-utils.h
index e2d1518..45d80e7 100644
--- a/gsf/gsf-open-pkg-utils.h
+++ b/gsf/gsf-open-pkg-utils.h
@@ -23,8 +23,7 @@
 #ifndef GSF_OPEN_PKG_UTILS_H
 #define GSF_OPEN_PKG_UTILS_H
 
-#include <gsf/gsf.h>
-#include <gsf/gsf-libxml.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-opendoc-utils.c b/gsf/gsf-opendoc-utils.c
index 7bb022d..0deac72 100644
--- a/gsf/gsf-opendoc-utils.c
+++ b/gsf/gsf-opendoc-utils.c
@@ -25,12 +25,10 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-opendoc-utils.h>
-#include <gsf/gsf-meta-names.h>
-#include <gsf/gsf-doc-meta-data.h>
-#include <gsf/gsf-timestamp.h>
-#include <gsf/gsf-docprop-vector.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
+
 #include <glib/gi18n-lib.h>
 
 
diff --git a/gsf/gsf-opendoc-utils.h b/gsf/gsf-opendoc-utils.h
index 4d51241..bfcfd09 100644
--- a/gsf/gsf-opendoc-utils.h
+++ b/gsf/gsf-opendoc-utils.h
@@ -24,9 +24,8 @@
 #ifndef GSF_OPENDOC_UTILS_H
 #define GSF_OPENDOC_UTILS_H
 
-#include <gsf/gsf.h>
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-libxml.h>
-#include <gmodule.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-outfile-impl.h b/gsf/gsf-outfile-impl.h
index 5ee2b12..8a857e2 100644
--- a/gsf/gsf-outfile-impl.h
+++ b/gsf/gsf-outfile-impl.h
@@ -22,9 +22,7 @@
 #ifndef GSF_OUTFILE_IMPL_H
 #define GSF_OUTFILE_IMPL_H
 
-#include <gsf/gsf.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-outfile.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-outfile-msole.c b/gsf/gsf-outfile-msole.c
index 3c68f82..87ed2e1 100644
--- a/gsf/gsf-outfile-msole.c
+++ b/gsf/gsf-outfile-msole.c
@@ -20,15 +20,11 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-outfile-impl.h>
 #include <gsf/gsf-outfile-msole.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
 #include <gsf/gsf-msole-impl.h>
-#include <gsf/gsf-msole-utils.h>
-#include <gsf/gsf-utils.h>
 
 #include <string.h>
-#include <stdio.h>
 
 static GObjectClass *parent_class;
 static GsfOutputClass *gsf_output_class;
diff --git a/gsf/gsf-outfile-msole.h b/gsf/gsf-outfile-msole.h
index 1cd4c17..f9c9b53 100644
--- a/gsf/gsf-outfile-msole.h
+++ b/gsf/gsf-outfile-msole.h
@@ -22,8 +22,8 @@
 #ifndef GSF_OUTFILE_MSOLE_H
 #define GSF_OUTFILE_MSOLE_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-outfile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-outfile-stdio.c b/gsf/gsf-outfile-stdio.c
index 322baaf..e813205 100644
--- a/gsf/gsf-outfile-stdio.c
+++ b/gsf/gsf-outfile-stdio.c
@@ -20,12 +20,9 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-outfile-impl.h>
 #include <gsf/gsf-outfile-stdio.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-output-stdio.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
+
 #include <glib/gstdio.h>
 
 #include <errno.h>
diff --git a/gsf/gsf-outfile-stdio.h b/gsf/gsf-outfile-stdio.h
index bfe4280..ef39fe6 100644
--- a/gsf/gsf-outfile-stdio.h
+++ b/gsf/gsf-outfile-stdio.h
@@ -22,7 +22,8 @@
 #ifndef GSF_OUTFILE_STDIO_H
 #define GSF_OUTFILE_STDIO_H
 
-#include <gsf/gsf.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-outfile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-outfile-zip.c b/gsf/gsf-outfile-zip.c
index e2760d5..4a01868 100644
--- a/gsf/gsf-outfile-zip.c
+++ b/gsf/gsf-outfile-zip.c
@@ -20,10 +20,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-outfile-impl.h>
 #include <gsf/gsf-outfile-zip.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
 #include <gsf/gsf-zip-impl.h>
 
 #include <string.h>
diff --git a/gsf/gsf-outfile-zip.h b/gsf/gsf-outfile-zip.h
index ae9de3d..43efc2f 100644
--- a/gsf/gsf-outfile-zip.h
+++ b/gsf/gsf-outfile-zip.h
@@ -22,8 +22,8 @@
 #ifndef GSF_OUTFILE_ZIP_H
 #define GSF_OUTFILE_ZIP_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-outfile.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-outfile.c b/gsf/gsf-outfile.c
index 9efec53..bff47ef 100644
--- a/gsf/gsf-outfile.c
+++ b/gsf/gsf-outfile.c
@@ -20,8 +20,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-outfile-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf-outfile.h>
+#include <gsf/gsf.h>
 
 #define GET_CLASS(instance) G_TYPE_INSTANCE_GET_CLASS (instance, GSF_OUTFILE_TYPE, GsfOutfileClass)
 
diff --git a/gsf/gsf-outfile.h b/gsf/gsf-outfile.h
index 89212ec..1c9c7c9 100644
--- a/gsf/gsf-outfile.h
+++ b/gsf/gsf-outfile.h
@@ -22,8 +22,7 @@
 #ifndef GSF_OUTFILE_H
 #define GSF_OUTFILE_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-output-bzip.c b/gsf/gsf-output-bzip.c
index 1b2dcb6..7a5b1a9 100644
--- a/gsf/gsf-output-bzip.c
+++ b/gsf/gsf-output-bzip.c
@@ -21,15 +21,10 @@
  */
 
 #include <gsf-config.h>
-
 #include <gsf/gsf-output-bzip.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
 
 #ifdef HAVE_BZ2
-/* For getting FILE.  Don't ask.  */
-#include <stdio.h>
 #include <bzlib.h>
 #define BZ_BUFSIZE 1024
 #endif
diff --git a/gsf/gsf-output-bzip.h b/gsf/gsf-output-bzip.h
index 323e321..3507e2c 100644
--- a/gsf/gsf-output-bzip.h
+++ b/gsf/gsf-output-bzip.h
@@ -22,6 +22,7 @@
 #ifndef GSF_OUTPUT_BZIP_H
 #define GSF_OUTPUT_BZIP_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-output-csv.h b/gsf/gsf-output-csv.h
index af5fd42..14f94e3 100644
--- a/gsf/gsf-output-csv.h
+++ b/gsf/gsf-output-csv.h
@@ -21,6 +21,7 @@
 #ifndef GSF_OUTPUT_CSV_H
 #define GSF_OUTPUT_CSV_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-output-gio.c b/gsf/gsf-output-gio.c
index ce43660..0025751 100644
--- a/gsf/gsf-output-gio.c
+++ b/gsf/gsf-output-gio.c
@@ -21,8 +21,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-output-gio.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 struct _GsfOutputGio {
diff --git a/gsf/gsf-output-gio.h b/gsf/gsf-output-gio.h
index 5a03318..569bd91 100644
--- a/gsf/gsf-output-gio.h
+++ b/gsf/gsf-output-gio.h
@@ -22,8 +22,9 @@
 #ifndef GSF_OUTPUT_GIO_H
 #define GSF_OUTPUT_GIO_H
 
-#include <gsf/gsf-output.h>
+#include <gsf/gsf-fwd.h>
 #include <gio/gio.h>
+#include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-output-gzip.c b/gsf/gsf-output-gzip.c
index 61f60fa..e182f2f 100644
--- a/gsf/gsf-output-gzip.c
+++ b/gsf/gsf-output-gzip.c
@@ -21,12 +21,9 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-output-gzip.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
 
 #include <zlib.h>
-#include <stdio.h>
 #include <time.h>
 #include <string.h>
 
diff --git a/gsf/gsf-output-gzip.h b/gsf/gsf-output-gzip.h
index ff4e9d5..081210d 100644
--- a/gsf/gsf-output-gzip.h
+++ b/gsf/gsf-output-gzip.h
@@ -22,6 +22,7 @@
 #ifndef GSF_OUTPUT_GZIP_H
 #define GSF_OUTPUT_GZIP_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-output-iconv.c b/gsf/gsf-output-iconv.c
index 7f31040..4d1c789 100644
--- a/gsf/gsf-output-iconv.c
+++ b/gsf/gsf-output-iconv.c
@@ -21,10 +21,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-output-iconv.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
-#include <glib.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 #define BUF_SIZE 0x400
diff --git a/gsf/gsf-output-iconv.h b/gsf/gsf-output-iconv.h
index a52e22b..6d2b0e7 100644
--- a/gsf/gsf-output-iconv.h
+++ b/gsf/gsf-output-iconv.h
@@ -22,6 +22,7 @@
 #ifndef GSF_OUTPUT_ICONV_H
 #define GSF_OUTPUT_ICONV_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-output-impl.h b/gsf/gsf-output-impl.h
index b849626..7ef99cc 100644
--- a/gsf/gsf-output-impl.h
+++ b/gsf/gsf-output-impl.h
@@ -22,9 +22,7 @@
 #ifndef GSF_OUTPUT_IMPL_H
 #define GSF_OUTPUT_IMPL_H
 
-#include <gsf/gsf.h>
-#include <gsf/gsf-output.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-output-iochannel.c b/gsf/gsf-output-iochannel.c
index 4f0936b..3df476c 100644
--- a/gsf/gsf-output-iochannel.c
+++ b/gsf/gsf-output-iochannel.c
@@ -20,8 +20,7 @@
  */
 #include <gsf-config.h>
 #include <gsf/gsf-output-iochannel.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
 
 static GsfOutputClass *parent_class;
 
diff --git a/gsf/gsf-output-iochannel.h b/gsf/gsf-output-iochannel.h
index 5e92b4d..dd76ac3 100644
--- a/gsf/gsf-output-iochannel.h
+++ b/gsf/gsf-output-iochannel.h
@@ -22,6 +22,7 @@
 #ifndef GSF_OUTPUT_IOCHANNEL_H
 #define GSF_OUTPUT_IOCHANNEL_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-output-memory.c b/gsf/gsf-output-memory.c
index 97bea4f..e6a0de3 100644
--- a/gsf/gsf-output-memory.c
+++ b/gsf/gsf-output-memory.c
@@ -20,8 +20,8 @@
  */
 #include <gsf-config.h>
 #include <gsf/gsf-output-memory.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 #define MIN_BLOCK 512
diff --git a/gsf/gsf-output-memory.h b/gsf/gsf-output-memory.h
index 7b5641f..413c4c6 100644
--- a/gsf/gsf-output-memory.h
+++ b/gsf/gsf-output-memory.h
@@ -22,6 +22,7 @@
 #ifndef GSF_OUTPUT_MEMORY_H
 #define GSF_OUTPUT_MEMORY_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-output.h>
 
 G_BEGIN_DECLS
diff --git a/gsf/gsf-output-stdio.c b/gsf/gsf-output-stdio.c
index d9e4cdd..34048b3 100644
--- a/gsf/gsf-output-stdio.c
+++ b/gsf/gsf-output-stdio.c
@@ -21,12 +21,10 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-output-stdio.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-utils.h>
+#include <gsf/gsf.h>
+
 #include <glib/gstdio.h>
 
-#include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #ifdef HAVE_UNISTD_H
diff --git a/gsf/gsf-output-stdio.h b/gsf/gsf-output-stdio.h
index 9e188b7..acac922 100644
--- a/gsf/gsf-output-stdio.h
+++ b/gsf/gsf-output-stdio.h
@@ -22,6 +22,7 @@
 #ifndef GSF_OUTPUT_STDIO_H
 #define GSF_OUTPUT_STDIO_H
 
+#include <gsf/gsf-fwd.h>
 #include <gsf/gsf-output.h>
 #include <stdio.h>
 
diff --git a/gsf/gsf-output-transaction.c b/gsf/gsf-output-transaction.c
index cd5c190..d1cca90 100644
--- a/gsf/gsf-output-transaction.c
+++ b/gsf/gsf-output-transaction.c
@@ -20,11 +20,8 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-output.h>
-#include <gsf/gsf-output-impl.h>
 #include <gsf/gsf-output-transaction.h>
-#include <gsf/gsf-output-memory.h>
+#include <gsf/gsf.h>
 
 struct _GsfOutputTransaction
 {
diff --git a/gsf/gsf-output-transaction.h b/gsf/gsf-output-transaction.h
index 6637396..52c1239 100644
--- a/gsf/gsf-output-transaction.h
+++ b/gsf/gsf-output-transaction.h
@@ -22,6 +22,9 @@
 #ifndef GSF_OUTPUT_TRANSACTION_H
 #define GSF_OUTPUT_TRANSACTION_H
 
+#include <gsf/gsf-fwd.h>
+#include <gsf/gsf-output.h>
+
 G_BEGIN_DECLS
 
 #define GSF_OUTPUT_TRANSACTION_TYPE        (gsf_output_transaction_get_type ())
diff --git a/gsf/gsf-output.c b/gsf/gsf-output.c
index b3de585..55491c3 100644
--- a/gsf/gsf-output.c
+++ b/gsf/gsf-output.c
@@ -20,8 +20,9 @@
  */
 
 #include <gsf-config.h>
-#include <gsf/gsf-output-impl.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf-output.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 static gsf_off_t gsf_output_real_vprintf (GsfOutput *output,
diff --git a/gsf/gsf-output.h b/gsf/gsf-output.h
index 2b7f829..7969826 100644
--- a/gsf/gsf-output.h
+++ b/gsf/gsf-output.h
@@ -22,9 +22,8 @@
 #ifndef GSF_OUTPUT_H
 #define GSF_OUTPUT_H
 
-#include <gsf/gsf.h>
+#include <gsf/gsf-fwd.h>
 #include <sys/types.h>
-#include <glib-object.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-shared-memory.c b/gsf/gsf-shared-memory.c
index 2cf7237..d7de9d4 100644
--- a/gsf/gsf-shared-memory.c
+++ b/gsf/gsf-shared-memory.c
@@ -21,7 +21,7 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-shared-memory.h>
-#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf.h>
 
 #ifdef HAVE_MMAP
 #include <sys/types.h>
diff --git a/gsf/gsf-shared-memory.h b/gsf/gsf-shared-memory.h
index d2c446a..a486716 100644
--- a/gsf/gsf-shared-memory.h
+++ b/gsf/gsf-shared-memory.h
@@ -22,8 +22,7 @@
 #ifndef GSF_SHARED_MEMORY_H
 #define GSF_SHARED_MEMORY_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-structured-blob.c b/gsf/gsf-structured-blob.c
index 50d8d5b..74d76d2 100644
--- a/gsf/gsf-structured-blob.c
+++ b/gsf/gsf-structured-blob.c
@@ -21,12 +21,8 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-structured-blob.h>
-#include <gsf/gsf-impl-utils.h>
-#include <gsf/gsf-infile-impl.h>
-#include <gsf/gsf-input.h>
-#include <gsf/gsf-outfile.h>
-#include <gsf/gsf-output.h>
-#include <gsf/gsf-shared-memory.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 
 static GObjectClass *parent_class;
diff --git a/gsf/gsf-structured-blob.h b/gsf/gsf-structured-blob.h
index 8aed27e..1fb85fe 100644
--- a/gsf/gsf-structured-blob.h
+++ b/gsf/gsf-structured-blob.h
@@ -22,8 +22,7 @@
 #ifndef GSF_STRUCTURED_BLOB_H
 #define GSF_STRUCTURED_BLOB_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-timestamp.c b/gsf/gsf-timestamp.c
index 9d45f9a..58418fe 100644
--- a/gsf/gsf-timestamp.c
+++ b/gsf/gsf-timestamp.c
@@ -21,9 +21,10 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-timestamp.h>
+#include <gsf/gsf.h>
+
 #include <string.h>
 #include <time.h>
-#include <stdio.h>
 #ifdef G_OS_WIN32
 #include <windows.h>
 #endif
diff --git a/gsf/gsf-timestamp.h b/gsf/gsf-timestamp.h
index d3cf006..2ec2210 100644
--- a/gsf/gsf-timestamp.h
+++ b/gsf/gsf-timestamp.h
@@ -23,8 +23,7 @@
 #ifndef GSF_TIMESTAMP_H
 #define GSF_TIMESTAMP_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-utils.c b/gsf/gsf-utils.c
index 60f112b..3c989d7 100644
--- a/gsf/gsf-utils.c
+++ b/gsf/gsf-utils.c
@@ -21,52 +21,12 @@
 
 #include <gsf-config.h>
 #include <gsf/gsf-utils.h>
-#include <gsf/gsf-input.h>
-#include <gsf/gsf-doc-meta-data.h>
-#include <gsf/gsf-docprop-vector.h>
-#include <gsf/gsf-impl-utils.h>
-
-#include <gsf/gsf-infile.h>
-#include <gsf/gsf-infile-msole.h>
-#include <gsf/gsf-infile-msvba.h>
-#include <gsf/gsf-infile-stdio.h>
-#include <gsf/gsf-infile-tar.h>
-#include <gsf/gsf-infile-zip.h>
-
-#include <gsf/gsf-input.h>
-#include <gsf/gsf-input-gzip.h>
-#include <gsf/gsf-input-http.h>
-#include <gsf/gsf-input-memory.h>
-#include <gsf/gsf-input-proxy.h>
-#include <gsf/gsf-input-stdio.h>
-#include <gsf/gsf-input-textline.h>
-
-#include <gsf/gsf-output.h>
-#include <gsf/gsf-output-bzip.h>
-#include <gsf/gsf-output-csv.h>
-#include <gsf/gsf-output-gzip.h>
-#include <gsf/gsf-output-iconv.h>
-#include <gsf/gsf-output-iochannel.h>
-#include <gsf/gsf-output-memory.h>
-#include <gsf/gsf-output-stdio.h>
-
-#include <gsf/gsf-outfile.h>
-#include <gsf/gsf-outfile-msole.h>
-#include <gsf/gsf-outfile-stdio.h>
-#include <gsf/gsf-outfile-zip.h>
-
-#include <gsf/gsf-libxml.h>
-#include <gsf/gsf-blob.h>
-#include <gsf/gsf-structured-blob.h>
-#include <gsf/gsf-shared-memory.h>
-#include <gsf/gsf-clip-data.h>
-#include <gsf/gsf-open-pkg-utils.h>
+#include <gsf/gsf.h>
 
 #include <gobject/gvaluecollector.h>
 #include <glib/gi18n-lib.h>
 
 #include <ctype.h>
-#include <stdio.h>
 #include <string.h>
 
 /*
diff --git a/gsf/gsf-utils.h b/gsf/gsf-utils.h
index 11e25f6..83d1be2 100644
--- a/gsf/gsf-utils.h
+++ b/gsf/gsf-utils.h
@@ -22,8 +22,7 @@
 #ifndef GSF_UTILS_H
 #define GSF_UTILS_H
 
-#include <gsf/gsf.h>
-#include <glib-object.h>
+#include <gsf/gsf-fwd.h>
 
 G_BEGIN_DECLS
 
diff --git a/gsf/gsf-zip-impl.h b/gsf/gsf-zip-impl.h
index 6210bd5..84d455e 100644
--- a/gsf/gsf-zip-impl.h
+++ b/gsf/gsf-zip-impl.h
@@ -1,4 +1,5 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* THIS IS NOT INSTALLED */
+
 /*
  * gsf-zip-impl.h:
  *
diff --git a/gsf/gsf-zip-utils.c b/gsf/gsf-zip-utils.c
index 1a772cf..64dca98 100644
--- a/gsf/gsf-zip-utils.c
+++ b/gsf/gsf-zip-utils.c
@@ -20,10 +20,11 @@
  */
 
 #include <gsf-config.h>
+#include <gsf/gsf-zip-impl.h>
 #include <gsf/gsf.h>
+
 #include <sys/types.h>
 #include <string.h>
-#include "gsf-zip-impl.h"
 
 /**
  * SECTION:zip
diff --git a/gsf/gsf.h b/gsf/gsf.h
index ffe7697..95209be 100644
--- a/gsf/gsf.h
+++ b/gsf/gsf.h
@@ -1,8 +1,8 @@
-/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 /*
  * gsf.h:
  *
  * Copyright (C) 2002-2006 Jody Goldberg (jody gnome org)
+ * Copyright (C) 2013 Morten Welinder (terra gnome org)
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 2.1 of the GNU Lesser General Public
@@ -19,92 +19,80 @@
  * USA
  */
 
-#ifndef GSF_H
-#define GSF_H
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-/**
- * GsfInput:
+/*
+ * Rules for header inclusion:
  *
- * Class representing an input stream.
- */
-typedef struct _GsfInput       GsfInput;
-
-/**
- * GsfInfil:
+ * 1. Applications should include gsf/gsf.h only and require libgsf 1.14.26
+ *    Prior to 1.14.26 the practice was to include specific headers.   That
+ *    still ought to work, but is deprecated.
  *
- * Class representing an input file.
- */
-typedef struct _GsfInfile      GsfInfile;
-
-/**
- * GsfOutput:
+ * 2. gsf/gsf-foo.c should include <gsf-config.h>, then <gsf/gsf-foo.h>,
+ *    then <gsf/gsf.h>.  No further gsf headers should be needed.
  *
- * Class representing an output stream, counterpart to #GsfInput.
- */
-typedef struct _GsfOutput      GsfOutput;
-
-/**
- * GsfOutfile:
+ * 3. gsf/gsf-foo.h should include <gsf/gsf-fwd.h>.  It must not include
+ *    <gsf/gsf.h> or <gsf-config.h> (which isn't even installed).  If
+ *    a super-class is needed, include also the header for that class.
+ *    For convenience, classes derived from Gsf{In,Out}{put,file} should
+ *    include the relevant header too.
  *
- * Class representing an output file, counterpart to #GsfInfile.
+ * 4. Rules 2 and 3 do not apply to headers that are not installed.
  */
-typedef struct _GsfOutfile     GsfOutfile;
 
-/**
- * GsfDocProp:
- *
- * Class representing a properties of a document.
- */
-typedef struct _GsfDocProp     GsfDocProp;
+#ifndef GSF_H
+#define GSF_H
 
-/**
- * GsfDocMetaData:
- *
- * Class representing information about a document, such as creator and time of
- * last modification.
- */
-typedef struct _GsfDocMetaData GsfDocMetaData;
+#include <glib.h>
 
-/**
- * GsfTimestamp:
- * @date :     #GDate in local timezone
- * @seconds :  #glong number of seconds since @date.
- * @time_zone :        possibly blank #GString of the timezone
- * @timet : as from mktime.
- *
- * A point in time.
- */
-typedef struct _GsfTimestamp   GsfTimestamp;
+#include <gsf/gsf-fwd.h>
 
-/**
- * gsf_off_t:
- *
- * Data type to represent offsets (positions) within a data stream.
- *
- * FIXME:
- * gsf_off_t is really supposed to be the widest type off_t can be configured
- * to on the platform
- */
-typedef gint64 gsf_off_t;
+#include <gsf/gsf-input.h>
+#include <gsf/gsf-output.h>
+#include <gsf/gsf-infile.h>
+#include <gsf/gsf-outfile.h>
 
-/**
- * GSF_OFF_T_FORMAT:
- *
- * The printf(3) conversion specifier to be used for printing values of type
- * #gsf_off_t.
- */
-#define GSF_OFF_T_FORMAT       G_GINT64_FORMAT
+#include <gsf/gsf-impl-utils.h>
+#include <gsf/gsf-input-impl.h>
+#include <gsf/gsf-infile-impl.h>
+#include <gsf/gsf-output-impl.h>
+#include <gsf/gsf-outfile-impl.h>
 
-#if GLIB_CHECK_VERSION(2,32,0)
-#define GSF_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f)
-#else
-#define GSF_DEPRECATED_FOR(f)
-#endif
+#include <gsf/gsf-libxml.h>
 
-G_END_DECLS
+#include <gsf/gsf-blob.h>
+#include <gsf/gsf-clip-data.h>
+#include <gsf/gsf-doc-meta-data.h>
+#include <gsf/gsf-docprop-vector.h>
+#include <gsf/gsf-infile-msole.h>
+#include <gsf/gsf-infile-msvba.h>
+#include <gsf/gsf-infile-stdio.h>
+#include <gsf/gsf-infile-zip.h>
+#include <gsf/gsf-input-bzip.h>
+#include <gsf/gsf-input-gio.h>
+#include <gsf/gsf-input-gzip.h>
+#include <gsf/gsf-input-http.h>
+#include <gsf/gsf-input-memory.h>
+#include <gsf/gsf-input-proxy.h>
+#include <gsf/gsf-input-stdio.h>
+#include <gsf/gsf-infile-tar.h>
+#include <gsf/gsf-input-textline.h>
+#include <gsf/gsf-meta-names.h>
+#include <gsf/gsf-msole-utils.h>
+#include <gsf/gsf-opendoc-utils.h>
+#include <gsf/gsf-open-pkg-utils.h>
+#include <gsf/gsf-outfile-msole.h>
+#include <gsf/gsf-outfile-stdio.h>
+#include <gsf/gsf-outfile-zip.h>
+#include <gsf/gsf-output-bzip.h>
+#include <gsf/gsf-output-csv.h>
+#include <gsf/gsf-output-gio.h>
+#include <gsf/gsf-output-gzip.h>
+#include <gsf/gsf-output-iconv.h>
+#include <gsf/gsf-output-iochannel.h>
+#include <gsf/gsf-output-memory.h>
+#include <gsf/gsf-output-stdio.h>
+#include <gsf/gsf-shared-memory.h>
+#include <gsf/gsf-structured-blob.h>
+#include <gsf/gsf-timestamp.h>
+#include <gsf/gsf-utils.h>
 
 #endif /* GSF_H */
diff --git a/thumbnailer/main.c b/thumbnailer/main.c
index 6176ae3..d3ea66f 100644
--- a/thumbnailer/main.c
+++ b/thumbnailer/main.c
@@ -19,20 +19,11 @@
  * USA
  */
 
-#include <gsf/gsf-input-memory.h>
-#include <gsf/gsf-input-stdio.h>
-#include <gsf/gsf-infile.h>
-#include <gsf/gsf-infile-msole.h>
-#include <gsf/gsf-infile-zip.h>
-#include <gsf/gsf-meta-names.h>
-#include <gsf/gsf-msole-utils.h>
-#include <gsf/gsf-utils.h>
-#include <gsf/gsf-clip-data.h>
-#include <gsf/gsf-open-pkg-utils.h>
+#include <gsf-config.h>
+#include <gsf/gsf.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <glib.h>
-#include <gsf-config.h>
 
 #ifdef HAVE_GDK_PIXBUF
 #include <gdk-pixbuf/gdk-pixbuf.h>
diff --git a/tools/gsf.c b/tools/gsf.c
index 4c5d309..f8a1ce9 100644
--- a/tools/gsf.c
+++ b/tools/gsf.c
@@ -1,23 +1,11 @@
 /* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
-#include <gsf/gsf-infile-msole.h>
-#include <gsf/gsf-infile-tar.h>
-#include <gsf/gsf-infile-zip.h>
-#include <gsf/gsf-infile.h>
-#include <gsf/gsf-input-stdio.h>
-#include <gsf/gsf-output-stdio.h>
-#include <gsf/gsf-outfile.h>
-#include <gsf/gsf-outfile-msole.h>
-#include <gsf/gsf-outfile-zip.h>
-#include <gsf/gsf-utils.h>
-#include <gsf/gsf-doc-meta-data.h>
-#include <gsf/gsf-msole-utils.h>
+#include <gsf-config.h>
+#include <gsf/gsf.h>
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 #include <string.h>
 
-#define GETTEXT_PACKAGE NULL /* FIXME */
-
 static gboolean show_version;
 
 static GOptionEntry const gsf_options [] = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]