TSDuck Version 3.24-2000 (TSDuck - The MPEG Transport Stream Toolkit)
ts::PollFilesListener Class Referenceabstract

Interface for classes listening for file modification. More...

Public Member Functions

virtual ~PollFilesListener ()
 Virtual destructor.
 
virtual bool handlePolledFiles (const PolledFileList &files)=0
 Invoked when files have changed. More...
 
virtual bool updatePollFiles (UString &wildcard, MilliSecond &poll_interval, MilliSecond &min_stable_delay)
 Invoked before each poll to give the opportunity to change where and how the files are polled. More...
 

Detailed Description

Interface for classes listening for file modification.

Member Function Documentation

◆ handlePolledFiles()

virtual bool ts::PollFilesListener::handlePolledFiles ( const PolledFileList files)
pure virtual

Invoked when files have changed.

Parameters
[in]filesList of changed files since last time. The entries in the list are sorted by file names.
Returns
True to continue polling, false to exit polling.

◆ updatePollFiles()

virtual bool ts::PollFilesListener::updatePollFiles ( UString wildcard,
MilliSecond poll_interval,
MilliSecond min_stable_delay 
)
virtual

Invoked before each poll to give the opportunity to change where and how the files are polled.

This is an optional feature, the default implementation does not change anything.

Parameters
[in,out]wildcardWildcard specification of files to poll (eg "/path/to/*.dat").
[in,out]poll_intervalInterval in milliseconds between two poll operations.
[in,out]min_stable_delayA file size needs to be stable during that duration for the file to be reported as added or modified. This prevent too frequent poll notifications when a file is being written and his size modified at each poll.
Returns
True to continue polling, false to exit polling.

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