Import Upstream version 2.72.4
This commit is contained in:
commit
4ef3ff9793
2003 changed files with 1332420 additions and 0 deletions
3
docs/reference/gio/.gitignore
vendored
Normal file
3
docs/reference/gio/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
*.1
|
||||
gio-overrides.txt
|
||||
tmpl
|
||||
36
docs/reference/gio/concat-files-helper.py
Normal file
36
docs/reference/gio/concat-files-helper.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2018 Collabora Inc.
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library 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
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General
|
||||
# Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Author: Xavier Claessens <xavier.claessens@collabora.com>
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
if len(sys.argv) < 3:
|
||||
print(
|
||||
"Usage: {} <output file> <input file 1> ...".format(
|
||||
os.path.basename(sys.argv[0])
|
||||
)
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
with open(sys.argv[1], "w") as outfile:
|
||||
for fname in sys.argv[2:]:
|
||||
with open(fname) as infile:
|
||||
for line in infile:
|
||||
outfile.write(line)
|
||||
352
docs/reference/gio/gapplication.xml
Normal file
352
docs/reference/gio/gapplication.xml
Normal file
|
|
@ -0,0 +1,352 @@
|
|||
<refentry id="gapplication-tool" lang="en">
|
||||
<refentryinfo>
|
||||
<title>gapplication</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>Ryan</firstname>
|
||||
<surname>Lortie</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gapplication</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gapplication</refname>
|
||||
<refpurpose>D-Bus application launcher</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gapplication</command>
|
||||
<arg choice="plain">help</arg>
|
||||
<arg choice="opt"><replaceable>COMMAND</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gapplication</command>
|
||||
<arg choice="plain">version</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gapplication</command>
|
||||
<arg choice="plain">list-apps</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gapplication</command>
|
||||
<arg choice="plain">launch</arg>
|
||||
<arg choice="plain"><replaceable>APPID</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gapplication</command>
|
||||
<arg choice="plain">launch</arg>
|
||||
<arg choice="plain"><replaceable>APPID</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>FILE</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gapplication</command>
|
||||
<arg choice="plain">list-actions</arg>
|
||||
<arg choice="plain"><replaceable>APPID</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gapplication</command>
|
||||
<arg choice="plain">action</arg>
|
||||
<arg choice="plain"><replaceable>APPID</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>ACTION</replaceable></arg>
|
||||
<arg choice="opt"><replaceable>PARAMETER</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
|
||||
<para>
|
||||
<command>gapplication</command> is a commandline implementation of the client-side of the
|
||||
<interfacename>org.freedesktop.Application</interfacename> interface as specified by the freedesktop.org
|
||||
Desktop Entry Specification.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>gapplication</command> can be used to start applications that have
|
||||
<varname>DBusActivatable</varname> set to <literal>true</literal> in their <filename>.desktop</filename>
|
||||
files and can be used to send messages to already-running instances of other applications.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is possible for applications to refer to <command>gapplication</command> in the <varname>Exec</varname>
|
||||
line of their <filename class='extension'>.desktop</filename> file to maintain backwards compatibility
|
||||
with implementations that do not directly support <varname>DBusActivatable</varname>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<command>gapplication</command> ships as part of <application>GLib</application>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Commands</title>
|
||||
|
||||
<refsect2>
|
||||
<title>Global commands</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>help</command>
|
||||
<arg choice="opt"><replaceable>COMMAND</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Displays a short synopsis of the available commands or provides detailed help on a specific
|
||||
command.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>version</command>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints the GLib version whence <command>gapplication</command> came.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>list-apps</command>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a list of all application IDs that are known to support D-Bus activation. This list is
|
||||
generated by scanning <filename class='extension'>.desktop</filename> files as per the current
|
||||
<envar>XDG_DATA_DIRS</envar>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>launch</command>
|
||||
<arg choice="plain"><replaceable>APPID</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>FILE</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Launches an application.
|
||||
</para>
|
||||
<para>
|
||||
The first parameter is the application ID in the familiar "reverse DNS" style (eg:
|
||||
'<literal>org.gnome.app</literal>') without the <filename class='extension'>.desktop</filename>
|
||||
suffix.
|
||||
</para>
|
||||
<para>
|
||||
Optionally, if additional parameters are given, they are treated as the names of files to open and
|
||||
may be filenames or URIs. If no files are given then the application is simply activated.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>list-actions</command>
|
||||
<arg choice="plain"><replaceable>APPID</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
List the actions declared in the application's <filename class='extension'>.desktop</filename>
|
||||
file. The parameter is the application ID, as above.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>action</command>
|
||||
<arg choice="plain"><replaceable>APPID</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>ACTION</replaceable></arg>
|
||||
<arg choice="opt"><replaceable>PARAMETER</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Invokes the named action (in the same way as would occur when activating an action specified in
|
||||
the <filename class='extension'>.desktop</filename> file).
|
||||
</para>
|
||||
<para>
|
||||
The application ID (as above) is the first parameter. The action name follows.
|
||||
</para>
|
||||
<para>
|
||||
Optionally, following the action name can be one parameter, in GVariant format, given as a single
|
||||
argument. Make sure to use sufficient quoting.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Examples</title>
|
||||
|
||||
<refsect2>
|
||||
<title>From the commandline</title>
|
||||
|
||||
<para>
|
||||
Launching an application:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gapplication launch org.example.fooview
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Opening a file with an application:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gapplication launch org.example.fooview ~/file.foo
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Opening many files with an application:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gapplication launch org.example.fooview ~/foos/*.foo
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Invoking an action on an application:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gapplication action org.example.fooview create
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Invoking an action on an application, with an action:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
gapplication action org.example.fooview show-item '"item_id_828739"'
|
||||
</programlisting>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>
|
||||
From the <varname>Exec</varname> lines of a <filename class='extension'>.desktop</filename> file
|
||||
</title>
|
||||
|
||||
<para>
|
||||
The commandline interface of <command>gapplication</command> was designed so that it could be used
|
||||
directly from the <varname>Exec</varname> line of a <filename class='extension'>.desktop</filename>
|
||||
file.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You might want to do this to allow for backwards compatibility with implementations of the specification
|
||||
that do not understand how to do D-Bus activation, without having to install a separate utility program.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Consider the following example:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
[Desktop Entry]
|
||||
Version=1.1
|
||||
Type=Application
|
||||
Name=Foo Viewer
|
||||
DBusActivatable=true
|
||||
MimeType=image/x-foo;
|
||||
Exec=gapplication launch org.example.fooview %F
|
||||
Actions=gallery;create;
|
||||
|
||||
[Desktop Action gallery]
|
||||
Name=Browse Gallery
|
||||
Exec=gapplication action org.example.fooview gallery
|
||||
|
||||
[Desktop Action create]
|
||||
Name=Create a new Foo!
|
||||
Exec=gapplication action org.example.fooview create
|
||||
</programlisting>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>From a script</title>
|
||||
|
||||
<para>
|
||||
If installing an application that supports D-Bus activation you may still want to put a file in
|
||||
<filename class='directory'>/usr/bin</filename> so that your program can be started from a terminal.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It is possible for this file to be a shell script. The script can handle arguments such as --help and
|
||||
--version directly. It can also parse other command line arguments and convert them to uses of
|
||||
<command>gapplication</command> to activate the application, open files, or invoke actions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Here is a simplified example, as may be installed in <filename>/usr/bin/fooview</filename>:
|
||||
</para>
|
||||
|
||||
<programlisting>
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
--help)
|
||||
echo "see 'man fooview' for more information"
|
||||
;;
|
||||
|
||||
--version)
|
||||
echo "fooview 1.2"
|
||||
;;
|
||||
|
||||
--gallery)
|
||||
gapplication action org.example.fooview gallery
|
||||
;;
|
||||
|
||||
--create)
|
||||
gapplication action org.example.fooview create
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo "unrecognised commandline argument"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
*)
|
||||
gapplication launch org.example.fooview "$@"
|
||||
;;
|
||||
esac
|
||||
</programlisting>
|
||||
</refsect2>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<ulink url='http://standards.freedesktop.org/desktop-entry-spec/latest/'>Desktop Entry Specification</ulink>,
|
||||
<citerefentry>
|
||||
<refentrytitle>gdbus</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>xdg-open</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>desktop-file-validate</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
1193
docs/reference/gio/gdbus-codegen.xml
Normal file
1193
docs/reference/gio/gdbus-codegen.xml
Normal file
File diff suppressed because it is too large
Load diff
1
docs/reference/gio/gdbus-object-manager-example/.gitignore
vendored
Normal file
1
docs/reference/gio/gdbus-object-manager-example/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
gdbus-object-manager-example-overrides.txt
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
]>
|
||||
<book lang="en" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<part>
|
||||
<title>GDBus ObjctManager Example</title>
|
||||
<chapter>
|
||||
<title>Interfaces</title>
|
||||
<xi:include href="xml/ExampleAnimal.xml"/>
|
||||
<xi:include href="xml/ExampleCat.xml"/>
|
||||
<xi:include href="xml/ExampleObject.xml"/>
|
||||
<xi:include href="xml/ExampleObjectManagerClient.xml"/>
|
||||
</chapter>
|
||||
</part>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
</book>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<SECTION>
|
||||
<FILE>ExampleAnimal</FILE>
|
||||
<TITLE>ExampleAnimal</TITLE>
|
||||
ExampleAnimal
|
||||
ExampleAnimalIface
|
||||
example_animal_interface_info
|
||||
example_animal_override_properties
|
||||
example_animal_call_poke
|
||||
example_animal_call_poke_finish
|
||||
example_animal_call_poke_sync
|
||||
example_animal_complete_poke
|
||||
example_animal_emit_jumped
|
||||
example_animal_get_mood
|
||||
example_animal_get_foo
|
||||
example_animal_get_bar
|
||||
example_animal_dup_mood
|
||||
example_animal_dup_foo
|
||||
example_animal_dup_bar
|
||||
example_animal_set_mood
|
||||
example_animal_set_foo
|
||||
example_animal_set_bar
|
||||
ExampleAnimalProxy
|
||||
ExampleAnimalProxyClass
|
||||
example_animal_proxy_new
|
||||
example_animal_proxy_new_finish
|
||||
example_animal_proxy_new_sync
|
||||
example_animal_proxy_new_for_bus
|
||||
example_animal_proxy_new_for_bus_finish
|
||||
example_animal_proxy_new_for_bus_sync
|
||||
ExampleAnimalSkeleton
|
||||
ExampleAnimalSkeletonClass
|
||||
example_animal_skeleton_new
|
||||
<SUBSECTION Standard>
|
||||
example_animal_get_type
|
||||
example_animal_proxy_get_type
|
||||
example_animal_skeleton_get_type
|
||||
ExampleAnimalSkeletonPrivate
|
||||
ExampleAnimalProxyPrivate
|
||||
EXAMPLE_TYPE_ANIMAL
|
||||
EXAMPLE_TYPE_ANIMAL_PROXY
|
||||
EXAMPLE_TYPE_ANIMAL_SKELETON
|
||||
EXAMPLE_ANIMAL
|
||||
EXAMPLE_ANIMAL_GET_IFACE
|
||||
EXAMPLE_ANIMAL_PROXY
|
||||
EXAMPLE_ANIMAL_PROXY_CLASS
|
||||
EXAMPLE_ANIMAL_PROXY_GET_CLASS
|
||||
EXAMPLE_ANIMAL_SKELETON
|
||||
EXAMPLE_ANIMAL_SKELETON_CLASS
|
||||
EXAMPLE_ANIMAL_SKELETON_GET_CLASS
|
||||
EXAMPLE_IS_ANIMAL
|
||||
EXAMPLE_IS_ANIMAL_PROXY
|
||||
EXAMPLE_IS_ANIMAL_PROXY_CLASS
|
||||
EXAMPLE_IS_ANIMAL_SKELETON
|
||||
EXAMPLE_IS_ANIMAL_SKELETON_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ExampleCat</FILE>
|
||||
<TITLE>ExampleCat</TITLE>
|
||||
ExampleCat
|
||||
ExampleCatIface
|
||||
example_cat_interface_info
|
||||
example_cat_override_properties
|
||||
ExampleCatProxy
|
||||
ExampleCatProxyClass
|
||||
example_cat_proxy_new
|
||||
example_cat_proxy_new_finish
|
||||
example_cat_proxy_new_sync
|
||||
example_cat_proxy_new_for_bus
|
||||
example_cat_proxy_new_for_bus_finish
|
||||
example_cat_proxy_new_for_bus_sync
|
||||
ExampleCatSkeleton
|
||||
ExampleCatSkeletonClass
|
||||
example_cat_skeleton_new
|
||||
<SUBSECTION Standard>
|
||||
example_cat_get_type
|
||||
example_cat_proxy_get_type
|
||||
example_cat_skeleton_get_type
|
||||
ExampleCatProxyPrivate
|
||||
ExampleCatSkeletonPrivate
|
||||
EXAMPLE_TYPE_CAT
|
||||
EXAMPLE_TYPE_CAT_PROXY
|
||||
EXAMPLE_TYPE_CAT_SKELETON
|
||||
EXAMPLE_CAT
|
||||
EXAMPLE_CAT_GET_IFACE
|
||||
EXAMPLE_CAT_PROXY
|
||||
EXAMPLE_CAT_PROXY_CLASS
|
||||
EXAMPLE_CAT_PROXY_GET_CLASS
|
||||
EXAMPLE_CAT_SKELETON
|
||||
EXAMPLE_CAT_SKELETON_CLASS
|
||||
EXAMPLE_CAT_SKELETON_GET_CLASS
|
||||
EXAMPLE_IS_CAT
|
||||
EXAMPLE_IS_CAT_PROXY
|
||||
EXAMPLE_IS_CAT_PROXY_CLASS
|
||||
EXAMPLE_IS_CAT_SKELETON
|
||||
EXAMPLE_IS_CAT_SKELETON_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ExampleObject</FILE>
|
||||
<TITLE>ExampleObject</TITLE>
|
||||
ExampleObject
|
||||
ExampleObjectIface
|
||||
example_object_get_animal
|
||||
example_object_get_cat
|
||||
example_object_peek_animal
|
||||
example_object_peek_cat
|
||||
ExampleObjectProxy
|
||||
ExampleObjectProxyClass
|
||||
example_object_proxy_new
|
||||
ExampleObjectSkeleton
|
||||
ExampleObjectSkeletonClass
|
||||
example_object_skeleton_new
|
||||
example_object_skeleton_set_animal
|
||||
example_object_skeleton_set_cat
|
||||
<SUBSECTION Standard>
|
||||
example_object_get_type
|
||||
example_object_proxy_get_type
|
||||
example_object_skeleton_get_type
|
||||
ExampleObjectProxyPrivate
|
||||
ExampleObjectSkeletonPrivate
|
||||
EXAMPLE_IS_OBJECT
|
||||
EXAMPLE_IS_OBJECT_PROXY
|
||||
EXAMPLE_IS_OBJECT_PROXY_CLASS
|
||||
EXAMPLE_IS_OBJECT_SKELETON
|
||||
EXAMPLE_IS_OBJECT_SKELETON_CLASS
|
||||
EXAMPLE_OBJECT
|
||||
EXAMPLE_OBJECT_GET_IFACE
|
||||
EXAMPLE_OBJECT_PROXY
|
||||
EXAMPLE_OBJECT_PROXY_CLASS
|
||||
EXAMPLE_OBJECT_PROXY_GET_CLASS
|
||||
EXAMPLE_OBJECT_SKELETON
|
||||
EXAMPLE_OBJECT_SKELETON_CLASS
|
||||
EXAMPLE_OBJECT_SKELETON_GET_CLASS
|
||||
EXAMPLE_TYPE_OBJECT
|
||||
EXAMPLE_TYPE_OBJECT_PROXY
|
||||
EXAMPLE_TYPE_OBJECT_SKELETON
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ExampleObjectManagerClient</FILE>
|
||||
<TITLE>ExampleObjectManagerClient</TITLE>
|
||||
ExampleObjectManagerClient
|
||||
ExampleObjectManagerClientClass
|
||||
example_object_manager_client_get_proxy_type
|
||||
example_object_manager_client_new
|
||||
example_object_manager_client_new_finish
|
||||
example_object_manager_client_new_sync
|
||||
example_object_manager_client_new_for_bus
|
||||
example_object_manager_client_new_for_bus_finish
|
||||
example_object_manager_client_new_for_bus_sync
|
||||
<SUBSECTION Standard>
|
||||
example_object_manager_client_get_type
|
||||
EXAMPLE_IS_OBJECT_MANAGER_CLIENT
|
||||
EXAMPLE_IS_OBJECT_MANAGER_CLIENT_CLASS
|
||||
EXAMPLE_OBJECT_MANAGER_CLIENT
|
||||
EXAMPLE_OBJECT_MANAGER_CLIENT_CLASS
|
||||
EXAMPLE_OBJECT_MANAGER_CLIENT_GET_CLASS
|
||||
EXAMPLE_TYPE_OBJECT_MANAGER_CLIENT
|
||||
ExampleObjectManagerClientPrivate
|
||||
</SECTION>
|
||||
11
docs/reference/gio/gdbus-object-manager-example/meson.build
Normal file
11
docs/reference/gio/gdbus-object-manager-example/meson.build
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
gdbus_object_manager_example_doc = gnome.gtkdoc('gdbus-object-manager-example',
|
||||
main_xml : 'gdbus-object-manager-example-docs.xml',
|
||||
namespace : 'example',
|
||||
dependencies : [libgdbus_example_objectmanager_dep],
|
||||
src_dir : 'gio/tests/gdbus-object-manager-example',
|
||||
scan_args : gtkdoc_common_scan_args + [
|
||||
'--rebuild-types',
|
||||
],
|
||||
install : false,
|
||||
)
|
||||
|
||||
429
docs/reference/gio/gdbus.xml
Normal file
429
docs/reference/gio/gdbus.xml
Normal file
|
|
@ -0,0 +1,429 @@
|
|||
<refentry id="gdbus" lang="en">
|
||||
|
||||
<refentryinfo>
|
||||
<title>gdbus</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>David</firstname>
|
||||
<surname>Zeuthen</surname>
|
||||
<email>zeuthen@gmail.com</email>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gdbus</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gdbus</refname>
|
||||
<refpurpose>Tool for working with D-Bus objects</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">introspect</arg>
|
||||
<group>
|
||||
<arg choice="plain">--system</arg>
|
||||
<arg choice="plain">--session</arg>
|
||||
<arg choice="plain">--address <replaceable>address</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain">--dest <replaceable>bus_name</replaceable></arg>
|
||||
<arg choice="plain">--object-path <replaceable>/path/to/object</replaceable></arg>
|
||||
<group>
|
||||
<arg choice="plain">--xml</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain">--recurse</arg>
|
||||
</group>
|
||||
<group>
|
||||
<arg choice="plain">--only-properties</arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">monitor</arg>
|
||||
<group>
|
||||
<arg choice="plain">--system</arg>
|
||||
<arg choice="plain">--session</arg>
|
||||
<arg choice="plain">--address <replaceable>address</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain">--dest <replaceable>bus_name</replaceable></arg>
|
||||
<group>
|
||||
<arg choice="plain">--object-path <replaceable>/path/to/object</replaceable></arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">call</arg>
|
||||
<group>
|
||||
<arg choice="plain">--system</arg>
|
||||
<arg choice="plain">--session</arg>
|
||||
<arg choice="plain">--address <replaceable>address</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain">--dest <replaceable>bus_name</replaceable></arg>
|
||||
<arg choice="plain">--object-path <replaceable>/path/to/object</replaceable></arg>
|
||||
<arg choice="plain">--method <replaceable>org.project.InterfaceName.MethodName</replaceable></arg>
|
||||
<group>
|
||||
<arg choice="plain">--timeout <replaceable>seconds</replaceable></arg>
|
||||
<arg choice="plain">--interactive</arg>
|
||||
</group>
|
||||
<arg choice="plain">ARG1</arg>
|
||||
<arg choice="plain" rep="repeat">ARG2</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">emit</arg>
|
||||
<group>
|
||||
<arg choice="plain">--system</arg>
|
||||
<arg choice="plain">--session</arg>
|
||||
<arg choice="plain">--address <replaceable>address</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain">--object-path <replaceable>/path/to/object</replaceable></arg>
|
||||
<arg choice="plain">--signal <replaceable>org.project.InterfaceName.SignalName</replaceable></arg>
|
||||
<group>
|
||||
<arg choice="plain">--dest <replaceable>unique_bus_name</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain">ARG1</arg>
|
||||
<arg choice="plain" rep="repeat">ARG2</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">wait</arg>
|
||||
<group>
|
||||
<arg choice="plain">--system</arg>
|
||||
<arg choice="plain">--session</arg>
|
||||
<arg choice="plain">--address <replaceable>address</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain">--activate <replaceable>bus_name</replaceable></arg>
|
||||
<group>
|
||||
<arg choice="plain">--timeout <replaceable>seconds</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain"><replaceable>bus_name</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">help</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
<command>gdbus</command> is a simple tool for working with D-Bus objects.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1>
|
||||
<title>Commands</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>introspect</option></term>
|
||||
<listitem><para>
|
||||
Prints out interfaces and property values for a remote object.
|
||||
For this to work, the owner of the object needs to implement the
|
||||
<literal>org.freedesktop.DBus.Introspectable</literal> interface.
|
||||
If the <option>--xml</option> option is used, the returned
|
||||
introspection XML is printed, otherwise a parsed pretty
|
||||
representation is printed.
|
||||
The <option>--recurse</option> option can be used to
|
||||
introspect children (and their children and so on) and the
|
||||
<option>--only-properties</option> option can be used to
|
||||
only print the interfaces with properties.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>monitor</option></term>
|
||||
<listitem><para>
|
||||
Monitors one or all objects owned by the owner of
|
||||
<replaceable>bus_name</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>call</option></term>
|
||||
<listitem><para>
|
||||
Invokes a method on a remote object. Each argument to pass to the
|
||||
method must be specified as a serialized
|
||||
<link linkend="GVariant"><type>GVariant</type></link> except that strings do
|
||||
not need explicit quotes. The return values are printed out as
|
||||
serialized <link linkend="GVariant"><type>GVariant</type></link>
|
||||
values.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>emit</option></term>
|
||||
<listitem><para>
|
||||
Emits a signal. Each argument to include in the signal must be specified as a serialized
|
||||
<link linkend="GVariant"><type>GVariant</type></link> except that strings do
|
||||
not need explicit quotes.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>wait</option></term>
|
||||
<listitem><para>
|
||||
Waits until <replaceable>bus_name</replaceable> is owned by some
|
||||
process on the bus. If the <option>--activate</option> is specified,
|
||||
that bus name will be auto-started first. It may be the same as the
|
||||
bus name being waited for, or different.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>help</option></term>
|
||||
<listitem><para>
|
||||
Prints help and exit.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Bash Completion</title>
|
||||
<para>
|
||||
<command>gdbus</command> ships with a bash completion script to
|
||||
complete commands, destinations, bus names, object paths and
|
||||
interface/method names.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Examples</title>
|
||||
This shows how to introspect an object - note that the value of each
|
||||
property is displayed:
|
||||
<programlisting>
|
||||
$ gdbus introspect --system \
|
||||
--dest org.freedesktop.NetworkManager \
|
||||
--object-path /org/freedesktop/NetworkManager/Devices/0
|
||||
node /org/freedesktop/NetworkManager/Devices/0 {
|
||||
interface org.freedesktop.DBus.Introspectable {
|
||||
methods:
|
||||
Introspect(out s data);
|
||||
};
|
||||
interface org.freedesktop.DBus.Properties {
|
||||
methods:
|
||||
Get(in s interface,
|
||||
in s propname,
|
||||
out v value);
|
||||
Set(in s interface,
|
||||
in s propname,
|
||||
in v value);
|
||||
GetAll(in s interface,
|
||||
out a{sv} props);
|
||||
};
|
||||
interface org.freedesktop.NetworkManager.Device.Wired {
|
||||
signals:
|
||||
PropertiesChanged(a{sv} arg_0);
|
||||
properties:
|
||||
readonly b Carrier = false;
|
||||
readonly u Speed = 0;
|
||||
readonly s HwAddress = '00:1D:72:88:BE:97';
|
||||
};
|
||||
interface org.freedesktop.NetworkManager.Device {
|
||||
methods:
|
||||
Disconnect();
|
||||
signals:
|
||||
StateChanged(u arg_0,
|
||||
u arg_1,
|
||||
u arg_2);
|
||||
properties:
|
||||
readonly u DeviceType = 1;
|
||||
readonly b Managed = true;
|
||||
readwrite o Ip6Config = '/';
|
||||
readwrite o Dhcp4Config = '/';
|
||||
readwrite o Ip4Config = '/';
|
||||
readonly u State = 2;
|
||||
readwrite u Ip4Address = 0;
|
||||
readonly u Capabilities = 3;
|
||||
readonly s Driver = 'e1000e';
|
||||
readwrite s Interface = 'eth0';
|
||||
readonly s Udi = '/sys/devices/pci0000:00/0000:00:19.0/net/eth0';
|
||||
};
|
||||
};
|
||||
</programlisting>
|
||||
<para>
|
||||
The <option>--recurse</option> and <option>--only-properties</option> options can be useful when wanting to inspect all objects owned by a particular process:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus introspect --system --dest org.freedesktop.UPower --object-path / --recurse --only-properties
|
||||
node / {
|
||||
node /org {
|
||||
node /org/freedesktop {
|
||||
node /org/freedesktop/UPower {
|
||||
interface org.freedesktop.UPower {
|
||||
properties:
|
||||
readonly b IsDocked = true;
|
||||
readonly b LidForceSleep = false;
|
||||
readonly b LidIsPresent = false;
|
||||
readonly b LidIsClosed = false;
|
||||
readonly b OnLowBattery = false;
|
||||
readonly b OnBattery = false;
|
||||
readonly b CanHibernate = true;
|
||||
readonly b CanSuspend = true;
|
||||
readonly s DaemonVersion = '0.9.10';
|
||||
};
|
||||
node /org/freedesktop/UPower/Policy {
|
||||
};
|
||||
node /org/freedesktop/UPower/Wakeups {
|
||||
interface org.freedesktop.UPower.Wakeups {
|
||||
properties:
|
||||
readonly b HasCapability = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
</programlisting>
|
||||
<para>
|
||||
In a similar fashion, the <option>introspect</option> command can be
|
||||
used to learn details about the <literal>Notify</literal> method:
|
||||
</para>
|
||||
<programlisting>
|
||||
[...]
|
||||
interface org.freedesktop.Notifications {
|
||||
methods:
|
||||
GetServerInformation(out s return_name,
|
||||
out s return_vendor,
|
||||
out s return_version,
|
||||
out s return_spec_version);
|
||||
GetCapabilities(out as return_caps);
|
||||
CloseNotification(in u id);
|
||||
Notify(in s app_name,
|
||||
in u id,
|
||||
in s icon,
|
||||
in s summary,
|
||||
in s body,
|
||||
in as actions,
|
||||
in a{sv} hints,
|
||||
in i timeout,
|
||||
out u return_id);
|
||||
};
|
||||
[...]
|
||||
</programlisting>
|
||||
<para>
|
||||
With this information, it's easy to use the <option>call</option>
|
||||
command to display a notification
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus call --session \
|
||||
--dest org.freedesktop.Notifications \
|
||||
--object-path /org/freedesktop/Notifications \
|
||||
--method org.freedesktop.Notifications.Notify \
|
||||
my_app_name \
|
||||
42 \
|
||||
gtk-dialog-info \
|
||||
"The Summary" \
|
||||
"Here's the body of the notification" \
|
||||
[] \
|
||||
{} \
|
||||
5000
|
||||
(uint32 12,)
|
||||
</programlisting>
|
||||
<para>
|
||||
Call a method with file handle argument:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus call --session \
|
||||
--dest org.example.foo \
|
||||
--object-path /org/example/foo \
|
||||
--method SendFDs \
|
||||
1 \
|
||||
10 \
|
||||
10<file.foo
|
||||
</programlisting>
|
||||
<para>
|
||||
Monitoring all objects on a service:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus monitor --system --dest org.freedesktop.ConsoleKit
|
||||
Monitoring signals from all objects owned by org.freedesktop.ConsoleKit
|
||||
The name org.freedesktop.ConsoleKit is owned by :1.15
|
||||
/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (false,)
|
||||
/org/freedesktop/ConsoleKit/Seat1: org.freedesktop.ConsoleKit.Seat.ActiveSessionChanged ('',)
|
||||
/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (true,)
|
||||
/org/freedesktop/ConsoleKit/Seat1: org.freedesktop.ConsoleKit.Seat.ActiveSessionChanged ('/org/freedesktop/ConsoleKit/Session2',)
|
||||
</programlisting>
|
||||
<para>
|
||||
Monitoring a single object on a service:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus monitor --system --dest org.freedesktop.NetworkManager --object-path /org/freedesktop/NetworkManager/AccessPoint/4141
|
||||
Monitoring signals on object /org/freedesktop/NetworkManager/AccessPoint/4141 owned by org.freedesktop.NetworkManager
|
||||
The name org.freedesktop.NetworkManager is owned by :1.5
|
||||
/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x5c>},)
|
||||
/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x64>},)
|
||||
/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x5e>},)
|
||||
/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x64>},)
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Emitting a signal:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus emit --session --object-path /foo --signal org.bar.Foo "['foo', 'bar', 'baz']"
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Emitting a signal to a specific process:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus emit --session --object-path /bar --signal org.bar.Bar someString --dest :1.42
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Waiting for a well-known name to be owned on the bus; this will
|
||||
<emphasis>not</emphasis> auto-start the service:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus wait --session org.bar.SomeName
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Auto-starting then waiting for a well-known name to be owned on the bus:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus wait --session --activate org.bar.SomeName
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Auto-starting a different service, then waiting for a well-known name to be
|
||||
owned on the bus. This is useful in situations where
|
||||
<replaceable>SomeName</replaceable> is not directly activatable:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus wait --session --activate org.bar.PrerequisiteName org.bar.SomeName
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
Waiting for a well-known name and giving up after 30 seconds. By default,
|
||||
the timeout is disabled; or set <option>--timeout</option> to 0 to disable it:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus wait --session --timeout 30 org.bar.SomeName
|
||||
</programlisting>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Bugs</title>
|
||||
<para>
|
||||
Please send bug reports to either the distribution bug tracker
|
||||
or the upstream bug tracker at
|
||||
<ulink url="https://gitlab.gnome.org/GNOME/glib/issues/new"/>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>See Also</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dbus-send</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
3
docs/reference/gio/gio-docs-unix.xml
Normal file
3
docs/reference/gio/gio-docs-unix.xml
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<chapter id='unix-support'>
|
||||
<!--FIXME: fill this with unix APIs that cannot build on Windows -->
|
||||
</chapter>
|
||||
6
docs/reference/gio/gio-docs-win32.xml
Normal file
6
docs/reference/gio/gio-docs-win32.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<chapter id='win32-support'>
|
||||
<title>Win32 support</title>
|
||||
<xi:include href="xml/gwin32registrykey.xml"/>
|
||||
<xi:include href="xml/gwin32inputstream.xml"/>
|
||||
<xi:include href="xml/gwin32outputstream.xml"/>
|
||||
</chapter>
|
||||
406
docs/reference/gio/gio-docs.xml
Normal file
406
docs/reference/gio/gio-docs.xml
Normal file
|
|
@ -0,0 +1,406 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC '-//OASIS//DTD DocBook XML V4.5//EN'
|
||||
'http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd' [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
]>
|
||||
<book lang="en" id="gio" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<title>GIO Reference Manual</title>
|
||||
<bookinfo>
|
||||
<title>GIO Reference Manual</title>
|
||||
<releaseinfo>
|
||||
for GIO &version;
|
||||
The latest version of this documentation can be found on-line at
|
||||
<ulink role="online-location" url="https://developer.gnome.org/gio/unstable/">https://developer.gnome.org/gio/unstable/</ulink>.
|
||||
</releaseinfo>
|
||||
</bookinfo>
|
||||
|
||||
<xi:include href="xml/overview.xml"/>
|
||||
|
||||
<part>
|
||||
<title>API Reference</title>
|
||||
<chapter id="file_ops">
|
||||
<title>File Operations</title>
|
||||
<xi:include href="xml/gfile.xml"/>
|
||||
<xi:include href="xml/gfileattribute.xml"/>
|
||||
<xi:include href="xml/gfileinfo.xml"/>
|
||||
<xi:include href="xml/gfileenumerator.xml"/>
|
||||
<xi:include href="xml/gioerror.xml"/>
|
||||
<xi:include href="xml/gmountoperation.xml"/>
|
||||
</chapter>
|
||||
<chapter id="file_mon">
|
||||
<title>File System Monitoring</title>
|
||||
<xi:include href="xml/gfilemonitor.xml"/>
|
||||
</chapter>
|
||||
<chapter id="utils">
|
||||
<title>File-related Utilities</title>
|
||||
<xi:include href="xml/gfilenamecompleter.xml"/>
|
||||
</chapter>
|
||||
<chapter id="async">
|
||||
<title>Asynchronous I/O</title>
|
||||
<xi:include href="xml/gcancellable.xml"/>
|
||||
<xi:include href="xml/gasyncresult.xml"/>
|
||||
<xi:include href="xml/gtask.xml"/>
|
||||
<xi:include href="xml/gioscheduler.xml"/>
|
||||
<xi:include href="xml/gsimpleasyncresult.xml"/>
|
||||
</chapter>
|
||||
<chapter id="conversion">
|
||||
<title>Data conversion</title>
|
||||
<xi:include href="xml/gconverter.xml"/>
|
||||
<xi:include href="xml/gcharsetconverter.xml"/>
|
||||
<xi:include href="xml/gzlibcompressor.xml"/>
|
||||
<xi:include href="xml/gzlibdecompressor.xml"/>
|
||||
</chapter>
|
||||
<chapter id="streaming">
|
||||
<title>Streaming I/O</title>
|
||||
<xi:include href="xml/gseekable.xml"/>
|
||||
<xi:include href="xml/ginputstream.xml"/>
|
||||
<xi:include href="xml/goutputstream.xml"/>
|
||||
<xi:include href="xml/giostream.xml"/>
|
||||
<xi:include href="xml/gsimpleiostream.xml"/>
|
||||
<xi:include href="xml/gfileinputstream.xml"/>
|
||||
<xi:include href="xml/gfileoutputstream.xml"/>
|
||||
<xi:include href="xml/gfileiostream.xml"/>
|
||||
<xi:include href="xml/gfiledescriptorbased.xml"/>
|
||||
<xi:include href="xml/gfilterinputstream.xml"/>
|
||||
<xi:include href="xml/gfilteroutputstream.xml"/>
|
||||
<xi:include href="xml/gmemoryinputstream.xml"/>
|
||||
<xi:include href="xml/gmemoryoutputstream.xml"/>
|
||||
<xi:include href="xml/gbufferedinputstream.xml"/>
|
||||
<xi:include href="xml/gbufferedoutputstream.xml"/>
|
||||
<xi:include href="xml/gdatainputstream.xml"/>
|
||||
<xi:include href="xml/gdataoutputstream.xml"/>
|
||||
<xi:include href="xml/gunixinputstream.xml"/>
|
||||
<xi:include href="xml/gunixoutputstream.xml"/>
|
||||
<xi:include href="xml/gconverterinputstream.xml"/>
|
||||
<xi:include href="xml/gconverteroutputstream.xml"/>
|
||||
<xi:include href="xml/gpollableinputstream.xml"/>
|
||||
<xi:include href="xml/gpollableoutputstream.xml"/>
|
||||
<xi:include href="xml/gpollableutils.xml"/>
|
||||
</chapter>
|
||||
<chapter id="types">
|
||||
<title>File types and applications</title>
|
||||
<xi:include href="xml/gcontenttype.xml"/>
|
||||
<xi:include href="xml/gappinfo.xml"/>
|
||||
<xi:include href="xml/gappinfomonitor.xml"/>
|
||||
<xi:include href="xml/gdesktopappinfo.xml"/>
|
||||
</chapter>
|
||||
<chapter id="volume_mon">
|
||||
<title>Volumes and Drives</title>
|
||||
<xi:include href="xml/gvolumemonitor.xml"/>
|
||||
<xi:include href="xml/gvolume.xml"/>
|
||||
<xi:include href="xml/gmount.xml"/>
|
||||
<xi:include href="xml/gdrive.xml"/>
|
||||
<xi:include href="xml/gunixmounts.xml"/>
|
||||
</chapter>
|
||||
<chapter id="icons">
|
||||
<title>Icons</title>
|
||||
<xi:include href="xml/gicon.xml"/>
|
||||
<xi:include href="xml/gfileicon.xml"/>
|
||||
<xi:include href="xml/gbytesicon.xml"/>
|
||||
<xi:include href="xml/gloadableicon.xml"/>
|
||||
<xi:include href="xml/gthemedicon.xml"/>
|
||||
<xi:include href="xml/gemblemedicon.xml"/>
|
||||
<xi:include href="xml/gemblem.xml"/>
|
||||
</chapter>
|
||||
<chapter id="failable_initialization">
|
||||
<title>Failable Initialization</title>
|
||||
<xi:include href="xml/ginitable.xml"/>
|
||||
<xi:include href="xml/gasyncinitable.xml"/>
|
||||
</chapter>
|
||||
<chapter id="subprocesses">
|
||||
<title>Subprocesses</title>
|
||||
<xi:include href="xml/gsubprocess.xml"/>
|
||||
<xi:include href="xml/gsubprocesslauncher.xml"/>
|
||||
</chapter>
|
||||
<chapter id="networking">
|
||||
<title>Low-level network support</title>
|
||||
<xi:include href="xml/gsocket.xml"/>
|
||||
<xi:include href="xml/gdatagrambased.xml"/>
|
||||
<xi:include href="xml/ginetaddress.xml"/>
|
||||
<xi:include href="xml/ginetaddressmask.xml"/>
|
||||
<xi:include href="xml/gsocketaddress.xml"/>
|
||||
<xi:include href="xml/ginetsocketaddress.xml"/>
|
||||
<xi:include href="xml/gunixsocketaddress.xml"/>
|
||||
<xi:include href="xml/gnativesocketaddress.xml"/>
|
||||
<xi:include href="xml/gsocketcontrolmessage.xml"/>
|
||||
<xi:include href="xml/gunixfdlist.xml"/>
|
||||
<xi:include href="xml/gunixfdmessage.xml"/>
|
||||
<xi:include href="xml/gcredentials.xml"/>
|
||||
<xi:include href="xml/gunixcredentialsmessage.xml"/>
|
||||
<xi:include href="xml/gproxy.xml"/>
|
||||
<xi:include href="xml/gproxyaddress.xml"/>
|
||||
<xi:include href="xml/gnetworking.xml"/>
|
||||
</chapter>
|
||||
<chapter id="highlevel-socket">
|
||||
<title>High-level network functionality</title>
|
||||
<xi:include href="xml/gsocketclient.xml"/>
|
||||
<xi:include href="xml/gsocketconnection.xml"/>
|
||||
<xi:include href="xml/gunixconnection.xml"/>
|
||||
<xi:include href="xml/gtcpconnection.xml"/>
|
||||
<xi:include href="xml/gtcpwrapperconnection.xml"/>
|
||||
<xi:include href="xml/gsocketlistener.xml"/>
|
||||
<xi:include href="xml/gsocketservice.xml"/>
|
||||
<xi:include href="xml/gthreadedsocketservice.xml"/>
|
||||
<xi:include href="xml/gnetworkmonitor.xml"/>
|
||||
</chapter>
|
||||
<chapter id="tls">
|
||||
<title>TLS (SSL) support</title>
|
||||
<xi:include href="xml/gtls.xml"/>
|
||||
<xi:include href="xml/gtlscertificate.xml"/>
|
||||
<xi:include href="xml/gtlsconnection.xml"/>
|
||||
<xi:include href="xml/gtlsclientconnection.xml"/>
|
||||
<xi:include href="xml/gtlsserverconnection.xml"/>
|
||||
<xi:include href="xml/gdtlsconnection.xml"/>
|
||||
<xi:include href="xml/gdtlsclientconnection.xml"/>
|
||||
<xi:include href="xml/gdtlsserverconnection.xml"/>
|
||||
<xi:include href="xml/gtlsbackend.xml"/>
|
||||
<xi:include href="xml/gtlsdatabase.xml"/>
|
||||
<xi:include href="xml/gtlsfiledatabase.xml"/>
|
||||
<xi:include href="xml/gtlsinteraction.xml"/>
|
||||
<xi:include href="xml/gtlspassword.xml"/>
|
||||
</chapter>
|
||||
<chapter id="resolver">
|
||||
<title>DNS resolution</title>
|
||||
<xi:include href="xml/gresolver.xml"/>
|
||||
<xi:include href="xml/gproxyresolver.xml"/>
|
||||
<xi:include href="xml/gsimpleproxyresolver.xml"/>
|
||||
<xi:include href="xml/gsocketconnectable.xml"/>
|
||||
<xi:include href="xml/gsocketaddressenumerator.xml"/>
|
||||
<xi:include href="xml/gproxyaddressenumerator.xml"/>
|
||||
<xi:include href="xml/gnetworkaddress.xml"/>
|
||||
<xi:include href="xml/gnetworkservice.xml"/>
|
||||
<xi:include href="xml/gsrvtarget.xml"/>
|
||||
</chapter>
|
||||
<chapter id="gdbus-lowlevel">
|
||||
<title>Low-level D-Bus Support</title>
|
||||
<xi:include href="xml/gdbusutils.xml"/>
|
||||
<xi:include href="xml/gdbusaddress.xml"/>
|
||||
<xi:include href="xml/gdbusintrospection.xml"/>
|
||||
<xi:include href="xml/gdbuserror.xml"/>
|
||||
<xi:include href="xml/gdbusmessage.xml"/>
|
||||
<xi:include href="xml/gdbusconnection.xml"/>
|
||||
<xi:include href="xml/gdbusmethodinvocation.xml"/>
|
||||
<xi:include href="xml/gdbusserver.xml"/>
|
||||
<xi:include href="xml/gdbusauthobserver.xml"/>
|
||||
</chapter>
|
||||
<chapter id="gdbus-convenience">
|
||||
<title>High-level D-Bus Support</title>
|
||||
<xi:include href="xml/gdbusnameowning.xml"/>
|
||||
<xi:include href="xml/gdbusnamewatching.xml"/>
|
||||
<xi:include href="xml/gdbusinterface.xml"/>
|
||||
<xi:include href="xml/gdbusinterfaceskeleton.xml"/>
|
||||
<xi:include href="xml/gdbusproxy.xml"/>
|
||||
<xi:include href="xml/gdbusobject.xml"/>
|
||||
<xi:include href="xml/gdbusobjectskeleton.xml"/>
|
||||
<xi:include href="xml/gdbusobjectproxy.xml"/>
|
||||
<xi:include href="xml/gdbusobjectmanager.xml"/>
|
||||
<xi:include href="xml/gdbusobjectmanagerserver.xml"/>
|
||||
<xi:include href="xml/gdbusobjectmanagerclient.xml"/>
|
||||
</chapter>
|
||||
<chapter id="settings">
|
||||
<title>Settings</title>
|
||||
<xi:include href="xml/gsettings.xml"/>
|
||||
<xi:include href="xml/gsettingsbackend.xml"/>
|
||||
<xi:include href="xml/gsettingsschema.xml"/>
|
||||
</chapter>
|
||||
<chapter id="resources">
|
||||
<title>Resources</title>
|
||||
<xi:include href="xml/gresource.xml"/>
|
||||
</chapter>
|
||||
<chapter id='permissions'>
|
||||
<title>Permissions</title>
|
||||
<xi:include href="xml/gpermission.xml"/>
|
||||
<xi:include href="xml/gsimplepermission.xml"/>
|
||||
</chapter>
|
||||
<chapter id='data-models'>
|
||||
<title>Data Models</title>
|
||||
<xi:include href="xml/glistmodel.xml"/>
|
||||
<xi:include href="xml/gliststore.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="application">
|
||||
<title>Application support</title>
|
||||
<xi:include href="xml/gapplication.xml"/>
|
||||
<xi:include href="xml/gapplicationcommandline.xml"/>
|
||||
<xi:include href="xml/gactiongroup.xml"/>
|
||||
<xi:include href="xml/gactionmap.xml"/>
|
||||
<xi:include href="xml/gsimpleactiongroup.xml"/>
|
||||
<xi:include href="xml/gaction.xml"/>
|
||||
<xi:include href="xml/gsimpleaction.xml"/>
|
||||
<xi:include href="xml/gpropertyaction.xml"/>
|
||||
<xi:include href="xml/gremoteactiongroup.xml"/>
|
||||
<xi:include href="xml/gactiongroupexporter.xml"/>
|
||||
<xi:include href="xml/gdbusactiongroup.xml"/>
|
||||
<xi:include href="xml/gdebugcontroller.xml"/>
|
||||
<xi:include href="xml/gdebugcontrollerdbus.xml"/>
|
||||
<xi:include href="xml/gmemorymonitor.xml"/>
|
||||
<xi:include href="xml/gmenumodel.xml"/>
|
||||
<xi:include href="xml/gmenu.xml"/>
|
||||
<xi:include href="xml/gmenuexporter.xml"/>
|
||||
<xi:include href="xml/gdbusmenumodel.xml"/>
|
||||
<xi:include href="xml/gnotification.xml"/>
|
||||
<xi:include href="xml/gpowerprofilemonitor.xml"/>
|
||||
</chapter>
|
||||
<chapter id="extending">
|
||||
<title>Extending GIO</title>
|
||||
<xi:include href="xml/gvfs.xml"/>
|
||||
<xi:include href="xml/giomodule.xml"/>
|
||||
<xi:include href="xml/extensionpoints.xml"/>
|
||||
</chapter>
|
||||
<chapter id="tools">
|
||||
<title>GIO Tools</title>
|
||||
<xi:include href="gio-querymodules.xml"/>
|
||||
<xi:include href="gsettings.xml"/>
|
||||
<xi:include href="glib-compile-schemas.xml"/>
|
||||
<xi:include href="glib-compile-resources.xml"/>
|
||||
<xi:include href="gdbus.xml"/>
|
||||
<xi:include href="xml/gdbus-codegen.xml"/>
|
||||
<xi:include href="gresource.xml"/>
|
||||
<xi:include href="gapplication.xml"/>
|
||||
<xi:include href="gio.xml"/>
|
||||
</chapter>
|
||||
<chapter id="testing">
|
||||
<title>GIO Testing</title>
|
||||
<xi:include href="xml/gtestdbus.xml"/>
|
||||
</chapter>
|
||||
<xi:include href="gio-docs-platform.xml"/>
|
||||
</part>
|
||||
|
||||
<part id="migrating">
|
||||
<title>Migrating to GIO</title>
|
||||
<xi:include href="xml/migrating-posix.xml"/>
|
||||
<xi:include href="xml/migrating-gnome-vfs.xml"/>
|
||||
<xi:include href="xml/migrating-gconf.xml"/>
|
||||
<xi:include href="xml/migrating-gdbus.xml"/>
|
||||
</part>
|
||||
|
||||
<chapter id="gio-hierarchy">
|
||||
<title>Object Hierarchy</title>
|
||||
<xi:include href="xml/tree_index.sgml"/>
|
||||
</chapter>
|
||||
|
||||
<index id="api-index-full">
|
||||
<title id="index-all">Index</title>
|
||||
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-deprecated" role="deprecated">
|
||||
<title>Index of deprecated symbols</title>
|
||||
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-18" role="2.18">
|
||||
<title>Index of new symbols in 2.18</title>
|
||||
<xi:include href="xml/api-index-2.18.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-20" role="2.20">
|
||||
<title>Index of new symbols in 2.20</title>
|
||||
<xi:include href="xml/api-index-2.20.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-22" role="2.22">
|
||||
<title>Index of new symbols in 2.22</title>
|
||||
<xi:include href="xml/api-index-2.22.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-24" role="2.24">
|
||||
<title>Index of new symbols in 2.24</title>
|
||||
<xi:include href="xml/api-index-2.24.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-26" role="2.26">
|
||||
<title>Index of new symbols in 2.26</title>
|
||||
<xi:include href="xml/api-index-2.26.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-28" role="2.28">
|
||||
<title>Index of new symbols in 2.28</title>
|
||||
<xi:include href="xml/api-index-2.28.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-30" role="2.30">
|
||||
<title>Index of new symbols in 2.30</title>
|
||||
<xi:include href="xml/api-index-2.30.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-32" role="2.32">
|
||||
<title>Index of new symbols in 2.32</title>
|
||||
<xi:include href="xml/api-index-2.32.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-34" role="2.34">
|
||||
<title>Index of new symbols in 2.34</title>
|
||||
<xi:include href="xml/api-index-2.34.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-36" role="2.36">
|
||||
<title>Index of new symbols in 2.36</title>
|
||||
<xi:include href="xml/api-index-2.36.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-38" role="2.38">
|
||||
<title>Index of new symbols in 2.38</title>
|
||||
<xi:include href="xml/api-index-2.38.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-40" role="2.40">
|
||||
<title>Index of new symbols in 2.40</title>
|
||||
<xi:include href="xml/api-index-2.40.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-42" role="2.42">
|
||||
<title>Index of new symbols in 2.42</title>
|
||||
<xi:include href="xml/api-index-2.42.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-44" role="2.44">
|
||||
<title>Index of new symbols in 2.44</title>
|
||||
<xi:include href="xml/api-index-2.44.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-46" role="2.46">
|
||||
<title>Index of new symbols in 2.46</title>
|
||||
<xi:include href="xml/api-index-2.46.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-48" role="2.48">
|
||||
<title>Index of new symbols in 2.48</title>
|
||||
<xi:include href="xml/api-index-2.48.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-50" role="2.50">
|
||||
<title>Index of new symbols in 2.50</title>
|
||||
<xi:include href="xml/api-index-2.50.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-52" role="2.52">
|
||||
<title>Index of new symbols in 2.52</title>
|
||||
<xi:include href="xml/api-index-2.52.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-54" role="2.54">
|
||||
<title>Index of new symbols in 2.54</title>
|
||||
<xi:include href="xml/api-index-2.54.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-56" role="2.56">
|
||||
<title>Index of new symbols in 2.56</title>
|
||||
<xi:include href="xml/api-index-2.56.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-58" role="2.58">
|
||||
<title>Index of new symbols in 2.58</title>
|
||||
<xi:include href="xml/api-index-2.58.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-60" role="2.60">
|
||||
<title>Index of new symbols in 2.60</title>
|
||||
<xi:include href="xml/api-index-2.60.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-62" role="2.62">
|
||||
<title>Index of new symbols in 2.62</title>
|
||||
<xi:include href="xml/api-index-2.62.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-64" role="2.64">
|
||||
<title>Index of new symbols in 2.64</title>
|
||||
<xi:include href="xml/api-index-2.64.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-66" role="2.66">
|
||||
<title>Index of new symbols in 2.66</title>
|
||||
<xi:include href="xml/api-index-2.66.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-68" role="2.68">
|
||||
<title>Index of new symbols in 2.68</title>
|
||||
<xi:include href="xml/api-index-2.68.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-70" role="2.70">
|
||||
<title>Index of new symbols in 2.70</title>
|
||||
<xi:include href="xml/api-index-2.70.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
<index id="api-index-2-72" role="2.72">
|
||||
<title>Index of new symbols in 2.72</title>
|
||||
<xi:include href="xml/api-index-2.72.xml"><xi:fallback /></xi:include>
|
||||
</index>
|
||||
|
||||
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
|
||||
|
||||
</book>
|
||||
45
docs/reference/gio/gio-querymodules.xml
Normal file
45
docs/reference/gio/gio-querymodules.xml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<refentry id="gio-querymodules" lang="en">
|
||||
|
||||
<refentryinfo>
|
||||
<title>glib-compile-schemas</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>Alexander</firstname>
|
||||
<surname>Larsson</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gio-querymodules</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gio-querymodules</refname>
|
||||
<refpurpose>GIO module cache creation</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gio-querymodules</command>
|
||||
<arg choice="req" rep="repeat">DIRECTORY</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para><command>gio-querymodules</command> creates a
|
||||
<filename>giomodule.cache</filename> file in the listed directories.
|
||||
This file lists the implemented extension points for each module
|
||||
that has been found. It is used by GIO at runtime to avoid opening
|
||||
all modules just to find out which extension points they are implementing.
|
||||
</para>
|
||||
<para>
|
||||
GIO modules are usually installed in the <filename>gio/modules</filename>
|
||||
subdirectory of libdir.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
4772
docs/reference/gio/gio-sections-common.txt
Normal file
4772
docs/reference/gio/gio-sections-common.txt
Normal file
File diff suppressed because it is too large
Load diff
112
docs/reference/gio/gio-sections-win32.txt
Normal file
112
docs/reference/gio/gio-sections-win32.txt
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<SECTION>
|
||||
<FILE>gwin32inputstream</FILE>
|
||||
<TITLE>GWin32InputStream</TITLE>
|
||||
GWin32InputStream
|
||||
g_win32_input_stream_new
|
||||
g_win32_input_stream_set_close_handle
|
||||
g_win32_input_stream_get_close_handle
|
||||
g_win32_input_stream_get_handle
|
||||
<SUBSECTION Standard>
|
||||
GWin32InputStreamClass
|
||||
G_WIN32_INPUT_STREAM
|
||||
G_IS_WIN32_INPUT_STREAM
|
||||
G_TYPE_WIN32_INPUT_STREAM
|
||||
G_WIN32_INPUT_STREAM_CLASS
|
||||
G_IS_WIN32_INPUT_STREAM_CLASS
|
||||
G_WIN32_INPUT_STREAM_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
g_win32_input_stream_get_type
|
||||
GWin32InputStreamPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gwin32outputstream</FILE>
|
||||
<TITLE>GWin32OutputStream</TITLE>
|
||||
GWin32OutputStream
|
||||
g_win32_output_stream_new
|
||||
g_win32_output_stream_set_close_handle
|
||||
g_win32_output_stream_get_close_handle
|
||||
g_win32_output_stream_get_handle
|
||||
<SUBSECTION Standard>
|
||||
GWin32OutputStreamClass
|
||||
G_WIN32_OUTPUT_STREAM
|
||||
G_IS_WIN32_OUTPUT_STREAM
|
||||
G_TYPE_WIN32_OUTPUT_STREAM
|
||||
G_WIN32_OUTPUT_STREAM_CLASS
|
||||
G_IS_WIN32_OUTPUT_STREAM_CLASS
|
||||
G_WIN32_OUTPUT_STREAM_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
g_win32_output_stream_get_type
|
||||
GWin32OutputStreamPrivate
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gwin32registrykey</FILE>
|
||||
|
||||
<SUBSECTION>
|
||||
GWin32RegistrySubkeyIter
|
||||
g_win32_registry_subkey_iter_copy
|
||||
g_win32_registry_subkey_iter_free
|
||||
g_win32_registry_subkey_iter_assign
|
||||
|
||||
<SUBSECTION>
|
||||
GWin32RegistryValueIter
|
||||
g_win32_registry_value_iter_copy
|
||||
g_win32_registry_value_iter_free
|
||||
g_win32_registry_value_iter_assign
|
||||
|
||||
<SUBSECTION>
|
||||
GWin32RegistryKey
|
||||
g_win32_registry_key_new
|
||||
g_win32_registry_key_new_w
|
||||
g_win32_registry_key_get_child
|
||||
g_win32_registry_key_get_child_w
|
||||
|
||||
<SUBSECTION>
|
||||
g_win32_registry_subkey_iter_init
|
||||
g_win32_registry_subkey_iter_clear
|
||||
g_win32_registry_subkey_iter_n_subkeys
|
||||
g_win32_registry_subkey_iter_next
|
||||
g_win32_registry_subkey_iter_get_name
|
||||
g_win32_registry_subkey_iter_get_name_w
|
||||
|
||||
<SUBSECTION>
|
||||
g_win32_registry_value_iter_init
|
||||
g_win32_registry_value_iter_clear
|
||||
g_win32_registry_value_iter_n_values
|
||||
g_win32_registry_value_iter_next
|
||||
GWin32RegistryValueType
|
||||
g_win32_registry_value_iter_get_value_type
|
||||
g_win32_registry_value_iter_get_name
|
||||
g_win32_registry_value_iter_get_name_w
|
||||
g_win32_registry_value_iter_get_data
|
||||
g_win32_registry_value_iter_get_data_w
|
||||
|
||||
<SUBSECTION>
|
||||
g_win32_registry_key_get_value
|
||||
g_win32_registry_key_get_value_w
|
||||
g_win32_registry_key_get_path
|
||||
g_win32_registry_key_get_path_w
|
||||
GWin32RegistryKeyWatchCallbackFunc
|
||||
GWin32RegistryKeyWatcherFlags
|
||||
g_win32_registry_key_watch
|
||||
g_win32_registry_key_has_changed
|
||||
g_win32_registry_key_erase_change_indicator
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GWin32RegistryKeyClass
|
||||
|
||||
<SUBSECTION Private>
|
||||
GWin32RegistryKeyPrivate
|
||||
g_win32_registry_key_get_type
|
||||
g_win32_registry_subkey_iter_get_type
|
||||
g_win32_registry_value_iter_get_type
|
||||
G_TYPE_WIN32_REGISTRY_KEY
|
||||
G_WIN32_REGISTRY_KEY
|
||||
G_WIN32_REGISTRY_KEY_CLASS
|
||||
G_IS_WIN32_REGISTRY_KEY
|
||||
G_IS_WIN32_REGISTRY_KEY_CLASS
|
||||
G_WIN32_REGISTRY_KEY_GET_CLASS
|
||||
G_TYPE_WIN32_REGISTRY_SUBKEY_ITER
|
||||
G_TYPE_WIN32_REGISTRY_VALUE_ITER
|
||||
</SECTION>
|
||||
805
docs/reference/gio/gio.xml
Normal file
805
docs/reference/gio/gio.xml
Normal file
|
|
@ -0,0 +1,805 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
<refentry id="gio">
|
||||
<refentryinfo>
|
||||
<title>gio</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>Matthias</firstname>
|
||||
<surname>Clasen</surname>
|
||||
<email>mclasen@redhat.com</email>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gio</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gio</refname>
|
||||
<refpurpose>GIO commandline tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">help</arg>
|
||||
<arg choice="opt"><replaceable>COMMAND</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">version</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">cat</arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">copy</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">info</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">launch</arg>
|
||||
<arg choice="plain"><replaceable>DESKTOP-FILE</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>FILE-ARG</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">list</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">mime</arg>
|
||||
<arg choice="plain"><replaceable>MIMETYPE</replaceable></arg>
|
||||
<arg choice="opt"><replaceable>HANDLER</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">mkdir</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">monitor</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">mount</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">move</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">open</arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">rename</arg>
|
||||
<arg choice="plain"><replaceable>LOCATION</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>NAME</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">remove</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">save</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">set</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>LOCATION</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>ATTRIBUTE</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>VALUE</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">trash</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gio</command>
|
||||
<arg choice="plain">tree</arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para><command>gio</command> is a utility that makes many of the GIO
|
||||
features available from the commandline. In doing so, it provides
|
||||
commands that are similar to traditional utilities, but let you
|
||||
use GIO locations instead of local files: for example you can use
|
||||
something like <filename>smb://server/resource/file.txt</filename>
|
||||
as a location.</para>
|
||||
<para>Plain filenames which contain a colon will be interpreted as URIs
|
||||
with an unknown protocol. To avoid this, prefix them with a path such as
|
||||
<filename>./</filename>, or with the <literal>file:</literal> protocol.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Commands</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>help</command>
|
||||
<arg choice="opt"><replaceable>COMMAND</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Displays a short synopsis of the available commands or provides
|
||||
detailed help on a specific command.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>version</command>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Prints the GLib version to which <command>gio</command>
|
||||
belongs.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>cat</command>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Concatenates the given files and prints them to the standard
|
||||
output.</para>
|
||||
<para>The <command>cat</command> command works just like the traditional <command>cat</command> utility.</para>
|
||||
<para>Note: just pipe through <command>cat</command> if you need its formatting options
|
||||
like <option>-n</option>, <option>-T</option> or other.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>copy</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Copies one or more files from <replaceable>SOURCE</replaceable>
|
||||
to <replaceable>DESTINATION</replaceable>. If more than one source
|
||||
is specified, the destination must be a directory.</para>
|
||||
<para>The <command>copy</command> command is similar to the traditional <command>cp</command> utility.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-T</option>, <option>--no-target-directory</option></term>
|
||||
<listitem><para>Don’t copy into <replaceable>DESTINATION</replaceable> even if it is a directory.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-p</option>, <option>--progress</option></term>
|
||||
<listitem><para>Show progress.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-i</option>, <option>--interactive</option></term>
|
||||
<listitem><para>Prompt for confirmation before overwriting files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--preserve</option></term>
|
||||
<listitem><para>Preserve all attributes of copied files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-b</option>, <option>--backup</option></term>
|
||||
<listitem><para>Create backups of existing destination files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-P</option>, <option>--no-dereference</option></term>
|
||||
<listitem><para>Never follow symbolic links.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--default-permissions</option></term>
|
||||
<listitem><para>Use the default permissions of the current process for the destination file, rather than copying the permissions of the source file.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>info</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Shows information about the given locations.</para>
|
||||
<para>The <command>info</command> command is similar to the traditional <command>ls</command> utility.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-w</option>, <option>--query-writable</option></term>
|
||||
<listitem><para>List writable attributes.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-f</option>, <option>--filesystem</option></term>
|
||||
<listitem><para>Show information about the filesystem that the given
|
||||
locations reside on.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-a</option> <option>--attributes=<replaceable>ATTRIBUTES</replaceable></option></term>
|
||||
<listitem><para>The attributes to get.</para>
|
||||
<para>Attributes can be specified with their GIO name, e.g.
|
||||
<literal>standard::icon</literal>, or just by namespace, e.g. <literal>unix</literal>, or by <literal>*</literal>,
|
||||
which matches all attributes. Several attributes or groups
|
||||
of attributes can be specified, separated by comma.</para>
|
||||
<para>By default, all attributes are listed.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-n</option>, <option>--nofollow-symlinks</option></term>
|
||||
<listitem><para>Don’t follow symbolic links.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>launch</command>
|
||||
<arg choice="plain"><replaceable>DESKTOP-FILE</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>FILE-ARG</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Launch a desktop file from any location given.</para>
|
||||
<para>The <command>launch</command> command extends the behavior of the <command>open</command> command by allowing
|
||||
any desktop file to be launched, not only those registered as file handlers.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>list</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Lists the contents of the given locations. If no location is
|
||||
given, the contents of the current directory are shown.</para>
|
||||
<para>The <command>list</command> command is similar to the traditional <command>ls</command> utility.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-a</option> <option>--attributes=<replaceable>ATTRIBUTES</replaceable></option></term>
|
||||
<listitem><para>The attributes to get.</para>
|
||||
<para>Attributes can be specified with their GIO name, e.g.
|
||||
<literal>standard::icon</literal>, or just by namespace, e.g. <literal>unix</literal>, or by <literal>*</literal>,
|
||||
which matches all attributes. Several attributes or groups
|
||||
of attributes can be specified, separated by comma.</para>
|
||||
<para>By default, all attributes are listed.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-h</option>, <option>--hidden</option></term>
|
||||
<listitem><para>Show hidden files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-l</option>, <option>--long</option></term>
|
||||
<listitem><para>Use a long listing format.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-n</option>, <option>--nofollow-symlinks</option></term>
|
||||
<listitem><para>Don’t follow symbolic links.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-d</option>, <option>--print-display-names</option></term>
|
||||
<listitem><para>Print display names.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-u</option>, <option>--print-uris</option></term>
|
||||
<listitem><para>Print full URIs.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>mime</command>
|
||||
<arg choice="plain"><replaceable>MIMETYPE</replaceable></arg>
|
||||
<arg choice="opt"><replaceable>HANDLER</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>If no handler is given, the <command>mime</command> command lists the
|
||||
registered and recommended applications for the mimetype.
|
||||
If a handler is given, it is set as the default handler for
|
||||
the mimetype.</para>
|
||||
<para>Handlers must be specified by their desktop file name,
|
||||
including the extension. Example: <literal>org.gnome.gedit.desktop</literal>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>mkdir</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Creates directories.</para>
|
||||
<para>The <command>mkdir</command> command is similar to the traditional <command>mkdir</command> utility.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-p</option>, <option>--parent</option></term>
|
||||
<listitem><para>Create parent directories when necessary.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>monitor</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Monitors files or directories for changes, such as creation
|
||||
deletion, content and attribute changes, and mount and unmount
|
||||
operations affecting the monitored locations.</para>
|
||||
<para>The <command>monitor</command> command uses the GIO file monitoring APIs to do
|
||||
its job. GIO has different implementations for different platforms.
|
||||
The most common implementation on Linux uses inotify.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-d</option>, <option>--dir=<replaceable>LOCATION</replaceable></option></term>
|
||||
<listitem><para>Monitor the given location as a directory. Normally,
|
||||
the file type is used to determine whether to monitor a file or directory.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-f</option>, <option>--file=<replaceable>LOCATION</replaceable></option></term>
|
||||
<listitem><para>Monitor the given location as a file. Normally,
|
||||
the file type is used to determine whether to monitor a file or directory.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-D</option>, <option>--direct=<replaceable>LOCATION</replaceable></option></term>
|
||||
<listitem><para>Monitor the file directly. This allows changes made via hardlinks to be captured.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-s</option>, <option>--silent=<replaceable>LOCATION</replaceable></option></term>
|
||||
<listitem><para>Monitor the file directly, but don’t report changes.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-n</option>, <option>--no-moves</option></term>
|
||||
<listitem><para>Report moves and renames as simple deleted/created events.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-m</option>, <option>--mounts</option></term>
|
||||
<listitem><para>Watch for mount events.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>mount</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Provides commandline access to various aspects of GIO’s mounting
|
||||
functionality.</para>
|
||||
<para>Mounting refers to the traditional concept of arranging multiple
|
||||
file systems and devices in a single tree, rooted at <filename>/</filename>. Classical
|
||||
mounting happens in the kernel and is controlled by the mount utility.
|
||||
GIO expands this concept by introducing mount daemons that can make
|
||||
file systems available to GIO applications without kernel
|
||||
involvement.</para>
|
||||
<para>GIO mounts can require authentication, and the <command>mount</command> command
|
||||
may ask for user IDs, passwords, and so on, when required.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-m</option>, <option>--mountable</option></term>
|
||||
<listitem><para>Mount as mountable.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-d</option>, <option>--device=<replaceable>ID</replaceable></option></term>
|
||||
<listitem><para>Mount volume with device file, or other identifier.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-u</option>, <option>--unmount</option></term>
|
||||
<listitem><para>Unmount the location.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-e</option>, <option>--eject</option></term>
|
||||
<listitem><para>Eject the location.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-t</option>, <option>--stop=<replaceable>DEVICE</replaceable></option></term>
|
||||
<listitem><para>Stop drive with device file.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-s</option>, <option>--unmount-scheme=<replaceable>SCHEME</replaceable></option></term>
|
||||
<listitem><para>Unmount all mounts with the given scheme.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-f</option>, <option>--force</option></term>
|
||||
<listitem><para>Ignore outstanding file operations when unmounting or ejecting.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-a</option>, <option>--anonymous</option></term>
|
||||
<listitem><para>Use an anonymous user when authenticating.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-l</option>, <option>--list</option></term>
|
||||
<listitem><para>List all GIO mounts.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-o</option>, <option>--monitor</option></term>
|
||||
<listitem><para>Monitor mount-related events.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-i</option>, <option>--detail</option></term>
|
||||
<listitem><para>Show extra information.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--tcrypt-pim</option></term>
|
||||
<listitem><para>The numeric PIM when unlocking a VeraCrypt volume.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--tcrypt-hidden</option></term>
|
||||
<listitem><para>Mount a TCRYPT hidden volume.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--tcrypt-system</option></term>
|
||||
<listitem><para>Mount a TCRYPT system volume.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>move</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>SOURCE</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Moves one or more files from <replaceable>SOURCE</replaceable>
|
||||
to <replaceable>DESTINATION</replaceable>. If more than one source
|
||||
is specified, the destination must be a directory.</para>
|
||||
<para>The <command>move</command> command is similar to the traditional <command>mv</command> utility.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-T</option>, <option>--no-target-directory</option></term>
|
||||
<listitem><para>Don’t copy into <replaceable>DESTINATION</replaceable> even if it is a directory.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-p</option>, <option>--progress</option></term>
|
||||
<listitem><para>Show progress.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-i</option>, <option>--interactive</option></term>
|
||||
<listitem><para>Prompt for confirmation before overwriting files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-b</option>, <option>--backup</option></term>
|
||||
<listitem><para>Create backups of existing destination files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-C</option>, <option>--no-copy-fallback</option></term>
|
||||
<listitem><para>Don’t use copy and delete fallback.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>open</command>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Opens files with the default application that is registered
|
||||
to handle files of this type.</para>
|
||||
<para>GIO obtains this information from the shared-mime-info
|
||||
database, with per-user overrides stored in
|
||||
<filename><envar>$XDG_DATA_HOME</envar>/applications/mimeapps.list</filename>.</para>
|
||||
<para>The <command>mime</command> command can be used to change the default handler for
|
||||
a mimetype.</para>
|
||||
<para>Environment variables will not be set on the application, as it
|
||||
may be an existing process which is activated to handle the new file.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>rename</command>
|
||||
<arg choice="plain"><replaceable>LOCATION</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>NAME</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Renames a file.</para>
|
||||
<para>The <command>rename</command> command is similar to the traditional <command>rename</command> utility.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>remove</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Deletes each given file.</para>
|
||||
<para>This command removes files irreversibly. If you want a reversible
|
||||
way to remove files, see the <command>trash</command> command.</para>
|
||||
<para>Note that not all URI schemes that are supported by GIO may
|
||||
allow deletion of files.</para>
|
||||
<para>The <command>remove</command> command is similar to the traditional <command>rm</command> utility.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-f</option>, <option>--force</option></term>
|
||||
<listitem><para>Ignore non-existent and non-deletable files.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>save</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>DESTINATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Reads from standard input and saves the data to the given
|
||||
location.</para>
|
||||
<para>This is similar to just redirecting output to a file using
|
||||
traditional shell syntax, but the <command>save</command> command allows saving to
|
||||
location that GIO can write to.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-b</option>, <option>--backup</option></term>
|
||||
<listitem><para>Back up existing destination files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-c</option>, <option>--create</option></term>
|
||||
<listitem><para>Only create the destination if it doesn’t exist yet.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-a</option>, <option>--append</option></term>
|
||||
<listitem><para>Append to the end of the file.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-p</option>, <option>--private</option></term>
|
||||
<listitem><para>When creating, restrict access to the current user.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-u</option>, <option>--unlink</option></term>
|
||||
<listitem><para>When replacing, replace as if the destination did not exist.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-v</option>, <option>--print-etag</option></term>
|
||||
<listitem><para>Print the new ETag in the end.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-e</option>, <option>--etag=<replaceable>ETAG</replaceable></option></term>
|
||||
<listitem><para>The ETag of the file that is overwritten.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>set</command>
|
||||
<arg choice="plain"><replaceable>LOCATION</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>ATTRIBUTE</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>VALUE</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Sets a file attribute on a file.</para>
|
||||
<para>File attributes can be specified with their GIO name, e.g
|
||||
<literal>standard::icon</literal>. Note that not all GIO file attributes are writable.
|
||||
Use the <option>--query-writable</option> option of the <command>info</command> command to list
|
||||
writable file attributes.</para>
|
||||
<para>If the <replaceable>TYPE</replaceable> is unset,
|
||||
<replaceable>VALUE</replaceable> does not have to be specified.
|
||||
If the <replaceable>TYPE</replaceable> is <literal>stringv</literal>, multiple values can be given.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-t</option>, <option>--type=<replaceable>TYPE</replaceable></option></term>
|
||||
<listitem><para>Specifies the type of the attribute. Supported
|
||||
types are <literal>string</literal>, <literal>stringv</literal>,
|
||||
<literal>bytestring</literal>, <literal>boolean</literal>,
|
||||
<literal>uint32</literal>, <literal>int32</literal>,
|
||||
<literal>uint64</literal>, <literal>int64</literal> and <literal>unset</literal>.</para>
|
||||
<para>If the type is not specified, <literal>string</literal> is assumed.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-n</option>, <option>--nofollow-symlinks</option></term>
|
||||
<listitem><para>Don’t follow symbolic links.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>trash</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Sends files or directories to the ‘Trashcan’ or restore them from
|
||||
‘Trashcan’. This can be a different folder depending on where the file
|
||||
is located, and not all file systems support this concept. In the common
|
||||
case that the file lives inside a user’s home directory, the trash folder is
|
||||
<filename><envar>$XDG_DATA_HOME</envar>/Trash</filename>.</para>
|
||||
<para>Note that moving files to the trash does not free up space on
|
||||
the file system until the ‘Trashcan’ is emptied. If you are interested
|
||||
in deleting a file irreversibly, see the <command>remove</command> command.</para>
|
||||
<para>Inspecting and emptying the ‘Trashcan’ is normally supported by
|
||||
graphical file managers such as Nautilus, but you can also see the
|
||||
trash with the command: <command>gio trash --list</command> or
|
||||
<command>gio list trash://</command>.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-f</option>, <option>--force</option></term>
|
||||
<listitem><para>Ignore non-existent and non-deletable files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--empty</option></term>
|
||||
<listitem><para>Empty the trash.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--list</option></term>
|
||||
<listitem><para>List files in the trash with their original locations</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>--restore</option></term>
|
||||
<listitem><para>Restore a file from trash to its original location. A URI beginning
|
||||
with <literal>trash://</literal> is expected here. If the original
|
||||
directory doesn't exist, it will be recreated.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>tree</command>
|
||||
<arg choice="opt" rep="repeat"><replaceable>OPTION</replaceable></arg>
|
||||
<arg choice="opt" rep="repeat"><replaceable>LOCATION</replaceable></arg>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Lists the contents of the given locations recursively, in a
|
||||
tree-like format. If no location is given, it defaults to the current
|
||||
directory.</para>
|
||||
<para>The <command>tree</command> command is similar to the traditional <command>tree</command> utility.</para>
|
||||
<refsect3>
|
||||
<title>Options</title>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-h</option>, <option>--hidden</option></term>
|
||||
<listitem><para>Show hidden files.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-l</option>, <option>--follow-symlinks</option></term>
|
||||
<listitem><para>Follow symbolic links.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect3>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>Exit status</title>
|
||||
<para>On success 0 is returned, a non-zero failure code otherwise.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>See Also</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>cat</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>cp</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>ls</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>mkdir</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>mv</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>rm</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>tree</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
254
docs/reference/gio/glib-compile-resources.xml
Normal file
254
docs/reference/gio/glib-compile-resources.xml
Normal file
|
|
@ -0,0 +1,254 @@
|
|||
<refentry id="glib-compile-resources" lang="en">
|
||||
|
||||
<refentryinfo>
|
||||
<title>glib-compile-schemas</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>Alexander</firstname>
|
||||
<surname>Larsson</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>glib-compile-resources</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>glib-compile-resources</refname>
|
||||
<refpurpose>GLib resource compiler</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>glib-compile-resources</command>
|
||||
<arg choice="opt" rep="repeat">OPTION</arg>
|
||||
<arg choice="req">FILE</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para><command>glib-compile-resources</command> reads the resource description from
|
||||
<replaceable>FILE</replaceable> and the files that it references
|
||||
and creates a binary resource bundle that is suitable for use with the
|
||||
<link linkend="GResource"><type>GResource</type></link> API.
|
||||
The resulting bundle is then written out as-is, or as C source for linking into
|
||||
an application.
|
||||
</para>
|
||||
<para>
|
||||
The XML resource files normally have the filename extension <filename>.gresource.xml</filename>.
|
||||
For a detailed description of the XML file format, see the
|
||||
<link linkend="GResource"><type>GResource</type></link> documentation.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Options</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-h</option>, <option>--help</option></term>
|
||||
<listitem><para>
|
||||
Print help and exit
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--version</option></term>
|
||||
<listitem><para>
|
||||
Print program version and exit
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--target=<replaceable>TARGET</replaceable></option></term>
|
||||
<listitem><para>
|
||||
Store the compiled resources in the file <replaceable>TARGET</replaceable>.
|
||||
If not specified a filename based on the <replaceable>FILE</replaceable>
|
||||
basename is used.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--sourcedir=<replaceable>DIRECTORY</replaceable></option></term>
|
||||
<listitem><para>
|
||||
The files referenced in <replaceable>FILE</replaceable> are loaded from
|
||||
this directory. If not specified, the current directory is used.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--generate</option></term>
|
||||
<listitem><para>
|
||||
Write the output file in the format selected for by its filename extension:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><literal>.c</literal></term>
|
||||
<listitem><para>C source</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>.h</literal></term>
|
||||
<listitem><para>C header</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>.gresource</literal></term>
|
||||
<listitem><para>resource bundle</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--generate-source</option></term>
|
||||
<listitem><para>
|
||||
Instead of a writing the resource bundle in binary form create a C source file
|
||||
that contains the resource bundle. This can then be compiled into an
|
||||
application for easy access.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--generate-header</option></term>
|
||||
<listitem><para>
|
||||
Generate a header file for use with C code generated by
|
||||
<option>--generate-source</option>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--generate-dependencies</option></term>
|
||||
<listitem><para>
|
||||
Prints the list of files that the resource bundle references to standard output.
|
||||
This can be used to track dependencies in the build system. For example, the
|
||||
following make rule would mark <replaceable>test.gresource</replaceable> as
|
||||
depending on all the files that <replaceable>test.gresource.xml</replaceable>
|
||||
includes, so that is is automatically rebuilt if any of them change:
|
||||
<programlisting>
|
||||
test.gresource: test.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies test.gresource.xml)
|
||||
</programlisting>
|
||||
Note that this may or may not be portable to non-GNU <command>make</command>.
|
||||
</para>
|
||||
<para>
|
||||
Also see <option>--dependency-file</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--c-name</option></term>
|
||||
<listitem><para>
|
||||
Specify the prefix used for the C identifiers in the code generated by
|
||||
<option>--generate-source</option> and <option>--generate-header</option>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--manual-register</option></term>
|
||||
<listitem><para>
|
||||
By default code generated by <option>--generate-source</option> uses automatic
|
||||
initialization of the resource. This works on most systems by using the
|
||||
compiler support for constructors. However, some (uncommon) compilers may not
|
||||
support this, you can then specify <option>--manual-register</option>,
|
||||
which will generate custom register and unregister functions that your code
|
||||
can manually call at initialization and uninitialization time.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--internal</option></term>
|
||||
<listitem><para>
|
||||
By default code generated by <option>--generate-source</option> declares all
|
||||
initialization functions as <type>extern</type>. So they are exported
|
||||
unless this is prevented by a link script or other means. Since libraries
|
||||
usually want to use the functions only internally it can be more useful to
|
||||
declare them as
|
||||
<link linkend="G-GNUC-INTERNAL:CAPS"><literal>G_GNUC_INTERNAL</literal></link>
|
||||
which is what <option>--internal</option> does.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--external-data</option></term>
|
||||
<listitem><para>
|
||||
By default code generated by <option>--generate-source</option> embeds the
|
||||
resource data as a string literal. When <option>--external-data</option>
|
||||
is given, the data is only declared in the generated C file, and the data
|
||||
has to be linked externally.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--dependency-file=<replaceable>FILE</replaceable></option></term>
|
||||
<listitem><para>
|
||||
Write dependencies in the same style as gcc -M -MF to the given file.
|
||||
If <option>FILE</option> is -, the dependencies are written to the standard
|
||||
output. Unlike <option>--generate-dependencies</option>, this option can be
|
||||
combined with other <option>--generate</option> options to generate dependencies
|
||||
as a side-effect of generating sources.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--generate-phony-targets</option></term>
|
||||
<listitem><para>
|
||||
When creating a dependency file with <option>--dependency-file</option>
|
||||
include phony targets in the same style as gcc -MP. This would typically
|
||||
be used with <literal>make</literal>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--compiler=<replaceable>NAME</replaceable></option></term>
|
||||
<listitem><para>
|
||||
Generate code that is going to target the given compiler <replaceable>NAME</replaceable>.
|
||||
The current two compiler modes are "gcc", for all GCC-compatible toolchains; and "msvc",
|
||||
for the Microsoft Visual C Compiler. If this option isn't set, then the default will be
|
||||
taken from the <envar>CC</envar> environment variable.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Environment</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><envar>XMLLINT</envar></term>
|
||||
<listitem><para>
|
||||
The full path to the <command>xmllint</command> executable. This is used to
|
||||
preprocess resources with the <literal>xml-stripblanks</literal> preprocessing
|
||||
option. If this environment variable is not set, <command>xmllint</command> is
|
||||
searched for in the <envar>PATH</envar>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><envar>GDK_PIXBUF_PIXDATA</envar></term>
|
||||
<listitem><para>
|
||||
Deprecated since gdk-pixbuf 2.32, as <type>GResource</type> supports embedding
|
||||
modern image formats without conversion.
|
||||
</para><para>
|
||||
The full path to the <command>gdk-pixbuf-pixdata</command> executable. This is
|
||||
used to preprocess resources with the <literal>to-pixdata</literal> preprocessing
|
||||
option. If this environment variable is not set, <command>gdk-pixbuf-pixdata</command>
|
||||
is searched for in the <envar>PATH</envar>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><envar>JSON_GLIB_FORMAT</envar></term>
|
||||
<listitem><para>
|
||||
The full path to the <command>json-glib-format</command> executable. This is used
|
||||
to preprocess resources with the <literal>json-stripblanks</literal> preprocessing
|
||||
option. If this environment variable is not set, <command>json-glib-format</command>
|
||||
is searched for in the <envar>PATH</envar>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
118
docs/reference/gio/glib-compile-schemas.xml
Normal file
118
docs/reference/gio/glib-compile-schemas.xml
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
<refentry id="glib-compile-schemas" lang="en">
|
||||
|
||||
<refentryinfo>
|
||||
<title>glib-compile-schemas</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>Ryan</firstname>
|
||||
<surname>Lortie</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>glib-compile-schemas</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>glib-compile-schemas</refname>
|
||||
<refpurpose>GSettings schema compiler</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>glib-compile-schemas</command>
|
||||
<arg choice="opt" rep="repeat">OPTION</arg>
|
||||
<arg choice="req">DIRECTORY</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para><command>glib-compile-schemas</command> compiles all the GSettings XML
|
||||
schema files in <replaceable>DIRECTORY</replaceable> into a binary file
|
||||
with the name <filename>gschemas.compiled</filename> that can be used
|
||||
by <link linkend="GSettings"><type>GSettings</type></link>. The XML schema
|
||||
files must have the filename extension <filename>.gschema.xml</filename>.
|
||||
For a detailed description of the XML file format, see the
|
||||
<link linkend="GSettings"><type>GSettings</type></link> documentation.
|
||||
</para>
|
||||
<para>
|
||||
At runtime, GSettings looks for schemas in the
|
||||
<filename>glib-2.0/schemas</filename> subdirectories of all directories
|
||||
specified in the <envar>XDG_DATA_DIRS</envar> environment variable. The
|
||||
usual location to install schema files is
|
||||
<filename>/usr/share/glib-2.0/schemas</filename>.
|
||||
</para>
|
||||
<para>
|
||||
In addition to schema files, glib-compile-schemas reads 'vendor override'
|
||||
files, which are key files that can override default values for keys in
|
||||
the schemas. The group names in the key files are the schema id, and the
|
||||
values are written in serialized GVariant form.
|
||||
Vendor override files must have the filename extension
|
||||
<filename>.gschema.override</filename>.
|
||||
</para>
|
||||
<para>
|
||||
By convention, vendor override files begin with <filename>nn_</filename>
|
||||
where <filename>nn</filename> is a number from 00 to 99. Higher
|
||||
numbered files have higher priority (eg: if the same override is made in
|
||||
a file numbered 10 and then again in a file numbered 20, the override
|
||||
from 20 will take precedence).
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Options</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-h</option>, <option>--help</option></term>
|
||||
<listitem><para>
|
||||
Print help and exit
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--version</option></term>
|
||||
<listitem><para>
|
||||
Print program version and exit
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--targetdir=<replaceable>TARGET</replaceable></option></term>
|
||||
<listitem><para>
|
||||
Store <filename>gschemas.compiled</filename> in the <replaceable>TARGET</replaceable> directory instead of <replaceable>DIRECTORY</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--strict</option></term>
|
||||
<listitem><para>
|
||||
Abort on any errors in schemas. Without this option, faulty schema files are
|
||||
simply omitted from the resulting compiled schema.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--dry-run</option></term>
|
||||
<listitem><para>
|
||||
Don't write <filename>gschemas.compiled</filename>. This option can be used
|
||||
to check <filename>.gschema.xml</filename> sources for errors.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--allow-any-name</option></term>
|
||||
<listitem><para>
|
||||
Do not enforce restrictions on key names. Note that this option is purely
|
||||
to facility the transition from GConf, and will be removed at some time
|
||||
in the future.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
127
docs/reference/gio/gresource.xml
Normal file
127
docs/reference/gio/gresource.xml
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
<refentry id="gresource-tool" lang="en">
|
||||
|
||||
<refentryinfo>
|
||||
<title>gresource</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>Matthias</firstname>
|
||||
<surname>Clasen</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gresource</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gresource</refname>
|
||||
<refpurpose>GResource tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gresource</command>
|
||||
<arg choice="opt">--section <replaceable>SECTION</replaceable></arg>
|
||||
<arg choice="plain">list</arg>
|
||||
<arg choice="plain"><replaceable>FILE</replaceable></arg>
|
||||
<arg choice="opt"><replaceable>PATH</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gresource</command>
|
||||
<arg choice="opt">--section <replaceable>SECTION</replaceable></arg>
|
||||
<arg choice="plain">details</arg>
|
||||
<arg choice="plain"><replaceable>FILE</replaceable></arg>
|
||||
<arg choice="opt"><replaceable>PATH</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gresource</command>
|
||||
<arg choice="opt">--section <replaceable>SECTION</replaceable></arg>
|
||||
<arg choice="plain">extract</arg>
|
||||
<arg choice="plain"><replaceable>FILE</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>PATH</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gresource</command>
|
||||
<arg choice="plain">sections</arg>
|
||||
<arg choice="plain"><replaceable>FILE</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gresource</command>
|
||||
<arg choice="plain">help</arg>
|
||||
<arg choice="opt"><replaceable>COMMAND</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para><command>gresource</command> offers a simple commandline
|
||||
interface to <link linkend="GResource"><type>GResource</type></link>.
|
||||
It lets you list and extract resources that have been compiled
|
||||
into a resource file or included in an elf file (a binary or a
|
||||
shared library).
|
||||
</para>
|
||||
<para>
|
||||
The file to operate on is specified by the <replaceable>FILE</replaceable>
|
||||
argument.
|
||||
</para>
|
||||
<para>
|
||||
If an elf file includes multiple sections with resources, it is
|
||||
possible to select which one to operate on with the
|
||||
<arg choice="plain">--section</arg> option. Use the
|
||||
<arg choice="plain">sections</arg> command to find available sections.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Commands</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>list</option></term>
|
||||
<listitem><para>
|
||||
Lists resources. If <replaceable>SECTION</replaceable> is given, only
|
||||
list resources in this section. If <replaceable>PATH</replaceable> is
|
||||
given, only list matching resources.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>details</option></term>
|
||||
<listitem><para>
|
||||
Lists resources with details. If <replaceable>SECTION</replaceable>
|
||||
is given, only list resources in this section. If
|
||||
<replaceable>PATH</replaceable> is given, only list matching resources.
|
||||
Details include the section, size and compression of each resource.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>extract</option></term>
|
||||
<listitem><para>
|
||||
Extracts the resource named by <replaceable>PATH</replaceable> to stdout.
|
||||
Note that resources may contain binary data.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>sections</option></term>
|
||||
<listitem><para>
|
||||
Lists sections containing resources. This is only interesting if
|
||||
<replaceable>FILE</replaceable> is an elf file.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>help</option></term>
|
||||
<listitem><para>
|
||||
Prints help and exits.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
248
docs/reference/gio/gsettings.xml
Normal file
248
docs/reference/gio/gsettings.xml
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
<refentry id="gsettings-tool" lang="en">
|
||||
|
||||
<refentryinfo>
|
||||
<title>gsettings</title>
|
||||
<productname>GIO</productname>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<contrib>Developer</contrib>
|
||||
<firstname>Ryan</firstname>
|
||||
<surname>Lortie</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>gsettings</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo class="manual">User Commands</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>gsettings</refname>
|
||||
<refpurpose>GSettings configuration tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">get</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">monitor</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
<arg choice="opt"><replaceable>KEY</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">writable</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">range</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">describe</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">set</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>VALUE</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">reset</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
<arg choice="plain"><replaceable>KEY</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">reset-recursively</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">list-schemas</arg>
|
||||
<arg choice="opt">--print-paths</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">list-relocatable-schemas</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">list-keys</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">list-children</arg>
|
||||
<arg choice="plain"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">list-recursively</arg>
|
||||
<arg choice="opt"><replaceable>SCHEMA</replaceable><arg choice="opt">:<replaceable>PATH</replaceable></arg></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gsettings</command>
|
||||
<arg choice="plain">help</arg>
|
||||
<arg choice="opt"><replaceable>COMMAND</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para><command>gsettings</command> offers a simple commandline
|
||||
interface to <link linkend="GSettings"><type>GSettings</type></link>.
|
||||
It lets you get, set or monitor an individual key for changes.
|
||||
</para>
|
||||
<para>
|
||||
The <replaceable>SCHEMA</replaceable> and <replaceable>KEY</replaceable>
|
||||
arguments are required for most commands to specify the schema id and the
|
||||
name of the key to operate on. The schema id may optionally have a
|
||||
:<replaceable>PATH</replaceable> suffix. Specifying the path is only needed
|
||||
if the schema does not have a fixed path.
|
||||
</para>
|
||||
<para>
|
||||
When setting a key, you also need specify a <replaceable>VALUE</replaceable>
|
||||
The format for the value is that of a serialized
|
||||
<link linkend="GVariant"><type>GVariant</type></link>,
|
||||
so e.g. a string
|
||||
must include explicit quotes: "'foo'". This format is also used when printing
|
||||
out values.
|
||||
</para>
|
||||
<para>
|
||||
Note that gsettings needs a D-Bus session bus connection to write changes to
|
||||
the dconf database.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>Commands</title>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>get</option></term>
|
||||
<listitem><para>
|
||||
Gets the value of <replaceable>KEY</replaceable>.
|
||||
The value is printed out as a serialized
|
||||
<link linkend="GVariant"><type>GVariant</type></link>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>monitor</option></term>
|
||||
<listitem><para>
|
||||
Monitors <replaceable>KEY</replaceable> for changes and prints the changed
|
||||
values. If no <replaceable>KEY</replaceable> is specified, all keys in the
|
||||
schema are monitored. Monitoring will continue until the process is terminated.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>writable</option></term>
|
||||
<listitem><para>
|
||||
Finds out whether <replaceable>KEY</replaceable> is writable.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>range</option></term>
|
||||
<listitem><para>
|
||||
Queries the range of valid values for <replaceable>KEY</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>describe</option></term>
|
||||
<listitem><para>
|
||||
Queries the description of valid values for <replaceable>KEY</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>set</option></term>
|
||||
<listitem><para>
|
||||
Sets the value of <replaceable>KEY</replaceable> to
|
||||
<replaceable>VALUE</replaceable>. The value is specified as a serialized
|
||||
<link linkend="GVariant"><type>GVariant</type></link>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>reset</option></term>
|
||||
<listitem><para>
|
||||
Resets <replaceable>KEY</replaceable> to its default value.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>reset-recursively</option></term>
|
||||
<listitem><para>
|
||||
Reset all keys under the given <replaceable>SCHEMA</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>list-schemas</option></term>
|
||||
<listitem><para>
|
||||
Lists the installed, non-relocatable schemas.
|
||||
See <option>list-relocatable-schemas</option> if you are interested in
|
||||
relocatable schemas. If <optional><option>--print-paths</option></optional>
|
||||
is given, the path where each schema is mapped is also printed.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>list-relocatable-schemas</option></term>
|
||||
<listitem><para>
|
||||
Lists the installed, relocatable schemas.
|
||||
See <option>list-schemas</option> if you are interested in
|
||||
non-relocatable schemas.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>list-keys</option></term>
|
||||
<listitem><para>
|
||||
Lists the keys in <replaceable>SCHEMA</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>list-children</option></term>
|
||||
<listitem><para>
|
||||
Lists the children of <replaceable>SCHEMA</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>list-recursively</option></term>
|
||||
<listitem><para>
|
||||
Lists keys and values, recursively. If no <replaceable>SCHEMA</replaceable>
|
||||
is given, list keys in all schemas.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>help</option></term>
|
||||
<listitem><para>
|
||||
Prints help and exits.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
||||
BIN
docs/reference/gio/gvfs-overview.odg
Normal file
BIN
docs/reference/gio/gvfs-overview.odg
Normal file
Binary file not shown.
BIN
docs/reference/gio/gvfs-overview.png
Normal file
BIN
docs/reference/gio/gvfs-overview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 47 KiB |
BIN
docs/reference/gio/menu-example.png
Normal file
BIN
docs/reference/gio/menu-example.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
docs/reference/gio/menu-model.png
Normal file
BIN
docs/reference/gio/menu-model.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
242
docs/reference/gio/meson.build
Normal file
242
docs/reference/gio/meson.build
Normal file
|
|
@ -0,0 +1,242 @@
|
|||
if get_option('gtk_doc')
|
||||
subdir('gdbus-object-manager-example')
|
||||
subdir('xml')
|
||||
|
||||
ignore_headers = [
|
||||
'fam',
|
||||
'fen',
|
||||
'gdbus-2.0',
|
||||
'gvdb',
|
||||
'inotify',
|
||||
'kqueue',
|
||||
'libasyncns',
|
||||
'tests',
|
||||
'win32',
|
||||
'xdgmime',
|
||||
'gappinfoprivate.h',
|
||||
'gapplicationimpl.h',
|
||||
'gasynchelper.h',
|
||||
'gcontenttypeprivate.h',
|
||||
'gcontextspecificgroup.h',
|
||||
'gcredentialsprivate.h',
|
||||
'gdbus-daemon-generated.h',
|
||||
'gdbusactiongroup-private.h',
|
||||
'gdbusauth.h',
|
||||
'gdbusauthmechanismanon.h',
|
||||
'gdbusauthmechanismexternal.h',
|
||||
'gdbusauthmechanism.h',
|
||||
'gdbusauthmechanismsha1.h',
|
||||
'gdbusdaemon.h',
|
||||
'gdbusprivate.h',
|
||||
'gdelayedsettingsbackend.h',
|
||||
'gdocumentportal.h',
|
||||
'gdummyfile.h',
|
||||
'gdummyproxyresolver.h',
|
||||
'gdummytlsbackend.h',
|
||||
'gfileattribute-priv.h',
|
||||
'gfileinfo-priv.h',
|
||||
'ghttpproxy.h',
|
||||
'giomodule-priv.h',
|
||||
'gioprivate.h',
|
||||
'giowin32-afunix.h',
|
||||
'giowin32-priv.h',
|
||||
'gio_probes.h',
|
||||
'gio_trace.h',
|
||||
'gio-tool.h',
|
||||
'glocaldirectorymonitor.h',
|
||||
'glocalfileenumerator.h',
|
||||
'glocalfile.h',
|
||||
'glocalfileinfo.h',
|
||||
'glocalfileinputstream.h',
|
||||
'glocalfileiostream.h',
|
||||
'glocalfilemonitor.h',
|
||||
'glocalfileoutputstream.h',
|
||||
'glocalvfs.h',
|
||||
'gmemorymonitordbus.h',
|
||||
'gmemorymonitorportal.h',
|
||||
'gmountprivate.h',
|
||||
'gnativevolumemonitor.h',
|
||||
'gnetworkingprivate.h',
|
||||
'gnetworkmonitorbase.h',
|
||||
'gnetworkmonitornetlink.h',
|
||||
'gnetworkmonitornm.h',
|
||||
'gnetworkmonitorportal.h',
|
||||
'gnotificationbackend.h',
|
||||
'gnotification-private.h',
|
||||
'gopenuriportal.h',
|
||||
'gpollfilemonitor.h',
|
||||
'gportalsupport.h',
|
||||
'gpowerprofilemonitordbus.h',
|
||||
'gpowerprofilemonitorportal.h',
|
||||
'gproxyresolverportal.h',
|
||||
'gregistrysettingsbackend.h',
|
||||
'gresourcefile.h',
|
||||
'gsettingsbackendinternal.h',
|
||||
'gsettings-mapping.h',
|
||||
'gsettingsschema-internal.h',
|
||||
'gsocketinputstream.h',
|
||||
'gsocketoutputstream.h',
|
||||
'gsocks4aproxy.h',
|
||||
'gsocks4proxy.h',
|
||||
'gsocks5proxy.h',
|
||||
'gsubprocesslauncher-private.h',
|
||||
'gthreadedresolver.h',
|
||||
'gtrashportal.h',
|
||||
'gunionvolumemonitor.h',
|
||||
'gunixmount.h',
|
||||
'gunixresolver.h',
|
||||
'gunixvolume.h',
|
||||
'gunixvolumemonitor.h',
|
||||
'gwin32networkmonitor.h',
|
||||
'gwin32api-application-activation-manager.h',
|
||||
'gwin32api-iterator.h',
|
||||
'gwin32api-misc.h',
|
||||
'gwin32api-package.h',
|
||||
'gwin32api-storage.h',
|
||||
'gwin32appinfo.h',
|
||||
'gwin32file-sync-stream.h',
|
||||
'gwin32mount.h',
|
||||
'gwin32packageparser.h',
|
||||
'gwin32resolver.h',
|
||||
'gwin32volumemonitor.h',
|
||||
'thumbnail-verify.h',
|
||||
'xdp-dbus.h',
|
||||
]
|
||||
|
||||
sections_files = files('gio-sections-common.txt')
|
||||
|
||||
if host_system == 'windows'
|
||||
ignore_headers += [
|
||||
'gfiledescriptorbased.h',
|
||||
'gunixmounts.h',
|
||||
'gunixfdlist.h',
|
||||
'gunixfdmessage.h',
|
||||
'gunixinputstream.h',
|
||||
'gunixoutputstream.h',
|
||||
'gdesktopappinfo.h',
|
||||
'gosxappinfo.h',
|
||||
]
|
||||
sections_files += files('gio-sections-win32.txt')
|
||||
platform_file = files('gio-docs-win32.xml')
|
||||
else
|
||||
if glib_have_cocoa
|
||||
ignore_headers += ['gdesktopappinfo.h']
|
||||
else
|
||||
ignore_headers += ['gosxappinfo.h']
|
||||
endif
|
||||
|
||||
ignore_headers += [
|
||||
'gwin32inputstream.h',
|
||||
'gwin32outputstream.h',
|
||||
'gwin32registrykey.h',
|
||||
]
|
||||
platform_file = files('gio-docs-unix.xml')
|
||||
endif
|
||||
|
||||
ignore_sources = [
|
||||
'kqueue',
|
||||
'tests',
|
||||
'gdbus-daemon-generated.c',
|
||||
'xdp-dbus.c',
|
||||
]
|
||||
|
||||
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
|
||||
version_conf = configuration_data()
|
||||
version_conf.set('VERSION', meson.project_version())
|
||||
configure_file(
|
||||
input: 'version.xml.in',
|
||||
output: 'version.xml',
|
||||
configuration: version_conf
|
||||
)
|
||||
|
||||
# FIXME: configure_file() does not support more than one file in input
|
||||
# argument. If input argument is omitted then meson checks that all items in
|
||||
# the command array are strings. But if we have an input then extra files
|
||||
# can be passed in command array.
|
||||
# See https://github.com/mesonbuild/meson/issues/5893
|
||||
concat_files_helper = find_program('concat-files-helper.py')
|
||||
configure_file(
|
||||
output : 'gio-sections.txt',
|
||||
input : sections_files[0],
|
||||
command : [concat_files_helper, '@OUTPUT@'] + sections_files,
|
||||
)
|
||||
|
||||
configure_file(
|
||||
output : 'gio-docs-platform.xml',
|
||||
input : platform_file,
|
||||
copy : true,
|
||||
)
|
||||
|
||||
content_files = [
|
||||
'overview.xml',
|
||||
'migrating-posix.xml',
|
||||
'migrating-gnome-vfs.xml',
|
||||
'migrating-gconf.xml',
|
||||
'migrating-gdbus.xml',
|
||||
'gio-querymodules.xml',
|
||||
'glib-compile-schemas.xml',
|
||||
'glib-compile-resources.xml',
|
||||
'gapplication.xml',
|
||||
'gsettings.xml',
|
||||
'gresource.xml',
|
||||
'gdbus.xml',
|
||||
'gdbus-codegen.xml',
|
||||
]
|
||||
|
||||
content_files += [
|
||||
gdbus_example_objectmanager_xml,
|
||||
gdbus_example_objectmanager_sources,
|
||||
gdbus_object_manager_example_doc
|
||||
]
|
||||
|
||||
gnome.gtkdoc('gio',
|
||||
main_xml : 'gio-docs.xml',
|
||||
namespace : 'g',
|
||||
mode : 'none',
|
||||
dependencies : [libgio_dep, libgobject_dep, libglib_dep],
|
||||
src_dir : 'gio',
|
||||
scan_args : gtkdoc_common_scan_args + [
|
||||
'--rebuild-types',
|
||||
'--ignore-headers=' + ' '.join(ignore_headers),
|
||||
],
|
||||
mkdb_args : [
|
||||
'--ignore-files=' + ' '.join(ignore_sources),
|
||||
],
|
||||
content_files : content_files,
|
||||
expand_content_files : [
|
||||
'overview.xml',
|
||||
'migrating-posix.xml',
|
||||
'migrating-gnome-vfs.xml',
|
||||
'migrating-gconf.xml',
|
||||
'migrating-gdbus.xml',
|
||||
'gdbus-codegen.xml',
|
||||
],
|
||||
html_assets : [
|
||||
'gvfs-overview.png',
|
||||
'menu-example.png',
|
||||
'menu-model.png',
|
||||
],
|
||||
fixxref_args: [
|
||||
'--html-dir=' + docpath,
|
||||
'--extra-dir=' + join_paths('gio', '..', 'glib', 'html'),
|
||||
'--extra-dir=' + join_paths('gio', '..', 'gobject', 'html'),
|
||||
],
|
||||
install: true,
|
||||
check: true,
|
||||
)
|
||||
endif
|
||||
|
||||
|
||||
if get_option('man')
|
||||
manpages = ['gapplication', 'gio-querymodules', 'glib-compile-schemas',
|
||||
'glib-compile-resources', 'gsettings', 'gresource', 'gdbus',
|
||||
'gio', 'gdbus-codegen']
|
||||
foreach page : manpages
|
||||
custom_target(page + '-man',
|
||||
input: page + '.xml',
|
||||
output: page + '.1',
|
||||
command: xsltproc_command,
|
||||
install: true,
|
||||
install_dir: man1_dir)
|
||||
endforeach
|
||||
endif
|
||||
515
docs/reference/gio/migrating-gconf.xml
Normal file
515
docs/reference/gio/migrating-gconf.xml
Normal file
|
|
@ -0,0 +1,515 @@
|
|||
<chapter>
|
||||
<title>Migrating from GConf to GSettings</title>
|
||||
|
||||
<section>
|
||||
<title>Before you start</title>
|
||||
|
||||
<para>
|
||||
Converting individual applications and their settings from GConf to
|
||||
GSettings can be done at will. But desktop-wide settings like font or
|
||||
theme settings often have consumers in multiple modules. Therefore,
|
||||
some consideration has to go into making sure that all users of a setting
|
||||
are converted to GSettings at the same time or that the program
|
||||
responsible for configuring that setting continues to update the value in
|
||||
both places.
|
||||
</para>
|
||||
<para>
|
||||
It is always a good idea to have a look at how others have handled
|
||||
similar problems before.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Conceptual differences</title>
|
||||
|
||||
<para>
|
||||
Conceptually, GConf and GSettings are fairly similar. Both
|
||||
have a concept of pluggable backends. Both keep information
|
||||
about keys and their types in schemas. Both have a concept of
|
||||
mandatory values, which lets you implement lock-down.
|
||||
</para>
|
||||
<para>
|
||||
There are some differences in the approach to schemas. GConf
|
||||
installs the schemas into the database and has API to handle
|
||||
schema information (gconf_client_get_default_from_schema(),
|
||||
gconf_value_get_schema(), etc). GSettings on the other hand
|
||||
assumes that an application knows its own schemas, and does
|
||||
not provide API to handle schema information at runtime.
|
||||
GSettings is also more strict about requiring a schema whenever
|
||||
you want to read or write a key. To deal with more free-form
|
||||
information that would appear in schema-less entries in GConf,
|
||||
GSettings allows for schemas to be 'relocatable'.
|
||||
</para>
|
||||
<para>
|
||||
One difference in the way applications interact with their
|
||||
settings is that with GConf you interact with a tree of
|
||||
settings (ie the keys you pass to functions when reading
|
||||
or writing values are actually paths with the actual name
|
||||
of the key as the last element. With GSettings, you create
|
||||
a GSettings object which has an implicit prefix that determines
|
||||
where the settings get stored in the global tree of settings,
|
||||
but the keys you pass when reading or writing values are just
|
||||
the key names, not the full path.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>GConfClient (and GConfBridge) API conversion</title>
|
||||
|
||||
<para>
|
||||
Most people use GConf via the high-level #GConfClient API.
|
||||
The corresponding API is the #GSettings object. While not
|
||||
every GConfClient function has a direct GSettings equivalent,
|
||||
many do:
|
||||
<table id="gconf-client-vs-gsettings">
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row><entry>GConfClient</entry><entry>GSettings</entry></row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row><entry>gconf_client_get_default()</entry><entry>no direct equivalent,
|
||||
instead you call g_settings_new() for the schemas you use</entry></row>
|
||||
<row><entry>gconf_client_set()</entry><entry>g_settings_set()</entry></row>
|
||||
<row><entry>gconf_client_get()</entry><entry>g_settings_get()</entry></row>
|
||||
<row><entry>gconf_client_get_bool()</entry><entry>g_settings_get_boolean()</entry></row>
|
||||
<row><entry>gconf_client_set_bool()</entry><entry>g_settings_set_boolean()</entry></row>
|
||||
<row><entry>gconf_client_get_int()</entry><entry>g_settings_get_int()</entry></row>
|
||||
<row><entry>gconf_client_set_int()</entry><entry>g_settings_set_int()</entry></row>
|
||||
<row><entry>gconf_client_get_float()</entry><entry>g_settings_get_double()</entry></row>
|
||||
<row><entry>gconf_client_set_float()</entry><entry>g_settings_set_double()</entry></row>
|
||||
<row><entry>gconf_client_get_string()</entry><entry>g_settings_get_string()</entry></row>
|
||||
<row><entry>gconf_client_set_string()</entry><entry>g_settings_set_string()</entry></row>
|
||||
<row><entry>gconf_client_get_list()</entry><entry>for string lists, see g_settings_get_strv(), else see g_settings_get_value() and #GVariant API</entry></row>
|
||||
<row><entry>gconf_client_set_list()</entry><entry>for string lists, see g_settings_set_strv(), else see g_settings_set_value() and #GVariant API</entry></row>
|
||||
<row><entry>gconf_entry_get_is_writable()</entry><entry>g_settings_is_writable()</entry></row>
|
||||
<row><entry>gconf_client_notify_add()</entry><entry>not required, the #GSettings::changed signal is emitted automatically</entry></row>
|
||||
<row><entry>gconf_client_add_dir()</entry><entry>not required, each GSettings instance automatically watches all keys in its path</entry></row>
|
||||
<row><entry>#GConfChangeSet</entry><entry>g_settings_delay(), g_settings_apply()</entry></row>
|
||||
<row><entry>gconf_client_get_default_from_schema()</entry><entry>no equivalent, applications are expected to know their schema</entry></row>
|
||||
<row><entry>gconf_client_all_entries()</entry><entry>no equivalent, applications are expected to know their schema, and GSettings does not allow schema-less entries</entry></row>
|
||||
<row><entry>gconf_client_get_without_default()</entry><entry>no equivalent</entry></row>
|
||||
<row><entry>gconf_bridge_bind_property()</entry><entry>g_settings_bind()</entry></row>
|
||||
<row><entry>gconf_bridge_bind_property_full()</entry><entry>g_settings_bind_with_mapping()</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</para>
|
||||
<para>
|
||||
GConfBridge was a third-party library that used GConf to bind an object property
|
||||
to a particular configuration key. GSettings offers this service itself.
|
||||
</para>
|
||||
<para>
|
||||
There is a pattern that is sometimes used for GConf, where a setting can have
|
||||
explicit 'value A', explicit 'value B' or 'use the system default'. With GConf,
|
||||
'use the system default' is sometimes implemented by unsetting the user value.
|
||||
</para>
|
||||
<para>
|
||||
This is not possible in GSettings, since it does not have API to determine if a value
|
||||
is the default and does not let you unset values. The recommended way (and much
|
||||
clearer) way in which this can be implemented in GSettings is to have a separate
|
||||
'use-system-default' boolean setting.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Change notification</title>
|
||||
|
||||
<para>
|
||||
GConf requires you to call gconf_client_add_dir() and
|
||||
gconf_client_notify_add() to get change notification. With
|
||||
GSettings, this is not necessary; signals get emitted automatically
|
||||
for every change.
|
||||
</para>
|
||||
<para>
|
||||
The #GSettings::changed signal is emitted for each changed key.
|
||||
There is also a #GSettings::change-event signal that you can handle
|
||||
if you need to see groups of keys that get changed at the same time.
|
||||
</para>
|
||||
<para>
|
||||
GSettings also notifies you about changes in writability of keys,
|
||||
with the #GSettings::writable-changed signal (and the
|
||||
#GSettings::writable-change-event signal).
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section><title>Change sets</title>
|
||||
<para>
|
||||
GConf has a concept of a set of changes which can be applied or reverted
|
||||
at once: #GConfChangeSet (GConf doesn't actually apply changes atomically,
|
||||
which is one of its shortcomings).
|
||||
</para>
|
||||
<para>
|
||||
Instead of a separate object to represent a change set, GSettings has a
|
||||
'delayed-apply' mode, which can be turned on for a GSettings object by
|
||||
calling g_settings_delay(). In this mode, changes done to the GSettings
|
||||
object are not applied - they are still visible when calling g_settings_get()
|
||||
<emphasis>on the same object</emphasis>, but not to other GSettings instances
|
||||
or even other processes.
|
||||
</para>
|
||||
<para>
|
||||
To apply the pending changes all at once (GSettings <emphasis>does</emphasis>
|
||||
atomicity here), call g_settings_apply(). To revert the pending changes,
|
||||
call g_settings_revert() or just drop the reference to the #GSettings object.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Schema conversion</title>
|
||||
|
||||
<para>
|
||||
If you are porting your application from GConf, most likely you already
|
||||
have a GConf schema. GConf comes with a commandline tool
|
||||
gsettings-schema-convert that can help with the task of converting
|
||||
a GConf schema into an equivalent GSettings schema. The tool is not
|
||||
perfect and may need assistance in some cases.
|
||||
</para>
|
||||
<example><title>An example for using gsettings-schema-convert</title>
|
||||
<para>Running <userinput>gsettings-schema-convert --gconf --xml --schema-id "org.gnome.font-rendering" --output org.gnome.font-rendering.gschema.xml destop_gnome_font_rendering.schemas</userinput> on the following <filename>desktop_gnome_font_rendering.schemas</filename> file:
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<?xml version="1.0"?>
|
||||
<gconfschemafile>
|
||||
<schemalist>
|
||||
<schema>
|
||||
<key>/schemas/desktop/gnome/font_rendering/dpi</key>
|
||||
<applyto>/desktop/gnome/font_rendering/dpi</applyto>
|
||||
<owner>gnome</owner>
|
||||
<type>int</type>
|
||||
<default>96</default>
|
||||
<locale name="C">
|
||||
<short>DPI</short>
|
||||
<long>The resolution used for converting font sizes to pixel sizes, in dots per inch.</long>
|
||||
</locale>
|
||||
</schema>
|
||||
</schemalist>
|
||||
</gconfschemafile>
|
||||
]]>
|
||||
</programlisting>
|
||||
produces a <filename>org.gnome.font-rendering.gschema.xml</filename> file with the following content:
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<schemalist>
|
||||
<schema id="org.gnome.font-rendering" path="/desktop/gnome/font_rendering/">
|
||||
<key name="dpi" type="i">
|
||||
<default>96</default>
|
||||
<summary>DPI</summary>
|
||||
<description>The resolution used for converting font sizes to pixel sizes, in dots per inch.</description>
|
||||
</key>
|
||||
</schema>
|
||||
</schemalist>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
GSettings schemas are identified at runtime by their id (as specified
|
||||
in the XML source file). It is recommended to use a dotted name as schema
|
||||
id, similar in style to a D-Bus bus name, e.g. "org.gnome.SessionManager".
|
||||
In cases where the settings are general and not specific to one application,
|
||||
the id should not use StudlyCaps, e.g. "org.gnome.font-rendering".
|
||||
The filename used for the XML schema source is immaterial, but
|
||||
schema compiler expects the files to have the extension
|
||||
<filename>.gschema.xml</filename>. It is recommended to simply
|
||||
use the schema id as the filename, followed by this extension,
|
||||
e.g. <filename>org.gnome.SessionManager.gschema.xml</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The XML source file for your GSettings schema needs to get installed
|
||||
into <filename>$datadir/glib-2.0/schemas</filename>, and needs to be
|
||||
compiled into a binary form. At runtime, GSettings looks for compiled
|
||||
schemas in the <filename>glib-2.0/schemas</filename> subdirectories
|
||||
of all <envar>XDG_DATA_DIRS</envar> directories, so if you install
|
||||
your schema in a different location, you need to set the
|
||||
<envar>XDG_DATA_DIRS</envar> environment variable appropriately.
|
||||
</para>
|
||||
<para>
|
||||
Schemas are compiled into binary form by the
|
||||
<link linkend="glib-compile-schemas">glib-compile-schemas</link> utility.
|
||||
GIO provides a <literal>glib_compile_schemas</literal>
|
||||
variable for the schema compiler.
|
||||
</para>
|
||||
<para>
|
||||
You can ignore all of this by using the provided m4 macros. To
|
||||
do this, add to your <filename>configure.ac</filename>:
|
||||
<programlisting>
|
||||
GLIB_GSETTINGS
|
||||
</programlisting>
|
||||
The corresponding <filename>Makefile.am</filename> fragment looks like
|
||||
this:
|
||||
<programlisting>
|
||||
# gsettings_SCHEMAS is a list of all the schemas you want to install
|
||||
gsettings_SCHEMAS = my.app.gschema.xml
|
||||
|
||||
# include the appropriate makefile rules for schema handling
|
||||
@GSETTINGS_RULES@
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
This is not sufficient on its own. You need to mention what the source
|
||||
of the <filename>my.app.gschema.xml</filename> file is. If the schema
|
||||
file is distributed directly with your project's tarball then a mention
|
||||
in <varname>EXTRA_DIST</varname> is appropriate. If the schema file is
|
||||
generated from another source then you will need the appropriate rule
|
||||
for that, plus probably an item in <varname>EXTRA_DIST</varname> for the
|
||||
source files used by that rule.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
One possible pitfall in doing schema conversion is that the default
|
||||
values in GSettings schemas are parsed by the #GVariant parser.
|
||||
This means that strings need to include quotes in the XML. Also note
|
||||
that the types are now specified as #GVariant type strings.
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<type>string</type>
|
||||
<default>rgb</default>
|
||||
]]>
|
||||
</programlisting>
|
||||
becomes
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<key name="rgba-order" type="s">
|
||||
<default>'rgb'</default> <!-- note quotes -->
|
||||
</key>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Another possible complication is that GConf specifies full paths
|
||||
for each key, while a GSettings schema has a 'path' attribute that
|
||||
contains the prefix for all the keys in the schema, and individual
|
||||
keys just have a simple name. So
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<key>/schemas/desktop/gnome/font_rendering/antialiasing</key>
|
||||
]]>
|
||||
</programlisting>
|
||||
becomes
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<schema id="org.gnome.font" path="/desktop/gnome/font_rendering/">
|
||||
<key name="antialiasing" type="s">
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Default values can be localized in both GConf and GSettings schemas,
|
||||
but GSettings uses gettext for the localization. You can specify
|
||||
the gettext domain to use in the <tag class="attribute">gettext-domain</tag>
|
||||
attribute. Therefore, when converting localized defaults in GConf,
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<key>/schemas/apps/my_app/font_size</key>
|
||||
<locale name="C">
|
||||
<default>18</default>
|
||||
</locale>
|
||||
<locale name="be">
|
||||
<default>24</default>
|
||||
</locale>
|
||||
</key>
|
||||
]]>
|
||||
</programlisting>
|
||||
becomes
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<schema id="..." gettext-domain="your-domain">
|
||||
...
|
||||
<key name="font-size" type="i">
|
||||
<default l10n="messages" context="font_size">18</default>
|
||||
</key>
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
GSettings uses gettext for translation of default values.
|
||||
The string that is translated is exactly the string that appears
|
||||
inside of the <tag class='starttag'>default</tag> element. This
|
||||
includes the quotation marks that appear around strings.
|
||||
Default values must be marked with the <varname>l10n</varname>
|
||||
attribute in the <tag class='starttag'>default</tag> tag, which
|
||||
should be set as equal to <literal>'messages'</literal> or
|
||||
<literal>'time'</literal> depending on the desired category. An
|
||||
optional translation context can also be specified with the
|
||||
<varname>context</varname> attribute, as in the example. This
|
||||
is usually recommended, since the string "<literal>18</literal>"
|
||||
is not particularly easy to translate without context. The
|
||||
translated version of the default value should be stored in the
|
||||
specified <varname>gettext-domain</varname>. Care must be taken
|
||||
during translation to ensure that all translated values remain
|
||||
syntactically valid; mistakes here will cause runtime errors.
|
||||
</para>
|
||||
<para>
|
||||
GSettings schemas have optional <tag class="starttag">summary</tag> and
|
||||
<tag class="starttag">description</tag> elements for each key which
|
||||
correspond to the <tag class="starttag">short</tag> and
|
||||
<tag class="starttag">long</tag> elements in the GConf schema and
|
||||
will be used in similar ways by a future gsettings-editor, so you
|
||||
should use the same conventions for them: The summary is just a short
|
||||
label with no punctuation, the description can be one or more complete
|
||||
sentences. If multiple paragraphs are desired for the description, the
|
||||
paragraphs should be separated by a completely empty line.
|
||||
</para>
|
||||
<para>
|
||||
Translations for these strings will also be handled
|
||||
via gettext, so you should arrange for these strings to be
|
||||
extracted into your gettext catalog. One way to do that is to use
|
||||
intltool. Since intltool 0.50.1, schema files are
|
||||
supported, so all you have to do is to add your .gschema.xml
|
||||
files to <filename>POTFILES.in</filename> with a line like
|
||||
<programlisting>
|
||||
[type: gettext/gsettings]data/org.foo.MyApp.gschema.xml
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
GSettings is a bit more restrictive about key names than GConf. Key
|
||||
names in GSettings can be at most 32 characters long, and must only
|
||||
consist of lowercase characters, numbers and dashes, with no
|
||||
consecutive dashes. The first character must not be a number or dash,
|
||||
and the last character cannot be '-'.
|
||||
</para>
|
||||
<para>
|
||||
If you are using the GConf backend for GSettings during the
|
||||
transition, you may want to keep your key names the same they
|
||||
were in GConf, so that existing settings in the users GConf
|
||||
database are preserved. You can achieve this by using the
|
||||
<option>--allow-any-name</option> with the
|
||||
<link linkend="glib-compile-schemas">glib-compile-schemas</link> schema
|
||||
compiler. Note that this option is only meant
|
||||
to ease the process of porting your application, allowing parts
|
||||
of your application to continue to access GConf and parts to use
|
||||
GSettings. By the time you have finished porting your application
|
||||
you must ensure that all key names are valid.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section><title>Data conversion</title>
|
||||
<para>
|
||||
GConf comes with a GSettings backend that can be used to
|
||||
facility the transition to the GSettings API until you are
|
||||
ready to make the jump to a different backend (most likely
|
||||
dconf). To use it, you need to set the <envar>GSETTINGS_BACKEND</envar>
|
||||
to 'gconf', e.g. by using
|
||||
<programlisting>
|
||||
g_setenv ("GSETTINGS_BACKEND", "gconf", TRUE);
|
||||
</programlisting>
|
||||
early on in your program. Note that this backend is meant purely
|
||||
as a transition tool, and should not be used in production.
|
||||
</para>
|
||||
<para>
|
||||
GConf also comes with a utility called
|
||||
<command>gsettings-data-convert</command>, which is designed to help
|
||||
with the task of migrating user settings from GConf into another
|
||||
GSettings backend. It can be run manually, but it is designed to be
|
||||
executed automatically, every time a user logs in. It keeps track of
|
||||
the data migrations that it has already done, and it is harmless to
|
||||
run it more than once.
|
||||
</para>
|
||||
<para>
|
||||
To make use of this utility, you must install a keyfile in the
|
||||
directory <filename>/usr/share/GConf/gsettings</filename> which
|
||||
lists the GSettings keys and GConf paths to map to each other, for
|
||||
each schema that you want to migrate user data for.
|
||||
</para>
|
||||
<para>
|
||||
Here is an example:
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
[org.gnome.fonts]
|
||||
antialiasing = /desktop/gnome/font_rendering/antialiasing
|
||||
dpi = /desktop/gnome/font_rendering/dpi
|
||||
hinting = /desktop/gnome/font_rendering/hinting
|
||||
rgba-order = /desktop/gnome/font_rendering/rgba_order
|
||||
|
||||
[apps.myapp:/path/to/myapps/]
|
||||
some-odd-key1 = /apps/myapp/some_ODD-key1
|
||||
]]>
|
||||
</programlisting>
|
||||
The last key demonstrates that it may be necessary to modify the key
|
||||
name to comply with stricter GSettings key name rules. Of course,
|
||||
that means your application must use the new key names when looking
|
||||
up settings in GSettings.
|
||||
</para>
|
||||
<para>
|
||||
The last group in the example also shows how to handle the case
|
||||
of 'relocatable' schemas, which don't have a fixed path. You can
|
||||
specify the path to use in the group name, separated by a colon.
|
||||
</para>
|
||||
<para>
|
||||
There are some limitations: <command>gsettings-data-convert</command>
|
||||
does not do any transformation of the values. And it does not handle
|
||||
complex GConf types other than lists of strings or integers.
|
||||
</para>
|
||||
<para>
|
||||
Don't forget to require GConf 2.31.1 or newer in your configure
|
||||
script if you are making use of the GConf backend or the conversion
|
||||
utility.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If, as an application developer, you are interested in manually
|
||||
ensuring that <command>gsettings-data-convert</command> has been
|
||||
invoked (for example, to deal with the case where the user is
|
||||
logged in during a distribution upgrade or for non-XDG desktop
|
||||
environments which do not run the command as an autostart) you
|
||||
may invoke it manually during your program initialisation. This
|
||||
is not recommended for all application authors -- it is your
|
||||
choice if this use case concerns you enough.
|
||||
</para>
|
||||
<para>
|
||||
Internally, <command>gsettings-data-convert</command> uses a
|
||||
keyfile to track which settings have been migrated. The
|
||||
following code fragment will check that keyfile to see if your
|
||||
data conversion script has been run yet and, if not, will
|
||||
attempt to invoke the tool to run it. You should adapt it to
|
||||
your application as you see fit.
|
||||
</para>
|
||||
<para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
static void
|
||||
ensure_migrated (const gchar *name)
|
||||
{
|
||||
gboolean needed = TRUE;
|
||||
GKeyFile *kf;
|
||||
gchar **list;
|
||||
gsize i, n;
|
||||
|
||||
kf = g_key_file_new ();
|
||||
|
||||
g_key_file_load_from_data_dirs (kf, "gsettings-data-convert",
|
||||
NULL, G_KEY_FILE_NONE, NULL);
|
||||
list = g_key_file_get_string_list (kf, "State", "converted", &n, NULL);
|
||||
|
||||
if (list)
|
||||
{
|
||||
for (i = 0; i < n; i++)
|
||||
if (strcmp (list[i], name) == 0)
|
||||
{
|
||||
needed = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
g_strfreev (list);
|
||||
}
|
||||
|
||||
g_key_file_free (kf);
|
||||
|
||||
if (needed)
|
||||
g_spawn_command_line_sync ("gsettings-data-convert",
|
||||
NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Although there is the possibility that the
|
||||
<command>gsettings-data-convert</command> script will end up
|
||||
running multiple times concurrently with this approach, it is
|
||||
believed that this is safe.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
310
docs/reference/gio/migrating-gdbus.xml
Normal file
310
docs/reference/gio/migrating-gdbus.xml
Normal file
|
|
@ -0,0 +1,310 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
|
||||
<!ENTITY version SYSTEM "version.xml">
|
||||
]>
|
||||
<chapter>
|
||||
<title>Migrating to GDBus</title>
|
||||
|
||||
<section>
|
||||
<title>Conceptual differences</title>
|
||||
|
||||
<para>
|
||||
The central concepts of D-Bus are modelled in a very similar way
|
||||
in dbus-glib and GDBus. Both have objects representing connections,
|
||||
proxies and method invocations. But there are some important
|
||||
differences:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
dbus-glib uses the <ulink
|
||||
url="http://www.freedesktop.org/wiki/Software/dbus#ReferenceImplementation.28dbus-daemonandlibdbus.29">libdbus
|
||||
reference implementation</ulink>, GDBus doesn't. Instead, it
|
||||
relies on GIO streams as transport layer, and has its own
|
||||
implementation for the D-Bus connection setup and
|
||||
authentication. Apart from using streams as transport,
|
||||
avoiding libdbus also lets GDBus avoid some thorny
|
||||
multithreading issues.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
dbus-glib uses the GObject type system for method arguments and
|
||||
return values, including a homegrown container specialization
|
||||
mechanism. GDBus relies on the #GVariant type system which is
|
||||
explicitly designed to match D-Bus types.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
dbus-glib models only D-Bus interfaces and does not provide
|
||||
any types for objects. GDBus models both D-Bus interfaces
|
||||
(via the #GDBusInterface, #GDBusProxy and
|
||||
#GDBusInterfaceSkeleton types) and objects (via the
|
||||
#GDBusObject, #GDBusObjectSkeleton and #GDBusObjectProxy types).
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
GDBus includes native support for the <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties">org.freedesktop.DBus.Properties</ulink> (via the #GDBusProxy type) and <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager">org.freedesktop.DBus.ObjectManager</ulink> D-Bus interfaces, dbus-glib doesn't.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
The typical way to export an object in dbus-glib involves
|
||||
generating glue code from XML introspection data using
|
||||
<command>dbus-binding-tool</command>. GDBus provides a
|
||||
similar tool called <command><link
|
||||
linkend="gdbus-codegen">gdbus-codegen</link></command> that
|
||||
can also generate Docbook D-Bus interface documentation.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
dbus-glib doesn't provide any convenience API for owning and
|
||||
watching bus names, GDBus provides the g_bus_own_name() and
|
||||
g_bus_watch_name() family of convenience functions.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
GDBus provides API to parse, generate and work with <link
|
||||
linkend="gio-D-Bus-Introspection-Data">Introspection
|
||||
XML</link>, dbus-glib doesn't.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
GTestDBus provides API to create isolated unit tests <link
|
||||
linkend="gio-D-Bus-Test-Scaffolding">GDBus Test Scaffolding</link>.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>API comparison</title>
|
||||
|
||||
<table id="dbus-glib-vs-gdbus">
|
||||
<title>dbus-glib APIs and their GDBus counterparts</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row><entry>dbus-glib</entry><entry>GDBus</entry></row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row><entry>#DBusGConnection</entry><entry>#GDBusConnection</entry></row>
|
||||
<row><entry>#DBusGProxy</entry><entry>#GDBusProxy, #GDBusInterface - also see #GDBusObjectProxy</entry></row>
|
||||
<row><entry>#DBusGObject</entry><entry>#GDBusInterfaceSkeleton, #GDBusInterface - also see #GDBusObjectSkeleton</entry></row>
|
||||
<row><entry>#DBusGMethodInvocation</entry><entry>#GDBusMethodInvocation</entry></row>
|
||||
<row><entry>dbus_g_bus_get()</entry><entry>g_bus_get_sync(), also see
|
||||
g_bus_get()</entry></row>
|
||||
<row><entry>dbus_g_proxy_new_for_name()</entry><entry>g_dbus_proxy_new_sync() and
|
||||
g_dbus_proxy_new_for_bus_sync(), also see g_dbus_proxy_new()</entry></row>
|
||||
<row><entry>dbus_g_proxy_add_signal()</entry><entry>not needed, use the generic #GDBusProxy::g-signal</entry></row>
|
||||
<row><entry>dbus_g_proxy_connect_signal()</entry><entry>use g_signal_connect() with #GDBusProxy::g-signal</entry></row>
|
||||
<row><entry>dbus_g_connection_register_g_object()</entry><entry>g_dbus_connection_register_object() - also see g_dbus_object_manager_server_export()</entry></row>
|
||||
<row><entry>dbus_g_connection_unregister_g_object()</entry><entry>g_dbus_connection_unregister_object() - also see g_dbus_object_manager_server_unexport()</entry></row>
|
||||
<row><entry>dbus_g_object_type_install_info()</entry><entry>introspection data is installed while registering
|
||||
an object, see g_dbus_connection_register_object()</entry></row>
|
||||
<row><entry>dbus_g_proxy_begin_call()</entry><entry>g_dbus_proxy_call()</entry></row>
|
||||
<row><entry>dbus_g_proxy_end_call()</entry><entry>g_dbus_proxy_call_finish()</entry></row>
|
||||
<row><entry>dbus_g_proxy_call()</entry><entry>g_dbus_proxy_call_sync()</entry></row>
|
||||
<row><entry>dbus_g_error_domain_register()</entry><entry>g_dbus_error_register_error_domain()</entry></row>
|
||||
<row><entry>dbus_g_error_has_name()</entry><entry>no direct equivalent, see g_dbus_error_get_remote_error()</entry></row>
|
||||
<row><entry>dbus_g_method_return()</entry><entry>g_dbus_method_invocation_return_value()</entry></row>
|
||||
<row><entry>dbus_g_method_return_error()</entry><entry>g_dbus_method_invocation_return_error() and variants</entry></row>
|
||||
<row><entry>dbus_g_method_get_sender()</entry><entry>g_dbus_method_invocation_get_sender()</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Owning bus names</title>
|
||||
<para>
|
||||
Using dbus-glib, you typically call RequestName manually
|
||||
to own a name, like in the following excerpt:
|
||||
<informalexample><programlisting><![CDATA[
|
||||
error = NULL;
|
||||
res = dbus_g_proxy_call (system_bus_proxy,
|
||||
"RequestName",
|
||||
&error,
|
||||
G_TYPE_STRING, NAME_TO_CLAIM,
|
||||
G_TYPE_UINT, DBUS_NAME_FLAG_ALLOW_REPLACEMENT,
|
||||
G_TYPE_INVALID,
|
||||
G_TYPE_UINT, &result,
|
||||
G_TYPE_INVALID);
|
||||
if (!res)
|
||||
{
|
||||
if (error != NULL)
|
||||
{
|
||||
g_warning ("Failed to acquire %s: %s",
|
||||
NAME_TO_CLAIM, error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Failed to acquire %s", NAME_TO_CLAIM);
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
|
||||
{
|
||||
if (error != NULL)
|
||||
{
|
||||
g_warning ("Failed to acquire %s: %s",
|
||||
NAME_TO_CLAIM, error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Failed to acquire %s", NAME_TO_CLAIM);
|
||||
}
|
||||
exit (1);
|
||||
}
|
||||
|
||||
dbus_g_proxy_add_signal (system_bus_proxy, "NameLost",
|
||||
G_TYPE_STRING, G_TYPE_INVALID);
|
||||
dbus_g_proxy_connect_signal (system_bus_proxy, "NameLost",
|
||||
G_CALLBACK (on_name_lost), NULL, NULL);
|
||||
|
||||
/* further setup ... */
|
||||
]]>
|
||||
</programlisting></informalexample>
|
||||
</para>
|
||||
<para>
|
||||
While you can do things this way with GDBus too, using
|
||||
g_dbus_proxy_call_sync(), it is much nicer to use the high-level API
|
||||
for this:
|
||||
<informalexample><programlisting><![CDATA[
|
||||
static void
|
||||
on_name_acquired (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* further setup ... */
|
||||
}
|
||||
|
||||
/* ... */
|
||||
|
||||
owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM,
|
||||
NAME_TO_CLAIM,
|
||||
G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT,
|
||||
on_bus_acquired,
|
||||
on_name_acquired,
|
||||
on_name_lost,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
g_main_loop_run (loop);
|
||||
|
||||
g_bus_unown_name (owner_id);
|
||||
]]>
|
||||
</programlisting></informalexample>
|
||||
Note that g_bus_own_name() works asynchronously and requires
|
||||
you to enter your mainloop to await the on_name_aquired()
|
||||
callback. Also note that in order to avoid race conditions (e.g.
|
||||
when your service is activated by a method call), you have to export
|
||||
your manager object <emphasis>before</emphasis> acquiring the
|
||||
name. The on_bus_acquired() callback is the right place to do
|
||||
such preparations.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Creating proxies for well-known names</title>
|
||||
<para>
|
||||
dbus-glib lets you create proxy objects for well-known names, like the
|
||||
following example:
|
||||
<informalexample><programlisting><![CDATA[
|
||||
proxy = dbus_g_proxy_new_for_name (system_bus_connection,
|
||||
"org.freedesktop.Accounts",
|
||||
"/org/freedesktop/Accounts",
|
||||
"org.freedesktop.Accounts");
|
||||
]]>
|
||||
</programlisting></informalexample>
|
||||
For a #DBusGProxy constructed like this, method calls will be sent to
|
||||
the current owner of the name, and that owner can change over time.
|
||||
</para>
|
||||
<para>
|
||||
The same can be achieved with #GDBusProxy:
|
||||
<informalexample><programlisting><![CDATA[
|
||||
error = NULL;
|
||||
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
|
||||
G_DBUS_PROXY_FLAGS_NONE,
|
||||
NULL, /* GDBusInterfaceInfo */
|
||||
"org.freedesktop.Accounts",
|
||||
"/org/freedesktop/Accounts",
|
||||
"org.freedesktop.Accounts",
|
||||
NULL, /* GCancellable */
|
||||
&error);
|
||||
]]>
|
||||
</programlisting></informalexample>
|
||||
For an added layer of safety, you can specify what D-Bus
|
||||
interface the proxy is expected to conform to by using the
|
||||
#GDBusInterfaceInfo type. Additionally, #GDBusProxy loads,
|
||||
caches and tracks changes to the D-Bus properties on the remote
|
||||
object. It also sets up match rules so D-Bus signals from the
|
||||
remote object are delivered locally.
|
||||
</para>
|
||||
<para>
|
||||
The #GDBusProxy type normally isn't used directly - instead
|
||||
proxies subclassing #GDBusProxy generated by <command><link
|
||||
linkend="gdbus-codegen">gdbus-codegen</link></command> is used, see <xref linkend="gdbus-example-gdbus-codegen"/>
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Generating code and docs</title>
|
||||
|
||||
<section id="gdbus-example-gdbus-codegen">
|
||||
<title>Using gdbus-codegen</title>
|
||||
|
||||
<para>
|
||||
dbus-glib comes with <command>dbus-binding-tool</command>, which
|
||||
can produce somewhat nice client- and server-side wrappers for a D-Bus interface.
|
||||
With GDBus, <command><link
|
||||
linkend="gdbus-codegen">gdbus-codegen</link></command> is used and like
|
||||
its counterpart, it also takes D-Bus Introspection XML as input:
|
||||
</para>
|
||||
<example id="gdbus-example-codegen-input"><title>Example D-Bus Introspection XML</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../../gio/tests/gdbus-object-manager-example/gdbus-example-objectmanager.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: gdbus-example-objectmanager.xml</xi:fallback></xi:include></programlisting></example>
|
||||
<para>
|
||||
If this XML is processed like this
|
||||
<informalexample><programlisting><![CDATA[
|
||||
gdbus-codegen --interface-prefix org.gtk.GDBus.Example.ObjectManager. \
|
||||
--generate-c-code generated-code \
|
||||
--c-namespace Example \
|
||||
--c-generate-object-manager \
|
||||
--generate-docbook generated-docs \
|
||||
gdbus-example-objectmanager.xml
|
||||
]]></programlisting></informalexample>
|
||||
then two files <filename>generated-code.h</filename> and
|
||||
<filename>generated-code.c</filename> are
|
||||
generated. Additionally, two XML files
|
||||
<filename>generated-docs-org.gtk.GDBus.Example.ObjectManager.Animal</filename> and
|
||||
<filename>generated-docs-org.gtk.GDBus.Example.ObjectManager.Cat</filename>
|
||||
with Docbook XML are generated. For an example of what the docs look
|
||||
like see <link
|
||||
linkend="gdbus-interface-org-gtk-GDBus-Example-ObjectManager-Animal">the Animal D-Bus interface documentation</link>.
|
||||
and
|
||||
<link
|
||||
linkend="gdbus-interface-org-gtk-GDBus-Example-ObjectManager-Cat">the Cat D-Bus interface documentation</link>.
|
||||
</para>
|
||||
<para>
|
||||
While the contents of <filename>generated-code.h</filename> and
|
||||
<filename>generated-code.c</filename> are best described by the
|
||||
<command><link
|
||||
linkend="gdbus-codegen">gdbus-codegen</link></command> manual
|
||||
page, brief examples of how this generated code can be used can be found in
|
||||
<xref linkend="gdbus-example-codegen-server"/>
|
||||
and <xref
|
||||
linkend="gdbus-example-codegen-client"/>. Additionally, since
|
||||
the generated code has 100% gtk-doc coverage, see
|
||||
#ExampleAnimal, #ExampleCat, #ExampleObject and
|
||||
#ExampleObjectManagerClient pages for documentation.
|
||||
</para>
|
||||
|
||||
<example id="gdbus-example-codegen-server"><title>Server-side application using generated code</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../../gio/tests/gdbus-example-objectmanager-server.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: gdbus-example-objectmanager-server.c</xi:fallback></xi:include></programlisting></example>
|
||||
|
||||
<example id="gdbus-example-codegen-client"><title>Client-side application using generated code</title><programlisting><xi:include xmlns:xi="http://www.w3.org/2001/XInclude" parse="text" href="../../../../../gio/tests/gdbus-example-objectmanager-client.c"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: gdbus-example-objectmanager-client.c</xi:fallback></xi:include></programlisting></example>
|
||||
|
||||
</section>
|
||||
|
||||
<!-- All XInclude paths are relative to the html/ directory under the build root directory -->
|
||||
<xi:include href="../../../../gio/tests/gdbus-object-manager-example/objectmanager-gen-org.gtk.GDBus.Example.ObjectManager.Animal.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: objectmanager-gen-org.gtk.GDBus.Example.ObjectManager.Animal.xml</xi:fallback></xi:include>
|
||||
<xi:include href="../../../../gio/tests/gdbus-object-manager-example/objectmanager-gen-org.gtk.GDBus.Example.ObjectManager.Cat.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: objectmanager-gen-org.gtk.GDBus.Example.ObjectManager.Cat.xml</xi:fallback></xi:include>
|
||||
<xi:include href="../gdbus-object-manager-example/xml/ExampleAnimal.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: ExampleAnimal.xml</xi:fallback></xi:include>
|
||||
<xi:include href="../gdbus-object-manager-example/xml/ExampleCat.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: ExampleCat.xml</xi:fallback></xi:include>
|
||||
<xi:include href="../gdbus-object-manager-example/xml/ExampleObject.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: ExampleObject.xml</xi:fallback></xi:include>
|
||||
<xi:include href="../gdbus-object-manager-example/xml/ExampleObjectManagerClient.xml"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT: ExampleObjectManagerClient.xml</xi:fallback></xi:include>
|
||||
|
||||
</section>
|
||||
|
||||
</chapter>
|
||||
133
docs/reference/gio/migrating-gnome-vfs.xml
Normal file
133
docs/reference/gio/migrating-gnome-vfs.xml
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
<chapter>
|
||||
<title>Migrating from GnomeVFS to GIO</title>
|
||||
|
||||
<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>GnomeVFSURI</entry><entry>GFile</entry></row>
|
||||
<row><entry>GnomeVFSFileInfo</entry><entry>GFileInfo</entry></row>
|
||||
<row><entry>GnomeVFSResult</entry><entry>GError, with G_IO_ERROR values</entry></row>
|
||||
<row><entry>GnomeVFSHandle & GnomeVFSAsyncHandle</entry><entry>GInputStream or GOutputStream</entry></row>
|
||||
<row><entry>GnomeVFSDirectoryHandle</entry><entry>GFileEnumerator</entry></row>
|
||||
<row><entry>mime type</entry><entry>content type</entry></row>
|
||||
<row><entry>GnomeVFSMonitor</entry><entry>GFileMonitor</entry></row>
|
||||
<row><entry>GnomeVFSVolumeMonitor</entry><entry>GVolumeMonitor</entry></row>
|
||||
<row><entry>GnomeVFSVolume</entry><entry>GMount</entry></row>
|
||||
<row><entry>GnomeVFSDrive</entry><entry>GVolume</entry></row>
|
||||
<row><entry>-</entry><entry>GDrive</entry></row>
|
||||
<row><entry>GnomeVFSContext</entry><entry>GCancellable</entry></row>
|
||||
<row><entry>gnome_vfs_async_cancel</entry><entry>g_cancellable_cancel</entry></row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<section>
|
||||
<title>Trash handling</title>
|
||||
|
||||
<para>
|
||||
The handling of trashed files has been changed in GIO, compared
|
||||
to gnome-vfs. gnome-vfs has a home-grown trash implementation that
|
||||
predates the freedesktop.org <ulink url="http://www.freedesktop.org/wiki/Specifications/trash-spec">Desktop Trash Can</ulink> specification
|
||||
that is implemented in GIO. The location for storing trashed files
|
||||
has changed from <filename>$HOME/.Trash</filename> to
|
||||
<filename>$HOME/.local/share/Trash</filename> (or more correctly
|
||||
<filename>$XDG_DATA_HOME/Trash</filename>), which means that
|
||||
there is a need for migrating files that have been trashed by
|
||||
gnome-vfs to the new location.
|
||||
</para>
|
||||
<para>
|
||||
In gnome-vfs, the <filename>trash://</filename> scheme offering a
|
||||
merged view of all trash directories was implemented in nautilus,
|
||||
and trash-handling applications had to find and monitor all trash
|
||||
directories themselves. With GIO, the <filename>trash://</filename>
|
||||
implementation has been moved to gvfs and applications can simply
|
||||
monitor that location:
|
||||
</para>
|
||||
<informalexample><programlisting>
|
||||
static void
|
||||
file_changed (GFileMonitor *file_monitor,
|
||||
GFile *child,
|
||||
GFile *other_file,
|
||||
GFileMonitorEvent event_type,
|
||||
gpointer user_data)
|
||||
{
|
||||
switch (event_type)
|
||||
{
|
||||
case G_FILE_MONITOR_EVENT_DELETED:
|
||||
g_print ("'%s' removed from trash\n", g_file_get_basename (child));
|
||||
break;
|
||||
case G_FILE_MONITOR_EVENT_CREATED:
|
||||
g_print ("'%s' added to trash\n", g_file_get_basename (child));
|
||||
break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
start_monitoring_trash (void)
|
||||
{
|
||||
GFile *file;
|
||||
GFileMonitor *monitor;
|
||||
|
||||
file = g_file_new_for_uri ("trash://");
|
||||
monitor = g_file_monitor_directory (file, 0, NULL, NULL);
|
||||
g_object_unref (file);
|
||||
|
||||
g_signal_connect (monitor, "changed", G_CALLBACK (file_changed), NULL);
|
||||
|
||||
/* ... */
|
||||
|
||||
}
|
||||
</programlisting></informalexample>
|
||||
<para>
|
||||
GIO exposes some useful metadata about trashed files. There are
|
||||
trash::orig-path and trash::deletion-date attributes. The
|
||||
standard::icon attribute of the <filename>trash://</filename>
|
||||
itself provides a suitable icon for displaying the trash can on
|
||||
the desktop. If you are using this icon, make sure to monitor
|
||||
this attribute for changes, since the icon may be updated to
|
||||
reflect that state of the trash can.
|
||||
</para>
|
||||
<para>
|
||||
Moving a file to the trash is much simpler with GIO. Instead of
|
||||
using gnome_vfs_find_directory() with %GNOME_VFS_DIRECTORY_KIND_TRASH
|
||||
to find out where to move the trashed file, just use the g_file_trash()
|
||||
function.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Operations on multiple files</title>
|
||||
|
||||
<para>
|
||||
gnome-vfs has the dreaded gnome_vfs_xfer_uri_list() function which
|
||||
has tons of options and offers the equivalent of cp, mv, ln, mkdir
|
||||
and rm at the same time.
|
||||
</para>
|
||||
<para>
|
||||
GIO offers a much simpler I/O scheduler functionality instead, that
|
||||
lets you schedule a function to be called in a separate thread, or
|
||||
if threads are not available, as an idle in the mainloop.
|
||||
See g_io_scheduler_push_job().
|
||||
</para>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Mime monitoring</title>
|
||||
|
||||
<para>
|
||||
gnome-vfs offered a way to monitor the association between mime types
|
||||
and default handlers for changes, with the #GnomeVFSMIMEMonitor object.
|
||||
GIO does not offer a replacement for this functionality at this time,
|
||||
since we have not found a compelling use case where
|
||||
#GnomeVFSMIMEMonitor was used. If you think you have such a use
|
||||
case, please report it at
|
||||
<ulink url="https://gitlab.gnome.org/GNOME/glib/issues/new">https://gitlab.gnome.org/GNOME/glib/issues/new</ulink>.
|
||||
</para>
|
||||
</section>
|
||||
</chapter>
|
||||
27
docs/reference/gio/migrating-posix.xml
Normal file
27
docs/reference/gio/migrating-posix.xml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<part id="migrating">
|
||||
<title>Migrating to GIO</title>
|
||||
|
||||
<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>
|
||||
|
||||
</chapter>
|
||||
</part>
|
||||
745
docs/reference/gio/overview.xml
Normal file
745
docs/reference/gio/overview.xml
Normal file
|
|
@ -0,0 +1,745 @@
|
|||
<part>
|
||||
<title>GIO Overview</title>
|
||||
|
||||
<chapter>
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>
|
||||
GIO is striving to provide a modern, easy-to-use VFS API that sits
|
||||
at the right level in the library stack, as well as other generally
|
||||
useful APIs for desktop applications (such as networking and
|
||||
D-Bus support). The goal is to overcome the 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 higher-level, document-centric
|
||||
interfaces.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The abstract file system model of GIO consists of a number of
|
||||
interfaces and base classes for I/O and files:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>GFile</term>
|
||||
<listitem><para>reference to a file</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GFileInfo</term>
|
||||
<listitem><para>information about a file or filesystem</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GFileEnumerator</term>
|
||||
<listitem><para>list files in directories</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GDrive</term>
|
||||
<listitem><para>represents a drive</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GVolume</term>
|
||||
<listitem><para>represents a file system in an abstract way</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GMount</term>
|
||||
<listitem><para>represents a mounted file system</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
Then there is a number of stream classes, similar to the input and
|
||||
output stream hierarchies that can be found in frameworks like Java:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>GInputStream</term>
|
||||
<listitem><para>read data</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GOutputStream</term>
|
||||
<listitem><para>write data</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GIOStream</term>
|
||||
<listitem><para>read and write data</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GSeekable</term>
|
||||
<listitem><para>interface optionally implemented by streams to support seeking</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
There are interfaces related to applications and the types
|
||||
of files they handle:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>GAppInfo</term>
|
||||
<listitem><para>information about an installed application</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GIcon</term>
|
||||
<listitem><para>abstract type for file and application icons</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
There is a framework for storing and retrieving application settings:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>GSettings</term>
|
||||
<listitem><para>stores and retrieves application settings</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
There is support for network programming, including connectivity monitoring,
|
||||
name resolution, lowlevel socket APIs and highlevel client and server
|
||||
helper classes:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>GSocket</term>
|
||||
<listitem><para>lowlevel platform independent socket object</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GResolver</term>
|
||||
<listitem><para>asynchronous and cancellable DNS resolver</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GSocketClient</term>
|
||||
<listitem><para>high-level network client helper</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GSocketService</term>
|
||||
<listitem><para>high-level network server helper</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GSocketConnection</term>
|
||||
<listitem><para>network connection stream</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>GNetworkMonitor</term>
|
||||
<listitem><para>network connectivity monitoring</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
There is support for connecting to <ulink url="http://www.freedesktop.org/wiki/Software/dbus">D-Bus</ulink>,
|
||||
sending and receiving messages, owning and watching bus names,
|
||||
and making objects available on the bus:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>GDBusConnection</term>
|
||||
<listitem><para>a D-Bus connection</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GDBusMethodInvocation</term>
|
||||
<listitem><para>for handling remote calls</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GDBusServer</term>
|
||||
<listitem><para>helper for accepting connections</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>GDBusProxy</term>
|
||||
<listitem><para>proxy to access D-Bus interfaces on a remote object</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
Beyond these, GIO provides facilities for file monitoring,
|
||||
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 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. The GVFS
|
||||
package also contains the GVFS daemon, which spawn further mount
|
||||
daemons for each individual connection.
|
||||
</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
|
||||
in the session; the user does not have to enter their password over
|
||||
and over again.
|
||||
</para>
|
||||
<para>
|
||||
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>Writing GIO applications</title>
|
||||
|
||||
<para>
|
||||
The information in the GLib <ulink url="http://developer.gnome.org/glib/stable/glib-programming.html">documentation</ulink> about writing GLib
|
||||
applications is generally applicable when writing GIO applications.
|
||||
</para>
|
||||
|
||||
<simplesect><title>Threads</title>
|
||||
|
||||
<para>
|
||||
GDBus has its own private worker thread, so applications using
|
||||
GDBus have at least 3 threads. GIO makes heavy use of the concept
|
||||
of a <link linkend="g-main-context-push-thread-default">thread-default
|
||||
main context</link> to execute callbacks of asynchronous
|
||||
methods in the same context in which the operation was started.
|
||||
</para>
|
||||
|
||||
</simplesect>
|
||||
|
||||
<simplesect id="async-programming"><title>Asynchronous Programming</title>
|
||||
|
||||
<para>
|
||||
Many GIO functions come in two versions: synchronous and asynchronous,
|
||||
denoted by an <code>_async</code> suffix. It is important to use these
|
||||
appropriately: synchronous calls should not be used from
|
||||
within a main loop which is shared with other code, such as one in the
|
||||
application’s main thread. Synchronous calls block until they complete,
|
||||
and I/O operations can take noticeable amounts of time (even on ‘fast’
|
||||
SSDs). Blocking a main loop iteration while waiting for I/O means that
|
||||
other sources in the main loop will not be dispatched, such as input and
|
||||
redraw handlers for the application’s UI. This can cause the application
|
||||
to ‘freeze’ until I/O completes.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A few self-contained groups of functions, such as code generated by
|
||||
<link linkend="gdbus-codegen"><application>gdbus-codegen</application></link>,
|
||||
use a different convention: functions are asynchronous default, and it is
|
||||
the <emphasis>synchronous</emphasis> version which has a
|
||||
<code>_sync</code>
|
||||
suffix. Aside from naming differences, they should be treated the same
|
||||
way as functions following the normal convention above.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The asynchronous (<code>_async</code>) versions of functions return
|
||||
control to the caller immediately, after scheduling the I/O in the kernel
|
||||
and adding a callback for it to the main loop. This callback will be
|
||||
invoked when the operation has completed. From the callback, the paired
|
||||
<code>_finish</code> function should be called to retrieve the return
|
||||
value of the I/O operation, and any errors which occurred. For more
|
||||
information on using and implementing asynchronous functions, see
|
||||
<link linkend="GAsyncResult.description"><type>GAsyncResult</type></link>
|
||||
and <link linkend="GTask.description"><type>GTask</type></link>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By starting multiple asynchronous operations in succession, they will be
|
||||
executed in parallel (up to an arbitrary limit imposed by GIO’s internal
|
||||
worker thread pool).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The synchronous versions of functions can be used early in application
|
||||
startup when there is no main loop to block, for example to load initial
|
||||
configuration files. They can also be used for I/O on files which are
|
||||
guaranteed to be small and on the local disk. Note that the user’s home
|
||||
directory is not guaranteed to be on the local disk.
|
||||
</para>
|
||||
</simplesect>
|
||||
|
||||
<simplesect><title>Security</title>
|
||||
|
||||
<para>
|
||||
When your program needs to carry out some privileged operation (say,
|
||||
create a new user account), there are various ways in which you can go
|
||||
about this:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Implement a daemon that offers the privileged operation. A convenient
|
||||
way to do this is as a D-Bus system-bus service. The daemon will probably
|
||||
need ways to check the identity and authorization of the caller before
|
||||
executing the operation. <ulink url="http://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html">polkit</ulink> is a framework that allows this.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Use a small helper that is executed with elevated privileges via
|
||||
pkexec. <ulink url="http://www.freedesktop.org/software/polkit/docs/latest/pkexec.1.html">pkexec</ulink> is a small program launcher that is part of polkit.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Use a small helper that is executed with elevated privileges by
|
||||
being suid root.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
None of these approaches is the clear winner, they all have their
|
||||
advantages and disadvantages.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When writing code that runs with elevated privileges, it is important
|
||||
to follow some basic rules of secure programming. David Wheeler has an
|
||||
excellent book on this topic,
|
||||
<ulink url="http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/index.html">Secure Programming for Linux and Unix HOWTO</ulink>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When using GIO in code that runs with elevated privileges, you have to
|
||||
be careful. GIO has extension points whose implementations get loaded
|
||||
from modules (executable code in shared objects), which could allow
|
||||
an attacker to sneak their own code into your application by tricking it
|
||||
into loading the code as a module. However, GIO will never load modules
|
||||
from your home directory except when explicitly asked to do so via an
|
||||
environment variable.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In most cases, your helper program should be so small that you don't
|
||||
need GIO, whose APIs are largely designed to support full-blown desktop
|
||||
applications. If you can't resist the convenience of these APIs, here
|
||||
are some steps you should take:
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
Clear the environment, e.g. using the <function>clearenv()</function>
|
||||
function.
|
||||
David Wheeler has a good <ulink url="http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/environment-variables.html">explanation</ulink> for why it is
|
||||
important to sanitize the environment.
|
||||
See <xref linkend="running-gio-apps"/>
|
||||
for a list of all environment variables affecting GIO. In particular,
|
||||
<envar>PATH</envar> (used to locate binaries), <envar>GIO_EXTRA_MODULES</envar> (used to locate loadable modules) and <envar>DBUS_{SYSTEM,SESSION}_BUS_ADDRESS</envar> (used to locate the D-Bus system and session bus) are important.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Don't use GVfs, by setting <envar>GIO_USE_VFS=local</envar> in the environment.
|
||||
The reason to avoid GVfs in security-sensitive programs is that it uses
|
||||
many libraries which have not necessarily been audited for security problems.
|
||||
Gvfs is also heavily distributed and relies on a session bus to be present.
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</simplesect>
|
||||
|
||||
</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>
|
||||
|
||||
<chapter id="running-gio-apps">
|
||||
<title>Running GIO applications</title>
|
||||
|
||||
<para>
|
||||
GIO inspects a few environment variables in addition to the
|
||||
ones used by GLib.
|
||||
</para>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>XDG_DATA_HOME</envar>, <envar>XDG_DATA_DIRS</envar></title>
|
||||
|
||||
<para>
|
||||
GIO uses these environment variables to locate MIME information.
|
||||
For more information, see the <ulink url="http://freedesktop.org/Standards/shared-mime-info-spec">Shared MIME-info Database</ulink>
|
||||
and the <ulink url="http://freedesktop.org/Standards/basedir-spec">Base Directory Specification</ulink>.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GVFS_DISABLE_FUSE</envar></title>
|
||||
|
||||
<para>
|
||||
This variable can be set to keep #Gvfs from starting the fuse backend,
|
||||
which may be unwanted or unnecessary in certain situations.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GIO_USE_VFS</envar></title>
|
||||
|
||||
<para>
|
||||
This environment variable can be set to the name of a #GVfs
|
||||
implementation to override the default for debugging purposes.
|
||||
The #GVfs implementation for local files that is included in GIO
|
||||
has the name "local", the implementation in the gvfs module has
|
||||
the name "gvfs". Most commonly, system software will set this to "local"
|
||||
to avoid having `GFile` APIs perform unnecessary D-Bus calls.
|
||||
</para><para>
|
||||
The special value <literal>help</literal> can be used to print a list of
|
||||
available implementations to standard output.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<para>
|
||||
The following environment variables are only useful for debugging
|
||||
GIO itself or modules that it loads. They should not be set in a
|
||||
production environment.
|
||||
</para>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GIO_USE_FILE_MONITOR</envar></title>
|
||||
|
||||
<para>
|
||||
This variable can be set to the name of a #GFileMonitor
|
||||
implementation to override the default for debugging purposes.
|
||||
The #GFileMonitor implementation for local files that is included
|
||||
in GIO on Linux has the name <literal>inotify</literal>, others that are built
|
||||
are built as modules (depending on the platform) are called
|
||||
<literal>fam</literal> and <literal>fen</literal>.
|
||||
</para><para>
|
||||
The special value <literal>help</literal> can be used to print a list of
|
||||
available implementations to standard output.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GIO_USE_VOLUME_MONITOR</envar></title>
|
||||
|
||||
<para>
|
||||
This variable can be set to the name of a #GVolumeMonitor
|
||||
implementation to override the default for debugging purposes.
|
||||
The #GVolumeMonitor implementation for local files that is included
|
||||
in GIO has the name "unix", the udisks2-based implementation in the
|
||||
gvfs module has the name "udisks2".
|
||||
</para><para>
|
||||
The special value <literal>help</literal> can be used to print a list of
|
||||
available implementations to standard output.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GIO_USE_TLS</envar></title>
|
||||
|
||||
<para>
|
||||
This variable can be set to the name of a #GTlsBackend
|
||||
implementation to override the default for debugging purposes.
|
||||
GIO does not include a #GTlsBackend implementation, the gnutls-based
|
||||
implementation in the glib-networking module has the name "gnutls".
|
||||
</para><para>
|
||||
The special value <literal>help</literal> can be used to print a list of
|
||||
available implementations to standard output.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GIO_MODULE_DIR</envar></title>
|
||||
|
||||
<para>
|
||||
When this environment variable is set to a path, GIO will load
|
||||
modules from this alternate directory instead of the directory
|
||||
built into GIO. This is useful when running tests, for example.
|
||||
</para>
|
||||
<para>
|
||||
This environment variable is ignored when running in a setuid program.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GIO_EXTRA_MODULES</envar></title>
|
||||
|
||||
<para>
|
||||
When this environment variable is set to a path, or a set of
|
||||
paths separated by a colon, GIO will attempt to load
|
||||
additional modules from within the path.
|
||||
</para>
|
||||
<para>
|
||||
This environment variable is ignored when running in a setuid program.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GSETTINGS_BACKEND</envar></title>
|
||||
|
||||
<para>
|
||||
This variable can be set to the name of a #GSettingsBackend
|
||||
implementation to override the default for debugging purposes.
|
||||
The memory-based implementation that is included in GIO has
|
||||
the name "memory", the one in dconf has the name "dconf".
|
||||
</para><para>
|
||||
The special value <literal>help</literal> can be used to print a list of
|
||||
available implementations to standard output.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>GSETTINGS_SCHEMA_DIR</envar></title>
|
||||
|
||||
<para>
|
||||
This variable can be set to the names of directories to consider when looking for compiled schemas for #GSettings,
|
||||
in addition to the <filename>glib-2.0/schemas</filename>
|
||||
subdirectories of the XDG system data dirs. To specify multiple directories, use <constant>G_SEARCHPATH_SEPARATOR_S</constant> as a separator.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>DBUS_SYSTEM_BUS_ADDRESS</envar></title>
|
||||
|
||||
<para>
|
||||
This variable is consulted to find the address of the D-Bus system
|
||||
bus. For the format of D-Bus addresses, see the D-Bus
|
||||
<ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html#addresses">specification</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
Setting this variable overrides platform-specific ways of determining
|
||||
the system bus address.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>DBUS_SESSION_BUS_ADDRESS</envar></title>
|
||||
|
||||
<para>
|
||||
This variable is consulted to find the address of the D-Bus session bus.
|
||||
</para>
|
||||
<para>
|
||||
Setting this variable overrides platform-specific ways of determining
|
||||
the session bus address.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>DBUS_STARTER_BUS_TYPE</envar></title>
|
||||
|
||||
<para>
|
||||
This variable is consulted to find out the 'starter' bus for an
|
||||
application that has been started via D-Bus activation. The possible
|
||||
values are 'system' or 'session'.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>G_DBUS_DEBUG</envar></title>
|
||||
|
||||
<para>
|
||||
This variable can be set to a list of debug options, which
|
||||
cause GLib to print out different types of debugging
|
||||
information when using the D-Bus routines.
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>transport</term>
|
||||
<listitem><para>Show IO activity (e.g. reads and writes)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>message</term>
|
||||
<listitem><para>Show all sent and received D-Bus messages</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>payload</term>
|
||||
<listitem><para>Show payload for all sent and received D-Bus messages (implies message)</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>call</term>
|
||||
<listitem><para>Trace g_dbus_connection_call() and g_dbus_connection_call_sync() API usage</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>signal</term>
|
||||
<listitem><para>Show when a D-Bus signal is received</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>incoming</term>
|
||||
<listitem><para>Show when an incoming D-Bus method call is received</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>return</term>
|
||||
<listitem><para>Show when a reply is returned via the #GDBusMethodInvocation API</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>emission</term>
|
||||
<listitem><para>Trace g_dbus_connection_emit_signal() API usage</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>authentication</term>
|
||||
<listitem><para>Show information about connection authentication</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>address</term>
|
||||
<listitem><para>Show information about D-Bus address lookups and autolaunching</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
The special value <literal>all</literal> can be used to turn
|
||||
on all debug options. The special value
|
||||
<literal>help</literal> can be used to print a list of
|
||||
supported options to standard output.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>G_DBUS_COOKIE_SHA1_KEYRING_DIR</envar></title>
|
||||
|
||||
<para>
|
||||
Can be used to override the directory used to store the
|
||||
keyring used in the <literal>DBUS_COOKIE_SHA1</literal>
|
||||
authentication mechanism. Normally the directory used is
|
||||
<filename>.dbus-keyrings</filename> in the user's home
|
||||
directory.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title><envar>G_DBUS_COOKIE_SHA1_KEYRING_DIR_IGNORE_PERMISSION</envar></title>
|
||||
|
||||
<para>
|
||||
If set, the permissions of the directory used to store the
|
||||
keyring used in the <literal>DBUS_COOKIE_SHA1</literal>
|
||||
authentication mechanism won't be checked. Normally the
|
||||
directory must be readable only by the user.
|
||||
</para>
|
||||
</formalpara>
|
||||
</chapter>
|
||||
|
||||
<chapter id="extending-gio">
|
||||
<title>Extending GIO</title>
|
||||
|
||||
<para>
|
||||
A lot of the functionality that is accessible through GIO
|
||||
is implemented in loadable modules, and modules provide a convenient
|
||||
way to extend GIO. In addition to the #GIOModule API which supports
|
||||
writing such modules, GIO has a mechanism to define extension points,
|
||||
and register implementations thereof, see #GIOExtensionPoint.
|
||||
</para>
|
||||
<para>
|
||||
The following extension points are currently defined by GIO:
|
||||
</para>
|
||||
|
||||
<formalpara>
|
||||
<title>G_VFS_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to override the functionality of the #GVfs class.
|
||||
Implementations of this extension point must be derived from #GVfs.
|
||||
GIO uses the implementation with the highest priority that is active,
|
||||
see g_vfs_is_active().
|
||||
</para>
|
||||
<para>
|
||||
GIO implements this extension point for local files, gvfs contains
|
||||
an implementation that supports all the backends in gvfs.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title>G_VOLUME_MONITOR_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to add more volume monitors.
|
||||
Implementations of this extension point must be derived from
|
||||
#GVolumeMonitor. GIO uses all registered extensions.
|
||||
</para>
|
||||
<para>
|
||||
gvfs contains an implementation that works together with the #GVfs
|
||||
implementation in gvfs.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title>G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to override the 'native' volume monitor.
|
||||
Implementations of this extension point must be derived from
|
||||
#GNativeVolumeMonitor. GIO uses the implementation with
|
||||
the highest priority that is supported, as determined by the
|
||||
is_supported() vfunc in #GVolumeMonitorClass.
|
||||
</para>
|
||||
<para>
|
||||
GIO implements this extension point for local mounts,
|
||||
gvfs contains a udisks2-based implementation.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title>G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to override the file monitor implementation for
|
||||
local files. Implementations of this extension point must
|
||||
be derived from #GLocalFileMonitor. GIO uses the implementation
|
||||
with the highest priority that is supported, as determined by the
|
||||
is_supported() vfunc in #GLocalFileMonitorClass.
|
||||
</para>
|
||||
<para>
|
||||
GIO uses this extension point internally, to switch between
|
||||
its fam-based and inotify-based file monitoring implementations.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title>G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Unix-only. Allows to provide a way to associate default handlers
|
||||
with URI schemes. Implementations of this extension point must
|
||||
implement the #GDesktopAppInfoLookup interface. GIO uses the
|
||||
implementation with the highest priority.
|
||||
</para>
|
||||
<para>
|
||||
This extension point has been discontinued in GLib 2.28. It is
|
||||
still available to keep API and ABI stability, but GIO is no
|
||||
longer using it for default handlers. Instead, the mime handler
|
||||
mechanism is used, together with x-scheme-handler pseudo-mimetypes.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title>G_SETTINGS_BACKEND_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to provide an alternative storage for #GSettings.
|
||||
Implementations of this extension point must derive from the
|
||||
#GSettingsBackend type. GIO contains a keyfile-based
|
||||
implementation of this extension point, another one is provided
|
||||
by dconf.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title>G_PROXY_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to provide implementations for network proxying.
|
||||
Implementations of this extension point must provide the
|
||||
#GProxy interface, and must be named after the network
|
||||
protocol they are proxying.
|
||||
</para>
|
||||
<para>
|
||||
glib-networking contains an implementation of this extension
|
||||
point based on libproxy.
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>G_TLS_BACKEND_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to provide implementations for TLS support.
|
||||
Implementations of this extension point must implement
|
||||
the #GTlsBackend interface.
|
||||
</para>
|
||||
<para>
|
||||
glib-networking contains an implementation of this extension
|
||||
point.
|
||||
</para>
|
||||
</formalpara>
|
||||
|
||||
<formalpara>
|
||||
<title>G_NETWORK_MONITOR_EXTENSION_POINT_NAME</title>
|
||||
|
||||
<para>
|
||||
Allows to provide implementations for network connectivity
|
||||
monitoring.
|
||||
Implementations of this extension point must implement
|
||||
the #GNetworkMonitorInterface interface.
|
||||
</para>
|
||||
<para>
|
||||
GIO contains an implementation of this extension point
|
||||
that is using the netlink interface of the Linux kernel.
|
||||
</para>
|
||||
</formalpara>
|
||||
</chapter>
|
||||
</part>
|
||||
|
||||
1
docs/reference/gio/version.xml.in
Normal file
1
docs/reference/gio/version.xml.in
Normal file
|
|
@ -0,0 +1 @@
|
|||
@VERSION@
|
||||
8
docs/reference/gio/xml/gtkdocentities.ent.in
Normal file
8
docs/reference/gio/xml/gtkdocentities.ent.in
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<!ENTITY package "@PACKAGE@">
|
||||
<!ENTITY package_bugreport "@PACKAGE_BUGREPORT@">
|
||||
<!ENTITY package_name "@PACKAGE_NAME@">
|
||||
<!ENTITY package_string "@PACKAGE_STRING@">
|
||||
<!ENTITY package_tarname "@PACKAGE_TARNAME@">
|
||||
<!ENTITY package_url "@PACKAGE_URL@">
|
||||
<!ENTITY package_version "@PACKAGE_VERSION@">
|
||||
<!ENTITY package_api_version "@PACKAGE_API_VERSION@">
|
||||
14
docs/reference/gio/xml/meson.build
Normal file
14
docs/reference/gio/xml/meson.build
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
ent_conf = configuration_data()
|
||||
ent_conf.set('PACKAGE', 'glib')
|
||||
ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/glib/issues/new')
|
||||
ent_conf.set('PACKAGE_NAME', 'glib')
|
||||
ent_conf.set('PACKAGE_STRING', 'glib')
|
||||
ent_conf.set('PACKAGE_TARNAME', 'glib')
|
||||
ent_conf.set('PACKAGE_URL', 'FIXME')
|
||||
ent_conf.set('PACKAGE_VERSION', glib_version)
|
||||
ent_conf.set('PACKAGE_API_VERSION', glib_api_version)
|
||||
configure_file(
|
||||
input: 'gtkdocentities.ent.in',
|
||||
output: 'gtkdocentities.ent',
|
||||
configuration: ent_conf
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue