~psusi/ubuntu/utopic/udisks2/fix-standby

« back to all changes in this revision

Viewing changes to doc/html/udisks2-Utilities.html

  • Committer: Package Import Robot
  • Author(s): Michael Biebl, Martin Pitt, Michael Biebl
  • Date: 2012-12-18 05:04:33 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20121218050433-3jwk4tdyip2umiy1
[ Martin Pitt ]
* Add debian/patches/test_luks_with_vfat.patch: Run Luks test with VFAT
  instead of ext4, to work around kernel crash with Linux 3.7 when using
  ext4 (https://launchpad.net/bugs/1089818)

[ Michael Biebl ]
* New upstream release.
* Update email address in debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
</tr></table></div>
38
38
<div class="refsynopsisdiv">
39
39
<a name="udisks2-Utilities.synopsis"></a><h2>Synopsis</h2>
40
 
<pre class="synopsis"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="udisks2-Utilities.html#udisks-decode-udev-string" title="udisks_decode_udev_string ()">udisks_decode_udev_string</a>           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);
41
 
<span class="returnvalue">void</span>                <a class="link" href="udisks2-Utilities.html#udisks-safe-append-to-object-path" title="udisks_safe_append_to_object_path ()">udisks_safe_append_to_object_path</a>   (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a> *str</code></em>,
42
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *s</code></em>);
43
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a>             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-block-get-size" title="udisks_daemon_util_block_get_size ()">udisks_daemon_util_block_get_size</a>   (<em class="parameter"><code><a href="http://www.freedesktop.org/software/systemd/gudev/GUdevDevice.html"><span class="type">GUdevDevice</span></a> *device</code></em>,
44
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_media_available</code></em>,
45
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_media_change_detected</code></em>);
46
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-resolve-link" title="udisks_daemon_util_resolve_link ()">udisks_daemon_util_resolve_link</a>     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
47
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
48
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-resolve-links" title="udisks_daemon_util_resolve_links ()">udisks_daemon_util_resolve_links</a>    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
49
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dir_name</code></em>);
50
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-check-authorization-sync" title="udisks_daemon_util_check_authorization_sync ()">udisks_daemon_util_check_authorization_sync</a>
 
40
<pre class="synopsis"><span class="returnvalue">gchar</span> *             <a class="link" href="udisks2-Utilities.html#udisks-decode-udev-string" title="udisks_decode_udev_string ()">udisks_decode_udev_string</a>           (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);
 
41
<span class="returnvalue">void</span>                <a class="link" href="udisks2-Utilities.html#udisks-safe-append-to-object-path" title="udisks_safe_append_to_object_path ()">udisks_safe_append_to_object_path</a>   (<em class="parameter"><code><span class="type">GString</span> *str</code></em>,
 
42
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *s</code></em>);
 
43
<span class="returnvalue">guint64</span>             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-block-get-size" title="udisks_daemon_util_block_get_size ()">udisks_daemon_util_block_get_size</a>   (<em class="parameter"><code><a href="http://www.freedesktop.org/software/systemd/gudev/GUdevDevice.html"><span class="type">GUdevDevice</span></a> *device</code></em>,
 
44
                                                         <em class="parameter"><code><span class="type">gboolean</span> *out_media_available</code></em>,
 
45
                                                         <em class="parameter"><code><span class="type">gboolean</span> *out_media_change_detected</code></em>);
 
46
<span class="returnvalue">gchar</span> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-resolve-link" title="udisks_daemon_util_resolve_link ()">udisks_daemon_util_resolve_link</a>     (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
 
47
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);
 
48
<span class="returnvalue">gchar</span> **            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-resolve-links" title="udisks_daemon_util_resolve_links ()">udisks_daemon_util_resolve_links</a>    (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
 
49
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *dir_name</code></em>);
 
50
<span class="returnvalue">gboolean</span>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-check-authorization-sync" title="udisks_daemon_util_check_authorization_sync ()">udisks_daemon_util_check_authorization_sync</a>
51
51
                                                        (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
52
52
                                                         <em class="parameter"><code><a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a> *object</code></em>,
53
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_id</code></em>,
54
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *options</code></em>,
55
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *message</code></em>,
56
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);
57
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-get-caller-uid-sync" title="udisks_daemon_util_get_caller_uid_sync ()">udisks_daemon_util_get_caller_uid_sync</a>
 
53
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *action_id</code></em>,
 
54
                                                         <em class="parameter"><code><span class="type">GVariant</span> *options</code></em>,
 
55
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *message</code></em>,
 
56
                                                         <em class="parameter"><code><span class="type">GDBusMethodInvocation</span> *invocation</code></em>);
 
