InotifyEvent Class Reference

inotify event class More...

#include <inotify-cxx.h>

Collaboration diagram for InotifyEvent:

Collaboration graph
[legend]

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.

Private Attributes

uint32_t m_uMask
 mask
uint32_t m_uCookie
 cookie
std::string m_name
 name
InotifyWatchm_pWatch
 source watch


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] pEvt event data
[in] pWatch inotify watch

InotifyEvent::~InotifyEvent (  )  [inline]

Destructor.


Member Function Documentation

void InotifyEvent::DumpTypes ( std::string &  rStr  )  const

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

Parameters:
[out] rStr dumped event types

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

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

Parameters:
[in] uValue event mask value
[out] rStr dumped event types

Here is the caller graph for this function:

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()

Here is the caller graph for this function:

uint32_t InotifyEvent::GetMaskByName ( const std::string &  rName  )  [static]

Finds the appropriate mask for a name.

Parameters:
[in] rName mask name
Returns:
mask for name; 0 on failure

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

Extracts the event name.

Parameters:
[out] rName event name

const std::string& InotifyEvent::GetName (  )  const [inline]

Returns the event name.

Returns:
event name

Here is the caller graph for this function:

InotifyWatch* InotifyEvent::GetWatch (  )  [inline]

Returns the source watch.

Returns:
source watch

bool InotifyEvent::IsType ( uint32_t  uType  )  const [inline]

Checks for the event type.

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

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

Checks a value for the event type.

Parameters:
[in] uValue checked value
[in] uType type which is checked for
Returns:
true = the value contains the given type, false = otherwise

Here is the caller graph for this function:


Member Data Documentation

std::string InotifyEvent::m_name [private]

name

source watch

uint32_t InotifyEvent::m_uCookie [private]

cookie

uint32_t InotifyEvent::m_uMask [private]

mask


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

doxygen