MOON
Server: Apache/2.2.31 (Unix) mod_ssl/2.2.31 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
System: Linux csr818.wilogic.com 2.6.18-419.el5xen #1 SMP Fri Feb 24 22:50:37 UTC 2017 x86_64
User: digitals (531)
PHP: 5.4.45
Disabled: NONE
Upload Files
File: //usr/share/gtk-doc/html/dbus-glib/dbus-glib-DBusGMethod.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>DBusGMethod</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="D-Bus GLib bindings - Reference Manual">
<link rel="up" href="ch02.html" title="API Reference">
<link rel="prev" href="dbus-glib-DBusGMessage.html" title="DBusGMessage">
<link rel="next" href="dbus-glib-DBusGError.html" title="DBusGError">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="ch01.html" title="Introduction">
<link rel="chapter" href="ch02.html" title="API Reference">
<link rel="chapter" href="ch03.html" title="Tools Reference">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="dbus-glib-DBusGMessage.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">D-Bus GLib bindings - Reference Manual</th>
<td><a accesskey="n" href="dbus-glib-DBusGError.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2534556" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2529152" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="dbus-glib-DBusGMethod"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2534556"></a><span class="refentrytitle">DBusGMethod</span>
</h2>
<p>DBusGMethod &#8212; GMethod Info &amp; Invocation</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" lang="en">
<a name="id2537580"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">



            <a href="dbus-glib-DBusGMethod.html#DBusGMethodInfo">DBusGMethodInfo</a>;
            <a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a>;
gchar*      <a href="dbus-glib-DBusGMethod.html#dbus-g-method-get-sender">dbus_g_method_get_sender</a>        (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context);
DBusMessage* <a href="dbus-glib-DBusGMethod.html#dbus-g-method-get-reply">dbus_g_method_get_reply</a>        (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context);
void        <a href="dbus-glib-DBusGMethod.html#dbus-g-method-send-reply">dbus_g_method_send_reply</a>        (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context,
                                             DBusMessage *reply);
void        <a href="dbus-glib-DBusGMethod.html#dbus-g-method-return">dbus_g_method_return</a>            (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context,
                                             ...);
void        <a href="dbus-glib-DBusGMethod.html#dbus-g-method-return-error">dbus_g_method_return_error</a>      (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context,
                                             GError *error);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2529152"></a><h2>Description</h2>
<p>
These types are used to call methods on <span class="type">GObject</span> objects.</p>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2527081"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2527092"></a><h3>
<a name="DBusGMethodInfo"></a>DBusGMethodInfo</h3>
<a class="indexterm" name="id2527104"></a><pre class="programlisting">typedef struct {
  GCallback                 function;    
  GClosureMarshal           marshaller;  
  int                       data_offset; 
} DBusGMethodInfo;
</pre>
<p>
Object typically generated by <a href="dbus-binding-tool.html" title="dbus-binding-tool"><span class="type">dbus-binding-tool</span></a> that
stores a mapping from introspection data to a
function pointer for a C method to be invoked.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term">GCallback&#160;<em class="structfield"><code>function</code></em>;</span></td>
<td> C method to invoke
</td>
</tr>
<tr>
<td>
<span class="term">GClosureMarshal&#160;<em class="structfield"><code>marshaller</code></em>;</span></td>
<td> Marshaller to invoke method 
</td>
</tr>
<tr>
<td>
<span class="term">int&#160;<em class="structfield"><code>data_offset</code></em>;</span></td>
<td> Offset into the introspection data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2548326"></a><h3>
<a name="DBusGMethodInvocation"></a>DBusGMethodInvocation</h3>
<a class="indexterm" name="id2548337"></a><pre class="programlisting">typedef struct _DBusGMethodInvocation DBusGMethodInvocation;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2548353"></a><h3>
<a name="dbus-g-method-get-sender"></a>dbus_g_method_get_sender ()</h3>
<a class="indexterm" name="id2548364"></a><pre class="programlisting">gchar*      dbus_g_method_get_sender        (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context);</pre>
<p>
Get the sender of a message so we can send a
"reply" later (i.e. send a message directly
to a service which invoked the method at a 
later time).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> the method context
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the unique name of teh sender
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2548425"></a><h3>
<a name="dbus-g-method-get-reply"></a>dbus_g_method_get_reply ()</h3>
<a class="indexterm" name="id2548436"></a><pre class="programlisting">DBusMessage* dbus_g_method_get_reply        (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context);</pre>
<p>
Get the reply message to append reply values
Used as a sidedoor when you can't generate dbus values
of the correct type due to glib binding limitations</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> the method context
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a <span class="type">DBusMessage</span> with the reply
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2536573"></a><h3>
<a name="dbus-g-method-send-reply"></a>dbus_g_method_send_reply ()</h3>
<a class="indexterm" name="id2536584"></a><pre class="programlisting">void        dbus_g_method_send_reply        (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context,
                                             DBusMessage *reply);</pre>
<p>
Used as a sidedoor when you can't generate dbus values
of the correct type due to glib binding limitations</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> the method context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>reply</code></em>&#160;:</span></td>
<td> the reply message, will be unreffed
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2536655"></a><h3>
<a name="dbus-g-method-return"></a>dbus_g_method_return ()</h3>
<a class="indexterm" name="id2536666"></a><pre class="programlisting">void        dbus_g_method_return            (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context,
                                             ...);</pre>
<p>
Send a return message for a given method invocation, with arguments.
This function also frees the sending context.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> the method context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></td>
<td>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2536732"></a><h3>
<a name="dbus-g-method-return-error"></a>dbus_g_method_return_error ()</h3>
<a class="indexterm" name="id2536743"></a><pre class="programlisting">void        dbus_g_method_return_error      (<a href="dbus-glib-DBusGMethod.html#DBusGMethodInvocation">DBusGMethodInvocation</a> *context,
                                             GError *error);</pre>
<p>
Send a error message for a given method invocation.
This function also frees the sending context.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em>&#160;:</span></td>
<td> the method context
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></td>
<td> the error to send
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2548755"></a><h2>See Also</h2>
<a href="dbus-glib-DBusGMessage.html#DBusGMessage"><span class="type">DBusGMessage</span></a>
</div>
</div>
</body>
</html>