From 2df62bf0ed2bea260e8610a130b4823b4013568a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 18 Dec 2007 03:14:39 +0000 Subject: [PATCH] Flesh out the docs svn path=/trunk/; revision=6150 --- docs/reference/ChangeLog | 4 ++ docs/reference/gio/Makefile.am | 5 +++ docs/reference/gio/gio-docs.xml | 4 +- docs/reference/gio/gio-sections.txt | 8 +--- docs/reference/gio/migrating.xml | 67 ++++++++++++++++++----------- docs/reference/gio/overview.xml | 53 ++++++++++++++++------- 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,3 +1,7 @@ +2007-12-17 Matthias Clasen + + * gio: Flesh out the overview and migration docs. + 2007-12-17 Matthias Clasen * gio/migration.xml: Stub of a migration chapter 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 @@ for GIO &version; - + API Reference @@ -96,7 +96,7 @@ - + Object Hierarchy 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 Unix Mounts GUnixMount GUnixMountPoint +GUnixMountEntry GUnixMountMonitor g_unix_mount_free g_unix_mount_point_free @@ -1135,13 +1136,6 @@ G_TYPE_UNIX_MOUNT g_unix_mount_monitor_get_type -
-gunixmountentry -GUnixMountEntry -GUnixMountEntry - -
-
gdesktopappinfo Desktop file based GAppInfo 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 @@ - + Migrating to GIO - - This chapter explains how to port applications from POSIX I/O or - gnome-vfs to GIO. - + + Migrating from POSIX to GIO + + + Comparison of POSIX and GIO concepts + + + POSIXGIO + + + char *pathGFile *file + struct stat *bufGFileInfo *info + struct statvfs *bufGFileInfo *info + int fdGInputStream *in + GOutputStream *out + DIR *GFileEnumerator *enum + fstab entryGUnixMountPoint *mount_point + mtab entryGUnixMountEntry *mount_entry + + +
- - Comparison of POSIX and GIO concepts - - - POSIXGIO - - - char *pathGFile *file - struct stat *bufGFileInfo *info - struct statvfs *bufGFileInfo *info - int fdGInputStream *in - GOutputStream *out - DIR *GFileEnumerator *enum - fstab entryGUnixMountPoint *mount_point - mtab entryGUnixMountEntry *mount_entry - - -
+
- + + Migrating from GnomeVFS to GIO - + + Comparison of GnomeVFS and GIO concepts + + + GnomeVFSGIO + + + GnomeVFSVolumeGMount + GnomeVFSDriveGVolume + -GDrive + + +
+ +
+ + 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 @@ GIO Overview + + Introduction + - 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. @@ -68,31 +71,29 @@ 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. - 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. - -
- GIO in the GTK+ library stack - -
-
+
+ GIO in the GTK+ library stack + +
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. @@ -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. +
+ + + Compiling GIO applications + + + GIO comes with a gio-2.0.pc file that you + should use together with pkg-config to obtain + the necessary information about header files and libraries. See + the pkg-config man page or the GLib documentation + for more information on how to use pkg-config + to compile your application. + + + + 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 gio-unix-2.0.pc file + instead of gio-2.0.pc + +