Anklang C++ API 0.0.0
Loading...
Searching...
No Matches
Driverabstract

#include "driver.hh"

Inheritance diagram for Driver:
[legend]

Classes

struct Flags

Public Types

enum {
  SURROUND , HEADSET , RECORDER , MIDI_THRU ,
  JACK , ALSA_USB , ALSA_KERN , OSS ,
  PULSE , ALSA_USER , PSEUDO , PAUTO ,
  PNULL , WCARD , WDEV , WSUB
}
typedef std::shared_ptr< Driver >DriverP
usingEntry = DriverEntry
usingEntryVec = DriverEntryS
enum IODir { READONLY , WRITEONLY , READWRITE }

Public Member Functions

virtual voidclose ()=0
Stringdevid () const
boolopened () const
boolreadable () const
boolwritable () const

Static Public Member Functions

static Stringpriority_string (uint priority)

Protected Member Functions

Driver (const String &driver, const String &devid)
template<class Derived >
std::shared_ptr< Derived >shared_from_base ()
virtual~Driver ()

Protected Attributes

const Stringdevid_
const Stringdriver_
size_tflags_

Detailed Description

Base class for a PCM and MIDI devices.

Member Typedef Documentation

DriverP

typedef std::shared_ptr<Driver> DriverP

Entry

using Entry = DriverEntry

EntryVec

using EntryVec = DriverEntryS

Member Enumeration Documentation

anonymous enum

anonymous enum
Enumerator
SURROUND
HEADSET
RECORDER
MIDI_THRU
JACK
ALSA_USB
ALSA_KERN
OSS
PULSE
ALSA_USER
PSEUDO
PAUTO
PNULL
WCARD
WDEV
WSUB

IODir

enum IODir
Enumerator
READONLY
WRITEONLY
READWRITE

Constructor & Destructor Documentation

Driver()

Driver ( const String & driver,
const String & devid
)
explicitprotected

~Driver()

~Driver ( )
protectedvirtual

Member Function Documentation

shared_from_base()

template<class Derived >
std::shared_ptr< Derived > shared_from_base ( )
protected

opened()

bool opened ( ) const

readable()

bool readable ( ) const

writable()

bool writable ( ) const

devid()

String devid ( ) const

Return a string which uniquely identifies this driver and device.

close()

virtual void close ( )
pure virtual

Implemented in NullPcmDriver, and NullMidiDriver.

priority_string()

String priority_string ( uint priority)
static

Return string which represents the given priority mask.

Member Data Documentation

driver_

const String driver_
protected

devid_

const String devid_
protected

flags_

size_t flags_
protected