Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 5061

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdbusunixfiledescriptor.cpp -->
  <title>Qt 4.8: QDBusUnixFileDescriptor Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtdbus.html">QtDBus</a></li>
<li>QDBusUnixFileDescriptor</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#availability">Availability</a></li>
</ul>
</div>
<h1 class="title">QDBusUnixFileDescriptor Class Reference</h1>
<!-- $$$QDBusUnixFileDescriptor-brief -->
<p>The QDBusUnixFileDescriptor class holds one Unix file descriptor. <a href="#details">More...</a></p>
<!-- @@@QDBusUnixFileDescriptor -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QDBusUnixFileDescriptor&gt;</span></pre><p>This class was introduced in Qt 4.8.</p>
<ul>
<li><a href="qdbusunixfiledescriptor-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#QDBusUnixFileDescriptor">QDBusUnixFileDescriptor</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#QDBusUnixFileDescriptor-2">QDBusUnixFileDescriptor</a></b> ( int <i>fileDescriptor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#QDBusUnixFileDescriptor-3">QDBusUnixFileDescriptor</a></b> ( const QDBusUnixFileDescriptor &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#dtor.QDBusUnixFileDescriptor">~QDBusUnixFileDescriptor</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#setFileDescriptor">setFileDescriptor</a></b> ( int <i>fileDescriptor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDBusUnixFileDescriptor &amp; </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#operator-eq">operator=</a></b> ( const QDBusUnixFileDescriptor &amp; <i>other</i> )</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qdbusunixfiledescriptor.html#isSupported">isSupported</a></b> ()</td></tr>
</table>
<a name="details"></a>
<!-- $$$QDBusUnixFileDescriptor-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDBusUnixFileDescriptor class holds one Unix file descriptor.</p>
<p>The QDBusUnixFileDescriptor class is used to hold one Unix file descriptor for use with the <a href="qtdbus.html">QtDBus</a> module. This allows applications to send and receive Unix file descriptors over the D-Bus connection, mapping automatically to the D-Bus type 'h'.</p>
<p>Objects of type QDBusUnixFileDescriptors can be used also as parameters in signals and slots that get exported to D-Bus by registering with QDBusConnection::registerObject.</p>
<p>QDBusUnixFileDescriptor does not take ownership of the file descriptor. Instead, it will use the Unix system call <tt>dup(2)</tt> to make a copy of the file descriptor. This file descriptor belongs to the QDBusUnixFileDescriptor object and should not be stored or closed by the user. Instead, you should make your own copy if you need that.</p>
<a name="availability"></a>
<h4>Availability</h4>
<p>Unix file descriptor passing is not available in all D-Bus connections. This feature is present with D-Bus library and bus daemon version 1.4 and upwards on Unix systems. <a href="qtdbus.html">QtDBus</a> automatically enables the feature if such a version was found at compile-time and run-time.</p>
<p>To verify that your connection does support passing file descriptors, check if the <a href="qdbusconnection.html#ConnectionCapability-enum">QDBusConnection::UnixFileDescriptorPassing</a> capability is set with <a href="qdbusconnection.html#connectionCapabilities">QDBusConnection::connectionCapabilities</a>(). If the flag is not active, then you will not be able to make calls to methods that have QDBusUnixFileDescriptor as arguments or even embed such a type in a variant. You will also not receive calls containing that type.</p>
<p>Note also that remote applications may not have support for Unix file descriptor passing. If you make a D-Bus to a remote application that cannot receive such a type, you will receive an error reply. If you try to send a signal containing a D-Bus file descriptor or return one from a method call, the message will be silently dropped.</p>
<p>Even if the feature is not available, QDBusUnixFileDescriptor will continue to operate, so code need not have compile-time checks for the availability of this feature.</p>
<p>On non-Unix systems, QDBusUnixFileDescriptor will always report an invalid state and <a href="qdbusunixfiledescriptor.html#isSupported">QDBusUnixFileDescriptor::isSupported</a>() will return false.</p>
</div>
<p><b>See also </b><a href="qdbusconnection.html#ConnectionCapability-enum">QDBusConnection::ConnectionCapabilities</a> and <a href="qdbusconnection.html#connectionCapabilities">QDBusConnection::connectionCapabilities</a>().</p>
<!-- @@@QDBusUnixFileDescriptor -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QDBusUnixFileDescriptor[overload1]$$$QDBusUnixFileDescriptor -->
<h3 class="fn"><a name="QDBusUnixFileDescriptor"></a>QDBusUnixFileDescriptor::<span class="name">QDBusUnixFileDescriptor</span> ()</h3>
<p>Constructs a <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> without a wrapped file descriptor. This is equivalent to constructing the object with an invalid file descriptor (like -1).</p>
<p><b>See also </b><a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>() and <a href="qdbusunixfiledescriptor.html#isValid">isValid</a>().</p>
<!-- @@@QDBusUnixFileDescriptor -->
<!-- $$$QDBusUnixFileDescriptor$$$QDBusUnixFileDescriptorint -->
<h3 class="fn"><a name="QDBusUnixFileDescriptor-2"></a>QDBusUnixFileDescriptor::<span class="name">QDBusUnixFileDescriptor</span> ( <span class="type">int</span> <i>fileDescriptor</i> )</h3>
<p>Constructs a <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> object by copying the <i>fileDescriptor</i> parameter. The original file descriptor is not touched and must be closed by the user.</p>
<p>Note that the value returned by <a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>() will be different from the <i>fileDescriptor</i> parameter passed.</p>
<p>If the <i>fileDescriptor</i> parameter is not valid, <a href="qdbusunixfiledescriptor.html#isValid">isValid</a>() will return false and <a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>() will return -1.</p>
<p><b>See also </b><a href="qdbusunixfiledescriptor.html#setFileDescriptor">setFileDescriptor</a>() and <a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>().</p>
<!-- @@@QDBusUnixFileDescriptor -->
<!-- $$$QDBusUnixFileDescriptor$$$QDBusUnixFileDescriptorconstQDBusUnixFileDescriptor& -->
<h3 class="fn"><a name="QDBusUnixFileDescriptor-3"></a>QDBusUnixFileDescriptor::<span class="name">QDBusUnixFileDescriptor</span> ( const <span class="type">QDBusUnixFileDescriptor</span> &amp; <i>other</i> )</h3>
<p>Constructs a <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> object by copying <i>other</i>.</p>
<!-- @@@QDBusUnixFileDescriptor -->
<!-- $$$~QDBusUnixFileDescriptor[overload1]$$$~QDBusUnixFileDescriptor -->
<h3 class="fn"><a name="dtor.QDBusUnixFileDescriptor"></a>QDBusUnixFileDescriptor::<span class="name">~QDBusUnixFileDescriptor</span> ()</h3>
<p>Destroys this <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> object and disposes of the Unix file descriptor that it contained.</p>
<!-- @@@~QDBusUnixFileDescriptor -->
<!-- $$$fileDescriptor[overload1]$$$fileDescriptor -->
<h3 class="fn"><a name="fileDescriptor"></a><span class="type">int</span> QDBusUnixFileDescriptor::<span class="name">fileDescriptor</span> () const</h3>
<p>Returns the Unix file descriptor contained by this <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> object. An invalid file descriptor is represented by the value -1.</p>
<p>Note that the file descriptor returned by this function is owned by the <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> object and must not be stored past the lifetime of this object. It is ok to use it while this object is valid, but if one wants to store it for longer use, the file descriptor should be cloned using the Unix <tt>dup(2)</tt>, <tt>dup2(2)</tt> or <tt>dup3(2)</tt> functions.</p>
<p><b>See also </b><a href="qdbusunixfiledescriptor.html#setFileDescriptor">setFileDescriptor</a>() and <a href="qdbusunixfiledescriptor.html#isValid">isValid</a>().</p>
<!-- @@@fileDescriptor -->
<!-- $$$isSupported[overload1]$$$isSupported -->
<h3 class="fn"><a name="isSupported"></a><span class="type">bool</span> QDBusUnixFileDescriptor::<span class="name">isSupported</span> ()<tt> [static]</tt></h3>
<p>Returns true if Unix file descriptors are supported on this platform. In other words, this function returns true if this is a Unix platform.</p>
<p>Note that <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> continues to operate even if this function returns false. The only difference is that the <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> objects will always be in the <a href="qdbusunixfiledescriptor.html#isValid">isValid</a>() == false state and <a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>() will always return -1. The class will not consume any operating system resources.</p>
<!-- @@@isSupported -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QDBusUnixFileDescriptor::<span class="name">isValid</span> () const</h3>
<p>Returns true if this Unix file descriptor is valid. A valid Unix file descriptor is not -1.</p>
<p><b>See also </b><a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>().</p>
<!-- @@@isValid -->
<!-- $$$setFileDescriptor[overload1]$$$setFileDescriptorint -->
<h3 class="fn"><a name="setFileDescriptor"></a><span class="type">void</span> QDBusUnixFileDescriptor::<span class="name">setFileDescriptor</span> ( <span class="type">int</span> <i>fileDescriptor</i> )</h3>
<p>Sets the file descriptor that this <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> object holds to a copy of <i>fileDescriptor</i>. The original file descriptor is not touched and must be closed by the user.</p>
<p>Note that the value returned by <a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>() will be different from the <i>fileDescriptor</i> parameter passed.</p>
<p>If the <i>fileDescriptor</i> parameter is not valid, <a href="qdbusunixfiledescriptor.html#isValid">isValid</a>() will return false and <a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>() will return -1.</p>
<p><b>See also </b><a href="qdbusunixfiledescriptor.html#isValid">isValid</a>() and <a href="qdbusunixfiledescriptor.html#fileDescriptor">fileDescriptor</a>().</p>
<!-- @@@setFileDescriptor -->
<!-- $$$operator=[overload1]$$$operator=constQDBusUnixFileDescriptor& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QDBusUnixFileDescriptor</span> &amp; QDBusUnixFileDescriptor::<span class="name">operator=</span> ( const <span class="type">QDBusUnixFileDescriptor</span> &amp; <i>other</i> )</h3>
<p>Copies the Unix file descriptor from the <i>other</i> <a href="qdbusunixfiledescriptor.html">QDBusUnixFileDescriptor</a> object. If the current object contained a file descriptor, it will be properly disposed of before.</p>
<!-- @@@operator= -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>