~ubuntu-branches/ubuntu/precise/glib2.0/precise-updates

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/ch28s02.html

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2012-01-17 11:16:09 UTC
  • mfrom: (1.59.36)
  • Revision ID: package-import@ubuntu.com-20120117111609-l6hqg8snni7gh1a4
Tags: 2.31.10-0ubuntu1
* New upstream version:
  GResource:
  - A new facility to allow linking data files into binaries and make 
    them available as resources
  - Resources are compiled using glib-compile-resources
  - GIO supports resource:/// uris to access resources
* debian/libglib2.0-0.install.in: install glib-compile-resources there
* debian/libglib2.0-0.symbols: new version update

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<title>Conceptual differences</title>
 
5
<title>Operations on multiple files</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7
7
<link rel="home" href="index.html" title="GIO Reference Manual">
8
 
<link rel="up" href="ch28.html" title="Migrating from GConf to GSettings">
9
 
<link rel="prev" href="ch28.html" title="Migrating from GConf to GSettings">
10
 
<link rel="next" href="ch28s03.html" title="GConfClient (and GConfBridge) API conversion">
 
8
<link rel="up" href="ch28.html" title="Migrating from GnomeVFS to GIO">
 
9
<link rel="prev" href="ch28.html" title="Migrating from GnomeVFS to GIO">
 
10
<link rel="next" href="ch28s03.html" title="Mime monitoring">
11
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
21
21
</tr></table>
22
22
<div class="section">
23
23
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
24
 
<a name="id1051801"></a>Conceptual differences</h2></div></div></div>
25
 
<p>
26
 
        Conceptually, GConf and GSettings are fairly similar. Both
27
 
        have a concept of pluggable backends. Both keep information
28
 
        about keys and their types in schemas. Both have a concept of
29
 
        mandatory values, which lets you implement lock-down.
30
 
      </p>
31
 
<p>
32
 
        There are some differences in the approach to schemas. GConf
33
 
        installs the schemas into the database and has API to handle
34
 
        schema information (<a href="/usr/share/gtk-doc/html/gconf/gconf-gconf-client.html#gconf-client-get-default-from-schema"><code class="function">gconf_client_get_default_from_schema()</code></a>,
35
 
        <a href="/usr/share/gtk-doc/html/gconf/gconf-gconf-value.html#gconf-value-get-schema"><code class="function">gconf_value_get_schema()</code></a>, etc). GSettings on the other hand
36
 
        assumes that an application knows its own schemas, and does
37
 
        not provide API to handle schema information at runtime.
38
 
        GSettings is also more strict about requiring a schema whenever
39
 
        you want to read or write a key. To deal with more free-form
40
 
        information that would appear in schema-less entries in GConf,
41
 
        GSettings allows for schemas to be 'relocatable'.
42
 
      </p>
43
 
<p>
44
 
        One difference in the way applications interact with their
45
 
        settings is that with GConf you interact with a tree of
46
 
        settings (ie the keys you pass to functions when reading
47
 
        or writing values are actually paths with the actual name
48
 
        of the key as the last element. With GSettings, you create
49
 
        a GSettings object which has an implicit prefix that determines
50
 
        where the settings get stored in the global tree of settings,
51
 
        but the keys you pass when reading or writing values are just
52
 
        the key names, not the full path.
 
24
<a name="id370814"></a>Operations on multiple files</h2></div></div></div>
 
25
<p>
 
26
        gnome-vfs has the dreaded <code class="function">gnome_vfs_xfer_uri_list()</code> function which
 
27
        has tons of options and offers the equivalent of cp, mv, ln, mkdir
 
28
        and rm at the same time. 
 
29
      </p>
 
30
<p>
 
31
        GIO offers a much simpler I/O scheduler functionality instead, that
 
32
        lets you schedule a function to be called in a separate thread, or
 
33
        if threads are not available, as an idle in the mainloop.
 
34
        See <a class="link" href="gio-GIOScheduler.html#g-io-scheduler-push-job" title="g_io_scheduler_push_job ()"><code class="function">g_io_scheduler_push_job()</code></a>. 
53
35
      </p>
54
36
</div>
55
37
<div class="footer">