diff options
Diffstat (limited to 'shared/inotify/doc/man/man3')
-rw-r--r-- | shared/inotify/doc/man/man3/Inotify.3 | 642 | ||||
-rw-r--r-- | shared/inotify/doc/man/man3/InotifyEvent.3 | 268 | ||||
-rw-r--r-- | shared/inotify/doc/man/man3/InotifyException.3 | 125 | ||||
-rw-r--r-- | shared/inotify/doc/man/man3/InotifyWatch.3 | 207 | ||||
-rw-r--r-- | shared/inotify/doc/man/man3/inotify-cxx.cpp.3 | 70 | ||||
-rw-r--r-- | shared/inotify/doc/man/man3/inotify-cxx.h.3 | 198 |
6 files changed, 1510 insertions, 0 deletions
diff --git a/shared/inotify/doc/man/man3/Inotify.3 b/shared/inotify/doc/man/man3/Inotify.3 new file mode 100644 index 00000000..23188784 --- /dev/null +++ b/shared/inotify/doc/man/man3/Inotify.3 @@ -0,0 +1,642 @@ +.TH "Inotify" 3 "18 Apr 2007" "Version 0.7.2" "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 () throw (InotifyException)" +.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 "void \fBAdd\fP (\fBInotifyWatch\fP *pWatch) throw (InotifyException)" +.br +.RI "\fIAdds a new watch. \fP" +.ti -1c +.RI "void \fBAdd\fP (\fBInotifyWatch\fP &rWatch) throw (InotifyException)" +.br +.RI "\fIAdds a new watch. \fP" +.ti -1c +.RI "void \fBRemove\fP (\fBInotifyWatch\fP *pWatch) throw (InotifyException)" +.br +.RI "\fIRemoves a watch. \fP" +.ti -1c +.RI "void \fBRemove\fP (\fBInotifyWatch\fP &rWatch) throw (InotifyException)" +.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 "size_t \fBGetEnabledCount\fP () const" +.br +.RI "\fIReturns the count of enabled watches. \fP" +.ti -1c +.RI "void \fBWaitForEvents\fP (bool fNoIntr=false) throw (InotifyException)" +.br +.RI "\fIWaits for inotify events. \fP" +.ti -1c +.RI "size_t \fBGetEventCount\fP ()" +.br +.RI "\fIReturns the count of received and queued events. \fP" +.ti -1c +.RI "bool \fBGetEvent\fP (\fBInotifyEvent\fP *pEvt) throw (InotifyException)" +.br +.RI "\fIExtracts a queued inotify event. \fP" +.ti -1c +.RI "bool \fBGetEvent\fP (\fBInotifyEvent\fP &rEvt) throw (InotifyException)" +.br +.RI "\fIExtracts a queued inotify event. \fP" +.ti -1c +.RI "bool \fBPeekEvent\fP (\fBInotifyEvent\fP *pEvt) throw (InotifyException)" +.br +.RI "\fIExtracts a queued inotify event (without removing). \fP" +.ti -1c +.RI "bool \fBPeekEvent\fP (\fBInotifyEvent\fP &rEvt) throw (InotifyException)" +.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 by a watch descriptor. \fP" +.ti -1c +.RI "\fBInotifyWatch\fP * \fBFindWatch\fP (const std::string &rPath)" +.br +.RI "\fISearches for a watch by a filesystem path. \fP" +.ti -1c +.RI "int \fBGetDescriptor\fP () const" +.br +.RI "\fIReturns the file descriptor. \fP" +.ti -1c +.RI "void \fBSetNonBlock\fP (bool fNonBlock) throw (InotifyException)" +.br +.RI "\fIEnables/disables non-blocking mode. \fP" +.ti -1c +.RI "void \fBSetCloseOnExec\fP (bool fClOnEx) throw (InotifyException)" +.br +.RI "\fIEnables/disables closing on exec. \fP" +.in -1c +.SS "Static Public Member Functions" + +.in +1c +.ti -1c +.RI "static uint32_t \fBGetCapability\fP (\fBInotifyCapability_t\fP cap) throw (InotifyException)" +.br +.RI "\fIAcquires a particular inotify capability/limit. \fP" +.ti -1c +.RI "static void \fBSetCapability\fP (\fBInotifyCapability_t\fP cap, uint32_t val) throw (InotifyException)" +.br +.RI "\fIModifies a particular inotify capability/limit. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaxEvents\fP () throw (InotifyException)" +.br +.RI "\fIReturns the maximum number of events in the kernel queue. \fP" +.ti -1c +.RI "static void \fBSetMaxEvents\fP (uint32_t val) throw (InotifyException)" +.br +.RI "\fISets the maximum number of events in the kernel queue. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaxInstances\fP () throw (InotifyException)" +.br +.RI "\fIReturns the maximum number of inotify instances per process. \fP" +.ti -1c +.RI "static void \fBSetMaxInstances\fP (uint32_t val) throw (InotifyException)" +.br +.RI "\fISets the maximum number of inotify instances per process. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaxWatches\fP () throw (InotifyException)" +.br +.RI "\fIReturns the maximum number of inotify watches per instance. \fP" +.ti -1c +.RI "static void \fBSetMaxWatches\fP (uint32_t val) throw (InotifyException)" +.br +.RI "\fISets the maximum number of inotify watches per instance. \fP" +.in -1c +.SS "Friends" + +.in +1c +.ti -1c +.RI "class \fBInotifyWatch\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +inotify class + +It holds information about the inotify device descriptor and manages the event queue. +.PP +If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. +.PP +.SH "Constructor & Destructor Documentation" +.PP +.SS "Inotify::Inotify () throw (\fBInotifyException\fP)" +.PP +Constructor. +.PP +Creates and initializes an instance of inotify communication object (opens the inotify device). +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if inotify isn't available +.RE +.PP + +.SS "Inotify::~Inotify ()" +.PP +Destructor. +.PP +Calls \fBClose()\fP due to clean-up. +.SH "Member Function Documentation" +.PP +.SS "void Inotify::Close ()" +.PP +Removes all watches and closes the inotify device. +.PP +.SS "void Inotify::Add (\fBInotifyWatch\fP * pWatch) throw (\fBInotifyException\fP)" +.PP +Adds a new watch. +.PP +\fBParameters:\fP +.RS 4 +\fIpWatch\fP inotify watch +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if adding failed +.RE +.PP + +.SS "void Inotify::Add (\fBInotifyWatch\fP & rWatch) throw (\fBInotifyException\fP)\fC [inline]\fP" +.PP +Adds a new watch. +.PP +\fBParameters:\fP +.RS 4 +\fIrWatch\fP inotify watch +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if adding failed +.RE +.PP + +.SS "void Inotify::Remove (\fBInotifyWatch\fP * pWatch) throw (\fBInotifyException\fP)" +.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 +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if removing failed +.RE +.PP + +.SS "void Inotify::Remove (\fBInotifyWatch\fP & rWatch) throw (\fBInotifyException\fP)\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 +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if removing failed +.RE +.PP + +.SS "void Inotify::RemoveAll ()" +.PP +Removes all watches. +.PP +.SS "size_t Inotify::GetWatchCount () const\fC [inline]\fP" +.PP +Returns the count of watches. +.PP +This is the total count of all watches (regardless whether enabled or not). +.PP +\fBReturns:\fP +.RS 4 +count of watches +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetEnabledCount()\fP +.RE +.PP + +.SS "size_t Inotify::GetEnabledCount () const\fC [inline]\fP" +.PP +Returns the count of enabled watches. +.PP +\fBReturns:\fP +.RS 4 +count of enabled watches +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetWatchCount()\fP +.RE +.PP + +.SS "void Inotify::WaitForEvents (bool fNoIntr = \fCfalse\fP) throw (\fBInotifyException\fP)" +.PP +Waits for inotify events. +.PP +It waits until one or more events occur. When called in nonblocking mode it only retrieves occurred events to the internal queue and exits. +.PP +\fBParameters:\fP +.RS 4 +\fIfNoIntr\fP if true it re-calls the system call after a handled signal +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if reading events failed +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBSetNonBlock()\fP +.RE +.PP + +.SS "size_t Inotify::GetEventCount ()\fC [inline]\fP" +.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 "bool Inotify::GetEvent (\fBInotifyEvent\fP * pEvt) throw (\fBInotifyException\fP)" +.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 +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the provided pointer is NULL +.RE +.PP + +.SS "bool Inotify::GetEvent (\fBInotifyEvent\fP & rEvt) throw (\fBInotifyException\fP)\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 +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown only in very anomalous cases +.RE +.PP + +.SS "bool Inotify::PeekEvent (\fBInotifyEvent\fP * pEvt) throw (\fBInotifyException\fP)" +.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 +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the provided pointer is NULL +.RE +.PP + +.SS "bool Inotify::PeekEvent (\fBInotifyEvent\fP & rEvt) throw (\fBInotifyException\fP)\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 +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown only in very anomalous cases +.RE +.PP + +.SS "\fBInotifyWatch\fP * Inotify::FindWatch (int iDescriptor)" +.PP +Searches for a watch by a watch descriptor. +.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 +pointer to a watch; NULL if no such watch exists +.RE +.PP + +.SS "\fBInotifyWatch\fP * Inotify::FindWatch (const std::string & rPath)" +.PP +Searches for a watch by a filesystem path. +.PP +It tries to find a watch by the given filesystem path. +.PP +\fBParameters:\fP +.RS 4 +\fIrPath\fP filesystem path +.RE +.PP +\fBReturns:\fP +.RS 4 +pointer to a watch; NULL if no such watch exists +.RE +.PP +\fBAttention:\fP +.RS 4 +The path must be exactly identical to the one used for the searched watch. Be careful about absolute/relative and case-insensitive paths. +.RE +.PP + +.SS "int Inotify::GetDescriptor () const\fC [inline]\fP" +.PP +Returns the file descriptor. +.PP +The descriptor can be used in standard low-level file functions (poll(), select(), fcntl() etc.). +.PP +\fBReturns:\fP +.RS 4 +valid file descriptor or -1 for inactive object +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBSetNonBlock()\fP +.RE +.PP + +.SS "void Inotify::SetNonBlock (bool fNonBlock) throw (\fBInotifyException\fP)" +.PP +Enables/disables non-blocking mode. +.PP +Use this mode if you want to monitor the descriptor (acquired thru \fBGetDescriptor()\fP) in functions such as poll(), select() etc. +.PP +Non-blocking mode is disabled by default. +.PP +\fBParameters:\fP +.RS 4 +\fIfNonBlock\fP enable/disable non-blocking mode +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if setting mode failed +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetDescriptor()\fP, \fBSetCloseOnExec()\fP +.RE +.PP + +.SS "void Inotify::SetCloseOnExec (bool fClOnEx) throw (\fBInotifyException\fP)" +.PP +Enables/disables closing on exec. +.PP +Enable this if you want to close the descriptor when executing another program. Otherwise, the descriptor will be inherited. +.PP +Closing on exec is disabled by default. +.PP +\fBParameters:\fP +.RS 4 +\fIfClOnEx\fP enable/disable closing on exec +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if setting failed +.RE +.PP +\fBSee also:\fP +.RS 4 +\fBGetDescriptor()\fP, \fBSetNonBlock()\fP +.RE +.PP + +.SS "uint32_t Inotify::GetCapability (\fBInotifyCapability_t\fP cap) throw (\fBInotifyException\fP)\fC [static]\fP" +.PP +Acquires a particular inotify capability/limit. +.PP +\fBParameters:\fP +.RS 4 +\fIcap\fP capability/limit identifier +.RE +.PP +\fBReturns:\fP +.RS 4 +capability/limit value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "void Inotify::SetCapability (\fBInotifyCapability_t\fP cap, uint32_t val) throw (\fBInotifyException\fP)\fC [static]\fP" +.PP +Modifies a particular inotify capability/limit. +.PP +\fBParameters:\fP +.RS 4 +\fIcap\fP capability/limit identifier +.br +\fIval\fP new capability/limit value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - it may seriously affect system performance and/or stability. +.RE +.PP + +.SS "static uint32_t Inotify::GetMaxEvents () throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Returns the maximum number of events in the kernel queue. +.PP +\fBReturns:\fP +.RS 4 +maximum number of events in the kernel queue +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "static void Inotify::SetMaxEvents (uint32_t val) throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Sets the maximum number of events in the kernel queue. +.PP +\fBParameters:\fP +.RS 4 +\fIval\fP new value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. +.RE +.PP + +.SS "static uint32_t Inotify::GetMaxInstances () throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Returns the maximum number of inotify instances per process. +.PP +It means the maximum number of open inotify file descriptors per running process. +.PP +\fBReturns:\fP +.RS 4 +maximum number of inotify instances +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "static void Inotify::SetMaxInstances (uint32_t val) throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Sets the maximum number of inotify instances per process. +.PP +\fBParameters:\fP +.RS 4 +\fIval\fP new value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. +.RE +.PP + +.SS "static uint32_t Inotify::GetMaxWatches () throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Returns the maximum number of inotify watches per instance. +.PP +It means the maximum number of inotify watches per inotify file descriptor. +.PP +\fBReturns:\fP +.RS 4 +maximum number of inotify watches +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be acquired +.RE +.PP + +.SS "static void Inotify::SetMaxWatches (uint32_t val) throw (\fBInotifyException\fP)\fC [inline, static]\fP" +.PP +Sets the maximum number of inotify watches per instance. +.PP +\fBParameters:\fP +.RS 4 +\fIval\fP new value +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if the given value cannot be set +.RE +.PP +\fBAttention:\fP +.RS 4 +Using this function requires root privileges. Beware of setting extensive values - the greater value is set here the more physical memory may be used for the inotify infrastructure. +.RE +.PP + +.SH "Friends And Related Function Documentation" +.PP +.SS "friend class \fBInotifyWatch\fP\fC [friend]\fP" +.PP + + +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/InotifyEvent.3 b/shared/inotify/doc/man/man3/InotifyEvent.3 new file mode 100644 index 00000000..51899460 --- /dev/null +++ b/shared/inotify/doc/man/man3/InotifyEvent.3 @@ -0,0 +1,268 @@ +.TH "InotifyEvent" 3 "18 Apr 2007" "Version 0.7.2" "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, \fBInotifyWatch\fP *pWatch)" +.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 "\fBInotifyWatch\fP * \fBGetWatch\fP ()" +.br +.RI "\fIReturns the source watch. \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 +.SS "Static Public Member Functions" + +.in +1c +.ti -1c +.RI "static bool \fBIsType\fP (uint32_t uValue, uint32_t uType)" +.br +.RI "\fIChecks a value for the event type. \fP" +.ti -1c +.RI "static uint32_t \fBGetMaskByName\fP (const std::string &rName)" +.br +.RI "\fIFinds the appropriate mask for a name. \fP" +.ti -1c +.RI "static void \fBDumpTypes\fP (uint32_t uValue, std::string &rStr)" +.br +.RI "\fIFills the string with all types contained in an event mask value. \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 +This class is not (and is not intended to be) thread-safe and therefore it must not be used concurrently in multiple threads. +.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, \fBInotifyWatch\fP * pWatch)\fC [inline]\fP" +.PP +Constructor. +.PP +Creates an event based on inotify event data. For NULL pointers it works the same way as \fBInotifyEvent()\fP. +.PP +\fBParameters:\fP +.RS 4 +\fIpEvt\fP event data +.br +\fIpWatch\fP inotify watch +.RE +.PP + +.SS "InotifyEvent::~InotifyEvent ()\fC [inline]\fP" +.PP +Destructor. +.PP +.SH "Member Function Documentation" +.PP +.SS "int32_t InotifyEvent::GetDescriptor () const" +.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::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 "static bool InotifyEvent::IsType (uint32_t uValue, uint32_t uType)\fC [inline, static]\fP" +.PP +Checks a value for the event type. +.PP +\fBParameters:\fP +.RS 4 +\fIuValue\fP checked value +.br +\fIuType\fP type which is checked for +.RE +.PP +\fBReturns:\fP +.RS 4 +true = the value contains the given type, false = otherwise +.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 + +.SS "uint32_t InotifyEvent::GetCookie () const\fC [inline]\fP" +.PP +Returns the event cookie. +.PP +\fBReturns:\fP +.RS 4 +event cookie +.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 "const std::string& InotifyEvent::GetName () const\fC [inline]\fP" +.PP +Returns the event name. +.PP +\fBReturns:\fP +.RS 4 +event name +.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 "\fBInotifyWatch\fP* InotifyEvent::GetWatch ()\fC [inline]\fP" +.PP +Returns the source watch. +.PP +\fBReturns:\fP +.RS 4 +source watch +.RE +.PP + +.SS "uint32_t InotifyEvent::GetMaskByName (const std::string & rName)\fC [static]\fP" +.PP +Finds the appropriate mask for a name. +.PP +\fBParameters:\fP +.RS 4 +\fIrName\fP mask name +.RE +.PP +\fBReturns:\fP +.RS 4 +mask for name; 0 on failure +.RE +.PP + +.SS "void InotifyEvent::DumpTypes (uint32_t uValue, std::string & rStr)\fC [static]\fP" +.PP +Fills the string with all types contained in an event mask value. +.PP +\fBParameters:\fP +.RS 4 +\fIuValue\fP event mask value +.br +\fIrStr\fP dumped event types +.RE +.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 + + +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/InotifyException.3 b/shared/inotify/doc/man/man3/InotifyException.3 new file mode 100644 index 00000000..90c5990d --- /dev/null +++ b/shared/inotify/doc/man/man3/InotifyException.3 @@ -0,0 +1,125 @@ +.TH "InotifyException" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +InotifyException \- Class for inotify exceptions. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <inotify-cxx.h>\fP +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBInotifyException\fP (const std::string &rMsg='', int iErr=0, void *pSrc=NULL)" +.br +.RI "\fIConstructor. \fP" +.ti -1c +.RI "const std::string & \fBGetMessage\fP () const" +.br +.RI "\fIReturns the exception message. \fP" +.ti -1c +.RI "int \fBGetErrorNumber\fP () const" +.br +.RI "\fIReturns the exception error number. \fP" +.ti -1c +.RI "void * \fBGetSource\fP () const" +.br +.RI "\fIReturns the exception source. \fP" +.in -1c +.SS "Protected Attributes" + +.in +1c +.ti -1c +.RI "std::string \fBm_msg\fP" +.br +.RI "\fImessage \fP" +.ti -1c +.RI "int \fBm_err\fP" +.br +.RI "\fIerror number \fP" +.ti -1c +.RI "void * \fBm_pSrc\fP" +.br +.RI "\fIsource \fP" +.in -1c +.SH "Detailed Description" +.PP +Class for inotify exceptions. + +This class allows to acquire information about exceptional events. It makes easier to log or display error messages and to identify problematic code locations. +.PP +Although this class is basically thread-safe it is not intended to be shared between threads. +.PP +.SH "Constructor & Destructor Documentation" +.PP +.SS "InotifyException::InotifyException (const std::string & rMsg = \fC''\fP, int iErr = \fC0\fP, void * pSrc = \fCNULL\fP)\fC [inline]\fP" +.PP +Constructor. +.PP +\fBParameters:\fP +.RS 4 +\fIrMsg\fP message +.br +\fIiErr\fP error number (see errno.h) +.br +\fIpSrc\fP source +.RE +.PP + +.SH "Member Function Documentation" +.PP +.SS "const std::string& InotifyException::GetMessage () const\fC [inline]\fP" +.PP +Returns the exception message. +.PP +\fBReturns:\fP +.RS 4 +message +.RE +.PP + +.SS "int InotifyException::GetErrorNumber () const\fC [inline]\fP" +.PP +Returns the exception error number. +.PP +If not applicable this value is 0 (zero). +.PP +\fBReturns:\fP +.RS 4 +error number (standardized; see errno.h) +.RE +.PP + +.SS "void* InotifyException::GetSource () const\fC [inline]\fP" +.PP +Returns the exception source. +.PP +\fBReturns:\fP +.RS 4 +source +.RE +.PP + +.SH "Member Data Documentation" +.PP +.SS "std::string \fBInotifyException::m_msg\fP\fC [protected]\fP" +.PP +message +.PP +.SS "int \fBInotifyException::m_err\fP\fC [protected]\fP" +.PP +error number +.PP +.SS "void* \fBInotifyException::m_pSrc\fP\fC [mutable, protected]\fP" +.PP +source +.PP + + +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/InotifyWatch.3 b/shared/inotify/doc/man/man3/InotifyWatch.3 new file mode 100644 index 00000000..ea352997 --- /dev/null +++ b/shared/inotify/doc/man/man3/InotifyWatch.3 @@ -0,0 +1,207 @@ +.TH "InotifyWatch" 3 "18 Apr 2007" "Version 0.7.2" "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, bool fEnabled=true)" +.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" +.ti -1c +.RI "void \fBSetMask\fP (uint32_t uMask) throw (InotifyException)" +.br +.RI "\fISets the watch event mask. \fP" +.ti -1c +.RI "\fBInotify\fP * \fBGetInotify\fP ()" +.br +.RI "\fIReturns the appropriate inotify class instance. \fP" +.ti -1c +.RI "void \fBSetEnabled\fP (bool fEnabled) throw (InotifyException)" +.br +.RI "\fIEnables/disables the watch. \fP" +.ti -1c +.RI "bool \fBIsEnabled\fP () const" +.br +.RI "\fIChecks whether the watch is enabled. \fP" +.ti -1c +.RI "bool \fBIsRecursive\fP () const" +.br +.RI "\fIChecks whether the watch is recursive. \fP" +.in -1c +.SS "Friends" + +.in +1c +.ti -1c +.RI "class \fBInotify\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +inotify watch class + +It holds information about the inotify watch on a particular inode. +.PP +If the INOTIFY_THREAD_SAFE is defined this class is thread-safe. +.PP +.SH "Constructor & Destructor Documentation" +.PP +.SS "InotifyWatch::InotifyWatch (const std::string & rPath, int32_t uMask, bool fEnabled = \fCtrue\fP)\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 +.br +\fIfEnabled\fP events enabled yes/no +.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 "const std::string& InotifyWatch::GetPath () const\fC [inline]\fP" +.PP +Returns the watched file path. +.PP +\fBReturns:\fP +.RS 4 +file path +.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 "void InotifyWatch::SetMask (uint32_t uMask) throw (\fBInotifyException\fP)" +.PP +Sets the watch event mask. +.PP +If the watch is active (added to an instance of \fBInotify\fP) this method may fail due to unsuccessful re-setting the watch in the kernel. +.PP +\fBParameters:\fP +.RS 4 +\fIuMask\fP event mask +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if changing fails +.RE +.PP + +.SS "\fBInotify\fP* InotifyWatch::GetInotify ()\fC [inline]\fP" +.PP +Returns the appropriate inotify class instance. +.PP +\fBReturns:\fP +.RS 4 +inotify instance +.RE +.PP + +.SS "void InotifyWatch::SetEnabled (bool fEnabled) throw (\fBInotifyException\fP)" +.PP +Enables/disables the watch. +.PP +If the watch is active (added to an instance of \fBInotify\fP) this method may fail due to unsuccessful re-setting the watch in the kernel. +.PP +Re-setting the current state has no effect. +.PP +\fBParameters:\fP +.RS 4 +\fIfEnabled\fP set enabled yes/no +.RE +.PP +\fBExceptions:\fP +.RS 4 +\fI\fBInotifyException\fP\fP thrown if enabling/disabling fails +.RE +.PP + +.SS "bool InotifyWatch::IsEnabled () const\fC [inline]\fP" +.PP +Checks whether the watch is enabled. +.PP +\fBReturns:\fP +.RS 4 +true = enables, false = disabled +.RE +.PP + +.SS "bool InotifyWatch::IsRecursive () const\fC [inline]\fP" +.PP +Checks whether the watch is recursive. +.PP +A recursive watch monitors a directory itself and all its subdirectories. This watch is a logical object which may have many underlying kernel watches. +.PP +\fBReturns:\fP +.RS 4 +currently always false (recursive watches not yet supported) +.RE +.PP +\fBAttention:\fP +.RS 4 +Recursive watches are currently NOT supported. They are planned for future versions. +.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. diff --git a/shared/inotify/doc/man/man3/inotify-cxx.cpp.3 b/shared/inotify/doc/man/man3/inotify-cxx.cpp.3 new file mode 100644 index 00000000..dd326b47 --- /dev/null +++ b/shared/inotify/doc/man/man3/inotify-cxx.cpp.3 @@ -0,0 +1,70 @@ +.TH "inotify-cxx.cpp" 3 "18 Apr 2007" "Version 0.7.2" "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 <fcntl.h>\fP +.br +\fC#include 'inotify-cxx.h'\fP +.br + +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBPROCFS_INOTIFY_BASE\fP '/proc/sys/fs/inotify/'" +.br +.RI "\fIprocfs inotify base path \fP" +.ti -1c +.RI "#define \fBDUMP_SEP\fP" +.br +.RI "\fIdump separator (between particular entries) \fP" +.in -1c +.SH "Detailed Description" +.PP +inotify C++ interface implementation + +inotify C++ interface +.PP +Copyright (C) 2006, 2007 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 +dump separator (between particular entries) +.PP +.SS "#define PROCFS_INOTIFY_BASE '/proc/sys/fs/inotify/'" +.PP +procfs inotify base path +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. diff --git a/shared/inotify/doc/man/man3/inotify-cxx.h.3 b/shared/inotify/doc/man/man3/inotify-cxx.h.3 new file mode 100644 index 00000000..4e0ec8b3 --- /dev/null +++ b/shared/inotify/doc/man/man3/inotify-cxx.h.3 @@ -0,0 +1,198 @@ +.TH "inotify-cxx.h" 3 "18 Apr 2007" "Version 0.7.2" "inotify-cxx" \" -*- nroff -*- +.ad l +.nh +.SH NAME +inotify-cxx.h \- inotify C++ interface header +.SH SYNOPSIS +.br +.PP +\fC#include <stdint.h>\fP +.br +\fC#include <string>\fP +.br +\fC#include <deque>\fP +.br +\fC#include <map>\fP +.br +\fC#include <sys/syscall.h>\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 \fBInotifyException\fP" +.br +.RI "\fIClass for inotify exceptions. \fP" +.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" +.ti -1c +.RI "#define \fBIN_EXC_MSG\fP(msg) (std::string(__PRETTY_FUNCTION__) + ': ' + msg)" +.br +.RI "\fIHelper macro for creating exception messages. \fP" +.ti -1c +.RI "#define \fBIN_LOCK_DECL\fP" +.br +.RI "\fIinotify-cxx thread safety \fP" +.ti -1c +.RI "#define \fBIN_LOCK_INIT\fP" +.br +.ti -1c +.RI "#define \fBIN_LOCK_DONE\fP" +.br +.ti -1c +.RI "#define \fBIN_READ_BEGIN\fP" +.br +.ti -1c +.RI "#define \fBIN_READ_END\fP" +.br +.ti -1c +.RI "#define \fBIN_READ_END_NOTHROW\fP" +.br +.ti -1c +.RI "#define \fBIN_WRITE_BEGIN\fP" +.br +.ti -1c +.RI "#define \fBIN_WRITE_END\fP" +.br +.ti -1c +.RI "#define \fBIN_WRITE_END_NOTHROW\fP" +.br +.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" +.ti -1c +.RI "typedef std::map< std::string, \fBInotifyWatch\fP * > \fBIN_WP_MAP\fP" +.br +.RI "\fIMapping from paths to watch objects. \fP" +.in -1c +.SS "Enumerations" + +.in +1c +.ti -1c +.RI "enum \fBInotifyCapability_t\fP { \fBIN_MAX_EVENTS\fP = 0, \fBIN_MAX_INSTANCES\fP = 1, \fBIN_MAX_WATCHES\fP = 2 }" +.br +.RI "\fIinotify capability/limit identifiers \fP" +.in -1c +.SH "Detailed Description" +.PP +inotify C++ interface header + +inotify C++ interface +.PP +Copyright (C) 2006, 2007 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 IN_EXC_MSG(msg) (std::string(__PRETTY_FUNCTION__) + ': ' + msg)" +.PP +Helper macro for creating exception messages. +.PP +It prepends the message by the function name. +.SS "#define IN_LOCK_DECL" +.PP +inotify-cxx thread safety +.PP +If this symbol is defined you can use this interface safely threaded applications. Remember that it slightly degrades performance. +.PP +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. +.PP +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. +.PP +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). +.SS "#define IN_LOCK_DONE" +.PP +.SS "#define IN_LOCK_INIT" +.PP +.SS "#define IN_READ_BEGIN" +.PP +.SS "#define IN_READ_END" +.PP +.SS "#define IN_READ_END_NOTHROW" +.PP +.SS "#define IN_WRITE_BEGIN" +.PP +.SS "#define IN_WRITE_END" +.PP +.SS "#define IN_WRITE_END_NOTHROW" +.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 +.SS "typedef std::map<std::string, \fBInotifyWatch\fP*> \fBIN_WP_MAP\fP" +.PP +Mapping from paths to watch objects. +.PP +.SH "Enumeration Type Documentation" +.PP +.SS "enum \fBInotifyCapability_t\fP" +.PP +inotify capability/limit identifiers +.PP +\fBEnumerator: \fP +.in +1c +.TP +\fB\fIIN_MAX_EVENTS \fP\fP +max. events in the kernel queue +.TP +\fB\fIIN_MAX_INSTANCES \fP\fP +max. inotify file descriptors per process +.TP +\fB\fIIN_MAX_WATCHES \fP\fP +max. watches per file descriptor +.SH "Author" +.PP +Generated automatically by Doxygen for inotify-cxx from the source code. |