AudioManager  7.6.6
Native Application Runtime Environment
am::CAmCommandReceiver Class Reference

This class realizes the command Interface. More...

#include <CAmCommandReceiver.h>

Inheritance diagram for am::CAmCommandReceiver:
am::IAmCommandReceive

Public Member Functions

 CAmCommandReceiver (IAmDatabaseHandler *iDatabaseHandler, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler)
 
 CAmCommandReceiver (IAmDatabaseHandler *iDatabaseHandler, CAmControlSender *iControlSender, CAmSocketHandler *iSocketHandler, CAmDbusWrapper *iDBusWrapper)
 
 ~CAmCommandReceiver ()
 
am_Error_e connect (const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t &mainConnectionID)
 connects a source to sink More...
 
am_Error_e disconnect (const am_mainConnectionID_t mainConnectionID)
 disconnects a mainConnection More...
 
am_Error_e setVolume (const am_sinkID_t sinkID, const am_mainVolume_t volume)
 sets the volume for a sink More...
 
am_Error_e volumeStep (const am_sinkID_t sinkID, const int16_t volumeStep)
 This function is used to increment or decrement the current volume for a sink. More...
 
am_Error_e setSinkMuteState (const am_sinkID_t sinkID, const am_MuteState_e muteState)
 sets the mute state of a sink More...
 
am_Error_e setMainSinkSoundProperty (const am_MainSoundProperty_s &soundProperty, const am_sinkID_t sinkID)
 This method is used to set sound properties, e.g. More...
 
am_Error_e setMainSourceSoundProperty (const am_MainSoundProperty_s &soundProperty, const am_sourceID_t sourceID)
 This method is used to set sound properties, e.g. More...
 
am_Error_e setSystemProperty (const am_SystemProperty_s &property)
 is used to set a specific system property. More...
 
am_Error_e getVolume (const am_sinkID_t sinkID, am_mainVolume_t &mainVolume) const
 Returns the current volume for the sink directly out of the database. More...
 
am_Error_e getListMainConnections (std::vector< am_MainConnectionType_s > &listConnections) const
 returns the actual list of MainConnections More...
 
am_Error_e getListMainSinks (std::vector< am_SinkType_s > &listMainSinks) const
 returns the actual list of Sinks More...
 
am_Error_e getListMainSources (std::vector< am_SourceType_s > &listMainSources) const
 returns the actual list of Sources More...
 
am_Error_e getListMainSinkSoundProperties (const am_sinkID_t sinkID, std::vector< am_MainSoundProperty_s > &listSoundProperties) const
 This is used to retrieve all source sound properties related to a source. More...
 
am_Error_e getListMainSourceSoundProperties (const am_sourceID_t sourceID, std::vector< am_MainSoundProperty_s > &listSourceProperties) const
 This is used to retrieve all source sound properties related to a source. More...
 
am_Error_e getListSourceClasses (std::vector< am_SourceClass_s > &listSourceClasses) const
 This is used to retrieve SourceClass Information of all source classes. More...
 
am_Error_e getListSinkClasses (std::vector< am_SinkClass_s > &listSinkClasses) const
 This is used to retrieve SinkClass Information of all sink classes. More...
 
am_Error_e getListSystemProperties (std::vector< am_SystemProperty_s > &listSystemProperties) const
 Retrieves a complete list of all systemProperties. More...
 
am_Error_e getTimingInformation (const am_mainConnectionID_t mainConnectionID, am_timeSync_t &delay) const
 returns the delay in ms that the audiopath for the given mainConnection has More...
 
am_Error_e getDBusConnectionWrapper (CAmDbusWrapper *&dbusConnectionWrapper) const
 this function is used to retrieve a pointer to the dBusConnectionWrapper More...
 
am_Error_e getSocketHandler (CAmSocketHandler *&socketHandler) const
 This function returns the pointer to the socketHandler. More...
 
void confirmCommandReady (const uint16_t handle, const am_Error_e error)
 asynchronous confirmation of setCommandReady. More...
 
void confirmCommandRundown (const uint16_t handle, const am_Error_e error)
 asynchronous confirmation of setCommandRundown More...
 
void getInterfaceVersion (std::string &version) const
 This function returns the version of the interface. More...
 
am_Error_e getListMainSinkNotificationConfigurations (const am_sinkID_t sinkID, std::vector< am_NotificationConfiguration_s > &listMainNotificationConfigurations) const
 Retrieves the list of MainNotifications for a sink. More...
 
am_Error_e getListMainSourceNotificationConfigurations (const am_sourceID_t sourceID, std::vector< am_NotificationConfiguration_s > &listMainNotificationConfigurations) const
 Retrieves the list of MainNotifications for a source. More...
 
am_Error_e setMainSinkNotificationConfiguration (const am_sinkID_t sinkID, const am_NotificationConfiguration_s &mainNotificationConfiguration)
 sets a MainNotificationConfiuration. More...
 
