incron  0.5.10
Public Member Functions | Static Public Member Functions
InotifyEvent Class Reference

inotify event class More...

#include <inotify-cxx.h>

List of all members.

Public Member Functions

 InotifyEvent ()
 Constructor.
 InotifyEvent (const struct inotify_event *pEvt, InotifyWatch *pWatch)
 Constructor.
 ~InotifyEvent ()
 Destructor.
int32_t GetDescriptor () const
 Returns the event watch descriptor.
uint32_t GetMask () const
 Returns the event mask.
bool IsType (uint32_t uType) const
 Checks for the event type.
uint32_t GetCookie () const
 Returns the event cookie.
uint32_t GetLength () const
 Returns the event name length.
const std::string & GetName () const
 Returns the event name.
void GetName (std::string &rName) const
 Extracts the event name.
InotifyWatchGetWatch ()
 Returns the source watch.
void DumpTypes (std::string &rStr) const
 Fills the string with all types contained in the event mask.

Static Public Member Functions

static bool IsType (uint32_t uValue, uint32_t uType)
 Checks a value for the event type.
static uint32_t GetMaskByName (const std::string &rName)
 Finds the appropriate mask for a name.
static void DumpTypes (uint32_t uValue, std::string &rStr)
 Fills the string with all types contained in an event mask value.

Detailed Description

inotify event class

It holds all information about inotify event and provides access to its particular values.

This class is not (and is not intended to be) thread-safe and therefore it must not be used concurrently in multiple threads.


Constructor & Destructor Documentation

InotifyEvent::InotifyEvent ( ) [inline]

Constructor.

Creates a plain event.

InotifyEvent::InotifyEvent ( const struct inotify_event *  pEvt,
InotifyWatch pWatch 
) [inline]

Constructor.

Creates an event based on inotify event data. For NULL pointers it works the same way as InotifyEvent().

Parameters:
[in]pEvtevent data
[in]pWatchinotify watch
InotifyEvent::~InotifyEvent ( ) [inline]

Destructor.


Member Function Documentation

void InotifyEvent::DumpTypes ( uint32_t  uValue,
std::string &  rStr 
) [static]

Fills the string with all types contained in an event mask value.

Parameters:
[in]uValueevent mask value
[out]rStrdumped event types
void InotifyEvent::DumpTypes ( std::string &  rStr) const

Fills the string with all types contained in the event mask.

Parameters:
[out]rStrdumped event types
uint32_t InotifyEvent::GetCookie ( ) const [inline]

Returns the event cookie.

Returns:
event cookie
int32_t InotifyEvent::GetDescriptor ( ) const

Returns the event watch descriptor.

Returns:
watch descriptor
See also:
InotifyWatch::GetDescriptor()
uint32_t InotifyEvent::GetLength ( ) const [inline]

Returns the event name length.

Returns:
event name length
uint32_t InotifyEvent::GetMask ( ) const [inline]

Returns the event mask.

Returns:
event mask
See also:
InotifyWatch::GetMask()
uint32_t InotifyEvent::GetMaskByName ( const std::string &  rName) [static]

Finds the appropriate mask for a name.

Parameters:
[in]rNamemask name
Returns:
mask for name; 0 on failure
const std::string& InotifyEvent::GetName ( ) const [inline]

Returns the event name.

Returns:
event name
void InotifyEvent::GetName ( std::string &  rName) const [inline]

Extracts the event name.

Parameters:
[out]rNameevent name
InotifyWatch* InotifyEvent::GetWatch ( ) [inline]

Returns the source watch.

Returns:
source watch
static bool InotifyEvent::IsType ( uint32_t  uValue,
uint32_t  uType 
) [inline, static]

Checks a value for the event type.

Parameters:
[in]uValuechecked value
[in]uTypetype which is checked for
Returns:
true = the value contains the given type, false = otherwise
bool InotifyEvent::IsType ( uint32_t  uType) const [inline]

Checks for the event type.

Parameters:
[in]uTypetype which is checked for
Returns:
true = event mask contains the given type, false = otherwise

The documentation for this class was generated from the following files: