Monitors the filesystem and call the WsFsTreeUpdater::update() method accordignly.
More...
#include <WsMonitor.h>
|
| int | startCallBack () |
| | Starts monitoring the Files of the filesystemtree Should be started in a separated thread. More...
|
| |
| int | startCallBackConfOnly () |
| | Starts monitoring the config Files of the filesystemtree Should be started in a separated thread. More...
|
| |
| int | startChecker () |
| | Starts loop that will monitor the m_updated variable every m_delay and update the tree if changed occured. More...
|
| |
| int | addDirectory (const path &p) |
| |
| const char * | eventName (const int &code) |
| | Matches an event code with it's name. More...
|
| |
| int | signal (const std::string &filename, const int &code) |
| | Called when a change occurs on a file monitored. More...
|
| |
| int | signalConf (const std::string &filename, const int &code) |
| | Called when a change occurs on a conf file monitored. More...
|
| |
Monitors the filesystem and call the WsFsTreeUpdater::update() method accordignly.
Definition at line 31 of file WsMonitor.h.
| WsMonitor::WsMonitor |
( |
WsFsTreeUpdater * |
u, |
|
|
std::vector< path > |
v, |
|
|
unsigned int |
delay |
|
) |
| |
| WsMonitor::~WsMonitor |
( |
| ) |
|
| int WsMonitor::addDirectory |
( |
const path & |
p | ) |
|
|
private |
| const char * WsMonitor::eventName |
( |
const int & |
code | ) |
|
|
private |
Matches an event code with it's name.
- Parameters
-
- Returns
- a char* containing the event name or unknown if no match found
Definition at line 47 of file WsMonitor.cpp.
| int WsMonitor::signal |
( |
const std::string & |
filename, |
|
|
const int & |
code |
|
) |
| |
|
private |
Called when a change occurs on a file monitored.
Sets the m_updated variable to true if event code is FamDeleted or FamCreated
- Parameters
-
| filename | the path to the file changed |
| code | the event code |
- Returns
- SUCCESS
Definition at line 205 of file WsMonitor.cpp.
| int WsMonitor::signalConf |
( |
const std::string & |
filename, |
|
|
const int & |
code |
|
) |
| |
|
private |
Called when a change occurs on a conf file monitored.
Sets the m_updated variable to true if event code is FamDeleted or FamCreated
- Parameters
-
| filename | the path to the conf file changed |
| code | the event code |
- Returns
- SUCCESS
Definition at line 228 of file WsMonitor.cpp.
| boost::thread * WsMonitor::start |
( |
| ) |
|
|
virtual |
| int WsMonitor::startCallBack |
( |
| ) |
|
|
private |
Starts monitoring the Files of the filesystemtree Should be started in a separated thread.
- Returns
- FAILURE if failed, otherwise endless loop
Definition at line 95 of file WsMonitor.cpp.
| int WsMonitor::startCallBackConfOnly |
( |
| ) |
|
|
private |
Starts monitoring the config Files of the filesystemtree Should be started in a separated thread.
- Returns
- FAILURE if failed, otherwise endless loop
Definition at line 148 of file WsMonitor.cpp.
| int WsMonitor::startChecker |
( |
| ) |
|
|
private |
Starts loop that will monitor the m_updated variable every m_delay and update the tree if changed occured.
- Returns
- Nothing
Definition at line 80 of file WsMonitor.cpp.
| unsigned int WsMonitor::m_delay |
|
private |
| FAMConnection* WsMonitor::m_fc |
|
private |
| FAMConnection* WsMonitor::m_fc2 |
|
private |
| FAMRequest* WsMonitor::m_frp |
|
private |
| FAMRequest* WsMonitor::m_frp2 |
|
private |
| std::vector<path> WsMonitor::m_paths |
|
private |
| bool WsMonitor::m_updated |
|
private |
The documentation for this class was generated from the following files:
- /Users/benoitdaccache/Documents/Dropbox/Programming/Ws/wscore/src/Updater/WsMonitor.h
- /Users/benoitdaccache/Documents/Dropbox/Programming/Ws/wscore/src/Updater/WsMonitor.cpp