#include <usertable.h>
Public Member Functions | |
UserTable (Inotify *pIn, EventDispatcher *pEd, const std::string &rUser) | |
Constructor. | |
virtual | ~UserTable () |
Destructor. | |
void | Load () |
Loads the table. | |
void | Dispose () |
Removes all entries from the table. | |
void | OnEvent (InotifyEvent &rEvt) |
Processes an inotify event. | |
Static Public Member Functions | |
static void | FinishDone () |
Cleans-up all zombie child processes and enables disabled watches. |
This class processes inotify events for an user. It creates child processes which do appropriate actions as defined in the user table file.
UserTable::UserTable | ( | Inotify * | pIn, | |
EventDispatcher * | pEd, | |||
const std::string & | rUser | |||
) |
Constructor.
[in] | pIn | inotify object |
[in] | pEd | event dispatcher |
[in] | rUser | user name |
UserTable::~UserTable | ( | ) | [virtual] |
Destructor.
void UserTable::Load | ( | ) |
Loads the table.
All loaded entries have their inotify watches and are registered for event dispatching. If loading fails the table remains empty.
void UserTable::Dispose | ( | ) |
Removes all entries from the table.
All entries are unregistered from the event dispatcher and their watches are destroyed.
void UserTable::OnEvent | ( | InotifyEvent & | rEvt | ) |
Processes an inotify event.
[in] | rEvt | inotify event |
void UserTable::FinishDone | ( | ) | [static] |
Cleans-up all zombie child processes and enables disabled watches.