AudioManager  7.6.6
Native Application Runtime Environment
IAmCommand.h
Go to the documentation of this file.
1 
23 #if !defined(EA_D9D48C0D_77EC_4fa7_B861_1827740C7ECA__INCLUDED_)
24 #define EA_D9D48C0D_77EC_4fa7_B861_1827740C7ECA__INCLUDED_
25 
26 #include <vector>
27 #include <string>
28 #include "audiomanagertypes.h"
29 namespace am {
30 class CAmDbusWrapper;
31 class CAmSocketHandler;
32 }
33 
34 
35 #include "audiomanagertypes.h"
36 
37 #define CommandVersion "4.0"
38 namespace am {
39 
57 {
58 
59 public:
61 
62  }
63 
64  virtual ~IAmCommandReceive() {
65 
66  }
67 
71  virtual void getInterfaceVersion(std::string& version) const =0;
77  virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
83  virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) =0;
89  virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
95  virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) =0;
101  virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
109  virtual am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
117  virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
123  virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0;
128  virtual am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const =0;
133  virtual am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const =0;
138  virtual am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const =0;
144  virtual am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties) const =0;
149  virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const =0;
154  virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
159  virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
164  virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
170  virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const =0;
176  virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
184  virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
188  virtual void confirmCommandReady(const uint16_t handle, const am_Error_e error) =0;
192  virtual void confirmCommandRundown(const uint16_t handle, const am_Error_e error) =0;
197  virtual am_Error_e getListMainSinkNotificationConfigurations(const am_sinkID_t sinkID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
202  virtual am_Error_e getListMainSourceNotificationConfigurations(const am_sourceID_t sourceID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
209  virtual am_Error_e setMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
216  virtual am_Error_e setMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
220  virtual am_Error_e getVolume(const am_sinkID_t sinkID, am_mainVolume_t& mainVolume) const =0;
221 
222 };
223 
244 {
245 
246 public:
248 
249  }
250 
251  virtual ~IAmCommandSend() {
252 
253  }
254 
258  virtual void getInterfaceVersion(std::string& version) const =0;
266  virtual am_Error_e startupInterface(IAmCommandReceive* commandreceiveinterface) =0;
274  virtual void setCommandReady(const uint16_t handle) =0;
283  virtual void setCommandRundown(const uint16_t handle) =0;
287  virtual void cbNewMainConnection(const am_MainConnectionType_s& mainConnection) =0;
291  virtual void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection) =0;
295  virtual void cbNewSink(const am_SinkType_s& sink) =0;
299  virtual void cbRemovedSink(const am_sinkID_t sinkID) =0;
303  virtual void cbNewSource(const am_SourceType_s& source) =0;
307  virtual void cbRemovedSource(const am_sourceID_t source) =0;
311  virtual void cbNumberOfSinkClassesChanged() =0;
315  virtual void cbNumberOfSourceClassesChanged() =0;
319  virtual void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) =0;
323  virtual void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
327  virtual void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
331  virtual void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
335  virtual void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
339  virtual void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
343  virtual void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
347  virtual void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty) =0;
351  virtual void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
355  virtual void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
359  virtual void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
363  virtual void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification) =0;
367  virtual void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification) =0;
371  virtual void cbMainSinkNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
375  virtual void cbMainSourceNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
376 
377 };
378 }
379 #endif // !defined(EA_D9D48C0D_77EC_4fa7_B861_1827740C7ECA__INCLUDED_)
virtual void confirmCommandRundown(const uint16_t handle, const am_Error_e error)=0
asynchronous confirmation of setCommandRundown
A Common-API wrapper class, which loads the common-api runtime and instantiates all necessary objects...
uint16_t am_sinkClass_t
am_Error_e
the errors of the audiomanager.
This struct holds information about the configuration for notifications.
virtual am_Error_e getListMainSourceNotificationConfigurations(const am_sourceID_t sourceID, std::vector< am_NotificationConfiguration_s > &listMainNotificationConfigurations) const =0
Retrieves the list of MainNotifications for a source.
The interface towards the Controlling Instance (e.g HMI).
Definition: IAmCommand.h:56
virtual am_Error_e getListSinkClasses(std::vector< am_SinkClass_s > &listSinkClasses) const =0
This is used to retrieve SinkClass Information of all sink classes.
This struct holds the payload of a notification.
virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume)=0
sets the volume for a sink
virtual am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector< am_MainSoundProperty_s > &listSoundProperties) const =0
This is used to retrieve all source sound properties related to a source.
virtual am_Error_e getSocketHandler(CAmSocketHandler *&socketHandler) const =0
This function returns the pointer to the socketHandler.
virtual am_Error_e setMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s &mainNotificationConfiguration)=0
sets a MainNotificationConfiuration.
The am::CAmSocketHandler implements a mainloop for the AudioManager.
virtual am_Error_e getVolume(const am_sinkID_t sinkID, am_mainVolume_t &mainVolume) const =0
Returns the current volume for the sink directly out of the database.
virtual am_Error_e getListMainConnections(std::vector< am_MainConnectionType_s > &listConnections) const =0
returns the actual list of MainConnections
this type holds all information of sinks relevant to the HMI
int16_t am_timeSync_t
offset time that is introduced in milli seconds.
virtual am_Error_e setSystemProperty(const am_SystemProperty_s &property)=0
is used to set a specific system property.
virtual am_Error_e getListMainSinkNotificationConfigurations(const am_sinkID_t sinkID, std::vector< am_NotificationConfiguration_s > &listMainNotificationConfigurations) const =0
Retrieves the list of MainNotifications for a sink.
virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t &delay) const =0
returns the delay in ms that the audiopath for the given mainConnection has
virtual am_Error_e getListMainSinks(std::vector< am_SinkType_s > &listMainSinks) const =0
returns the actual list of Sinks
virtual ~IAmCommandReceive()
Definition: IAmCommand.h:64
virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID)=0
disconnects a mainConnection
struct describing system properties
virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper *&dbusConnectionWrapper) const =0
this function is used to retrieve a pointer to the dBusConnectionWrapper
virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector< am_MainSoundProperty_s > &listSourceProperties) const =0
This is used to retrieve all source sound properties related to a source.
struct describung mainsound property
uint16_t am_sourceID_t
a source ID
virtual void confirmCommandReady(const uint16_t handle, const am_Error_e error)=0
asynchronous confirmation of setCommandReady.
virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s &soundProperty, const am_sourceID_t sourceID)=0
This method is used to set sound properties, e.g.
virtual ~IAmCommandSend()
Definition: IAmCommand.h:251
virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t &mainConnectionID)=0
connects a source to sink
am_ConnectionState_e
represents the connection state
virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)=0
sets the mute state of a sink
this type holds all information of connections relevant to the HMI
Copyright (C) 2012 - 2014, BMW AG.
uint16_t am_sourceClass_t
this describes the availability of a sink or a source together with the latest change ...
This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins)...
virtual am_Error_e setMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s &mainNotificationConfiguration)=0
sets a MainNotificationConfiuration.
virtual am_Error_e getListMainSources(std::vector< am_SourceType_s > &listMainSources) const =0
returns the actual list of Sources
int16_t am_mainVolume_t
This is the volume presented on the command interface.
virtual void getInterfaceVersion(std::string &version) const =0
This function returns the version of the interface.
this type holds all information of sources relevant to the HMI
uint16_t am_sinkID_t
a sink ID
uint16_t am_mainConnectionID_t
a mainConnection ID
virtual am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s &soundProperty, const am_sinkID_t sinkID)=0
This method is used to set sound properties, e.g.
This interface handles all communication from the AudioManagerDaemon towards the system.
Definition: IAmCommand.h:243
virtual am_Error_e getListSourceClasses(std::vector< am_SourceClass_s > &listSourceClasses) const =0
This is used to retrieve SourceClass Information of all source classes.
virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep)=0
This function is used to increment or decrement the current volume for a sink.
virtual am_Error_e getListSystemProperties(std::vector< am_SystemProperty_s > &listSystemProperties) const =0
Retrieves a complete list of all systemProperties.