UserTable Class Reference

User table class. More...

#include <usertable.h>

List of all members.

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.
bool MayAccess (const std::string &rPath, bool fNoFollow) const
 Checks whether the user may access a file.

Static Public Member Functions

static void FinishDone ()
 Cleans-up all zombie child processes and enables disabled watches.


Detailed Description

User table class.

This class processes inotify events for an user. It creates child processes which do appropriate actions as defined in the user table file.


Constructor & Destructor Documentation

UserTable::UserTable ( Inotify pIn,
EventDispatcher pEd,
const std::string &  rUser 
)

Constructor.

Parameters:
[in] pIn inotify object
[in] pEd event dispatcher
[in] rUser user name

UserTable::~UserTable (  )  [virtual]

Destructor.


Member Function Documentation

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.

Parameters:
[in] rEvt inotify event

void UserTable::FinishDone (  )  [static]

Cleans-up all zombie child processes and enables disabled watches.

Attention:
This method must be called AFTER processing all events which has been caused by the processes.

bool UserTable::MayAccess ( const std::string &  rPath,
bool  fNoFollow 
) const

Checks whether the user may access a file.

Any access right (RWX) is sufficient.

Parameters:
[in] rPath absolute file path
[in] fNoFollow don't follow a symbolic link
Returns:
true = access granted, false = otherwise


The documentation for this class was generated from the following files:
Generated on Sat Jan 6 23:06:33 2007 for incron by  doxygen 1.5.1