Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::events::MountedVolumeListChangeDetector Class Reference

Detects when volumes are mounted or unmounted. More...

#include <volume_detector.hpp>

Public Member Functions

 MountedVolumeListChangeDetector ()=default
 ~MountedVolumeListChangeDetector ()
void start (std::chrono::milliseconds interval=std::chrono::seconds(2))
 Start monitoring with the given poll interval.
void stop ()
 Stop monitoring.
bool is_running () const
 Whether monitoring is active.

Static Public Member Functions

static std::vector< std::string > get_mounted_volumes ()
 Get current list of mounted volumes.

Public Attributes

std::function< void(const std::vector< std::string > &volumes)> on_change
 Called when the volume list changes.

Detailed Description

Detects when volumes are mounted or unmounted.

Polls the filesystem at a configurable interval.

Constructor & Destructor Documentation

◆ MountedVolumeListChangeDetector()

pulp::events::MountedVolumeListChangeDetector::MountedVolumeListChangeDetector ( )
default

◆ ~MountedVolumeListChangeDetector()

pulp::events::MountedVolumeListChangeDetector::~MountedVolumeListChangeDetector ( )

Member Function Documentation

◆ get_mounted_volumes()

std::vector< std::string > pulp::events::MountedVolumeListChangeDetector::get_mounted_volumes ( )
static

Get current list of mounted volumes.

◆ is_running()

bool pulp::events::MountedVolumeListChangeDetector::is_running ( ) const
inline

Whether monitoring is active.

◆ start()

void pulp::events::MountedVolumeListChangeDetector::start ( std::chrono::milliseconds interval = std::chrono::seconds(2))

Start monitoring with the given poll interval.

◆ stop()

void pulp::events::MountedVolumeListChangeDetector::stop ( )

Stop monitoring.

Member Data Documentation

◆ on_change

std::function<void(const std::vector<std::string>& volumes)> pulp::events::MountedVolumeListChangeDetector::on_change

Called when the volume list changes.


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