⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
gtk-doc
/
html
/
gio
/
View File Name :
gio-D-Bus-Utilities.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>D-Bus Utilities: GIO Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="GIO Reference Manual"> <link rel="up" href="gdbus-lowlevel.html" title="Low-level D-Bus Support"> <link rel="prev" href="gdbus-lowlevel.html" title="Low-level D-Bus Support"> <link rel="next" href="gio-D-Bus-Addresses.html" title="D-Bus Addresses"> <meta name="generator" content="GTK-Doc V1.32 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> <a href="#gio-D-Bus-Utilities.description" class="shortcut">Description</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="gdbus-lowlevel.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="gdbus-lowlevel.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="gio-D-Bus-Addresses.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="gio-D-Bus-Utilities"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="gio-D-Bus-Utilities.top_of_page"></a>D-Bus Utilities</span></h2> <p>D-Bus Utilities — Various utilities related to D-Bus</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="gio-D-Bus-Utilities.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <tr> <td class="function_type"> <span class="returnvalue">gchar</span> * </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-generate-guid" title="g_dbus_generate_guid ()">g_dbus_generate_guid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-is-guid" title="g_dbus_is_guid ()">g_dbus_is_guid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-is-name" title="g_dbus_is_name ()">g_dbus_is_name</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-is-unique-name" title="g_dbus_is_unique_name ()">g_dbus_is_unique_name</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-is-member-name" title="g_dbus_is_member_name ()">g_dbus_is_member_name</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-is-interface-name" title="g_dbus_is_interface_name ()">g_dbus_is_interface_name</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">GVariant</span> * </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-gvalue-to-gvariant" title="g_dbus_gvalue_to_gvariant ()">g_dbus_gvalue_to_gvariant</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-gvariant-to-gvalue" title="g_dbus_gvariant_to_gvalue ()">g_dbus_gvariant_to_gvalue</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="gio-D-Bus-Utilities.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gio/gio.h> </pre> </div> <div class="refsect1"> <a name="gio-D-Bus-Utilities.description"></a><h2>Description</h2> <p>Various utility routines related to D-Bus.</p> </div> <div class="refsect1"> <a name="gio-D-Bus-Utilities.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="g-dbus-generate-guid"></a><h3>g_dbus_generate_guid ()</h3> <pre class="programlisting"><span class="returnvalue">gchar</span> * g_dbus_generate_guid (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> <p>Generate a D-Bus GUID that can be used with e.g. <a class="link" href="GDBusConnection.html#g-dbus-connection-new" title="g_dbus_connection_new ()"><code class="function">g_dbus_connection_new()</code></a>.</p> <p>See the D-Bus specification regarding what strings are valid D-Bus GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).</p> <div class="refsect3"> <a name="g-dbus-generate-guid.returns"></a><h4>Returns</h4> <p> A valid D-Bus GUID. Free with <code class="function">g_free()</code>.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-dbus-is-guid"></a><h3>g_dbus_is_guid ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_dbus_is_guid (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre> <p>Checks if <em class="parameter"><code>string</code></em> is a D-Bus GUID.</p> <p>See the D-Bus specification regarding what strings are valid D-Bus GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).</p> <div class="refsect3"> <a name="g-dbus-is-guid.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>string</p></td> <td class="parameter_description"><p>The string to check.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-dbus-is-guid.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if <em class="parameter"><code>string</code></em> is a guid, <code class="literal">FALSE</code> otherwise.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-dbus-is-name"></a><h3>g_dbus_is_name ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_dbus_is_name (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre> <p>Checks if <em class="parameter"><code>string</code></em> is a valid D-Bus bus name (either unique or well-known).</p> <div class="refsect3"> <a name="g-dbus-is-name.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>string</p></td> <td class="parameter_description"><p>The string to check.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-dbus-is-name.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if valid, <code class="literal">FALSE</code> otherwise.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-dbus-is-unique-name"></a><h3>g_dbus_is_unique_name ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_dbus_is_unique_name (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre> <p>Checks if <em class="parameter"><code>string</code></em> is a valid D-Bus unique bus name.</p> <div class="refsect3"> <a name="g-dbus-is-unique-name.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>string</p></td> <td class="parameter_description"><p>The string to check.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-dbus-is-unique-name.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if valid, <code class="literal">FALSE</code> otherwise.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-dbus-is-member-name"></a><h3>g_dbus_is_member_name ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_dbus_is_member_name (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre> <p>Checks if <em class="parameter"><code>string</code></em> is a valid D-Bus member (e.g. signal or method) name.</p> <div class="refsect3"> <a name="g-dbus-is-member-name.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>string</p></td> <td class="parameter_description"><p>The string to check.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-dbus-is-member-name.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if valid, <code class="literal">FALSE</code> otherwise.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-dbus-is-interface-name"></a><h3>g_dbus_is_interface_name ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_dbus_is_interface_name (<em class="parameter"><code>const <span class="type">gchar</span> *string</code></em>);</pre> <p>Checks if <em class="parameter"><code>string</code></em> is a valid D-Bus interface name.</p> <div class="refsect3"> <a name="g-dbus-is-interface-name.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>string</p></td> <td class="parameter_description"><p>The string to check.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-dbus-is-interface-name.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if valid, <code class="literal">FALSE</code> otherwise.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p> </div> <hr> <div class="refsect2"> <a name="g-dbus-gvalue-to-gvariant"></a><h3>g_dbus_gvalue_to_gvariant ()</h3> <pre class="programlisting"><span class="returnvalue">GVariant</span> * g_dbus_gvalue_to_gvariant (<em class="parameter"><code>const <span class="type">GValue</span> *gvalue</code></em>, <em class="parameter"><code>const <span class="type">GVariantType</span> *type</code></em>);</pre> <p>Converts a <span class="type">GValue</span> to a <span class="type">GVariant</span> of the type indicated by the <em class="parameter"><code>type</code></em> parameter.</p> <p>The conversion is using the following rules:</p> <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><span class="type">G_TYPE_STRING</span>: 's', 'o', 'g' or 'ay'</p></li> <li class="listitem"><p><span class="type">G_TYPE_STRV</span>: 'as', 'ao' or 'aay'</p></li> <li class="listitem"><p><span class="type">G_TYPE_BOOLEAN</span>: 'b'</p></li> <li class="listitem"><p><span class="type">G_TYPE_UCHAR</span>: 'y'</p></li> <li class="listitem"><p><span class="type">G_TYPE_INT</span>: 'i', 'n'</p></li> <li class="listitem"><p><span class="type">G_TYPE_UINT</span>: 'u', 'q'</p></li> <li class="listitem"><p><span class="type">G_TYPE_INT64</span> 'x'</p></li> <li class="listitem"><p><span class="type">G_TYPE_UINT64</span>: 't'</p></li> <li class="listitem"><p><span class="type">G_TYPE_DOUBLE</span>: 'd'</p></li> <li class="listitem"><p><span class="type">G_TYPE_VARIANT</span>: Any <span class="type">GVariantType</span></p></li> </ul></div> <p>This can fail if e.g. <em class="parameter"><code>gvalue</code></em> is of type <span class="type">G_TYPE_STRING</span> and <em class="parameter"><code>type</code></em> is 'i'. It will also fail for any <span class="type">GType</span> (including e.g. <span class="type">G_TYPE_OBJECT</span> and <span class="type">G_TYPE_BOXED</span> derived-types) not in the table above.</p> <p>Note that if <em class="parameter"><code>gvalue</code></em> is of type <span class="type">G_TYPE_VARIANT</span> and its value is <code class="literal">NULL</code>, the empty <span class="type">GVariant</span> instance (never <code class="literal">NULL</code>) for <em class="parameter"><code>type</code></em> is returned (e.g. 0 for scalar types, the empty string for string types, '/' for object path types, the empty array for any array type and so on).</p> <p>See the <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-gvariant-to-gvalue" title="g_dbus_gvariant_to_gvalue ()"><code class="function">g_dbus_gvariant_to_gvalue()</code></a> function for how to convert a <span class="type">GVariant</span> to a <span class="type">GValue</span>.</p> <div class="refsect3"> <a name="g-dbus-gvalue-to-gvariant.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>gvalue</p></td> <td class="parameter_description"><p>A <span class="type">GValue</span> to convert to a <span class="type">GVariant</span></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>type</p></td> <td class="parameter_description"><p>A <span class="type">GVariantType</span></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-dbus-gvalue-to-gvariant.returns"></a><h4>Returns</h4> <p> A <span class="type">GVariant</span> (never floating) of <span class="type">GVariantType</span> <em class="parameter"><code>type</code></em> holding the data from <em class="parameter"><code>gvalue</code></em> or <code class="literal">NULL</code> in case of failure. Free with <code class="function">g_variant_unref()</code>.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p> </div> <hr> <div class="refsect2"> <a name="g-dbus-gvariant-to-gvalue"></a><h3>g_dbus_gvariant_to_gvalue ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_dbus_gvariant_to_gvalue (<em class="parameter"><code><span class="type">GVariant</span> *value</code></em>, <em class="parameter"><code><span class="type">GValue</span> *out_gvalue</code></em>);</pre> <p>Converts a <span class="type">GVariant</span> to a <span class="type">GValue</span>. If <em class="parameter"><code>value</code></em> is floating, it is consumed.</p> <p>The rules specified in the <a class="link" href="gio-D-Bus-Utilities.html#g-dbus-gvalue-to-gvariant" title="g_dbus_gvalue_to_gvariant ()"><code class="function">g_dbus_gvalue_to_gvariant()</code></a> function are used - this function is essentially its reverse form. So, a <span class="type">GVariant</span> containing any basic or string array type will be converted to a <span class="type">GValue</span> containing a basic value or string array. Any other <span class="type">GVariant</span> (handle, variant, tuple, dict entry) will be converted to a <span class="type">GValue</span> containing that <span class="type">GVariant</span>.</p> <p>The conversion never fails - a valid <span class="type">GValue</span> is always returned in <em class="parameter"><code>out_gvalue</code></em> .</p> <div class="refsect3"> <a name="g-dbus-gvariant-to-gvalue.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>value</p></td> <td class="parameter_description"><p>A <span class="type">GVariant</span>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>out_gvalue</p></td> <td class="parameter_description"><p>Return location pointing to a zero-filled (uninitialized) <span class="type">GValue</span>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-30.html#api-index-2.30">2.30</a></p> </div> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.32</div> </body> </html>