/inotify-cxx/trunk/doc/man/man3/Inotify.3 |
---|
0,0 → 1,302 |
.TH "Inotify" 3 "4 Sep 2006" "Version 0.1.0" "inotify-cxx" \" -*- nroff -*- |
.ad l |
.nh |
.SH NAME |
Inotify \- inotify class |
.PP |
.SH SYNOPSIS |
.br |
.PP |
\fC#include <inotify-cxx.h>\fP |
.PP |
.SS "Public Member Functions" |
.in +1c |
.ti -1c |
.RI "\fBInotify\fP ()" |
.br |
.RI "\fIConstructor. \fP" |
.ti -1c |
.RI "\fB~Inotify\fP ()" |
.br |
.RI "\fIDestructor. \fP" |
.ti -1c |
.RI "void \fBClose\fP ()" |
.br |
.RI "\fIRemoves all watches and closes the inotify device. \fP" |
.ti -1c |
.RI "bool \fBIsReady\fP () const " |
.br |
.RI "\fIChecks whether the inotify is ready. \fP" |
.ti -1c |
.RI "bool \fBAdd\fP (\fBInotifyWatch\fP *pWatch)" |
.br |
.RI "\fIAdds a new watch. \fP" |
.ti -1c |
.RI "bool \fBAdd\fP (\fBInotifyWatch\fP &rWatch)" |
.br |
.RI "\fIAdds a new watch. \fP" |
.ti -1c |
.RI "void \fBRemove\fP (\fBInotifyWatch\fP *pWatch)" |
.br |
.RI "\fIRemoves a watch. \fP" |
.ti -1c |
.RI "void \fBRemove\fP (\fBInotifyWatch\fP &rWatch)" |
.br |
.RI "\fIRemoves a watch. \fP" |
.ti -1c |
.RI "void \fBRemoveAll\fP ()" |
.br |
.RI "\fIRemoves all watches. \fP" |
.ti -1c |
.RI "size_t \fBGetWatchCount\fP () const " |
.br |
.RI "\fIReturns the count of watches. \fP" |
.ti -1c |
.RI "bool \fBWaitForEvents\fP (bool fNoIntr=false)" |
.br |
.RI "\fIWaits for inotify events. \fP" |
.ti -1c |
.RI "int \fBGetEventCount\fP ()" |
.br |
.RI "\fIReturns the count of received and queued events. \fP" |
.ti -1c |
.RI "bool \fBGetEvent\fP (\fBInotifyEvent\fP *pEvt)" |
.br |
.RI "\fIExtracts a queued inotify event. \fP" |
.ti -1c |
.RI "bool \fBGetEvent\fP (\fBInotifyEvent\fP &rEvt)" |
.br |
.RI "\fIExtracts a queued inotify event. \fP" |
.ti -1c |
.RI "bool \fBPeekEvent\fP (\fBInotifyEvent\fP *pEvt)" |
.br |
.RI "\fIExtracts a queued inotify event (without removing). \fP" |
.ti -1c |
.RI "bool \fBPeekEvent\fP (\fBInotifyEvent\fP &rEvt)" |
.br |
.RI "\fIExtracts a queued inotify event (without removing). \fP" |
.ti -1c |
.RI "\fBInotifyWatch\fP * \fBFindWatch\fP (int iDescriptor)" |
.br |
.RI "\fISearches for a watch. \fP" |
.in -1c |
.SH "Detailed Description" |
.PP |
inotify class |
.PP |
.SH "Constructor & Destructor Documentation" |
.PP |
.SS "Inotify::Inotify ()" |
.PP |
Constructor. |
.PP |
Creates and initializes an instance of inotify communication object (opens the inotify device). |
.SS "Inotify::~Inotify ()" |
.PP |
Destructor. |
.PP |
Calls \fBClose()\fP due for clean-up. |
.SH "Member Function Documentation" |
.PP |
.SS "bool Inotify::Add (\fBInotifyWatch\fP & rWatch)\fC [inline]\fP" |
.PP |
Adds a new watch. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrWatch\fP inotify watch |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = success, false = failure |
.RE |
.PP |
.SS "bool Inotify::Add (\fBInotifyWatch\fP * pWatch)" |
.PP |
Adds a new watch. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIpWatch\fP inotify watch |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = success, false = failure |
.RE |
.PP |
.SS "void Inotify::Close ()" |
.PP |
Removes all watches and closes the inotify device. |
.PP |
.SS "\fBInotifyWatch\fP * Inotify::FindWatch (int iDescriptor)" |
.PP |
Searches for a watch. |
.PP |
It tries to find a watch by the given descriptor. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIiDescriptor\fP watch descriptor |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
found descriptor; NULL if no such watch exists |
.RE |
.PP |
.SS "bool Inotify::GetEvent (\fBInotifyEvent\fP & rEvt)\fC [inline]\fP" |
.PP |
Extracts a queued inotify event. |
.PP |
The extracted event is removed from the queue. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrEvt\fP event object |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = success, false = failure |
.RE |
.PP |
.SS "bool Inotify::GetEvent (\fBInotifyEvent\fP * pEvt)" |
.PP |
Extracts a queued inotify event. |
.PP |
The extracted event is removed from the queue. If the pointer is NULL it does nothing. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIpEvt\fP event object |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = success, false = failure |
.RE |
.PP |
.SS "int Inotify::GetEventCount ()" |
.PP |
Returns the count of received and queued events. |
.PP |
This number is related to the events in the queue inside this object, not to the events pending in the kernel. |
.PP |
\fBReturns:\fP |
.RS 4 |
count of events |
.RE |
.PP |
.SS "size_t Inotify::GetWatchCount () const\fC [inline]\fP" |
.PP |
Returns the count of watches. |
.PP |
\fBReturns:\fP |
.RS 4 |
count of watches |
.RE |
.PP |
.SS "bool Inotify::IsReady () const\fC [inline]\fP" |
.PP |
Checks whether the inotify is ready. |
.PP |
\fBReturns:\fP |
.RS 4 |
true = initialized properly, false = something failed |
.RE |
.PP |
.SS "bool Inotify::PeekEvent (\fBInotifyEvent\fP & rEvt)\fC [inline]\fP" |
.PP |
Extracts a queued inotify event (without removing). |
.PP |
The extracted event stays in the queue. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrEvt\fP event object |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = success, false = failure |
.RE |
.PP |
.SS "bool Inotify::PeekEvent (\fBInotifyEvent\fP * pEvt)" |
.PP |
Extracts a queued inotify event (without removing). |
.PP |
The extracted event stays in the queue. If the pointer is NULL it does nothing. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIpEvt\fP event object |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = success, false = failure |
.RE |
.PP |
.SS "void Inotify::Remove (\fBInotifyWatch\fP & rWatch)\fC [inline]\fP" |
.PP |
Removes a watch. |
.PP |
If the given watch is not present it does nothing. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrWatch\fP inotify watch |
.RE |
.PP |
.SS "void Inotify::Remove (\fBInotifyWatch\fP * pWatch)" |
.PP |
Removes a watch. |
.PP |
If the given watch is not present it does nothing. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIpWatch\fP inotify watch |
.RE |
.PP |
.SS "void Inotify::RemoveAll ()" |
.PP |
Removes all watches. |
.PP |
.SS "bool Inotify::WaitForEvents (bool fNoIntr = \fCfalse\fP)" |
.PP |
Waits for inotify events. |
.PP |
It waits until one or more events occur. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIfNoIntr\fP if true it re-calls the system call after a handled signal |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = event(s) occurred, false = failure |
.RE |
.PP |
.SH "Author" |
.PP |
Generated automatically by Doxygen for inotify-cxx from the source code. |
/inotify-cxx/trunk/doc/man/man3/inotify-cxx.cpp.3 |
---|
0,0 → 1,57 |
.TH "inotify-cxx.cpp" 3 "4 Sep 2006" "Version 0.1.0" "inotify-cxx" \" -*- nroff -*- |
.ad l |
.nh |
.SH NAME |
inotify-cxx.cpp \- inotify C++ interface implementation |
.SH SYNOPSIS |
.br |
.PP |
\fC#include <errno.h>\fP |
.br |
\fC#include <unistd.h>\fP |
.br |
\fC#include 'inotify-cxx.h'\fP |
.br |
.SS "Defines" |
.in +1c |
.ti -1c |
.RI "#define \fBDUMP_SEP\fP" |
.br |
.in -1c |
.SH "Detailed Description" |
.PP |
inotify C++ interface implementation |
inotify C++ interface |
.PP |
Copyright (C) 2006 Lukas Jelinek <lukas@aiken.cz> |
.PP |
This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses: |
.PP |
.PD 0 |
.IP "\(bu" 2 |
1. X11-style license (see LICENSE-X11) |
.IP "\(bu" 2 |
2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) |
.IP "\(bu" 2 |
3. GNU General Public License, version 2 (see LICENSE-GPL) |
.PP |
If you want to help with choosing the best license for you, please visit http://www.gnu.org/licenses/license-list.html. |
.SH "Define Documentation" |
.PP |
.SS "#define DUMP_SEP" |
.PP |
\fBValue:\fP |
.PP |
.nf |
({ \ |
if (!rStr.empty()) { \ |
rStr.append(' '); \ |
} \ |
}) |
.fi |
.SH "Author" |
.PP |
Generated automatically by Doxygen for inotify-cxx from the source code. |
/inotify-cxx/trunk/doc/man/man3/InotifyEvent.3 |
---|
0,0 → 1,220 |
.TH "InotifyEvent" 3 "4 Sep 2006" "Version 0.1.0" "inotify-cxx" \" -*- nroff -*- |
.ad l |
.nh |
.SH NAME |
InotifyEvent \- inotify event class |
.PP |
.SH SYNOPSIS |
.br |
.PP |
\fC#include <inotify-cxx.h>\fP |
.PP |
.SS "Public Member Functions" |
.in +1c |
.ti -1c |
.RI "\fBInotifyEvent\fP ()" |
.br |
.RI "\fIConstructor. \fP" |
.ti -1c |
.RI "\fBInotifyEvent\fP (const struct inotify_event *pEvt)" |
.br |
.RI "\fIConstructor. \fP" |
.ti -1c |
.RI "\fB~InotifyEvent\fP ()" |
.br |
.RI "\fIDestructor. \fP" |
.ti -1c |
.RI "int32_t \fBGetDescriptor\fP () const " |
.br |
.RI "\fIReturns the event watch descriptor. \fP" |
.ti -1c |
.RI "uint32_t \fBGetMask\fP () const " |
.br |
.RI "\fIReturns the event mask. \fP" |
.ti -1c |
.RI "bool \fBIsType\fP (uint32_t uType) const " |
.br |
.RI "\fIChecks for the event type. \fP" |
.ti -1c |
.RI "uint32_t \fBGetCookie\fP () const " |
.br |
.RI "\fIReturns the event cookie. \fP" |
.ti -1c |
.RI "uint32_t \fBGetLength\fP () const " |
.br |
.RI "\fIReturns the event name length. \fP" |
.ti -1c |
.RI "const std::string & \fBGetName\fP () const " |
.br |
.RI "\fIReturns the event name. \fP" |
.ti -1c |
.RI "void \fBGetName\fP (std::string &rName) const " |
.br |
.RI "\fIExtracts the event name. \fP" |
.ti -1c |
.RI "void \fBGetData\fP (struct inotify_event *pEvt)" |
.br |
.RI "\fIReturns the event raw data. \fP" |
.ti -1c |
.RI "void \fBGetData\fP (struct inotify_event &rEvt)" |
.br |
.RI "\fIReturns the event raw data. \fP" |
.ti -1c |
.RI "void \fBDumpTypes\fP (std::string &rStr) const " |
.br |
.RI "\fIFills the string with all types contained in the event mask. \fP" |
.in -1c |
.SH "Detailed Description" |
.PP |
inotify event class |
It holds all information about inotify event and provides access to its particular values. |
.PP |
.SH "Constructor & Destructor Documentation" |
.PP |
.SS "InotifyEvent::InotifyEvent ()\fC [inline]\fP" |
.PP |
Constructor. |
.PP |
Creates a plain event. |
.SS "InotifyEvent::InotifyEvent (const struct inotify_event * pEvt)\fC [inline]\fP" |
.PP |
Constructor. |
.PP |
Creates an event based on inotify event data. For NULL pointer it works the same way as \fBInotifyEvent()\fP. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIpEvt\fP event data |
.RE |
.PP |
.SS "InotifyEvent::~InotifyEvent ()\fC [inline]\fP" |
.PP |
Destructor. |
.PP |
.SH "Member Function Documentation" |
.PP |
.SS "void InotifyEvent::DumpTypes (std::string & rStr) const" |
.PP |
Fills the string with all types contained in the event mask. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrStr\fP dumped event types |
.RE |
.PP |
.SS "uint32_t InotifyEvent::GetCookie () const\fC [inline]\fP" |
.PP |
Returns the event cookie. |
.PP |
\fBReturns:\fP |
.RS 4 |
event cookie |
.RE |
.PP |
.SS "void InotifyEvent::GetData (struct inotify_event & rEvt)\fC [inline]\fP" |
.PP |
Returns the event raw data. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrEvt\fP event data |
.RE |
.PP |
.SS "void InotifyEvent::GetData (struct inotify_event * pEvt)\fC [inline]\fP" |
.PP |
Returns the event raw data. |
.PP |
For NULL pointer it does nothing. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIpEvt\fP event data |
.RE |
.PP |
.SS "int32_t InotifyEvent::GetDescriptor () const\fC [inline]\fP" |
.PP |
Returns the event watch descriptor. |
.PP |
\fBReturns:\fP |
.RS 4 |
watch descriptor |
.RE |
.PP |
\fBSee also:\fP |
.RS 4 |
\fBInotifyWatch::GetDescriptor()\fP |
.RE |
.PP |
.SS "uint32_t InotifyEvent::GetLength () const\fC [inline]\fP" |
.PP |
Returns the event name length. |
.PP |
\fBReturns:\fP |
.RS 4 |
event name length |
.RE |
.PP |
.SS "uint32_t InotifyEvent::GetMask () const\fC [inline]\fP" |
.PP |
Returns the event mask. |
.PP |
\fBReturns:\fP |
.RS 4 |
event mask |
.RE |
.PP |
\fBSee also:\fP |
.RS 4 |
\fBInotifyWatch::GetMask()\fP |
.RE |
.PP |
.SS "void InotifyEvent::GetName (std::string & rName) const\fC [inline]\fP" |
.PP |
Extracts the event name. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrName\fP event name |
.RE |
.PP |
.SS "const std::string& InotifyEvent::GetName () const\fC [inline]\fP" |
.PP |
Returns the event name. |
.PP |
\fBReturns:\fP |
.RS 4 |
event name |
.RE |
.PP |
.SS "bool InotifyEvent::IsType (uint32_t uType) const\fC [inline]\fP" |
.PP |
Checks for the event type. |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIuType\fP type which is checked for |
.RE |
.PP |
\fBReturns:\fP |
.RS 4 |
true = event mask contains the given type, false = otherwise |
.RE |
.PP |
.SH "Author" |
.PP |
Generated automatically by Doxygen for inotify-cxx from the source code. |
/inotify-cxx/trunk/doc/man/man3/inotify-cxx.h.3 |
---|
0,0 → 1,93 |
.TH "inotify-cxx.h" 3 "4 Sep 2006" "Version 0.1.0" "inotify-cxx" \" -*- nroff -*- |
.ad l |
.nh |
.SH NAME |
inotify-cxx.h \- inotify C++ interface header |
.SH SYNOPSIS |
.br |
.PP |
\fC#include <string>\fP |
.br |
\fC#include <deque>\fP |
.br |
\fC#include <map>\fP |
.br |
\fC#include <sys/inotify.h>\fP |
.br |
\fC#include <sys/inotify-syscalls.h>\fP |
.br |
.SS "Classes" |
.in +1c |
.ti -1c |
.RI "class \fBInotifyEvent\fP" |
.br |
.RI "\fIinotify event class \fP" |
.ti -1c |
.RI "class \fBInotifyWatch\fP" |
.br |
.RI "\fIinotify watch class \fP" |
.ti -1c |
.RI "class \fBInotify\fP" |
.br |
.RI "\fIinotify class \fP" |
.in -1c |
.SS "Defines" |
.in +1c |
.ti -1c |
.RI "#define \fBINOTIFY_EVENT_SIZE\fP (sizeof(struct inotify_event))" |
.br |
.RI "\fIEvent struct size. \fP" |
.ti -1c |
.RI "#define \fBINOTIFY_BUFLEN\fP (1024 * (INOTIFY_EVENT_SIZE + 16))" |
.br |
.RI "\fIEvent buffer length. \fP" |
.in -1c |
.SS "Typedefs" |
.in +1c |
.ti -1c |
.RI "typedef std::map< int32_t, \fBInotifyWatch\fP * > \fBIN_WATCH_MAP\fP" |
.br |
.RI "\fIMapping from watch descriptors to watch objects. \fP" |
.in -1c |
.SH "Detailed Description" |
.PP |
inotify C++ interface header |
inotify C++ interface |
.PP |
Copyright (C) 2006 Lukas Jelinek, <lukas@aiken.cz> |
.PP |
This program is free software; you can redistribute it and/or modify it under the terms of one of the following licenses: |
.PP |
.PD 0 |
.IP "\(bu" 2 |
1. X11-style license (see LICENSE-X11) |
.IP "\(bu" 2 |
2. GNU Lesser General Public License, version 2.1 (see LICENSE-LGPL) |
.IP "\(bu" 2 |
3. GNU General Public License, version 2 (see LICENSE-GPL) |
.PP |
If you want to help with choosing the best license for you, please visit http://www.gnu.org/licenses/license-list.html. |
.SH "Define Documentation" |
.PP |
.SS "#define INOTIFY_BUFLEN (1024 * (INOTIFY_EVENT_SIZE + 16))" |
.PP |
Event buffer length. |
.PP |
.SS "#define INOTIFY_EVENT_SIZE (sizeof(struct inotify_event))" |
.PP |
Event struct size. |
.PP |
.SH "Typedef Documentation" |
.PP |
.SS "typedef std::map<int32_t, \fBInotifyWatch\fP*> \fBIN_WATCH_MAP\fP" |
.PP |
Mapping from watch descriptors to watch objects. |
.PP |
.SH "Author" |
.PP |
Generated automatically by Doxygen for inotify-cxx from the source code. |
/inotify-cxx/trunk/doc/man/man3/InotifyWatch.3 |
---|
0,0 → 1,108 |
.TH "InotifyWatch" 3 "4 Sep 2006" "Version 0.1.0" "inotify-cxx" \" -*- nroff -*- |
.ad l |
.nh |
.SH NAME |
InotifyWatch \- inotify watch class |
.PP |
.SH SYNOPSIS |
.br |
.PP |
\fC#include <inotify-cxx.h>\fP |
.PP |
.SS "Public Member Functions" |
.in +1c |
.ti -1c |
.RI "\fBInotifyWatch\fP (const std::string &rPath, int32_t uMask)" |
.br |
.RI "\fIConstructor. \fP" |
.ti -1c |
.RI "\fB~InotifyWatch\fP ()" |
.br |
.RI "\fIDestructor. \fP" |
.ti -1c |
.RI "int32_t \fBGetDescriptor\fP () const " |
.br |
.RI "\fIReturns the watch descriptor. \fP" |
.ti -1c |
.RI "const std::string & \fBGetPath\fP () const " |
.br |
.RI "\fIReturns the watched file path. \fP" |
.ti -1c |
.RI "uint32_t \fBGetMask\fP () const " |
.br |
.RI "\fIReturns the watch event mask. \fP" |
.in -1c |
.SS "Friends" |
.in +1c |
.ti -1c |
.RI "class \fBInotify\fP" |
.br |
.in -1c |
.SH "Detailed Description" |
.PP |
inotify watch class |
.PP |
.SH "Constructor & Destructor Documentation" |
.PP |
.SS "InotifyWatch::InotifyWatch (const std::string & rPath, int32_t uMask)\fC [inline]\fP" |
.PP |
Constructor. |
.PP |
Creates an inotify watch. Because this watch is inactive it has an invalid descriptor (-1). |
.PP |
\fBParameters:\fP |
.RS 4 |
\fIrPath\fP watched file path |
.br |
\fIuMask\fP mask for events |
.RE |
.PP |
.SS "InotifyWatch::~InotifyWatch ()\fC [inline]\fP" |
.PP |
Destructor. |
.PP |
.SH "Member Function Documentation" |
.PP |
.SS "int32_t InotifyWatch::GetDescriptor () const\fC [inline]\fP" |
.PP |
Returns the watch descriptor. |
.PP |
\fBReturns:\fP |
.RS 4 |
watch descriptor; -1 for inactive watch |
.RE |
.PP |
.SS "uint32_t InotifyWatch::GetMask () const\fC [inline]\fP" |
.PP |
Returns the watch event mask. |
.PP |
\fBReturns:\fP |
.RS 4 |
event mask |
.RE |
.PP |
.SS "const std::string& InotifyWatch::GetPath () const\fC [inline]\fP" |
.PP |
Returns the watched file path. |
.PP |
\fBReturns:\fP |
.RS 4 |
file path |
.RE |
.PP |
.SH "Friends And Related Function Documentation" |
.PP |
.SS "friend class \fBInotify\fP\fC [friend]\fP" |
.PP |
.SH "Author" |
.PP |
Generated automatically by Doxygen for inotify-cxx from the source code. |