blob: 9a61b04b180020f4b0b3743b11acac58967ef45b [file] [log] [blame]
<!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"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Apache log4cxx: FileWatchdog 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</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>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</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 style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="http://logging.apache.org/log4cxx">Apache log4cxx</a>
&#160;<span id="projectnumber">Version 0.10.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</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>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classlog4cxx_1_1helpers_1_1_file_watchdog.html','');});
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classlog4cxx_1_1helpers_1_1_file_watchdog-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">FileWatchdog Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Check every now and then that a certain file has not changed.
<a href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#details">More...</a></p>
<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:a51a44ce5ec6073f875da7a1896946b46"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a51a44ce5ec6073f875da7a1896946b46">~FileWatchdog</a> ()</td></tr>
<tr class="separator:a51a44ce5ec6073f875da7a1896946b46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aefe6623814493be741100e5a025b069e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#aefe6623814493be741100e5a025b069e">setDelay</a> (long delay1)</td></tr>
<tr class="memdesc:aefe6623814493be741100e5a025b069e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the delay to observe between each check of the file changes. <a href="#aefe6623814493be741100e5a025b069e">More...</a><br /></td></tr>
<tr class="separator:aefe6623814493be741100e5a025b069e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60de64d75454385b23995437f1d72669"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a60de64d75454385b23995437f1d72669">start</a> ()</td></tr>
<tr class="separator:a60de64d75454385b23995437f1d72669"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a339ae144d23b36d09a21da4767206ea3"><td class="memItemLeft" align="right" valign="top">static long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a339ae144d23b36d09a21da4767206ea3">DEFAULT_DELAY</a></td></tr>
<tr class="memdesc:a339ae144d23b36d09a21da4767206ea3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The default delay between every file modification check, set to 60 seconds. <a href="#a339ae144d23b36d09a21da4767206ea3">More...</a><br /></td></tr>
<tr class="separator:a339ae144d23b36d09a21da4767206ea3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a44a68d4e8c945a01dda40a8e3014ac27"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a44a68d4e8c945a01dda40a8e3014ac27">FileWatchdog</a> (const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;filename)</td></tr>
<tr class="separator:a44a68d4e8c945a01dda40a8e3014ac27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8954ea8a0bff2e80da8c1dbec6a621d2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a8954ea8a0bff2e80da8c1dbec6a621d2">doOnChange</a> ()=0</td></tr>
<tr class="separator:a8954ea8a0bff2e80da8c1dbec6a621d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a028e7d72c2a034609e3c097701430e4f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a028e7d72c2a034609e3c097701430e4f">checkAndConfigure</a> ()</td></tr>
<tr class="separator:a028e7d72c2a034609e3c097701430e4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a5eea5bedc36e0a29487dac7dd5725035"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classlog4cxx_1_1_file.html">File</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a5eea5bedc36e0a29487dac7dd5725035">file</a></td></tr>
<tr class="memdesc:a5eea5bedc36e0a29487dac7dd5725035"><td class="mdescLeft">&#160;</td><td class="mdescRight">The name of the file to observe for changes. <a href="#a5eea5bedc36e0a29487dac7dd5725035">More...</a><br /></td></tr>
<tr class="separator:a5eea5bedc36e0a29487dac7dd5725035"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3465e71050ee8220d3f57ba66c03e435"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a3465e71050ee8220d3f57ba66c03e435">delay</a></td></tr>
<tr class="memdesc:a3465e71050ee8220d3f57ba66c03e435"><td class="mdescLeft">&#160;</td><td class="mdescRight">The delay to observe between every check. <a href="#a3465e71050ee8220d3f57ba66c03e435">More...</a><br /></td></tr>
<tr class="separator:a3465e71050ee8220d3f57ba66c03e435"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12e31c584480d7af070a5a8c3e4a9b67"><td class="memItemLeft" align="right" valign="top"><a class="el" href="log4cxx_8h.html#adcf85375d350e7045ac5570a2c922aec">log4cxx_time_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a12e31c584480d7af070a5a8c3e4a9b67">lastModif</a></td></tr>
<tr class="separator:a12e31c584480d7af070a5a8c3e4a9b67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2194125bc0c6250f421b3ee503b2d0d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#aa2194125bc0c6250f421b3ee503b2d0d">warnedAlready</a></td></tr>
<tr class="separator:aa2194125bc0c6250f421b3ee503b2d0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afad9245c0b4d29181807680897ec7500"><td class="memItemLeft" align="right" valign="top">volatile unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#afad9245c0b4d29181807680897ec7500">interrupted</a></td></tr>
<tr class="separator:afad9245c0b4d29181807680897ec7500"><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>Check every now and then that a certain file has not changed. </p>
<p>If it has, then call the <a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html#a8954ea8a0bff2e80da8c1dbec6a621d2">doOnChange</a> method. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a51a44ce5ec6073f875da7a1896946b46"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ~<a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html">FileWatchdog</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a44a68d4e8c945a01dda40a8e3014ac27"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classlog4cxx_1_1helpers_1_1_file_watchdog.html">FileWatchdog</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classlog4cxx_1_1_file.html">File</a> &amp;&#160;</td>
<td class="paramname"><em>filename</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a028e7d72c2a034609e3c097701430e4f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void checkAndConfigure </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a8954ea8a0bff2e80da8c1dbec6a621d2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void doOnChange </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="aefe6623814493be741100e5a025b069e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void setDelay </td>
<td>(</td>
<td class="paramtype">long&#160;</td>
<td class="paramname"><em>delay1</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the delay to observe between each check of the file changes. </p>
</div>
</div>
<a class="anchor" id="a60de64d75454385b23995437f1d72669"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void start </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a339ae144d23b36d09a21da4767206ea3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">long DEFAULT_DELAY</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The default delay between every file modification check, set to 60 seconds. </p>
</div>
</div>
<a class="anchor" id="a3465e71050ee8220d3f57ba66c03e435"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">long delay</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The delay to observe between every check. </p>
<p>By default set DEFAULT_DELAY. </p>
</div>
</div>
<a class="anchor" id="a5eea5bedc36e0a29487dac7dd5725035"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classlog4cxx_1_1_file.html">File</a> file</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The name of the file to observe for changes. </p>
</div>
</div>
<a class="anchor" id="afad9245c0b4d29181807680897ec7500"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">volatile unsigned int interrupted</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="a12e31c584480d7af070a5a8c3e4a9b67"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="log4cxx_8h.html#adcf85375d350e7045ac5570a2c922aec">log4cxx_time_t</a> lastModif</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a class="anchor" id="aa2194125bc0c6250f421b3ee503b2d0d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool warnedAlready</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="filewatchdog_8h.html">filewatchdog.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
</body>
</html>