Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WsFsTreeUpdater Class Reference

handles the update of the FileSystemTree More...

#include <WsFsTreeUpdater.h>

Collaboration diagram for WsFsTreeUpdater:
Collaboration graph

Public Member Functions

 WsFsTreeUpdater (const std::string &p, unsigned int delay, bool m=false)
 constrictor More...
 
 ~WsFsTreeUpdater ()
 
int update ()
 update the fsTree More...
 
FileSystemTreePtr getLastTree ()
 returns the last created tree More...
 
bool isLastVersion (FileSystemTreePtr fs)
 checks whether the fs is the last version More...
 

Private Member Functions

int startRegularUpdate ()
 Starts the regular update of the tree. More...
 
int threadUpdate ()
 Updates the tree in a thread. More...
 

Private Attributes

std::string m_rootPath
 RootPath. More...
 
bool m_isMonitor
 Use Gamin or no. More...
 
WsAbstractMonitorm_monitor
 Pointer to the file monitoring class used. More...
 
unsigned int m_delay
 Delay after which the FileSystemTree will be updated if changed occured. More...
 
FileSystemTreePtr m_fsTree
 
boost::mutex m_lMutex
 
boost::mutex m_updateMutex
 
bool m_isLoaded
 

Detailed Description

handles the update of the FileSystemTree

Updates the FileSystemTree by launching Gamin or by regularly updating it

Definition at line 34 of file WsFsTreeUpdater.h.

Constructor & Destructor Documentation

WsFsTreeUpdater::WsFsTreeUpdater ( const std::string &  p,
unsigned int  delay,
bool  m = false 
)

constrictor

Parameters
pthe root path
mMonitor or not ?

Definition at line 18 of file WsFsTreeUpdater.cpp.

WsFsTreeUpdater::~WsFsTreeUpdater ( )

Definition at line 27 of file WsFsTreeUpdater.cpp.

Member Function Documentation

FileSystemTreePtr WsFsTreeUpdater::getLastTree ( )

returns the last created tree

Definition at line 34 of file WsFsTreeUpdater.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool WsFsTreeUpdater::isLastVersion ( FileSystemTreePtr  fs)

checks whether the fs is the last version

Parameters
fsthe FilsSystemTree to check
Returns
true if is the same, false otherwise

Definition at line 84 of file WsFsTreeUpdater.cpp.

int WsFsTreeUpdater::startRegularUpdate ( )
private

Starts the regular update of the tree.

This method must be called in a thread and only if Gamin is disabled

Returns
SUCCESS or FAILURE

Definition at line 99 of file WsFsTreeUpdater.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int WsFsTreeUpdater::threadUpdate ( )
private

Updates the tree in a thread.

Returns
SUCCESS or FAILURE

Definition at line 89 of file WsFsTreeUpdater.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

int WsFsTreeUpdater::update ( )

update the fsTree

Returns
SUCCESS or FAILURE

Definition at line 46 of file WsFsTreeUpdater.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

unsigned int WsFsTreeUpdater::m_delay
private

Delay after which the FileSystemTree will be updated if changed occured.

Definition at line 98 of file WsFsTreeUpdater.h.

FileSystemTreePtr WsFsTreeUpdater::m_fsTree
private

Definition at line 100 of file WsFsTreeUpdater.h.

bool WsFsTreeUpdater::m_isLoaded
private

Definition at line 104 of file WsFsTreeUpdater.h.

bool WsFsTreeUpdater::m_isMonitor
private

Use Gamin or no.

Definition at line 88 of file WsFsTreeUpdater.h.

boost::mutex WsFsTreeUpdater::m_lMutex
private

Definition at line 102 of file WsFsTreeUpdater.h.

WsAbstractMonitor* WsFsTreeUpdater::m_monitor
private

Pointer to the file monitoring class used.

Definition at line 93 of file WsFsTreeUpdater.h.

std::string WsFsTreeUpdater::m_rootPath
private

RootPath.

Definition at line 83 of file WsFsTreeUpdater.h.

boost::mutex WsFsTreeUpdater::m_updateMutex
private

Definition at line 103 of file WsFsTreeUpdater.h.


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