Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a964702347d726c5f8ba742f8b9d5908 > files > 40

incron-0.5.9-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>incron: InotifyWatch Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>InotifyWatch Class Reference</h1><!-- doxytag: class="InotifyWatch" -->inotify watch class  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a>&gt;</code>
<p>

<p>
<a href="classInotifyWatch-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#c9c02f1dbd143eebd711eba03ac366e9">InotifyWatch</a> (const std::string &amp;rPath, int32_t uMask, bool fEnabled=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#c9c02f1dbd143eebd711eba03ac366e9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#871c16b01aa8841b36246e5b629ecaef">~InotifyWatch</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#871c16b01aa8841b36246e5b629ecaef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#855f982421402dd63d064dde328f2a59">GetDescriptor</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the watch descriptor.  <a href="#855f982421402dd63d064dde328f2a59"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#2e659c699e7d43bd0a218fe4905784d2">GetPath</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the watched file path.  <a href="#2e659c699e7d43bd0a218fe4905784d2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint32_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#f759f9baca6f4abbbaae57e076486009">GetMask</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the watch event mask.  <a href="#f759f9baca6f4abbbaae57e076486009"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#3ad7fbc55c21b3fcd08c2d1d388e14b6">SetMask</a> (uint32_t uMask)  throw (InotifyException)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the watch event mask.  <a href="#3ad7fbc55c21b3fcd08c2d1d388e14b6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classInotify.html">Inotify</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#cbf0042d06841f9503405b104e4c35d0">GetInotify</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the appropriate inotify class instance.  <a href="#cbf0042d06841f9503405b104e4c35d0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#a71aff8650fadff32a3c655ca50945f1">SetEnabled</a> (bool fEnabled)  throw (InotifyException)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enables/disables the watch.  <a href="#a71aff8650fadff32a3c655ca50945f1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#5ab551a912e5acff6a9c74baaf9ea324">IsEnabled</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks whether the watch is enabled.  <a href="#5ab551a912e5acff6a9c74baaf9ea324"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#222c911ef0e8d6f61570489ed6042e55">IsRecursive</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Checks whether the watch is recursive.  <a href="#222c911ef0e8d6f61570489ed6042e55"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html#94bfb861dc18ca5d16abfcff90db8c86">Inotify</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
inotify watch class 
<p>
It holds information about the inotify watch on a particular inode.<p>
If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. <hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="c9c02f1dbd143eebd711eba03ac366e9"></a><!-- doxytag: member="InotifyWatch::InotifyWatch" ref="c9c02f1dbd143eebd711eba03ac366e9" args="(const std::string &amp;rPath, int32_t uMask, bool fEnabled=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">InotifyWatch::InotifyWatch           </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>rPath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>uMask</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>fEnabled</em> = <code>true</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<p>
Creates an inotify watch. Because this watch is inactive it has an invalid descriptor (-1).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>rPath</em>&nbsp;</td><td>watched file path </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>uMask</em>&nbsp;</td><td>mask for events </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fEnabled</em>&nbsp;</td><td>events enabled yes/no </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="871c16b01aa8841b36246e5b629ecaef"></a><!-- doxytag: member="InotifyWatch::~InotifyWatch" ref="871c16b01aa8841b36246e5b629ecaef" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">InotifyWatch::~InotifyWatch           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="855f982421402dd63d064dde328f2a59"></a><!-- doxytag: member="InotifyWatch::GetDescriptor" ref="855f982421402dd63d064dde328f2a59" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t InotifyWatch::GetDescriptor           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the watch descriptor. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>watch descriptor; -1 for inactive watch </dd></dl>

</div>
</div><p>
<a class="anchor" name="2e659c699e7d43bd0a218fe4905784d2"></a><!-- doxytag: member="InotifyWatch::GetPath" ref="2e659c699e7d43bd0a218fe4905784d2" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const std::string&amp; InotifyWatch::GetPath           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the watched file path. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>file path </dd></dl>

</div>
</div><p>
<a class="anchor" name="f759f9baca6f4abbbaae57e076486009"></a><!-- doxytag: member="InotifyWatch::GetMask" ref="f759f9baca6f4abbbaae57e076486009" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t InotifyWatch::GetMask           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the watch event mask. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>event mask </dd></dl>

</div>
</div><p>
<a class="anchor" name="3ad7fbc55c21b3fcd08c2d1d388e14b6"></a><!-- doxytag: member="InotifyWatch::SetMask" ref="3ad7fbc55c21b3fcd08c2d1d388e14b6" args="(uint32_t uMask)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void InotifyWatch::SetMask           </td>
          <td>(</td>
          <td class="paramtype">uint32_t&nbsp;</td>
          <td class="paramname"> <em>uMask</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>  throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the watch event mask. 
<p>
If the watch is active (added to an instance of <a class="el" href="classInotify.html" title="inotify class">Inotify</a>) this method may fail due to unsuccessful re-setting the watch in the kernel.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>uMask</em>&nbsp;</td><td>event mask</td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html" title="Class for inotify exceptions.">InotifyException</a></em>&nbsp;</td><td>thrown if changing fails </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="cbf0042d06841f9503405b104e4c35d0"></a><!-- doxytag: member="InotifyWatch::GetInotify" ref="cbf0042d06841f9503405b104e4c35d0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classInotify.html">Inotify</a>* InotifyWatch::GetInotify           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the appropriate inotify class instance. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>inotify instance </dd></dl>

</div>
</div><p>
<a class="anchor" name="a71aff8650fadff32a3c655ca50945f1"></a><!-- doxytag: member="InotifyWatch::SetEnabled" ref="a71aff8650fadff32a3c655ca50945f1" args="(bool fEnabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void InotifyWatch::SetEnabled           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>fEnabled</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td>  throw (<a class="el" href="classInotifyException.html">InotifyException</a>)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Enables/disables the watch. 
<p>
If the watch is active (added to an instance of <a class="el" href="classInotify.html" title="inotify class">Inotify</a>) this method may fail due to unsuccessful re-setting the watch in the kernel.<p>
Re-setting the current state has no effect.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fEnabled</em>&nbsp;</td><td>set enabled yes/no</td></tr>
  </table>
</dl>
<dl compact><dt><b>Exceptions:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em><a class="el" href="classInotifyException.html" title="Class for inotify exceptions.">InotifyException</a></em>&nbsp;</td><td>thrown if enabling/disabling fails </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="5ab551a912e5acff6a9c74baaf9ea324"></a><!-- doxytag: member="InotifyWatch::IsEnabled" ref="5ab551a912e5acff6a9c74baaf9ea324" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool InotifyWatch::IsEnabled           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Checks whether the watch is enabled. 
<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true = enables, false = disabled </dd></dl>

</div>
</div><p>
<a class="anchor" name="222c911ef0e8d6f61570489ed6042e55"></a><!-- doxytag: member="InotifyWatch::IsRecursive" ref="222c911ef0e8d6f61570489ed6042e55" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool InotifyWatch::IsRecursive           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Checks whether the watch is recursive. 
<p>
A recursive watch monitors a directory itself and all its subdirectories. This watch is a logical object which may have many underlying kernel watches.<p>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>currently always false (recursive watches not yet supported) </dd></dl>
<dl class="attention" compact><dt><b>Attention:</b></dt><dd>Recursive watches are currently NOT supported. They are planned for future versions. </dd></dl>

</div>
</div><p>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="94bfb861dc18ca5d16abfcff90db8c86"></a><!-- doxytag: member="InotifyWatch::Inotify" ref="94bfb861dc18ca5d16abfcff90db8c86" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classInotify.html">Inotify</a><code> [friend]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="inotify-cxx_8h-source.html">inotify-cxx.h</a><li><a class="el" href="inotify-cxx_8cpp.html">inotify-cxx.cpp</a></ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jun 21 22:27:24 2009 for incron by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>