am_Error_e setMainSourceNotificationConfiguration (const am_sourceID_t sourceID, const am_NotificationConfiguration_s &mainNotificationConfiguration)
 sets a MainNotificationConfiuration. More...
 
uint16_t getStartupHandle ()
 returns a startup handle More...
 
uint16_t getRundownHandle ()
 returns a rundown handle More...
 
void waitOnStartup (bool startup)
 tells the ComandReceiver to start waiting for all handles to be confirmed More...
 
void waitOnRundown (bool rundown)
 tells the ComandReceiver to start waiting for all handles to be confirmed More...
 
- Public Member Functions inherited from am::IAmCommandReceive
 IAmCommandReceive ()
 
virtual ~IAmCommandReceive ()
 

Detailed Description

This class realizes the command Interface.

Definition at line 40 of file CAmCommandReceiver.h.

Constructor & Destructor Documentation

am::CAmCommandReceiver::CAmCommandReceiver ( IAmDatabaseHandler iDatabaseHandler,
CAmControlSender iControlSender,
CAmSocketHandler iSocketHandler 
)

Definition at line 37 of file CAmCommandReceiver.cpp.

am::CAmCommandReceiver::CAmCommandReceiver ( IAmDatabaseHandler iDatabaseHandler,
CAmControlSender iControlSender,
CAmSocketHandler iSocketHandler,
CAmDbusWrapper iDBusWrapper 
)

Definition at line 56 of file CAmCommandReceiver.cpp.

am::CAmCommandReceiver::~CAmCommandReceiver ( )

Definition at line 75 of file CAmCommandReceiver.cpp.

Member Function Documentation

void am::CAmCommandReceiver::confirmCommandReady ( const uint16_t  handle,
const am_Error_e  error 
)
virtual

asynchronous confirmation of setCommandReady.

Implements am::IAmCommandReceive.

Definition at line 199 of file CAmCommandReceiver.cpp.

void am::CAmCommandReceiver::confirmCommandRundown ( const uint16_t  handle,
const am_Error_e  error 
)
virtual

asynchronous confirmation of setCommandRundown

Implements am::IAmCommandReceive.

Definition at line 208 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::connect ( const am_sourceID_t  sourceID,
const am_sinkID_t  sinkID,
am_mainConnectionID_t mainConnectionID 
)
virtual

connects a source to sink

Returns
E_OK on success, E_NOT_POSSIBLE on failure, E_ALREADY_EXISTS if the connection does already exists

Implements am::IAmCommandReceive.

Definition at line 79 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::disconnect ( const am_mainConnectionID_t  mainConnectionID)
virtual

disconnects a mainConnection

Returns
E_OK on successes, E_NON_EXISTENT if the connection does not exist, E_NOT_POSSIBLE on error.

Implements am::IAmCommandReceive.

Definition at line 85 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getDBusConnectionWrapper ( CAmDbusWrapper *&  dbusConnectionWrapper) const
virtual

this function is used to retrieve a pointer to the dBusConnectionWrapper

Returns
E_OK if pointer is valid, E_UKNOWN if AudioManager was compiled without DBus Support

Implements am::IAmCommandReceive.

Definition at line 177 of file CAmCommandReceiver.cpp.

void am::CAmCommandReceiver::getInterfaceVersion ( std::string &  version) const
virtual

This function returns the version of the interface.

Implements am::IAmCommandReceive.

Definition at line 194 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListMainConnections ( std::vector< am_MainConnectionType_s > &  listConnections) const
virtual

returns the actual list of MainConnections

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 132 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListMainSinkNotificationConfigurations ( const am_sinkID_t  sinkID,
std::vector< am_NotificationConfiguration_s > &  listMainNotificationConfigurations 
) const
virtual

Retrieves the list of MainNotifications for a sink.

Does not return the possible ones.

Implements am::IAmCommandReceive.

Definition at line 237 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListMainSinks ( std::vector< am_SinkType_s > &  listMainSinks) const
virtual

returns the actual list of Sinks

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 137 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListMainSinkSoundProperties ( const am_sinkID_t  sinkID,
std::vector< am_MainSoundProperty_s > &  listSoundProperties 
) const
virtual

This is used to retrieve all source sound properties related to a source.

Returns a vector of the sound properties and values as pair

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 147 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListMainSourceNotificationConfigurations ( const am_sourceID_t  sourceID,
std::vector< am_NotificationConfiguration_s > &  listMainNotificationConfigurations 
) const
virtual

Retrieves the list of MainNotifications for a source.

Does not return the possible ones.

Implements am::IAmCommandReceive.

Definition at line 242 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListMainSources ( std::vector< am_SourceType_s > &  listMainSources) const
virtual

returns the actual list of Sources

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 142 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListMainSourceSoundProperties ( const am_sourceID_t  sourceID,
std::vector< am_MainSoundProperty_s > &  listSourceProperties 
) const
virtual

