blob: ce2badd67ba9d588f5ae24ec5b08a502b88e7a8e [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crashpad: crashpad::NotifyServer::Interface Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="crashpad_doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Crashpad
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacecrashpad.html">crashpad</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1NotifyServer.html">NotifyServer</a></li><li class="navelem"><a class="el" href="classcrashpad_1_1NotifyServer_1_1Interface.html">Interface</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcrashpad_1_1NotifyServer_1_1Interface-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">crashpad::NotifyServer::Interface Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>An interface that the different request messages that are a part of the <code>notify</code> Mach subsystem can be dispatched to.
<a href="classcrashpad_1_1NotifyServer_1_1Interface.html#details">More...</a></p>
<p><code>#include &quot;util/mach/notify_server.h&quot;</code></p>
<div class="dynheader">
Inheritance diagram for crashpad::NotifyServer::Interface:</div>
<div class="dyncontent">
<div class="center">
<img src="classcrashpad_1_1NotifyServer_1_1Interface.png" usemap="#crashpad::NotifyServer::Interface_map" alt=""/>
<map id="crashpad::NotifyServer::Interface_map" name="crashpad::NotifyServer::Interface_map">
<area href="classcrashpad_1_1NotifyServer_1_1DefaultInterface.html" title="A concrete implementation of Interface that provides a default behavior for all notify routines." alt="crashpad::NotifyServer::DefaultInterface" shape="rect" coords="0,56,239,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afb31bdbba0f94be2efa0caff19a89fa4"><td class="memItemLeft" align="right" valign="top">virtual kern_return_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1NotifyServer_1_1Interface.html#afb31bdbba0f94be2efa0caff19a89fa4">DoMachNotifyPortDeleted</a> (notify_port_t notify, mach_port_name_t name, const mach_msg_trailer_t *trailer)=0</td></tr>
<tr class="memdesc:afb31bdbba0f94be2efa0caff19a89fa4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles port-deleted notifications sent by <code>mach_notify_port_deleted()</code>. <a href="classcrashpad_1_1NotifyServer_1_1Interface.html#afb31bdbba0f94be2efa0caff19a89fa4">More...</a><br /></td></tr>
<tr class="separator:afb31bdbba0f94be2efa0caff19a89fa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd3f056edee7243e1b388aed2dcd6505"><td class="memItemLeft" align="right" valign="top">virtual kern_return_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1NotifyServer_1_1Interface.html#afd3f056edee7243e1b388aed2dcd6505">DoMachNotifyPortDestroyed</a> (notify_port_t notify, mach_port_t rights, const mach_msg_trailer_t *trailer, bool *destroy_request)=0</td></tr>
<tr class="memdesc:afd3f056edee7243e1b388aed2dcd6505"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles port-destroyed notifications sent by <code>mach_notify_port_destroyed()</code>. <a href="classcrashpad_1_1NotifyServer_1_1Interface.html#afd3f056edee7243e1b388aed2dcd6505">More...</a><br /></td></tr>
<tr class="separator:afd3f056edee7243e1b388aed2dcd6505"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9818bb1f746ab470b06daffa53f4a3f6"><td class="memItemLeft" align="right" valign="top">virtual kern_return_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1NotifyServer_1_1Interface.html#a9818bb1f746ab470b06daffa53f4a3f6">DoMachNotifyNoSenders</a> (notify_port_t notify, mach_port_mscount_t mscount, const mach_msg_trailer_t *trailer)=0</td></tr>
<tr class="memdesc:a9818bb1f746ab470b06daffa53f4a3f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles no-senders notifications sent by <code>mach_notify_no_senders()</code>. <a href="classcrashpad_1_1NotifyServer_1_1Interface.html#a9818bb1f746ab470b06daffa53f4a3f6">More...</a><br /></td></tr>
<tr class="separator:a9818bb1f746ab470b06daffa53f4a3f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39d4166913a905e3354cc2f689869b0e"><td class="memItemLeft" align="right" valign="top">virtual kern_return_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1NotifyServer_1_1Interface.html#a39d4166913a905e3354cc2f689869b0e">DoMachNotifySendOnce</a> (notify_port_t notify, const mach_msg_trailer_t *trailer)=0</td></tr>
<tr class="memdesc:a39d4166913a905e3354cc2f689869b0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles send-once notifications sent by <code>mach_notify_send_once()</code>. <a href="classcrashpad_1_1NotifyServer_1_1Interface.html#a39d4166913a905e3354cc2f689869b0e">More...</a><br /></td></tr>
<tr class="separator:a39d4166913a905e3354cc2f689869b0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14dd1d58279338be03f2d8bcb4cec552"><td class="memItemLeft" align="right" valign="top">virtual kern_return_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcrashpad_1_1NotifyServer_1_1Interface.html#a14dd1d58279338be03f2d8bcb4cec552">DoMachNotifyDeadName</a> (notify_port_t notify, mach_port_name_t name, const mach_msg_trailer_t *trailer)=0</td></tr>
<tr class="memdesc:a14dd1d58279338be03f2d8bcb4cec552"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handles dead-name notifications sent by <code>mach_notify_dead_name()</code>. <a href="classcrashpad_1_1NotifyServer_1_1Interface.html#a14dd1d58279338be03f2d8bcb4cec552">More...</a><br /></td></tr>
<tr class="separator:a14dd1d58279338be03f2d8bcb4cec552"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>An interface that the different request messages that are a part of the <code>notify</code> Mach subsystem can be dispatched to. </p>
<p>Default implementations of all methods are available in the <a class="el" href="classcrashpad_1_1NotifyServer_1_1DefaultInterface.html" title="A concrete implementation of Interface that provides a default behavior for all notify routines.">DefaultInterface</a> class. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a14dd1d58279338be03f2d8bcb4cec552"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14dd1d58279338be03f2d8bcb4cec552">&#9670;&nbsp;</a></span>DoMachNotifyDeadName()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual kern_return_t crashpad::NotifyServer::Interface::DoMachNotifyDeadName </td>
<td>(</td>
<td class="paramtype">notify_port_t&#160;</td>
<td class="paramname"><em>notify</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mach_port_name_t&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const mach_msg_trailer_t *&#160;</td>
<td class="paramname"><em>trailer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Handles dead-name notifications sent by <code>mach_notify_dead_name()</code>. </p>
<p>A dead-name notification is generated when a port with a dead-name notification request is destroyed and the right becomes a dead name.</p>
<p>This behaves equivalently to a <code>do_mach_notify_dead_name()</code> function used with <code>notify_server()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">notify</td><td>The Mach port that the notification was sent to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The dead name. Although this is transferred as a <code>mach_port_name_t</code> and not a <code>mach_port_t</code>, the callee assumes an additional reference to this port when this method is called. See the note below. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">trailer</td><td>The trailer received with the notification message.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>When a dead-name notification is generated, the user reference count of the dead name is incremented. A send right with one reference that becomes a dead name will have one dead-name reference, and the dead-name notification will add another dead-name reference, for a total of 2. <a class="el" href="classcrashpad_1_1NotifyServer_1_1Interface.html#a14dd1d58279338be03f2d8bcb4cec552" title="Handles dead-name notifications sent by mach_notify_dead_name().">DoMachNotifyDeadName()</a> implementations must take care to deallocate this extra reference. There is no <em>destroy_request</em> parameter to simplify this operation because dead-name notifications carry a port name only (<em>name</em> is of type <code>mach_port_name_t</code>) without transferring port rights, and are thus not complex Mach messages. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1NotifyServer_1_1DefaultInterface.html#a0373d989a72ee8c37ab4977f8ffb836a">crashpad::NotifyServer::DefaultInterface</a>.</p>
</div>
</div>
<a id="a9818bb1f746ab470b06daffa53f4a3f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9818bb1f746ab470b06daffa53f4a3f6">&#9670;&nbsp;</a></span>DoMachNotifyNoSenders()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual kern_return_t crashpad::NotifyServer::Interface::DoMachNotifyNoSenders </td>
<td>(</td>
<td class="paramtype">notify_port_t&#160;</td>
<td class="paramname"><em>notify</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mach_port_mscount_t&#160;</td>
<td class="paramname"><em>mscount</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const mach_msg_trailer_t *&#160;</td>
<td class="paramname"><em>trailer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Handles no-senders notifications sent by <code>mach_notify_no_senders()</code>. </p>
<p>A no-senders notification is generated when a receive right with a no-senders notification request loses its last corresponding send right.</p>
<p>This behaves equivalently to a <code>do_mach_notify_no_senders()</code> function used with <code>notify_server()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">notify</td><td>The Mach port that the notification was sent to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mscount</td><td>The value of the sender-less port’s make-send count at the time the notification was generated. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">trailer</td><td>The trailer received with the notification message. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1NotifyServer_1_1DefaultInterface.html#aed9cb9e85f275edd5ee72eca34888188">crashpad::NotifyServer::DefaultInterface</a>.</p>
</div>
</div>
<a id="afb31bdbba0f94be2efa0caff19a89fa4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb31bdbba0f94be2efa0caff19a89fa4">&#9670;&nbsp;</a></span>DoMachNotifyPortDeleted()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual kern_return_t crashpad::NotifyServer::Interface::DoMachNotifyPortDeleted </td>
<td>(</td>
<td class="paramtype">notify_port_t&#160;</td>
<td class="paramname"><em>notify</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mach_port_name_t&#160;</td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const mach_msg_trailer_t *&#160;</td>
<td class="paramname"><em>trailer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Handles port-deleted notifications sent by <code>mach_notify_port_deleted()</code>. </p>
<p>A port-deleted notification is generated when a port with a dead-name notification request is destroyed and the port name becomes available for reuse.</p>
<p>This behaves equivalently to a <code>do_mach_notify_port_deleted()</code> function used with <code>notify_server()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">notify</td><td>The Mach port that the notification was sent to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>The name that formerly referenced the deleted port. When this method is called, <em>name</em> no longer corresponds to the port that has been deleted, and may be reused for another purpose. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">trailer</td><td>The trailer received with the notification message. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1NotifyServer_1_1DefaultInterface.html#a462b8fbfe77693bc77e4dc394d89398f">crashpad::NotifyServer::DefaultInterface</a>.</p>
</div>
</div>
<a id="afd3f056edee7243e1b388aed2dcd6505"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd3f056edee7243e1b388aed2dcd6505">&#9670;&nbsp;</a></span>DoMachNotifyPortDestroyed()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual kern_return_t crashpad::NotifyServer::Interface::DoMachNotifyPortDestroyed </td>
<td>(</td>
<td class="paramtype">notify_port_t&#160;</td>
<td class="paramname"><em>notify</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mach_port_t&#160;</td>
<td class="paramname"><em>rights</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const mach_msg_trailer_t *&#160;</td>
<td class="paramname"><em>trailer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool *&#160;</td>
<td class="paramname"><em>destroy_request</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Handles port-destroyed notifications sent by <code>mach_notify_port_destroyed()</code>. </p>
<p>A port-destroyed notification is generated when a receive right with a port-destroyed notification request is destroyed. Rather than destroying the receive right, it is transferred via this notification’s <em>rights</em> parameter.</p>
<p>This behaves equivalently to a <code>do_mach_notify_port_destroyed()</code> function used with <code>notify_server()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">notify</td><td>The Mach port that the notification was sent to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rights</td><td>A receive right for the port that would have been destroyed. The callee takes ownership of this port, however, if the callee does not wish to take ownership, it may set <em>destroy_request</em> to <code>true</code>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">trailer</td><td>The trailer received with the notification message. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">destroy_request</td><td><code>true</code> if the request message is to be destroyed even when this method returns success. See <a class="el" href="classcrashpad_1_1MachMessageServer_1_1Interface.html" title="A Mach RPC callback interface, called by Run().">MachMessageServer::Interface</a>. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1NotifyServer_1_1DefaultInterface.html#a26e577092f3d7289a950545319e29d7f">crashpad::NotifyServer::DefaultInterface</a>.</p>
</div>
</div>
<a id="a39d4166913a905e3354cc2f689869b0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39d4166913a905e3354cc2f689869b0e">&#9670;&nbsp;</a></span>DoMachNotifySendOnce()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual kern_return_t crashpad::NotifyServer::Interface::DoMachNotifySendOnce </td>
<td>(</td>
<td class="paramtype">notify_port_t&#160;</td>
<td class="paramname"><em>notify</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const mach_msg_trailer_t *&#160;</td>
<td class="paramname"><em>trailer</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Handles send-once notifications sent by <code>mach_notify_send_once()</code>. </p>
<p>A send-once notification is generated when a send-once right is destroyed without being used.</p>
<p>This behaves equivalently to a <code>do_mach_notify_send_once()</code> function used with <code>notify_server()</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">notify</td><td>The Mach port that the notification was sent to. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">trailer</td><td>The trailer received with the notification message.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Unlike the other notifications in the <code>notify</code> subsystem, send-once notifications are not generated as a result of a notification request, but are generated any time a send-once right is destroyed rather than being used. The notification is sent via the send-once right to its receiver. These notifications are more useful for clients, not servers. Send-once notifications are normally handled by MIG-generated client routines, which make send-once rights for their reply ports and interpret send-once notifications as a signal that there will be no reply. Although not expected to be primarily useful for servers, this method is provided because send-once notifications are defined as a part of the <code>notify</code> subsystem. </dd></dl>
<p>Implemented in <a class="el" href="classcrashpad_1_1NotifyServer_1_1DefaultInterface.html#a3a5e82e6bd51eac1dbff7aac2c7b6bf4">crashpad::NotifyServer::DefaultInterface</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>util/mach/notify_server.h</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>