57
<span class="returnvalue">gboolean</span>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-get-caller-uid-sync" title="udisks_daemon_util_get_caller_uid_sync ()">udisks_daemon_util_get_caller_uid_sync</a>
58
58
                                                        (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
59
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
60
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
 
59
                                                         <em class="parameter"><code><span class="type">GDBusMethodInvocation</span> *invocation</code></em>,
 
60
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
61
61
                                                         <em class="parameter"><code><span class="type">uid_t</span> *out_uid</code></em>,
62
62
                                                         <em class="parameter"><code><span class="type">gid_t</span> *out_gid</code></em>,
63
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **out_user_name</code></em>,
64
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
65
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-get-caller-pid-sync" title="udisks_daemon_util_get_caller_pid_sync ()">udisks_daemon_util_get_caller_pid_sync</a>
 
63
                                                         <em class="parameter"><code><span class="type">gchar</span> **out_user_name</code></em>,
 
64
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
 
65
<span class="returnvalue">gboolean</span>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-get-caller-pid-sync" title="udisks_daemon_util_get_caller_pid_sync ()">udisks_daemon_util_get_caller_pid_sync</a>
66
66
                                                        (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
67
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
68
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
 
67
                                                         <em class="parameter"><code><span class="type">GDBusMethodInvocation</span> *invocation</code></em>,
 
68
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
69
69
                                                         <em class="parameter"><code><span class="type">pid_t</span> *out_pid</code></em>,
70
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
71
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-setup-by-user" title="udisks_daemon_util_setup_by_user ()">udisks_daemon_util_setup_by_user</a>    (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
 
70
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
 
71
<span class="returnvalue">gboolean</span>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-setup-by-user" title="udisks_daemon_util_setup_by_user ()">udisks_daemon_util_setup_by_user</a>    (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
72
72
                                                         <em class="parameter"><code><a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a> *object</code></em>,
73
73
                                                         <em class="parameter"><code><span class="type">uid_t</span> user</code></em>);
74
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-dup-object" title="udisks_daemon_util_dup_object ()">udisks_daemon_util_dup_object</a>       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> interface_</code></em>,
75
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
76
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-escape" title="udisks_daemon_util_escape ()">udisks_daemon_util_escape</a>           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);
77
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-escape-and-quote" title="udisks_daemon_util_escape_and_quote ()">udisks_daemon_util_escape_and_quote</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);
 
74
<span class="returnvalue">gpointer</span>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-dup-object" title="udisks_daemon_util_dup_object ()">udisks_daemon_util_dup_object</a>       (<em class="parameter"><code><span class="type">gpointer</span> interface_</code></em>,
 
75
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
 
76
<span class="returnvalue">gchar</span> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-escape" title="udisks_daemon_util_escape ()">udisks_daemon_util_escape</a>           (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);
 
77
<span class="returnvalue">gchar</span> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-escape-and-quote" title="udisks_daemon_util_escape_and_quote ()">udisks_daemon_util_escape_and_quote</a> (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);
78
78
typedef             <a class="link" href="udisks2-Utilities.html#UDisksInhibitCookie" title="UDisksInhibitCookie">UDisksInhibitCookie</a>;
79
79
<a class="link" href="udisks2-Utilities.html#UDisksInhibitCookie" title="UDisksInhibitCookie"><span class="returnvalue">UDisksInhibitCookie</span></a> * <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-inhibit-system-sync" title="udisks_daemon_util_inhibit_system_sync ()">udisks_daemon_util_inhibit_system_sync</a>
80
 
                                                        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *reason</code></em>);
 
80
                                                        (<em class="parameter"><code>const <span class="type">gchar</span> *reason</code></em>);
81
81
<span class="returnvalue">void</span>                <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-uninhibit-system-sync" title="udisks_daemon_util_uninhibit_system_sync ()">udisks_daemon_util_uninhibit_system_sync</a>
82
82
                                                        (<em class="parameter"><code><a class="link" href="udisks2-Utilities.html#UDisksInhibitCookie" title="UDisksInhibitCookie"><span class="type">UDisksInhibitCookie</span></a> *cookie</code></em>);
83
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-hexdump" title="udisks_daemon_util_hexdump ()">udisks_daemon_util_hexdump</a>          (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
84
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);
85
 
<span class="returnvalue">void</span>                <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-hexdump-debug" title="udisks_daemon_util_hexdump_debug ()">udisks_daemon_util_hexdump_debug</a>    (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
86
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);
87
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-file-set-contents" title="udisks_daemon_util_file_set_contents ()">udisks_daemon_util_file_set_contents</a>
88
 
                                                        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
89
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *contents</code></em>,
90
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> contents_len</code></em>,
91
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> mode_for_new_file</code></em>,
92
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
93
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-on-same-seat" title="udisks_daemon_util_on_same_seat ()">udisks_daemon_util_on_same_seat</a>     (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
 
83
<span class="returnvalue">gchar</span> *             <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-hexdump" title="udisks_daemon_util_hexdump ()">udisks_daemon_util_hexdump</a>          (<em class="parameter"><code><span class="type">gconstpointer</span> data</code></em>,
 
84
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>);
 
85
<span class="returnvalue">void</span>                <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-hexdump-debug" title="udisks_daemon_util_hexdump_debug ()">udisks_daemon_util_hexdump_debug</a>    (<em class="parameter"><code><span class="type">gconstpointer</span> data</code></em>,
 
86
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>);
 
87
<span class="returnvalue">gboolean</span>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-file-set-contents" title="udisks_daemon_util_file_set_contents ()">udisks_daemon_util_file_set_contents</a>
 
88
                                                        (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
 
89
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *contents</code></em>,
 
90
                                                         <em class="parameter"><code><span class="type">gssize</span> contents_len</code></em>,
 
91
                                                         <em class="parameter"><code><span class="type">gint</span> mode_for_new_file</code></em>,
 
92
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
 
93
<span class="returnvalue">gboolean</span>            <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-on-same-seat" title="udisks_daemon_util_on_same_seat ()">udisks_daemon_util_on_same_seat</a>     (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
94
94
                                                         <em class="parameter"><code><a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a> *object</code></em>,
95
95
                                                         <em class="parameter"><code><span class="type">pid_t</span> process</code></em>);
96
96
</pre>
105
105
<a name="udisks2-Utilities.details"></a><h2>Details</h2>
106
106
<div class="refsect2">
107
107
<a name="udisks-decode-udev-string"></a><h3>udisks_decode_udev_string ()</h3>
108
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             udisks_decode_udev_string           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
 