This is used to retrieve all source sound properties related to a source.

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 152 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListSinkClasses ( std::vector< am_SinkClass_s > &  listSinkClasses) const
virtual

This is used to retrieve SinkClass Information of all sink classes.

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 162 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListSourceClasses ( std::vector< am_SourceClass_s > &  listSourceClasses) const
virtual

This is used to retrieve SourceClass Information of all source classes.

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 157 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getListSystemProperties ( std::vector< am_SystemProperty_s > &  listSystemProperties) const
virtual

Retrieves a complete list of all systemProperties.

Returns
E_OK on success, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 167 of file CAmCommandReceiver.cpp.

uint16_t am::CAmCommandReceiver::getRundownHandle ( )

returns a rundown handle

Definition at line 224 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getSocketHandler ( CAmSocketHandler *&  socketHandler) const
virtual

This function returns the pointer to the socketHandler.

This can be used to integrate socket-based activites like communication with the mainloop of the AudioManager. returns E_OK if pointer is valid, E_UNKNOWN in case AudioManager was compiled without socketHandler support,

Implements am::IAmCommandReceive.

Definition at line 188 of file CAmCommandReceiver.cpp.

uint16_t am::CAmCommandReceiver::getStartupHandle ( )

returns a startup handle

Definition at line 217 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getTimingInformation ( const am_mainConnectionID_t  mainConnectionID,
am_timeSync_t delay 
) const
virtual

returns the delay in ms that the audiopath for the given mainConnection has

Returns
E_OK on success, E_NOT_POSSIBLE if timing information is not yet retrieved, E_DATABASE_ERROR on read error on the database

Implements am::IAmCommandReceive.

Definition at line 172 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::getVolume ( const am_sinkID_t  sinkID,
am_mainVolume_t mainVolume 
) const
virtual

Returns the current volume for the sink directly out of the database.

Implements am::IAmCommandReceive.

Definition at line 127 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::setMainSinkNotificationConfiguration ( const am_sinkID_t  sinkID,
const am_NotificationConfiguration_s mainNotificationConfiguration 
)
virtual

sets a MainNotificationConfiuration.

This can be used to turn on an off notifications an to change the mode of the configuration.

Returns
E_OK on success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 247 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::setMainSinkSoundProperty ( const am_MainSoundProperty_s soundProperty,
const am_sinkID_t  sinkID 
)
virtual

This method is used to set sound properties, e.g.

Equalizer Values. Since the capabilities of the system can differ, the exact key value pairs can be extended in each product

Returns
E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error

Implements am::IAmCommandReceive.

Definition at line 109 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::setMainSourceNotificationConfiguration ( const am_sourceID_t  sourceID,
const am_NotificationConfiguration_s mainNotificationConfiguration 
)
virtual

sets a MainNotificationConfiuration.

This can be used to turn on an off notifications an to change the mode of the configuration.

Returns
E_OK on success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error

Implements am::IAmCommandReceive.

Definition at line 253 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::setMainSourceSoundProperty ( const am_MainSoundProperty_s soundProperty,
const am_sourceID_t  sourceID 
)
virtual

This method is used to set sound properties, e.g.

Equalizer Values. Since the capabilities of the system can differ, the exact key value pairs can be extended in each product

Returns
E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error

Implements am::IAmCommandReceive.

Definition at line 115 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::setSinkMuteState ( const am_sinkID_t  sinkID,
const am_MuteState_e  muteState 
)
virtual

sets the mute state of a sink

Returns
E_OK on success, E_UNKNOWN on error. If the mute state is already the desired one, the Daemon will return E_OK.

Implements am::IAmCommandReceive.

Definition at line 103 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::setSystemProperty ( const am_SystemProperty_s property)
virtual

is used to set a specific system property.

Returns
E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error

Implements am::IAmCommandReceive.

Definition at line 121 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::setVolume ( const am_sinkID_t  sinkID,
const am_mainVolume_t  volume 
)
virtual

sets the volume for a sink

Returns
E_OK on success, E_UNKOWN on error, E_OUT_OF_RANGE in case the value is out of range

Implements am::IAmCommandReceive.

Definition at line 91 of file CAmCommandReceiver.cpp.

am_Error_e am::CAmCommandReceiver::volumeStep ( const am_sinkID_t  sinkID,
const int16_t  volumeStep 
)
virtual

This function is used to increment or decrement the current volume for a sink.

Returns
E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the value is not in the given volume range.

Implements am::IAmCommandReceive.

Definition at line 97 of file CAmCommandReceiver.cpp.

void am::CAmCommandReceiver::waitOnRundown ( bool  rundown)

tells the ComandReceiver to start waiting for all handles to be confirmed

Definition at line 259 of file CAmCommandReceiver.cpp.

void am::CAmCommandReceiver::waitOnStartup ( bool  startup)

tells the ComandReceiver to start waiting for all handles to be confirmed

Definition at line 231 of file CAmCommandReceiver.cpp.


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