141 lines
14 KiB
HTML
141 lines
14 KiB
HTML
<!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" lang="en-US">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.6"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>uvw: src/uvw/fs_poll.h Source File</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" />
|
|
</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 id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">uvw<span id="projectnumber"> 3.1.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.6 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @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:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(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">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_98934c98f70735fe3a272005a9eb8736.html">uvw</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">fs_poll.h</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef UVW_FS_POLL_INCLUDE_H</span></div>
|
|
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define UVW_FS_POLL_INCLUDE_H</span></div>
|
|
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
|
|
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="preprocessor">#include <chrono></span></div>
|
|
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#include <string></span></div>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#include <uv.h></span></div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#include "config.h"</span></div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "handle.hpp"</span></div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include "loop.h"</span></div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include "util.h"</span></div>
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
|
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceuvw.html">uvw</a> {</div>
|
|
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span> </div>
|
|
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"><a class="line" href="structuvw_1_1fs__poll__event.html"> 15</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structuvw_1_1fs__poll__event.html">fs_poll_event</a> {</div>
|
|
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> <span class="keyword">explicit</span> <a class="code hl_struct" href="structuvw_1_1fs__poll__event.html">fs_poll_event</a>(<a class="code hl_typedef" href="namespaceuvw.html#a7f8333af7e3de1e46417f57d930c636e">file_info</a> previous, <a class="code hl_typedef" href="namespaceuvw.html#a7f8333af7e3de1e46417f57d930c636e">file_info</a> current) <span class="keyword">noexcept</span>;</div>
|
|
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
|
|
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"><a class="line" href="structuvw_1_1fs__poll__event.html#af7697443fe95e146a343f66c8f945527"> 18</a></span> <a class="code hl_typedef" href="namespaceuvw.html#a7f8333af7e3de1e46417f57d930c636e">file_info</a> <a class="code hl_variable" href="structuvw_1_1fs__poll__event.html#af7697443fe95e146a343f66c8f945527">prev</a>; </div>
|
|
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"><a class="line" href="structuvw_1_1fs__poll__event.html#a00e3768768134a46cd33980215084d15"> 19</a></span> <a class="code hl_typedef" href="namespaceuvw.html#a7f8333af7e3de1e46417f57d930c636e">file_info</a> <a class="code hl_variable" href="structuvw_1_1fs__poll__event.html#a00e3768768134a46cd33980215084d15">curr</a>; </div>
|
|
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>};</div>
|
|
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="classuvw_1_1fs__poll__handle.html"> 31</a></span><span class="keyword">class </span><a class="code hl_class" href="classuvw_1_1fs__poll__handle.html">fs_poll_handle</a> final: <span class="keyword">public</span> <a class="code hl_class" href="classuvw_1_1handle.html">handle</a><fs_poll_handle, uv_fs_poll_t, fs_poll_event> {</div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keyword">static</span> <span class="keywordtype">void</span> start_callback(uv_fs_poll_t *hndl, <span class="keywordtype">int</span> status, <span class="keyword">const</span> uv_stat_t *prev, <span class="keyword">const</span> uv_stat_t *curr);</div>
|
|
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
|
|
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">public</span>:</div>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">using </span>time = std::chrono::duration<unsigned int, std::milli>;</div>
|
|
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
|
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">using </span>handle::handle;</div>
|
|
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
|
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classuvw_1_1fs__poll__handle.html#a7c0d1a480d134556ffca8608d7754272"> 43</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classuvw_1_1fs__poll__handle.html#a7c0d1a480d134556ffca8608d7754272">init</a>() final;</div>
|
|
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
|
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="classuvw_1_1fs__poll__handle.html#a31efa9bc6a0ff368fca2086475b54787"> 54</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classuvw_1_1fs__poll__handle.html#a31efa9bc6a0ff368fca2086475b54787">start</a>(const std::<span class="keywordtype">string</span> &file, time interval);</div>
|
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
|
|
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="classuvw_1_1fs__poll__handle.html#aca65d6643e324e866092e9cf2b738183"> 60</a></span> <span class="keywordtype">int</span> <a class="code hl_function" href="classuvw_1_1fs__poll__handle.html#aca65d6643e324e866092e9cf2b738183">stop</a>();</div>
|
|
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
|
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="classuvw_1_1fs__poll__handle.html#a5977b24559d0bb1a50dcb3c7cee64aeb"> 67</a></span> std::<span class="keywordtype">string</span> <a class="code hl_function" href="classuvw_1_1fs__poll__handle.html#a5977b24559d0bb1a50dcb3c7cee64aeb">path</a>() noexcept;</div>
|
|
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>};</div>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
|
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>} <span class="comment">// namespace uvw</span></div>
|
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
|
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="preprocessor">#ifndef UVW_AS_LIB</span></div>
|
|
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="preprocessor"># include "fs_poll.cpp"</span></div>
|
|
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
|
|
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="preprocessor">#endif </span><span class="comment">// UVW_FS_POLL_INCLUDE_H</span></div>
|
|
<div class="ttc" id="aclassuvw_1_1fs__poll__handle_html"><div class="ttname"><a href="classuvw_1_1fs__poll__handle.html">uvw::fs_poll_handle</a></div><div class="ttdoc">The fs poll handle.</div><div class="ttdef"><b>Definition:</b> <a href="fs__poll_8h_source.html#l00031">fs_poll.h:31</a></div></div>
|
|
<div class="ttc" id="aclassuvw_1_1fs__poll__handle_html_a31efa9bc6a0ff368fca2086475b54787"><div class="ttname"><a href="classuvw_1_1fs__poll__handle.html#a31efa9bc6a0ff368fca2086475b54787">uvw::fs_poll_handle::start</a></div><div class="ttdeci">int start(const std::string &file, time interval)</div><div class="ttdoc">Starts the handle.</div></div>
|
|
<div class="ttc" id="aclassuvw_1_1fs__poll__handle_html_a5977b24559d0bb1a50dcb3c7cee64aeb"><div class="ttname"><a href="classuvw_1_1fs__poll__handle.html#a5977b24559d0bb1a50dcb3c7cee64aeb">uvw::fs_poll_handle::path</a></div><div class="ttdeci">std::string path() noexcept</div><div class="ttdoc">Gets the path being monitored by the handle.</div></div>
|
|
<div class="ttc" id="aclassuvw_1_1fs__poll__handle_html_a7c0d1a480d134556ffca8608d7754272"><div class="ttname"><a href="classuvw_1_1fs__poll__handle.html#a7c0d1a480d134556ffca8608d7754272">uvw::fs_poll_handle::init</a></div><div class="ttdeci">int init() final</div><div class="ttdoc">Initializes the handle.</div></div>
|
|
<div class="ttc" id="aclassuvw_1_1fs__poll__handle_html_aca65d6643e324e866092e9cf2b738183"><div class="ttname"><a href="classuvw_1_1fs__poll__handle.html#aca65d6643e324e866092e9cf2b738183">uvw::fs_poll_handle::stop</a></div><div class="ttdeci">int stop()</div><div class="ttdoc">Stops the handle.</div></div>
|
|
<div class="ttc" id="aclassuvw_1_1handle_html"><div class="ttname"><a href="classuvw_1_1handle.html">uvw::handle</a></div><div class="ttdoc">Handle base class.</div><div class="ttdef"><b>Definition:</b> <a href="handle_8hpp_source.html#l00023">handle.hpp:23</a></div></div>
|
|
<div class="ttc" id="anamespaceuvw_html"><div class="ttname"><a href="namespaceuvw.html">uvw</a></div><div class="ttdoc">uvw default namespace.</div><div class="ttdef"><b>Definition:</b> <a href="async_8h_source.html#l00008">async.h:8</a></div></div>
|
|
<div class="ttc" id="anamespaceuvw_html_a7f8333af7e3de1e46417f57d930c636e"><div class="ttname"><a href="namespaceuvw.html#a7f8333af7e3de1e46417f57d930c636e">uvw::file_info</a></div><div class="ttdeci">uv_stat_t file_info</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00096">util.h:96</a></div></div>
|
|
<div class="ttc" id="astructuvw_1_1fs__poll__event_html"><div class="ttname"><a href="structuvw_1_1fs__poll__event.html">uvw::fs_poll_event</a></div><div class="ttdoc">Fs pos event.</div><div class="ttdef"><b>Definition:</b> <a href="fs__poll_8h_source.html#l00015">fs_poll.h:15</a></div></div>
|
|
<div class="ttc" id="astructuvw_1_1fs__poll__event_html_a00e3768768134a46cd33980215084d15"><div class="ttname"><a href="structuvw_1_1fs__poll__event.html#a00e3768768134a46cd33980215084d15">uvw::fs_poll_event::curr</a></div><div class="ttdeci">file_info curr</div><div class="ttdef"><b>Definition:</b> <a href="fs__poll_8h_source.html#l00019">fs_poll.h:19</a></div></div>
|
|
<div class="ttc" id="astructuvw_1_1fs__poll__event_html_af7697443fe95e146a343f66c8f945527"><div class="ttname"><a href="structuvw_1_1fs__poll__event.html#af7697443fe95e146a343f66c8f945527">uvw::fs_poll_event::prev</a></div><div class="ttdeci">file_info prev</div><div class="ttdef"><b>Definition:</b> <a href="fs__poll_8h_source.html#l00018">fs_poll.h:18</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|