Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > e8cbfa9673da18966abee0a6d7051b87 > files > 113

glibmm2.4-doc-2.16.1-1mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>glibmm 2.4: Gio::SimpleAsyncResult Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<table border="0" width="100%">
<tr>
    <td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td>
    <td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td>
</tr>
</table>
<center>
  <a class="qindex" href="../../../../gtkmm-2.4/docs/index.html">Main Page</a> &nbsp;
  <a href="../../../../gtkmm-2.4/docs/reference/html/group__Widgets.html">Widgets</a> &nbsp;
  <a class="qindex" href="namespaces.html">glibmm Namespaces</a> &nbsp;
  <a href="../../../../gtkmm-2.4/docs/tutorial/html/index.html"> Book</a> &nbsp;
</center>
<hr width="100%"/>

<!-- begin main content -->
<div id="content">
<!-- Generated by Doxygen 1.5.3 -->
<div class="nav">
<a class="el" href="namespaceGio.html">Gio</a>::<a class="el" href="classGio_1_1SimpleAsyncResult.html">SimpleAsyncResult</a></div>
<h1>Gio::SimpleAsyncResult Class Reference</h1><!-- doxytag: class="Gio::SimpleAsyncResult" --><!-- doxytag: inherits="Glib::Object,Gio::AsyncResult" -->Implements <a class="el" href="classGio_1_1AsyncResult.html" title="Provides a base class for implementing asynchronous function results.">AsyncResult</a> for simple cases.  
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for Gio::SimpleAsyncResult:</div>
<div class="dynsection">
<p><center><img src="classGio_1_1SimpleAsyncResult__inherit__graph.png" border="0" usemap="#Gio_1_1SimpleAsyncResult__inherit__map" alt="Inheritance graph"></center>
<map name="Gio_1_1SimpleAsyncResult__inherit__map">
<area shape="rect" href="classGlib_1_1Object.html" title="Glib::Object" alt="" coords="5,239,99,265"><area shape="rect" href="classGlib_1_1ObjectBase.html" title="Glib::ObjectBase is a common base class for Objects and Interfaces." alt="" coords="47,84,172,111"><area shape="rect" href="classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="120,161,232,188"><area shape="rect" href="classsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="53,7,165,33"><area shape="rect" href="classGio_1_1AsyncResult.html" title="Provides a base class for implementing asynchronous function results." alt="" coords="123,239,251,265"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="classGio_1_1SimpleAsyncResult-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SimpleAsyncResult.html#c34a2acc91b6a715754948614a7745a7">~SimpleAsyncResult</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">GSimpleAsyncResult*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SimpleAsyncResult.html#0ef6a5574a33a4b27be0e4b64554622f">gobj</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Provides access to the underlying C GObject.  <a href="#0ef6a5574a33a4b27be0e4b64554622f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <br>
GSimpleAsyncResult*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SimpleAsyncResult.html#3097025d0abcc5ee580cd514aceffe8d">gobj</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Provides access to the underlying C GObject.  <a href="#3097025d0abcc5ee580cd514aceffe8d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">GSimpleAsyncResult*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SimpleAsyncResult.html#b6d90f92b000f0df8bb73458b8655b46">gobj_copy</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.  <a href="#b6d90f92b000f0df8bb73458b8655b46"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Related Functions</h2></td></tr>
<tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><br>
&lt;<a class="el" href="classGio_1_1SimpleAsyncResult.html">Gio::SimpleAsyncResult</a>&gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGio_1_1SimpleAsyncResult.html#03e8374577d665b14131b784882ae6b0">wrap</a> (GSimpleAsyncResult* object, bool take_copy=false)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A <a class="el" href="namespaceGlib.html#671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object.  <a href="#03e8374577d665b14131b784882ae6b0"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Implements <a class="el" href="classGio_1_1AsyncResult.html" title="Provides a base class for implementing asynchronous function results.">AsyncResult</a> for simple cases. 
<p>
Most of the time, this will be all an application needs, and will be used transparently. Because of this, <a class="el" href="classGio_1_1SimpleAsyncResult.html" title="Implements AsyncResult for simple cases.">SimpleAsyncResult</a> is used throughout GIO for handling asynchronous functions.<p>
Most of the time, an application will not need to know of the details of this API; it is handled transparently, and any necessary operations are handled by AsyncResult's interface. However, if implementing a new GIO module, for writing language bindings, or for complex applications that need better control of how asynchronous operations are completed, it is important to understand this functionality.<p>
<a class="el" href="classGio_1_1SimpleAsyncResult.html" title="Implements AsyncResult for simple cases.">SimpleAsyncResult</a> handles SlotAsyncReady, error reporting, operation cancellation and the final state of an operation, completely transparent to the application. Results can be returned as a pointer e.g. for functions that return data that is collected asynchronously, a boolean value for checking the success or failure of an operation, or a gssize for operations which return the number of bytes modified by the operation; all of the simple return cases are covered.<p>
SimpleAsyncResults are tagged with the calling function to ensure that asynchronous functions and their finishing functions are used together correctly.<p>
To create a new <a class="el" href="classGio_1_1SimpleAsyncResult.html" title="Implements AsyncResult for simple cases.">SimpleAsyncResult</a>, call create(). If the result needs to be created for a GError, use create_from_error(). If a GError is not available (e.g. the asynchronous operation's doesn't take a GError argument), but the result still needs to be created for an error condition, use g_simple_async_result_new_error() (or g_simple_async_result_set_error_va() if your application or binding requires passing a variable argument list directly), and the error can then be propegated through the use of g_simple_async_result_propagate_error().<p>
An asynchronous operation can be made to ignore a cancellation event by calling set_handle_cancellation() with false.<p>
<a class="el" href="classGio_1_1SimpleAsyncResult.html" title="Implements AsyncResult for simple cases.">SimpleAsyncResult</a> can integrate into GLib's event loop, GMainLoop, or it can use GThreads if available. complete() will finish an I/O task directly within the main event loop. complete_in_idle() will integrate the I/O task into the main event loop as an idle function and run_in_thread() will run the job in a separate thread.<p>
To set the results of an asynchronous function, set_op_res() methods are provided, setting the operation's result to a gpointer, bool, or gssize,.<p>
Likewise, to get the result of an asynchronous function, get_op_res_gpointer(), get_op_res_bool(), and get_op_res_gssize() are provided, getting the operation's result as a gpointer, bool, and gssize, respectively.<p>
<dl compact><dt><b><a class="el" href="newin2p16s.html#_newin2p16s000042">Since glibmm 2.16:</a></b></dt><dd></dd></dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="c34a2acc91b6a715754948614a7745a7"></a><!-- doxytag: member="Gio::SimpleAsyncResult::~SimpleAsyncResult" ref="c34a2acc91b6a715754948614a7745a7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Gio::SimpleAsyncResult::~SimpleAsyncResult           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="0ef6a5574a33a4b27be0e4b64554622f"></a><!-- doxytag: member="Gio::SimpleAsyncResult::gobj" ref="0ef6a5574a33a4b27be0e4b64554622f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GSimpleAsyncResult* Gio::SimpleAsyncResult::gobj           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Provides access to the underlying C GObject. 
<p>

