Synergy Color Management Component - SDK -  2018.0.80
SYNCOLOR::TransformPathMonitor Class Reference

Monitor a path for transform directories and files. More...

Classes

class  Callback
 Callback class required for retrieving directory and file lists. More...
 

Public Member Functions

 TransformPathMonitor (const char *path)
 Constructor. More...
 
 ~TransformPathMonitor ()
 Destructor. More...
 
SynStatus setPath (const char *path)
 Set the base path to monitor. More...
 
const char * getPath () const
 Monitored path. More...
 
SynStatus listDirectories (const char *relativePath, Callback &callback)
 List of monitored directories. More...
 
SynStatus listFiles (const char *relativePath, Callback &callback)
 List of monitored transforms files in a given directory. More...
 
SynStatus getFileFullPath (const char *relativePath, const char *fileName, char *fullPath, unsigned fullPathSize)
 Full path for the specified transform directory and filename. More...
 

Private Attributes

Impl * _pImpl
 Opaque implementation instance. More...
 

Detailed Description

Monitor a path for transform directories and files.

This class observes a directory and provides the list of directories and supported color transform files in its hierarchy. If a directory or file is added within the hierarchy, subsequent calls to listDirectories() and listFiles() will contain the updated lists.

Constructor & Destructor Documentation

SYNCOLOR::TransformPathMonitor::TransformPathMonitor ( const char *  path)

Constructor.

Parameters
pathBase path to monitor.
SYNCOLOR::TransformPathMonitor::~TransformPathMonitor ( )

Destructor.

Member Function Documentation

SynStatus SYNCOLOR::TransformPathMonitor::setPath ( const char *  path)

Set the base path to monitor.

Parameters
pathBase path to monitor.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
const char* SYNCOLOR::TransformPathMonitor::getPath ( ) const

Monitored path.

Returns
Base path being monitored. This string is not to be deleted.
SynStatus SYNCOLOR::TransformPathMonitor::listDirectories ( const char *  relativePath,
Callback callback 
)

List of monitored directories.

Directory names are provided to the Callback::processEntry() method one by one in a lexically sorted order.

Parameters
relativePathSub-path relative to the monitor base path. Use the empty string for the TransformPathMonitor base path.
callbackCallback implementation.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
SynStatus SYNCOLOR::TransformPathMonitor::listFiles ( const char *  relativePath,
Callback callback 
)

List of monitored transforms files in a given directory.

File names are provided to the Callback::processEntry() method one by one in a lexically sorted order.

Parameters
relativePathSub-path relative to the monitor base path. Use the empty string for TransformPathMonitor base path.
callbackCallback implementation.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.
SynStatus SYNCOLOR::TransformPathMonitor::getFileFullPath ( const char *  relativePath,
const char *  fileName,
char *  fullPath,
unsigned  fullPathSize 
)

Full path for the specified transform directory and filename.

Parameters
relativePathSub-path relative to the monitor base path. Use the empty string for TransformPathMonitor base path.
fileNameFile name provided by getList().
fullPathpointer Return full path buffer.
fullPathSizeReturn buffer size.
Returns
Returns a SYNCOLOR::SynStatus. Check the error code to determine if an error occurred.

Member Data Documentation

Impl* SYNCOLOR::TransformPathMonitor::_pImpl
private

Opaque implementation instance.