1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3
<title>PyinotifyHandler.PyinotifyHandler Class Reference</title>
4
<link href="doxygen.css" rel="stylesheet" type="text/css">
5
<link href="tabs.css" rel="stylesheet" type="text/css">
7
<!-- Generated by Doxygen 1.5.4 -->
10
<li><a href="index.html"><span>Main Page</span></a></li>
11
<li><a href="namespaces.html"><span>Packages</span></a></li>
12
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
13
<li><a href="files.html"><span>Files</span></a></li>
18
<li><a href="annotated.html"><span>Class List</span></a></li>
19
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
20
<li><a href="functions.html"><span>Class Members</span></a></li>
24
<a class="el" href="namespacePyinotifyHandler.html">PyinotifyHandler</a>.<a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html">PyinotifyHandler</a></div>
25
<h1>PyinotifyHandler.PyinotifyHandler Class Reference</h1><!-- doxytag: class="PyinotifyHandler::PyinotifyHandler" -->a handler for inotiy events
26
<a href="#_details">More...</a>
30
<a href="classPyinotifyHandler_1_1PyinotifyHandler-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
32
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
33
<tr><td class="memItemLeft" nowrap align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#113602b5ed23c72441b6cf662082a8bd">addToWatched</a></td></tr>
35
<tr><td class="mdescLeft"> </td><td class="mdescRight">adds a single path to __watched. <a href="#113602b5ed23c72441b6cf662082a8bd"></a><br></td></tr>
36
<tr><td class="memItemLeft" nowrap align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#22670c341e72bab2fd5b59322fea0c59">__init__</a></td></tr>
38
<tr><td class="mdescLeft"> </td><td class="mdescRight">takes a list of paths and adds each one to watched. <a href="#22670c341e72bab2fd5b59322fea0c59"></a><br></td></tr>
39
<tr><td class="memItemLeft" nowrap align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#302c67f73298e8891978becab9cc8e8d">startNotifier</a></td></tr>
41
<tr><td class="mdescLeft"> </td><td class="mdescRight">Run the notifier in a separate thread. <a href="#302c67f73298e8891978becab9cc8e8d"></a><br></td></tr>
42
<tr><td class="memItemLeft" nowrap align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#ff2021a14229f496a22df9571f89fb43">stopNotifier</a></td></tr>
44
<tr><td class="mdescLeft"> </td><td class="mdescRight">stop the notifier <a href="#ff2021a14229f496a22df9571f89fb43"></a><br></td></tr>
45
<tr><td class="memItemLeft" nowrap align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#f489ba7cc83cbd7a8483b0c909b6baa4">extractEvent</a></td></tr>
47
<tr><td class="mdescLeft"> </td><td class="mdescRight">extract the first event on the top of the queue <a href="#f489ba7cc83cbd7a8483b0c909b6baa4"></a><br></td></tr>
48
<tr><td class="memItemLeft" nowrap align="right" valign="top">def </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#bccb3c6a0b0137dc91e119231d3e3b85">getPipe</a></td></tr>
50
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the write file descriptor of the pipe <a href="#bccb3c6a0b0137dc91e119231d3e3b85"></a><br></td></tr>
51
<tr><td colspan="2"><br><h2>Static Private Attributes</h2></td></tr>
52
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#6ae48bfa0d3281f747818f058c8c7f97">__watched</a> = None</td></tr>
54
<tr><td class="mdescLeft"> </td><td class="mdescRight">Contains paths and masks for watched resources. <a href="#6ae48bfa0d3281f747818f058c8c7f97"></a><br></td></tr>
55
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#abb87bcd8996436fff043bda65e8c0a4">__notifier</a> = None</td></tr>
57
<tr><td class="mdescLeft"> </td><td class="mdescRight">a threaded notifier of events <a href="#abb87bcd8996436fff043bda65e8c0a4"></a><br></td></tr>
58
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#8b92130a5157b7d7dcd7e182e50de0e4">__handler</a> = None</td></tr>
60
<tr><td class="mdescLeft"> </td><td class="mdescRight">inhertis from pyinotify.ProcessEvent Contains functions to handle events <a href="#8b92130a5157b7d7dcd7e182e50de0e4"></a><br></td></tr>
61
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#07bc0444e3e130b2295c3c05215ef505">__blacklist</a> = None</td></tr>
63
<tr><td class="mdescLeft"> </td><td class="mdescRight">list of files/dirs that we don't want to monitorize <a href="#07bc0444e3e130b2295c3c05215ef505"></a><br></td></tr>
64
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#baed0369b21e0d42db22a6b0705592dd">__reBlacklist</a> = None</td></tr>
66
<tr><td class="mdescLeft"> </td><td class="mdescRight">list of blacklisted patterns <a href="#baed0369b21e0d42db22a6b0705592dd"></a><br></td></tr>
67
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#7d1737a66e61d70aebbb3d4d20871dc6">__whitelist</a> = None</td></tr>
69
<tr><td class="mdescLeft"> </td><td class="mdescRight">list of files/dirs that we want to monitorize <a href="#7d1737a66e61d70aebbb3d4d20871dc6"></a><br></td></tr>
70
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#337afd2383c71b9918b65c59267d94e8">__text</a> = None</td></tr>
72
<tr><td class="mdescLeft"> </td><td class="mdescRight">buffer to write events <a href="#337afd2383c71b9918b65c59267d94e8"></a><br></td></tr>
74
<hr><a name="_details"></a><h2>Detailed Description</h2>
75
a handler for inotiy events
77
This module allows HD Lorean to watch events in the directory tree We obtain a whitelist and a blacklist of files from the module <a class="el" href="namespaceConfigFileManager.html">ConfigFileManager</a> and use them to enqueue the events <dl class="author" compact><dt><b>Author:</b></dt><dd>: Jorge </dd></dl>
78
<hr><h2>Member Function Documentation</h2>
79
<a class="anchor" name="113602b5ed23c72441b6cf662082a8bd"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::addToWatched" ref="113602b5ed23c72441b6cf662082a8bd" args="" -->
81
<div class="memproto">
82
<table class="memname">
84
<td class="memname">def PyinotifyHandler.PyinotifyHandler.addToWatched </td>
86
<td class="paramtype"> </td>
87
<td class="paramname"> <em>self</em>, </td>
90
<td class="paramkey"></td>
92
<td class="paramtype"> </td>
93
<td class="paramname"> <em>path</em></td><td> </td>
98
<td></td><td></td><td width="100%"></td>
105
adds a single path to __watched.
107
checks if path exist and if it refers to file or directory then adds path to watched resources with the appropriate flags <dl compact><dt><b>Parameters:</b></dt><dd>
108
<table border="0" cellspacing="2" cellpadding="0">
109
<tr><td valign="top"></td><td valign="top"><em>path,:</em> </td><td>type=string add the file or directoriy path to watched </td></tr>
112
<dl class="author" compact><dt><b>Author:</b></dt><dd>: Jorge </dd></dl>
116
<a class="anchor" name="22670c341e72bab2fd5b59322fea0c59"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__init__" ref="22670c341e72bab2fd5b59322fea0c59" args="" -->
117
<div class="memitem">
118
<div class="memproto">
119
<table class="memname">
121
<td class="memname">def PyinotifyHandler.PyinotifyHandler.__init__ </td>
123
<td class="paramtype"> </td>
124
<td class="paramname"> <em>self</em>, </td>
127
<td class="paramkey"></td>
129
<td class="paramtype"> </td>
130
<td class="paramname"> <em>text</em></td><td> </td>
135
<td></td><td></td><td width="100%"></td>
142
takes a list of paths and adds each one to watched.
144
An instance of <a class="el" href="namespaceConfigFileManager.html">ConfigFileManager</a> is created to obtain the watched, white and reBlack sets The handler is initialized with those sets <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="namespaceHandler.html">Handler</a> a notifier is created with the watched set and the handler </dd></dl>
145
<dl class="author" compact><dt><b>Author:</b></dt><dd>: Jorge </dd></dl>
149
<a class="anchor" name="302c67f73298e8891978becab9cc8e8d"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::startNotifier" ref="302c67f73298e8891978becab9cc8e8d" args="" -->
150
<div class="memitem">
151
<div class="memproto">
152
<table class="memname">
154
<td class="memname">def PyinotifyHandler.PyinotifyHandler.startNotifier </td>
156
<td class="paramtype"> </td>
157
<td class="paramname"> <em>self</em> </td>
158
<td> ) </td>
159
<td width="100%"></td>
166
Run the notifier in a separate thread.
168
<dl class="author" compact><dt><b>Author:</b></dt><dd>: Jorge </dd></dl>
172
<a class="anchor" name="ff2021a14229f496a22df9571f89fb43"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::stopNotifier" ref="ff2021a14229f496a22df9571f89fb43" args="" -->
173
<div class="memitem">
174
<div class="memproto">
175
<table class="memname">
177
<td class="memname">def PyinotifyHandler.PyinotifyHandler.stopNotifier </td>
179
<td class="paramtype"> </td>
180
<td class="paramname"> <em>self</em> </td>
181
<td> ) </td>
182
<td width="100%"></td>
191
<dl class="author" compact><dt><b>Author:</b></dt><dd>: Jorge </dd></dl>
195
<a class="anchor" name="f489ba7cc83cbd7a8483b0c909b6baa4"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::extractEvent" ref="f489ba7cc83cbd7a8483b0c909b6baa4" args="" -->
196
<div class="memitem">
197
<div class="memproto">
198
<table class="memname">
200
<td class="memname">def PyinotifyHandler.PyinotifyHandler.extractEvent </td>
202
<td class="paramtype"> </td>
203
<td class="paramname"> <em>self</em> </td>
204
<td> ) </td>
205
<td width="100%"></td>
212
extract the first event on the top of the queue
214
<dl class="return" compact><dt><b>Returns:</b></dt><dd>: the first event object on the queue if the queue is not empty, false otherwise </dd></dl>
215
<dl class="author" compact><dt><b>Author:</b></dt><dd>: Jorge </dd></dl>
219
<a class="anchor" name="bccb3c6a0b0137dc91e119231d3e3b85"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::getPipe" ref="bccb3c6a0b0137dc91e119231d3e3b85" args="" -->
220
<div class="memitem">
221
<div class="memproto">
222
<table class="memname">
224
<td class="memname">def PyinotifyHandler.PyinotifyHandler.getPipe </td>
226
<td class="paramtype"> </td>
227
<td class="paramname"> <em>self</em> </td>
228
<td> ) </td>
229
<td width="100%"></td>
236
returns the write file descriptor of the pipe
238
<dl class="return" compact><dt><b>Returns:</b></dt><dd>__rfd </dd></dl>
242
<hr><h2>Member Data Documentation</h2>
243
<a class="anchor" name="6ae48bfa0d3281f747818f058c8c7f97"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__watched" ref="6ae48bfa0d3281f747818f058c8c7f97" args="" -->
244
<div class="memitem">
245
<div class="memproto">
246
<table class="memname">
248
<td class="memname"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#6ae48bfa0d3281f747818f058c8c7f97">PyinotifyHandler.PyinotifyHandler.__watched</a> = None<code> [static, private]</code> </td>
255
Contains paths and masks for watched resources.
260
<a class="anchor" name="abb87bcd8996436fff043bda65e8c0a4"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__notifier" ref="abb87bcd8996436fff043bda65e8c0a4" args="" -->
261
<div class="memitem">
262
<div class="memproto">
263
<table class="memname">
265
<td class="memname"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#abb87bcd8996436fff043bda65e8c0a4">PyinotifyHandler.PyinotifyHandler.__notifier</a> = None<code> [static, private]</code> </td>
272
a threaded notifier of events
277
<a class="anchor" name="8b92130a5157b7d7dcd7e182e50de0e4"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__handler" ref="8b92130a5157b7d7dcd7e182e50de0e4" args="" -->
278
<div class="memitem">
279
<div class="memproto">
280
<table class="memname">
282
<td class="memname"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#8b92130a5157b7d7dcd7e182e50de0e4">PyinotifyHandler.PyinotifyHandler.__handler</a> = None<code> [static, private]</code> </td>
289
inhertis from pyinotify.ProcessEvent Contains functions to handle events
294
<a class="anchor" name="07bc0444e3e130b2295c3c05215ef505"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__blacklist" ref="07bc0444e3e130b2295c3c05215ef505" args="" -->
295
<div class="memitem">
296
<div class="memproto">
297
<table class="memname">
299
<td class="memname"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#07bc0444e3e130b2295c3c05215ef505">PyinotifyHandler.PyinotifyHandler.__blacklist</a> = None<code> [static, private]</code> </td>
306
list of files/dirs that we don't want to monitorize
311
<a class="anchor" name="baed0369b21e0d42db22a6b0705592dd"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__reBlacklist" ref="baed0369b21e0d42db22a6b0705592dd" args="" -->
312
<div class="memitem">
313
<div class="memproto">
314
<table class="memname">
316
<td class="memname"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#baed0369b21e0d42db22a6b0705592dd">PyinotifyHandler.PyinotifyHandler.__reBlacklist</a> = None<code> [static, private]</code> </td>
323
list of blacklisted patterns
328
<a class="anchor" name="7d1737a66e61d70aebbb3d4d20871dc6"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__whitelist" ref="7d1737a66e61d70aebbb3d4d20871dc6" args="" -->
329
<div class="memitem">
330
<div class="memproto">
331
<table class="memname">
333
<td class="memname"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#7d1737a66e61d70aebbb3d4d20871dc6">PyinotifyHandler.PyinotifyHandler.__whitelist</a> = None<code> [static, private]</code> </td>
340
list of files/dirs that we want to monitorize
345
<a class="anchor" name="337afd2383c71b9918b65c59267d94e8"></a><!-- doxytag: member="PyinotifyHandler::PyinotifyHandler::__text" ref="337afd2383c71b9918b65c59267d94e8" args="" -->
346
<div class="memitem">
347
<div class="memproto">
348
<table class="memname">
350
<td class="memname"><a class="el" href="classPyinotifyHandler_1_1PyinotifyHandler.html#337afd2383c71b9918b65c59267d94e8">PyinotifyHandler.PyinotifyHandler.__text</a> = None<code> [static, private]</code> </td>
357
buffer to write events
362
<hr>The documentation for this class was generated from the following file:<ul>
363
<li>workspace/unstable/watcher/src/<a class="el" href="PyinotifyHandler_8py.html">PyinotifyHandler.py</a></ul>
364
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Dec 15 14:21:09 2007 by
365
<a href="http://www.doxygen.org/index.html">
366
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>