Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::kernel::SourceInfo Class Reference

Provides information about sources as strings. More...

#include <source_info.h>

Inheritance diagram for sen::kernel::SourceInfo:

Public Member Functions

virtual ~SourceInfo ()=default
const std::string & getName () const noexcept
 The name of the session.
std::vector< std::string > getDetectedSources () const
 Name of the buses discovered so far.
void onSourceDetected (const std::function< void(const std::string &)> &callback)
 Sets a callback that will be invoked when sources are detected. The first time it will be called for each of the already-detected sources. Replaces any previously-set callback.
void onSourceUndetected (const std::function< void(const std::string &)> &callback)
 Sets a callback that will be invoked when sources are undetected. Replaces any previously-set callback.

Protected Member Functions

 SourceInfo (std::string name)
void addSource (const std::string &name)
void removeSource (const std::string &name)
virtual void drainInputs ()
void lock ()
void unlock ()

Friends

class SessionsDiscoverer
class impl::Runner

Detailed Description

Provides information about sources as strings.

Constructor & Destructor Documentation

◆ ~SourceInfo()

virtual sen::kernel::SourceInfo::~SourceInfo ( )
virtualdefault

◆ SourceInfo()

sen::kernel::SourceInfo::SourceInfo ( std::string name)
explicitprotected

Member Function Documentation

◆ getName()

const std::string & sen::kernel::SourceInfo::getName ( ) const
nodiscardnoexcept

The name of the session.

◆ getDetectedSources()

std::vector< std::string > sen::kernel::SourceInfo::getDetectedSources ( ) const
nodiscard

Name of the buses discovered so far.

◆ onSourceDetected()

void sen::kernel::SourceInfo::onSourceDetected ( const std::function< void(const std::string &)> & callback)

Sets a callback that will be invoked when sources are detected. The first time it will be called for each of the already-detected sources. Replaces any previously-set callback.

◆ onSourceUndetected()

void sen::kernel::SourceInfo::onSourceUndetected ( const std::function< void(const std::string &)> & callback)

Sets a callback that will be invoked when sources are undetected. Replaces any previously-set callback.

◆ addSource()

void sen::kernel::SourceInfo::addSource ( const std::string & name)
protected

◆ removeSource()

void sen::kernel::SourceInfo::removeSource ( const std::string & name)
protected

◆ drainInputs()

virtual void sen::kernel::SourceInfo::drainInputs ( )
protectedvirtual

◆ lock()

void sen::kernel::SourceInfo::lock ( )
protected

◆ unlock()

void sen::kernel::SourceInfo::unlock ( )
protected

◆ SessionsDiscoverer

friend class SessionsDiscoverer
friend

◆ impl::Runner

friend class impl::Runner
friend

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