summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2007-12-18 03:14:39 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-12-18 03:14:39 +0000
commit2df62bf0ed2bea260e8610a130b4823b4013568a (patch)
tree56936a0728ff6bec557370910ecc83a5c64ce49c
parent0debd52858ffb4f468e55cd2f3c7e4dec5455b94 (diff)
downloadglib-2df62bf0ed2bea260e8610a130b4823b4013568a.tar.gz
Flesh out the docs
svn path=/trunk/; revision=6150
-rw-r--r--docs/reference/ChangeLog4
-rw-r--r--docs/reference/gio/Makefile.am5
-rw-r--r--docs/reference/gio/gio-docs.xml4
-rw-r--r--docs/reference/gio/gio-sections.txt8
-rw-r--r--docs/reference/gio/migrating.xml67
-rw-r--r--docs/reference/gio/overview.xml53
6 files changed, 92 insertions, 49 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index b237d45a3..a74ac1ffc 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,5 +1,9 @@
2007-12-17 Matthias Clasen <mclasen@redhat.com>
+ * gio: Flesh out the overview and migration docs.
+
+2007-12-17 Matthias Clasen <mclasen@redhat.com>
+
* gio/migration.xml: Stub of a migration chapter
* gio/overview.xml: Stub of an overview
* gio/gvfs-overview.{odg,png}: Overview diagram taken
diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
index 88afc47a7..9aad48f1b 100644
--- a/docs/reference/gio/Makefile.am
+++ b/docs/reference/gio/Makefile.am
@@ -92,6 +92,11 @@ HTML_IMAGES = \
content_files = \
version.xml \
+ overview.xml \
+ migrating.xml
+
+expand_content_files = \
+ overview.xml \
migrating.xml
extra_files = \
diff --git a/docs/reference/gio/gio-docs.xml b/docs/reference/gio/gio-docs.xml
index 9b778a45f..fa8ae2137 100644
--- a/docs/reference/gio/gio-docs.xml
+++ b/docs/reference/gio/gio-docs.xml
@@ -10,7 +10,7 @@
<releaseinfo>for GIO &version;</releaseinfo>
</bookinfo>
- <xi:include href="overview.xml"/>
+ <xi:include href="xml/overview.xml"/>
<part>
<title>API Reference</title>
@@ -96,7 +96,7 @@
</chapter>
</part>
- <xi:include href="migrating.xml"/>
+ <xi:include href="xml/migrating.xml"/>
<chapter id="gio-hierarchy">
<title>Object Hierarchy</title>
diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt
index 97f8580d4..4a45d3548 100644
--- a/docs/reference/gio/gio-sections.txt
+++ b/docs/reference/gio/gio-sections.txt
@@ -1091,6 +1091,7 @@ g_filename_completer_get_type
<TITLE>Unix Mounts</TITLE>
GUnixMount
GUnixMountPoint
+GUnixMountEntry
GUnixMountMonitor
g_unix_mount_free
g_unix_mount_point_free
@@ -1136,13 +1137,6 @@ g_unix_mount_monitor_get_type
</SECTION>
<SECTION>
-<FILE>gunixmountentry</FILE>
-<TITLE>GUnixMountEntry</TITLE>
-GUnixMountEntry
-<SUBSECTION Standard>
-</SECTION>
-
-<SECTION>
<FILE>gdesktopappinfo</FILE>
<TITLE>Desktop file based GAppInfo</TITLE>
GDesktopAppInfo
diff --git a/docs/reference/gio/migrating.xml b/docs/reference/gio/migrating.xml
index b1be94674..86c63e5ae 100644
--- a/docs/reference/gio/migrating.xml
+++ b/docs/reference/gio/migrating.xml
@@ -1,30 +1,47 @@
-<chapter id="migrating">
+<part id="migrating">
<title>Migrating to GIO</title>
- <para>
- This chapter explains how to port applications from POSIX I/O or
- gnome-vfs to GIO.
- </para>
+ <chapter>
+ <title>Migrating from POSIX to GIO</title>
+
+ <table id="posix-vs-gio">
+ <title>Comparison of POSIX and GIO concepts</title>
+ <tgroup cols="2">
+ <thead>
+ <row><entry>POSIX</entry><entry>GIO</entry></row>
+ </thead>
+ <tbody>
+ <row><entry>char *path</entry><entry>GFile *file</entry></row>
+ <row><entry>struct stat *buf</entry><entry>GFileInfo *info</entry></row>
+ <row><entry>struct statvfs *buf</entry><entry>GFileInfo *info</entry></row>
+ <row><entry morerows="1">int fd</entry><entry>GInputStream *in</entry></row>
+ <row><entry>GOutputStream *out</entry></row>
+ <row><entry>DIR *</entry><entry>GFileEnumerator *enum</entry></row>
+ <row><entry>fstab entry</entry><entry>GUnixMountPoint *mount_point</entry></row>
+ <row><entry>mtab entry</entry><entry>GUnixMountEntry *mount_entry</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
- <table id="posix-vs-gio">
- <title>Comparison of POSIX and GIO concepts</title>
- <tgroup cols="2">
- <thead>
- <row><entry>POSIX</entry><entry>GIO</entry></row>
- </thead>
- <tbody>
- <row><entry>char *path</entry><entry>GFile *file</entry></row>
- <row><entry>struct stat *buf</entry><entry>GFileInfo *info</entry></row>
- <row><entry>struct statvfs *buf</entry><entry>GFileInfo *info</entry></row>
- <row><entry morerows="1">int fd</entry><entry>GInputStream *in</entry></row>
- <row><entry>GOutputStream *out</entry></row>
- <row><entry>DIR *</entry><entry>GFileEnumerator *enum</entry></row>
- <row><entry>fstab entry</entry><entry>GUnixMountPoint *mount_point</entry></row>
- <row><entry>mtab entry</entry><entry>GUnixMountEntry *mount_entry</entry></row>
- </tbody>
- </tgroup>
- </table>
+ </chapter>
- <!-- FIXME now explain ! -->
+ <chapter>
+ <title>Migrating from GnomeVFS to GIO</title>
-</chapter>
+ <table id="gnome-vfs-vs-gio">
+ <title>Comparison of GnomeVFS and GIO concepts</title>
+ <tgroup cols="2">
+ <thead>
+ <row><entry>GnomeVFS</entry><entry>GIO</entry></row>
+ </thead>
+ <tbody>
+ <row><entry>GnomeVFSVolume</entry><entry>GMount</entry></row>
+ <row><entry>GnomeVFSDrive</entry><entry>GVolume</entry></row>
+ <row><entry>-</entry><entry>GDrive</entry></row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </chapter>
+
+</part>
diff --git a/docs/reference/gio/overview.xml b/docs/reference/gio/overview.xml
index 18d6e79cd..5f3d5045b 100644
--- a/docs/reference/gio/overview.xml
+++ b/docs/reference/gio/overview.xml
@@ -1,13 +1,16 @@
<part>
<title>GIO Overview</title>
+ <chapter>
+ <title>Introduction</title>
+
<para>
- GIO is striving to provide a modern, easy-to-use VFS api that sits
+ GIO is striving to provide a modern, easy-to-use VFS API that sits
at the right level in the library stack. The goal is to overcome the
- shortcomings of gnome-vfs and provide an api that is so good that
+ shortcomings of GnomeVFS and provide an API that is so good that
developers prefer it over raw POSIX calls. Among other things
that means using GObject. It also means not cloning the POSIX
- api, but providing a higher-level, document-centric interfaces.
+ API, but providing a higher-level, document-centric interfaces.
</para>
<para>
@@ -68,31 +71,29 @@
</varlistentry>
</variablelist>
Beyond these, GIO provides facilities for file monitoring,
- asynchronous I/O and filename completion. In addition to the
+ asynchronous I/O and filename completion. In addition to the
interfaces, GIO provides implementations for the local case.
Implementations for various network file systems are provided
by the GVFS package as loadable modules.
</para>
<para>
- Other design choices which consciously break with the gnome-vfs
+ Other design choices which consciously break with the GnomeVFS
design are to move backends out-of-process, which minimizes the
dependency bloat and makes the whole system more robust. The backends
- are not included in GIO, but in the separate GVFS package. GVFS
- also contains the GVFS daemon, which spawn further mount daemons
- for each individual connection.
+ are not included in GIO, but in the separate GVFS package. The GVFS
+ package also contains the GVFS daemon, which spawn further mount
+ daemons for each individual connection.
</para>
- <para>
- <figure id="mainloop-states">
- <title>GIO in the GTK+ library stack</title>
- <graphic fileref="gvfs-overview.png" format="PNG"></graphic>
- </figure>
- </para>
+ <figure id="gvfs-overview">
+ <title>GIO in the GTK+ library stack</title>
+ <graphic fileref="gvfs-overview.png" format="PNG"></graphic>
+ </figure>
<para>
The GIO model of I/O is stateful: if an application establishes e.g.
- a sftp connection to a server, it becomes available to all applications
+ a SFTP connection to a server, it becomes available to all applications
in the session; the user does not have to enter his password over
and over again.
</para>
@@ -100,5 +101,27 @@
One of the big advantages of putting the VFS in the GLib layer
is that GTK+ can directly use it, e.g. in the filechooser.
</para>
+ </chapter>
+
+ <chapter>
+ <title>Compiling GIO applications</title>
+
+ <para>
+ GIO comes with a <filename>gio-2.0.pc</filename> file that you
+ should use together with <literal>pkg-config</literal> to obtain
+ the necessary information about header files and libraries. See
+ the <literal>pkg-config</literal> man page or the GLib documentation
+ for more information on how to use <literal>pkg-config</literal>
+ to compile your application.
+ </para>
+
+ <para>
+ If you are using GIO on UNIX-like systems, you may want to use
+ UNIX-specific GIO interfaces such as #GUnixInputStream,
+ #GUnixOutputStream, #GUnixMount or #GDesktopAppInfo.
+ To do so, use the <filename>gio-unix-2.0.pc</filename> file
+ instead of <filename>gio-2.0.pc</filename>
+ </para>
+ </chapter>
</part>