Current File : //usr/share/doc/dbus/api/group__DBusServerLaunchd.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>D-Bus: DBusServer implementations for Launchd</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">D-Bus
   &#160;<span id="projectnumber">1.8.20</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">DBusServer implementations for Launchd</div>  </div>
<div class="ingroups"><a class="el" href="group__DBusInternals.html">D-Bus secret internal implementation details</a></div></div><!--header-->
<div class="contents">

<p>Implementation details of <a class="el" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a> with Launchd support.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServerLaunchd.html#ga5d09a40275e9a28d35ef3474875487a2">_dbus_server_new_for_launchd</a> (const char *launchd_env_var, <a class="el" href="structDBusError.html">DBusError</a> *error)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new server from launchd.  <a href="#ga5d09a40275e9a28d35ef3474875487a2"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Implementation details of <a class="el" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a> with Launchd support. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga5d09a40275e9a28d35ef3474875487a2"></a><!-- doxytag: member="dbus&#45;server&#45;launchd.c::_dbus_server_new_for_launchd" ref="ga5d09a40275e9a28d35ef3474875487a2" args="(const char *launchd_env_var, DBusError *error)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structDBusServer.html">DBusServer</a>* <a class="el" href="group__DBusServerLaunchd.html#ga5d09a40275e9a28d35ef3474875487a2">_dbus_server_new_for_launchd</a> </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>launchd_env_var</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structDBusError.html">DBusError</a> *&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new server from launchd. </p>
<p>launchd has allocaed a socket for us. We now query launchd for the file descriptor of this socket and create a server on it. In addition we inherit launchd's environment which holds a variable containing the path to the socket. This is used to init the server's address which is passed to autolaunched services.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">launchd_env_var</td><td>the environment variable which holds the unix path to the socket </td></tr>
    <tr><td class="paramname">error</td><td>location to store reason for failure. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new server, or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> on failure. </dd></dl>

<p>Definition at line <a class="el" href="dbus-server-launchd_8c_source.html#l00065">65</a> of file <a class="el" href="dbus-server-launchd_8c_source.html">dbus-server-launchd.c</a>.</p>

<p>References <a class="el" href="dbus-sysdeps-unix_8c_source.html#l02937">_dbus_fd_set_close_on_exec()</a>, <a class="el" href="dbus-sysdeps_8c_source.html#l00185">_dbus_getenv()</a>, <a class="el" href="dbus-server-socket_8c_source.html#l00280">_dbus_server_new_for_socket()</a>, <a class="el" href="dbus-string_8c_source.html#l00918">_dbus_string_append()</a>, <a class="el" href="dbus-string_8c_source.html#l00242">_dbus_string_free()</a>, <a class="el" href="dbus-string_8c_source.html#l00175">_dbus_string_init()</a>, <a class="el" href="dbus-internals_8c_source.html#l00230">_dbus_warn()</a>, <a class="el" href="dbus-protocol_8h_source.html#l00362">DBUS_ERROR_BAD_ADDRESS</a>, <a class="el" href="dbus-protocol_8h_source.html#l00350">DBUS_ERROR_FAILED</a>, <a class="el" href="dbus-protocol_8h_source.html#l00360">DBUS_ERROR_IO_ERROR</a>, <a class="el" href="dbus-protocol_8h_source.html#l00366">DBUS_ERROR_LIMITS_EXCEEDED</a>, <a class="el" href="dbus-protocol_8h_source.html#l00352">DBUS_ERROR_NO_MEMORY</a>, <a class="el" href="dbus-protocol_8h_source.html#l00372">DBUS_ERROR_NO_SERVER</a>, <a class="el" href="dbus-errors_8c_source.html#l00354">dbus_set_error()</a>, <a class="el" href="dbus-sysdeps_8c_source.html#l00114">dbus_setenv()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>

<p>Referenced by <a class="el" href="dbus-server-unix_8c_source.html#l00054">_dbus_server_listen_platform_specific()</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 3 2016 17:50:33 for D-Bus by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>