<p>Reimplemented from <a class="el" href="classGio_1_1AsyncResult.html#d7ebc2ac808bd8eff4f4cd4f94c1c70a">Gio::AsyncResult</a>.</p>

</div>
</div><p>
<a class="anchor" name="3097025d0abcc5ee580cd514aceffe8d"></a><!-- doxytag: member="Gio::SimpleAsyncResult::gobj" ref="3097025d0abcc5ee580cd514aceffe8d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GSimpleAsyncResult* Gio::SimpleAsyncResult::gobj           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Provides access to the underlying C GObject. 
<p>

<p>Reimplemented from <a class="el" href="classGio_1_1AsyncResult.html#134862761e05a548d2817505480140be">Gio::AsyncResult</a>.</p>

</div>
</div><p>
<a class="anchor" name="b6d90f92b000f0df8bb73458b8655b46"></a><!-- doxytag: member="Gio::SimpleAsyncResult::gobj_copy" ref="b6d90f92b000f0df8bb73458b8655b46" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GSimpleAsyncResult* Gio::SimpleAsyncResult::gobj_copy           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. 
<p>

</div>
</div><p>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="03e8374577d665b14131b784882ae6b0"></a><!-- doxytag: member="Gio::SimpleAsyncResult::wrap" ref="03e8374577d665b14131b784882ae6b0" args="(GSimpleAsyncResult *object, bool take_copy=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a>&lt;<a class="el" href="classGio_1_1SimpleAsyncResult.html">Gio::SimpleAsyncResult</a>&gt; wrap           </td>
          <td>(</td>
          <td class="paramtype">GSimpleAsyncResult *&nbsp;</td>
          <td class="paramname"> <em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>take_copy</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
A <a class="el" href="namespaceGlib.html#671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>The C instance. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>take_copy</em>&nbsp;</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="simpleasyncresult_8h.html">simpleasyncresult.h</a></ul>
</div> <!-- end main content -->

<hr><address><small>
Generated for glibmm 2.4 by <a href="http://www.doxygen.org/index.html">
Doxygen</a> 1.5.3 &copy;&nbsp;1997-2001</small></address>
</body>
</html>