TSDuck v3.40-4033
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::PollFilesListener Class Referenceabstract

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

#include <tsPollFilesListener.h>

Public Member Functions

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

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,
cn::milliseconds &  poll_interval,
cn::milliseconds &  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: