1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>inotify-cxx: inotify-cxx.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>inotify-cxx.h File Reference</h1>inotify C++ interface header
<a href="#_details">More...</a>
<p>
<code>#include <stdint.h></code><br>
<code>#include <string></code><br>
<code>#include <deque></code><br>
<code>#include <map></code><br>
<code>#include <sys/inotify.h></code><br>
<p>
<div class="dynheader">
Include dependency graph for inotify-cxx.h:</div>
<div class="dynsection">
<p><center><img src="inotify-cxx_8h__incl.png" border="0" usemap="#inotify-cxx.h_map" alt=""></center>
</div>
<p>
<div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dynsection">
<p><center><img src="inotify-cxx_8h__dep__incl.png" border="0" usemap="#inotify-cxx.hdep_map" alt=""></center>
<map name="inotify-cxx.hdep_map">
<area shape="rect" href="inotify-cxx_8cpp.html" title="inotify C++ interface implementation" alt="" coords="5,80,109,107"></map>
</div>
<p>
<a href="inotify-cxx_8h_source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyException.html">InotifyException</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class for inotify exceptions. <a href="classInotifyException.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyEvent.html">InotifyEvent</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify event class <a href="classInotifyEvent.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotifyWatch.html">InotifyWatch</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify watch class <a href="classInotifyWatch.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classInotify.html">Inotify</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify class <a href="classInotify.html#_details">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#f64b4cc985ba26f31a9cb242153a5014">INOTIFY_EVENT_SIZE</a> (sizeof(struct inotify_event))</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Event struct size. <a href="#f64b4cc985ba26f31a9cb242153a5014"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#a84911f8e42d71161b60d4a28940abb4">INOTIFY_BUFLEN</a> (1024 * (INOTIFY_EVENT_SIZE + 16))</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Event buffer length. <a href="#a84911f8e42d71161b60d4a28940abb4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#fe6b93f7e09db7022f1f9dd102932e12">IN_EXC_MSG</a>(msg) (std::string(__PRETTY_FUNCTION__) + ": " + msg)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Helper macro for creating exception messages. <a href="#fe6b93f7e09db7022f1f9dd102932e12"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#904d25c0fd931e1bad4f9d5cd346a766">IN_LOCK_DECL</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify-cxx thread safety <a href="#904d25c0fd931e1bad4f9d5cd346a766"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#981aa546075fba39715fd2f63a41f575">IN_LOCK_INIT</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#08422ec66fb587c1684afbaa575a53dd">IN_LOCK_DONE</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#963a97dc42487e86715b4e04639b0db8">IN_READ_BEGIN</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#0b82080ab6709175341b97e1f3c3955d">IN_READ_END</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#5c6a5be1898ef17662795cc4b420c851">IN_READ_END_NOTHROW</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#c3a6d87ace9403f7ac58f931bbcd9599">IN_WRITE_BEGIN</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#f8aeac51b3b4ef56f1791c5c1a2e9cf5">IN_WRITE_END</a></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#7e68c4884137939c5e3301f40c198dc7">IN_WRITE_END_NOTHROW</a></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::map< int32_t, <br class="typebreak">
<a class="el" href="classInotifyWatch.html">InotifyWatch</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">IN_WATCH_MAP</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Mapping from watch descriptors to watch objects. <a href="#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef std::map< std::string, <br class="typebreak">
<a class="el" href="classInotifyWatch.html">InotifyWatch</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">IN_WP_MAP</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Mapping from paths to watch objects. <a href="#5dd7761ff5a6b7cc7271950aebb7ddf6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> { <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1">IN_MAX_EVENTS</a> = 0,
<a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9">IN_MAX_INSTANCES</a> = 1,
<a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429">IN_MAX_WATCHES</a> = 2
}</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">inotify capability/limit identifiers <a href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">More...</a><br></td></tr>
</table>
<hr><h2>Detailed Description</h2>
inotify C++ interface header
<p>
inotify C++ interface<p>
Copyright (C) 2006, 2007, 2009 Lukas Jelinek, <<a href="mailto:lukas@aiken.cz">lukas@aiken.cz</a>><p>
This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses:<p>
<ul>
<li>1. X11-style license (see LICENSE-X11) </li>
<li>2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) </li>
<li>3. GNU General Public License, version 2 (see LICENSE-GPL)</li>
</ul>
If you want to help with choosing the best license for you, please visit <a href="http://www.gnu.org/licenses/license-list.html.">http://www.gnu.org/licenses/license-list.html.</a><p>
Credits: Mike Frysinger (cleanup of includes) <hr><h2>Define Documentation</h2>
<a class="anchor" name="fe6b93f7e09db7022f1f9dd102932e12"></a><!-- doxytag: member="inotify-cxx.h::IN_EXC_MSG" ref="fe6b93f7e09db7022f1f9dd102932e12" args="(msg)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_EXC_MSG </td>
<td>(</td>
<td class="paramtype">msg </td>
<td class="paramname"> </td>
<td> ) </td>
<td> (std::string(__PRETTY_FUNCTION__) + ": " + msg)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Helper macro for creating exception messages.
<p>
It prepends the message by the function name.
</div>
</div><p>
<a class="anchor" name="904d25c0fd931e1bad4f9d5cd346a766"></a><!-- doxytag: member="inotify-cxx.h::IN_LOCK_DECL" ref="904d25c0fd931e1bad4f9d5cd346a766" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_LOCK_DECL </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
inotify-cxx thread safety
<p>
If this symbol is defined you can use this interface safely threaded applications. Remember that it slightly degrades performance.<p>
Even if INOTIFY_THREAD_SAFE is defined some classes stay unsafe. If you must use them (must you?) in more than one thread concurrently you need to implement explicite locking.<p>
You need not to define INOTIFY_THREAD_SAFE in that cases where the application is multithreaded but all the inotify infrastructure will be managed only in one thread. This is the recommended way.<p>
Locking may fail (it is very rare but not impossible). In this case an exception is thrown. But if unlocking fails in case of an error it does nothing (this failure is ignored).
</div>
</div><p>
<a class="anchor" name="08422ec66fb587c1684afbaa575a53dd"></a><!-- doxytag: member="inotify-cxx.h::IN_LOCK_DONE" ref="08422ec66fb587c1684afbaa575a53dd" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_LOCK_DONE </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="981aa546075fba39715fd2f63a41f575"></a><!-- doxytag: member="inotify-cxx.h::IN_LOCK_INIT" ref="981aa546075fba39715fd2f63a41f575" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_LOCK_INIT </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="963a97dc42487e86715b4e04639b0db8"></a><!-- doxytag: member="inotify-cxx.h::IN_READ_BEGIN" ref="963a97dc42487e86715b4e04639b0db8" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_READ_BEGIN </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="0b82080ab6709175341b97e1f3c3955d"></a><!-- doxytag: member="inotify-cxx.h::IN_READ_END" ref="0b82080ab6709175341b97e1f3c3955d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_READ_END </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="5c6a5be1898ef17662795cc4b420c851"></a><!-- doxytag: member="inotify-cxx.h::IN_READ_END_NOTHROW" ref="5c6a5be1898ef17662795cc4b420c851" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_READ_END_NOTHROW </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="c3a6d87ace9403f7ac58f931bbcd9599"></a><!-- doxytag: member="inotify-cxx.h::IN_WRITE_BEGIN" ref="c3a6d87ace9403f7ac58f931bbcd9599" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_WRITE_BEGIN </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="f8aeac51b3b4ef56f1791c5c1a2e9cf5"></a><!-- doxytag: member="inotify-cxx.h::IN_WRITE_END" ref="f8aeac51b3b4ef56f1791c5c1a2e9cf5" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_WRITE_END </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="7e68c4884137939c5e3301f40c198dc7"></a><!-- doxytag: member="inotify-cxx.h::IN_WRITE_END_NOTHROW" ref="7e68c4884137939c5e3301f40c198dc7" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define IN_WRITE_END_NOTHROW </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="a84911f8e42d71161b60d4a28940abb4"></a><!-- doxytag: member="inotify-cxx.h::INOTIFY_BUFLEN" ref="a84911f8e42d71161b60d4a28940abb4" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16)) </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Event buffer length.
<p>
</div>
</div><p>
<a class="anchor" name="f64b4cc985ba26f31a9cb242153a5014"></a><!-- doxytag: member="inotify-cxx.h::INOTIFY_EVENT_SIZE" ref="f64b4cc985ba26f31a9cb242153a5014" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event)) </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Event struct size.
<p>
</div>
</div><p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="e6b5ebcb4e0d6a9f5ca8da26bc00cc2a"></a><!-- doxytag: member="inotify-cxx.h::IN_WATCH_MAP" ref="e6b5ebcb4e0d6a9f5ca8da26bc00cc2a" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef std::map<int32_t, <a class="el" href="classInotifyWatch.html">InotifyWatch</a>*> <a class="el" href="inotify-cxx_8h.html#e6b5ebcb4e0d6a9f5ca8da26bc00cc2a">IN_WATCH_MAP</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Mapping from watch descriptors to watch objects.
<p>
</div>
</div><p>
<a class="anchor" name="5dd7761ff5a6b7cc7271950aebb7ddf6"></a><!-- doxytag: member="inotify-cxx.h::IN_WP_MAP" ref="5dd7761ff5a6b7cc7271950aebb7ddf6" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef std::map<std::string, <a class="el" href="classInotifyWatch.html">InotifyWatch</a>*> <a class="el" href="inotify-cxx_8h.html#5dd7761ff5a6b7cc7271950aebb7ddf6">IN_WP_MAP</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Mapping from paths to watch objects.
<p>
</div>
</div><p>
<hr><h2>Enumeration Type Documentation</h2>
<a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d"></a><!-- doxytag: member="inotify-cxx.h::InotifyCapability_t" ref="bccd39d32dd83905178cf42edaae5c4d" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="inotify-cxx_8h.html#bccd39d32dd83905178cf42edaae5c4d">InotifyCapability_t</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
inotify capability/limit identifiers
<p>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1"></a><!-- doxytag: member="IN_MAX_EVENTS" ref="bccd39d32dd83905178cf42edaae5c4d18e969c9c44523b38a13b0a207286dd1" args="" -->IN_MAX_EVENTS</em> </td><td>
max. events in the kernel queue </td></tr>
<tr><td valign="top"><em><a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9"></a><!-- doxytag: member="IN_MAX_INSTANCES" ref="bccd39d32dd83905178cf42edaae5c4d43cc45296a9afe5cb68f568176608dd9" args="" -->IN_MAX_INSTANCES</em> </td><td>
max. inotify file descriptors per process </td></tr>
<tr><td valign="top"><em><a class="anchor" name="bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429"></a><!-- doxytag: member="IN_MAX_WATCHES" ref="bccd39d32dd83905178cf42edaae5c4d594390780d2bdcec064c00aec1f20429" args="" -->IN_MAX_WATCHES</em> </td><td>
max. watches per file descriptor </td></tr>
</table>
</dl>
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small><a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> </small></address>
</body>
</html>
|