#include <inotify-cxx.h>
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. | |
InotifyWatch * | GetWatch () |
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 | |
InotifyWatch * | m_pWatch |
source watch |
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.
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().
[in] | pEvt | event data |
[in] | pWatch | inotify watch |
InotifyEvent::~InotifyEvent | ( | ) | [inline] |
Destructor.
void InotifyEvent::DumpTypes | ( | std::string & | rStr | ) | const |
Fills the string with all types contained in the event mask.
[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.
[in] | uValue | event mask value |
[out] | rStr | dumped event types |
uint32_t InotifyEvent::GetCookie | ( | ) | const [inline] |
Returns the event cookie.
int32_t InotifyEvent::GetDescriptor | ( | ) | const |
uint32_t InotifyEvent::GetLength | ( | ) | const [inline] |
Returns the event name length.
uint32_t InotifyEvent::GetMask | ( | ) | const [inline] |
Returns the event mask.
uint32_t InotifyEvent::GetMaskByName | ( | const std::string & | rName | ) | [static] |
Finds the appropriate mask for a name.
[in] | rName | mask name |
void InotifyEvent::GetName | ( | std::string & | rName | ) | const [inline] |
Extracts the event name.
[out] | rName | event name |
const std::string& InotifyEvent::GetName | ( | ) | const [inline] |
Returns the event name.
InotifyWatch* InotifyEvent::GetWatch | ( | ) | [inline] |
Returns the source watch.
bool InotifyEvent::IsType | ( | uint32_t | uType | ) | const [inline] |
Checks for the event type.
[in] | uType | type which is checked for |
static bool InotifyEvent::IsType | ( | uint32_t | uValue, | |
uint32_t | uType | |||
) | [inline, static] |
Checks a value for the event type.
[in] | uValue | checked value |
[in] | uType | type which is checked for |
std::string InotifyEvent::m_name [private] |
name
InotifyWatch* InotifyEvent::m_pWatch [private] |
source watch
uint32_t InotifyEvent::m_uCookie [private] |
cookie
uint32_t InotifyEvent::m_uMask [private] |
mask