108
<pre class="programlisting"><span class="returnvalue">gchar</span> *             udisks_decode_udev_string           (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
109
109
<p>
110
110
Unescapes sequences like \x20 to " " and ensures the returned string is valid UTF-8.
111
111
</p>
113
113
If the string is not valid UTF-8, try as hard as possible to convert to UTF-8.
114
114
</p>
115
115
<p>
116
 
If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is passed, then <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.
 
116
If <code class="literal">NULL</code> is passed, then <code class="literal">NULL</code> is returned.
117
117
</p>
118
118
<p>
119
119
See <a href="http://www.freedesktop.org/software/systemd/libudev/libudev-udev-util.html#udev-util-encode-string"><code class="function">udev_util_encode_string()</code></a> in libudev/libudev-util.c in the udev
127
127
<tbody>
128
128
<tr>
129
129
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
130
 
<td>An udev-encoded string or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
 
130
<td>An udev-encoded string or <code class="literal">NULL</code>.</td>
131
131
</tr>
132
132
<tr>
133
133
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
134
 
<td>A valid UTF-8 string that must be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
 
134
<td>A valid UTF-8 string that must be freed with <code class="function">g_free()</code>.</td>
135
135
</tr>
136
136
</tbody>
137
137
</table></div>
139
139
<hr>
140
140
<div class="refsect2">
141
141
<a name="udisks-safe-append-to-object-path"></a><h3>udisks_safe_append_to_object_path ()</h3>
142
 
<pre class="programlisting"><span class="returnvalue">void</span>                udisks_safe_append_to_object_path   (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a> *str</code></em>,
143
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *s</code></em>);</pre>
 
142
<pre class="programlisting"><span class="returnvalue">void</span>                udisks_safe_append_to_object_path   (<em class="parameter"><code><span class="type">GString</span> *str</code></em>,
 
143
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *s</code></em>);</pre>
144
144
<p>
145
145
Appends <em class="parameter"><code>s</code></em> to <em class="parameter"><code>str</code></em> in a way such that only characters that can be
146
146
used in a D-Bus object path will be used. E.g. a character not in
159
159
<tbody>
160
160
<tr>
161
161
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
162
 
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a> to append to.</td>
 
162
<td>A <span class="type">GString</span> to append to.</td>
163
163
</tr>
164
164
<tr>
165
165
<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
171
171
<hr>
172
172
<div class="refsect2">
173
173
<a name="udisks-daemon-util-block-get-size"></a><h3>udisks_daemon_util_block_get_size ()</h3>
174
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a>             udisks_daemon_util_block_get_size   (<em class="parameter"><code><a href="http://www.freedesktop.org/software/systemd/gudev/GUdevDevice.html"><span class="type">GUdevDevice</span></a> *device</code></em>,
175
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_media_available</code></em>,
176
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *out_media_change_detected</code></em>);</pre>
 
174
<pre class="programlisting"><span class="returnvalue">guint64</span>             udisks_daemon_util_block_get_size   (<em class="parameter"><code><a href="http://www.freedesktop.org/software/systemd/gudev/GUdevDevice.html"><span class="type">GUdevDevice</span></a> *device</code></em>,
 
175
                                                         <em class="parameter"><code><span class="type">gboolean</span> *out_media_available</code></em>,
 
176
                                                         <em class="parameter"><code><span class="type">gboolean</span> *out_media_change_detected</code></em>);</pre>
177
177
<p>
178
178
Gets the size of the <em class="parameter"><code>device</code></em> top-level block device, checking for media in the process
179
179
</p>
189
189
</tr>
190
190
<tr>
191
191
<td><p><span class="term"><em class="parameter"><code>out_media_available</code></em> :</span></p></td>
192
 
<td>Return location for whether media is available or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
 
192
<td>Return location for whether media is available or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
193
193
</td>
194
194
</tr>
195
195
<tr>
196
196
<td><p><span class="term"><em class="parameter"><code>out_media_change_detected</code></em> :</span></p></td>
197
 
<td>Return location for whether media change is detected or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
 
197
<td>Return location for whether media change is detected or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
198
198
</td>
199
199
</tr>
200
200
<tr>
207
207
<hr>
208
208
<div class="refsect2">
209
209
<a name="udisks-daemon-util-resolve-link"></a><h3>udisks_daemon_util_resolve_link ()</h3>
210
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             udisks_daemon_util_resolve_link     (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
211
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
 
210
<pre class="programlisting"><span class="returnvalue">gchar</span> *             udisks_daemon_util_resolve_link     (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
 
211
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>);</pre>
212
212
<p>
213
213
Resolves the symlink <em class="parameter"><code>path</code></em>/<em class="parameter"><code>name</code></em>.
214
214
</p>
228
228
</tr>
229
229
<tr>
230
230
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
231
 
<td>A canonicalized absolute pathname or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the symlink
232
 
could not be resolved. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
 
231
<td>A canonicalized absolute pathname or <code class="literal">NULL</code> if the symlink
 
232
could not be resolved. Free with <code class="function">g_free()</code>.</td>
233
233
</tr>
234
234
</tbody>
235
235
</table></div>
237
237
<hr>
238
238
<div class="refsect2">
239
239
<a name="udisks-daemon-util-resolve-links"></a><h3>udisks_daemon_util_resolve_links ()</h3>
240
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **            udisks_daemon_util_resolve_links    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>,
241
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dir_name</code></em>);</pre>
 
240
<pre class="programlisting"><span class="returnvalue">gchar</span> **            udisks_daemon_util_resolve_links    (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
 
241
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *dir_name</code></em>);</pre>
242
242
<p>
243
243
Resolves all symlinks in <em class="parameter"><code>path</code></em>/<em class="parameter"><code>dir_name</code></em>. This can be used to
244
244
easily walk e.g. holders or slaves of block devices.
259
259
</tr>
260
260
<tr>
261
261
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
262
 
<td>An array of canonicalized absolute pathnames. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a>.</td>
 
262
<td>An array of canonicalized absolute pathnames. Free with <code class="function">g_strfreev()</code>.</td>
263
263
</tr>
264
264
</tbody>
265
265
</table></div>
267
267
<hr>
268
268
<div class="refsect2">
269
269
<a name="udisks-daemon-util-check-authorization-sync"></a><h3>udisks_daemon_util_check_authorization_sync ()</h3>
270
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            udisks_daemon_util_check_authorization_sync
 
270
<pre class="programlisting"><span class="returnvalue">gboolean</span>            udisks_daemon_util_check_authorization_sync
271
271
                                                        (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
272
272
                                                         <em class="parameter"><code><a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a> *object</code></em>,
273
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *action_id</code></em>,
274
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> *options</code></em>,
275
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *message</code></em>,
276
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>);</pre>
 
273
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *action_id</code></em>,
 
274
                                                         <em class="parameter"><code><span class="type">GVariant</span> *options</code></em>,
 
275
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *message</code></em>,
 
276
                                                         <em class="parameter"><code><span class="type">GDBusMethodInvocation</span> *invocation</code></em>);</pre>
277
277
<p>
278
278
Checks if the caller represented by <em class="parameter"><code>invocation</code></em> is authorized for
279
279
the action identified by <em class="parameter"><code>action_id</code></em>, optionally displaying <em class="parameter"><code>message</code></em>
285
285
The calling thread is blocked for the duration of the authorization
286
286
check which could be a very long time since it may involve
287
287
presenting an authentication dialog and having a human user use
288
 
it. If <span class="quote">“<span class="quote">auth.no_user_interaction</span>”</span> in <em class="parameter"><code>options</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
 
288
it. If <span class="quote">“<span class="quote">auth.no_user_interaction</span>”</span> in <em class="parameter"><code>options</code></em> is <code class="literal">TRUE</code>
289
289
no authentication dialog will be presented and the check is not
290
290
expected to take a long time.
291
291
</p>
314
314
</tr>
315
315
<tr>
316
316
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
317
 
<td>The <a href="http://library.gnome.org/devel/gio/unstable/GDBusObject.html"><span class="type">GDBusObject</span></a> that the call is on or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
 
317
<td>The <span class="type">GDBusObject</span> that the call is on or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
318
318
</td>
319
319
</tr>
320
320
<tr>
323
323
</tr>
324
324
<tr>
325
325
<td><p><span class="term"><em class="parameter"><code>options</code></em> :</span></p></td>
326
 
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-GVariant.html#GVariant"><span class="type">GVariant</span></a> to check for the <span class="quote">“<span class="quote">auth.no_user_interaction</span>”</span> option or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
 
326
<td>A <span class="type">GVariant</span> to check for the <span class="quote">“<span class="quote">auth.no_user_interaction</span>”</span> option or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
327
327
</td>
328
328
</tr>
329
329
<tr>
337
337
<tr>
338
338
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
339
339
<td>
340
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if caller is authorized, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td>
 
340
<code class="literal">TRUE</code> if caller is authorized, <code class="literal">FALSE</code> if not.</td>
341
341
</tr>
342
342
</tbody>
343
343
</table></div>
345
345
<hr>
346
346
<div class="refsect2">
347
347
<a name="udisks-daemon-util-get-caller-uid-sync"></a><h3>udisks_daemon_util_get_caller_uid_sync ()</h3>
348
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            udisks_daemon_util_get_caller_uid_sync
 
348
<pre class="programlisting"><span class="returnvalue">gboolean</span>            udisks_daemon_util_get_caller_uid_sync
349
349
                                                        (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
350
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
351
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
 
350
                                                         <em class="parameter"><code><span class="type">GDBusMethodInvocation</span> *invocation</code></em>,
 
351
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
352
352
                                                         <em class="parameter"><code><span class="type">uid_t</span> *out_uid</code></em>,
353
353
                                                         <em class="parameter"><code><span class="type">gid_t</span> *out_gid</code></em>,
354
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **out_user_name</code></em>,
355
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
354
                                                         <em class="parameter"><code><span class="type">gchar</span> **out_user_name</code></em>,
 
355
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
356
356
<p>
357
357
Gets the UNIX user id (and possibly group id and user name) of the
358
358
peer represented by <em class="parameter"><code>invocation</code></em>.
369
369
</tr>
370
370
<tr>
371
371
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
372
 
<td>A <a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a>.</td>
 
372
<td>A <span class="type">GDBusMethodInvocation</span>.</td>
373
373
</tr>
374
374
<tr>
375
375
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
376
 
<td>A <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
 
376
<td>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
377
377
</td>
378
378
</tr>
379
379
<tr>
380
380
<td><p><span class="term"><em class="parameter"><code>out_uid</code></em> :</span></p></td>
381
 
<td>Return location for resolved uid or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
 
381
<td>Return location for resolved uid or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
382
382
</td>
383
383
</tr>
384
384
<tr>
385
385
<td><p><span class="term"><em class="parameter"><code>out_gid</code></em> :</span></p></td>
386
 
<td>Return location for resolved gid or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
 
386
<td>Return location for resolved gid or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
387
387
</td>
388
388
</tr>
389
389
<tr>
390
390
<td><p><span class="term"><em class="parameter"><code>out_user_name</code></em> :</span></p></td>
391
 
<td>Return location for resolved user name or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
 
391
<td>Return location for resolved user name or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>][<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
392
392
</td>
393
393
</tr>
394
394
<tr>
398
398
<tr>
399
399
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
400
400
<td>
401
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the user id (and possibly group id) was obtained, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
 
401
<code class="literal">TRUE</code> if the user id (and possibly group id) was obtained, <code class="literal">FALSE</code> otherwise</td>
402
402
</tr>
403
403
</tbody>
404
404
</table></div>
406
406
<hr>
407
407
<div class="refsect2">
408
408
<a name="udisks-daemon-util-get-caller-pid-sync"></a><h3>udisks_daemon_util_get_caller_pid_sync ()</h3>
409
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            udisks_daemon_util_get_caller_pid_sync
 
409
<pre class="programlisting"><span class="returnvalue">gboolean</span>            udisks_daemon_util_get_caller_pid_sync
410
410
                                                        (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
411
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a> *invocation</code></em>,
412
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> *cancellable</code></em>,
 
411
                                                         <em class="parameter"><code><span class="type">GDBusMethodInvocation</span> *invocation</code></em>,
 
412
                                                         <em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>,
413
413
                                                         <em class="parameter"><code><span class="type">pid_t</span> *out_pid</code></em>,
414
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
414
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
415
415
<p>
416
416
Gets the UNIX process id of the peer represented by <em class="parameter"><code>invocation</code></em>.
417
417
</p>
427
427
</tr>
428
428
<tr>
429
429
<td><p><span class="term"><em class="parameter"><code>invocation</code></em> :</span></p></td>
430
 
<td>A <a href="http://library.gnome.org/devel/gio/unstable/GDBusMethodInvocation.html"><span class="type">GDBusMethodInvocation</span></a>.</td>
 
430
<td>A <span class="type">GDBusMethodInvocation</span>.</td>
431
431
</tr>
432
432
<tr>
433
433
<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
434
 
<td>A <a href="http://library.gnome.org/devel/gio/unstable/GCancellable.html"><span class="type">GCancellable</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
 
434
<td>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/allow-none"><span class="acronym">allow-none</span></a>]</span>
435
435
</td>
436
436
</tr>
437
437
<tr>
438
438
<td><p><span class="term"><em class="parameter"><code>out_pid</code></em> :</span></p></td>
439
 
<td>Return location for resolved pid or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
 
439
<td>Return location for resolved pid or <code class="literal">NULL</code>. <span class="annotation">[<a href="http://foldoc.org/out"><span class="acronym">out</span></a>]</span>
440
440
</td>
441
441
</tr>
442
442
<tr>
446
446
<tr>
447
447
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
448
448
<td>
449
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the process id was obtained, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
 
449
<code class="literal">TRUE</code> if the process id was obtained, <code class="literal">FALSE</code> otherwise</td>
450
450
</tr>
451
451
</tbody>
452
452
</table></div>
454
454
<hr>
455
455
<div class="refsect2">
456
456
<a name="udisks-daemon-util-setup-by-user"></a><h3>udisks_daemon_util_setup_by_user ()</h3>
457
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            udisks_daemon_util_setup_by_user    (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
 
457
<pre class="programlisting"><span class="returnvalue">gboolean</span>            udisks_daemon_util_setup_by_user    (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
458
458
                                                         <em class="parameter"><code><a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a> *object</code></em>,
459
459
                                                         <em class="parameter"><code><span class="type">uid_t</span> user</code></em>);</pre>
460
460
<p>
473
473
</tr>
474
474
<tr>
475
475
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
476
 
<td>The <a href="http://library.gnome.org/devel/gio/unstable/GDBusObject.html"><span class="type">GDBusObject</span></a> that the call is on or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
 
476
<td>The <span class="type">GDBusObject</span> that the call is on or <code class="literal">NULL</code>.</td>
477
477
</tr>
478
478
<tr>
479
479
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
482
482
<tr>
483
483
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
484
484
<td>
485
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>object</code></em> has been set-up by <em class="parameter"><code>user</code></em>, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td>
 
485
<code class="literal">TRUE</code> if <em class="parameter"><code>object</code></em> has been set-up by <em class="parameter"><code>user</code></em>, <code class="literal">FALSE</code> if not.</td>
486
486
</tr>
487
487
</tbody>
488
488
</table></div>
490
490
<hr>
491
491
<div class="refsect2">
492
492
<a name="udisks-daemon-util-dup-object"></a><h3>udisks_daemon_util_dup_object ()</h3>
493
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            udisks_daemon_util_dup_object       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> interface_</code></em>,
494
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
493
<pre class="programlisting"><span class="returnvalue">gpointer</span>            udisks_daemon_util_dup_object       (<em class="parameter"><code><span class="type">gpointer</span> interface_</code></em>,
 
494
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
495
495
<p>
496
496
Gets the enclosing <a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a> for <em class="parameter"><code>interface</code></em>, if any.
497
497
</p>
503
503
<tbody>
504
504
<tr>
505
505
<td><p><span class="term"><em class="parameter"><code>interface_</code></em> :</span></p></td>
506
 
<td>A <a href="http://library.gnome.org/devel/gio/unstable/GDBusInterface.html"><span class="type">GDBusInterface</span></a>-derived instance. <span class="annotation">[<a href="http://foldoc.org/type"><span class="acronym">type</span></a> GDBusInterface]</span>
 
506
<td>A <span class="type">GDBusInterface</span>-derived instance. <span class="annotation">[<a href="http://foldoc.org/type"><span class="acronym">type</span></a> GDBusInterface]</span>
507
507
</td>
508
508
</tr>
509
509
<tr>
510
510
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
511
511
<td>
512
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, or an unset <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> to set if the return value is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
 
512
<code class="literal">NULL</code>, or an unset <span class="type">GError</span> to set if the return value is <code class="literal">NULL</code>.</td>
513
513
</tr>
514
514
<tr>
515
515
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
516
 
<td>Either <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or a
 
516
<td>Either <code class="literal">NULL</code> or a
517
517
<a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a>-derived instance that must be released with
518
 
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/type"><span class="acronym">type</span></a> UDisksObject]</span>
 
518
<code class="function">g_object_unref()</code>. <span class="annotation">[<a href="http://foldoc.org/transfer%20full"><span class="acronym">transfer full</span></a>][<a href="http://foldoc.org/type"><span class="acronym">type</span></a> UDisksObject]</span>
519
519
</td>
520
520
</tr>
521
521
</tbody>
524
524
<hr>
525
525
<div class="refsect2">
526
526
<a name="udisks-daemon-util-escape"></a><h3>udisks_daemon_util_escape ()</h3>
527
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             udisks_daemon_util_escape           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
 
527
<pre class="programlisting"><span class="returnvalue">gchar</span> *             udisks_daemon_util_escape           (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
528
528
<p>
529
529
Escapes double-quotes (") and back-slashes (\) in a string
530
530
using back-slash (\).
541
541
</tr>
542
542
<tr>
543
543
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
544
 
<td>The escaped string. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
 
544
<td>The escaped string. Free with <code class="function">g_free()</code>.</td>
545
545
</tr>
546
546
</tbody>
547
547
</table></div>
549
549
<hr>
550
550
<div class="refsect2">
551
551
<a name="udisks-daemon-util-escape-and-quote"></a><h3>udisks_daemon_util_escape_and_quote ()</h3>
552
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             udisks_daemon_util_escape_and_quote (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
 
552
<pre class="programlisting"><span class="returnvalue">gchar</span> *             udisks_daemon_util_escape_and_quote (<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
553
553
<p>
554
554
Like <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-escape" title="udisks_daemon_util_escape ()"><code class="function">udisks_daemon_util_escape()</code></a> but also wraps the result in
555
555
double-quotes.
566
566
</tr>
567
567
<tr>
568
568
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
569
 
<td>The double-quoted and escaped string. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td>
 
569
<td>The double-quoted and escaped string. Free with <code class="function">g_free()</code>.</td>
570
570
</tr>
571
571
</tbody>
572
572
</table></div>
585
585
<div class="refsect2">
586
586
<a name="udisks-daemon-util-inhibit-system-sync"></a><h3>udisks_daemon_util_inhibit_system_sync ()</h3>
587
587
<pre class="programlisting"><a class="link" href="udisks2-Utilities.html#UDisksInhibitCookie" title="UDisksInhibitCookie"><span class="returnvalue">UDisksInhibitCookie</span></a> * udisks_daemon_util_inhibit_system_sync
588
 
                                                        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *reason</code></em>);</pre>
 
588
                                                        (<em class="parameter"><code>const <span class="type">gchar</span> *reason</code></em>);</pre>
589
589
<p>
590
590
Tries to inhibit the system.
591
591
</p>
617
617
<pre class="programlisting"><span class="returnvalue">void</span>                udisks_daemon_util_uninhibit_system_sync
618
618
                                                        (<em class="parameter"><code><a class="link" href="udisks2-Utilities.html#UDisksInhibitCookie" title="UDisksInhibitCookie"><span class="type">UDisksInhibitCookie</span></a> *cookie</code></em>);</pre>
619
619
<p>
620
 
Does nothing if <em class="parameter"><code>cookie</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, otherwise uninhibits.
 
620
Does nothing if <em class="parameter"><code>cookie</code></em> is <code class="literal">NULL</code>, otherwise uninhibits.
621
621
</p>
622
622
<div class="variablelist"><table border="0" class="variablelist">
623
623
<colgroup>
627
627
<tbody><tr>
628
628
<td><p><span class="term"><em class="parameter"><code>cookie</code></em> :</span></p></td>
629
629
<td>
630
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or a cookie obtained from <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-inhibit-system-sync" title="udisks_daemon_util_inhibit_system_sync ()"><code class="function">udisks_daemon_util_inhibit_system_sync()</code></a>.</td>
 
630
<code class="literal">NULL</code> or a cookie obtained from <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-inhibit-system-sync" title="udisks_daemon_util_inhibit_system_sync ()"><code class="function">udisks_daemon_util_inhibit_system_sync()</code></a>.</td>
631
631
</tr></tbody>
632
632
</table></div>
633
633
</div>
634
634
<hr>
635
635
<div class="refsect2">
636
636
<a name="udisks-daemon-util-hexdump"></a><h3>udisks_daemon_util_hexdump ()</h3>
637
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             udisks_daemon_util_hexdump          (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
638
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre>
 
637
<pre class="programlisting"><span class="returnvalue">gchar</span> *             udisks_daemon_util_hexdump          (<em class="parameter"><code><span class="type">gconstpointer</span> data</code></em>,
 
638
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>);</pre>
639
639
<p>
640
640
Utility function to generate a hexadecimal representation of <em class="parameter"><code>len</code></em>
641
641
bytes of <em class="parameter"><code>data</code></em>.
656
656
</tr>
657
657
<tr>
658
658
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
659
 
<td>A multi-line string. Free with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> when done using it.</td>
 
659
<td>A multi-line string. Free with <code class="function">g_free()</code> when done using it.</td>
660
660
</tr>
661
661
</tbody>
662
662
</table></div>
664
664
<hr>
665
665
<div class="refsect2">
666
666
<a name="udisks-daemon-util-hexdump-debug"></a><h3>udisks_daemon_util_hexdump_debug ()</h3>
667
 
<pre class="programlisting"><span class="returnvalue">void</span>                udisks_daemon_util_hexdump_debug    (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
668
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> len</code></em>);</pre>
 
667
<pre class="programlisting"><span class="returnvalue">void</span>                udisks_daemon_util_hexdump_debug    (<em class="parameter"><code><span class="type">gconstpointer</span> data</code></em>,
 
668
                                                         <em class="parameter"><code><span class="type">gsize</span> len</code></em>);</pre>
669
669
<p>
670
670
Utility function to dumps the hexadecimal representation of <em class="parameter"><code>len</code></em>
671
671
bytes of <em class="parameter"><code>data</code></em> generated with <a class="link" href="udisks2-Utilities.html#udisks-daemon-util-hexdump" title="udisks_daemon_util_hexdump ()"><code class="function">udisks_daemon_util_hexdump()</code></a> using
691
691
<hr>
692
692
<div class="refsect2">
693
693
<a name="udisks-daemon-util-file-set-contents"></a><h3>udisks_daemon_util_file_set_contents ()</h3>
694
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            udisks_daemon_util_file_set_contents
695
 
                                                        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
696
 
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *contents</code></em>,
697
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> contents_len</code></em>,
698
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> mode_for_new_file</code></em>,
699
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
694
<pre class="programlisting"><span class="returnvalue">gboolean</span>            udisks_daemon_util_file_set_contents
 
695
                                                        (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
 
696
                                                         <em class="parameter"><code>const <span class="type">gchar</span> *contents</code></em>,
 
697
                                                         <em class="parameter"><code><span class="type">gssize</span> contents_len</code></em>,
 
698
                                                         <em class="parameter"><code><span class="type">gint</span> mode_for_new_file</code></em>,
 
699
                                                         <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
700
700
<p>
701
 
Like <a href="http://library.gnome.org/devel/glib/unstable/glib-File-Utilities.html#g-file-set-contents"><code class="function">g_file_set_contents()</code></a> but preserves the mode of the file if it
 
701
Like <code class="function">g_file_set_contents()</code> but preserves the mode of the file if it
702
702
already exists and sets it to <em class="parameter"><code>mode_for_new_file</code></em> otherwise.
703
703
</p>
704
704
<div class="variablelist"><table border="0" class="variablelist">
727
727
</tr>
728
728
<tr>
729
729
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
730
 
<td>Return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
 
730
<td>Return location for a <span class="type">GError</span>, or <code class="literal">NULL</code>.</td>
731
731
</tr>
732
732
<tr>
733
733
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
734
734
<td>
735
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if an error occurred</td>
 
735
<code class="literal">TRUE</code> on success, <code class="literal">FALSE</code> if an error occurred</td>
736
736
</tr>
737
737
</tbody>
738
738
</table></div>
740
740
<hr>
741
741
<div class="refsect2">
742
742
<a name="udisks-daemon-util-on-same-seat"></a><h3>udisks_daemon_util_on_same_seat ()</h3>
743
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            udisks_daemon_util_on_same_seat     (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
 
743
<pre class="programlisting"><span class="returnvalue">gboolean</span>            udisks_daemon_util_on_same_seat     (<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>,
744
744
                                                         <em class="parameter"><code><a class="link" href="UDisksObject.html" title="UDisksObject"><span class="type">UDisksObject</span></a> *object</code></em>,
745
745
                                                         <em class="parameter"><code><span class="type">pid_t</span> process</code></em>);</pre>
746
746
<p>
762
762
</tr>
763
763
<tr>
764
764
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
765
 
<td>The <a href="http://library.gnome.org/devel/gio/unstable/GDBusObject.html"><span class="type">GDBusObject</span></a> that the call is on or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
 
765
<td>The <span class="type">GDBusObject</span> that the call is on or <code class="literal">NULL</code>.</td>
766
766
</tr>
767
767
<tr>
768
768
<td><p><span class="term"><em class="parameter"><code>process</code></em> :</span></p></td>
771
771
<tr>
772
772
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
773
773
<td>
774
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>object</code></em> and <em class="parameter"><code>process</code></em> is on the same seat, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
 
774
<code class="literal">TRUE</code> if <em class="parameter"><code>object</code></em> and <em class="parameter"><code>process</code></em> is on the same seat, <code class="literal">FALSE</code> otherwise.</td>
775
775
</tr>
776
776
</tbody>
777
777
</table></div>