AudioManager  7.5.11
Native Application Runtime Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CAmCommandSender.h
Go to the documentation of this file.
1 
24 #ifndef COMMANDSENDER_H_
25 #define COMMANDSENDER_H_
26 
27 #ifdef UNIT_TEST
28 #include "../test/IAmCommandBackdoor.h" //we need this for the unit test
29 #endif
30 
31 #include "IAmCommand.h"
32 
33 namespace am
34 {
35 
36 class CAmCommandReceiver;
37 
38 
44 {
45 public:
46  CAmCommandSender(const std::vector<std::string>& listOfPluginDirectories);
49  void setCommandReady();
50  void setCommandRundown();
51  void cbNewMainConnection(const am_MainConnectionType_s mainConnection);
52  void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection);
53  void cbNewSink(am_SinkType_s sink);
54  void cbRemovedSink(const am_sinkID_t sink);
55  void cbNewSource(const am_SourceType_s source);
56  void cbRemovedSource(const am_sourceID_t source);
59  void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState);
60  void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty);
61  void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty);
62  void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability);
63  void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability);
64  void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume);
65  void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState);
66  void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty);
67  void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time);
68  void getInterfaceVersion(std::string& version) const;
69  am_Error_e getListPlugins(std::vector<std::string>& interfaces) const;
70  void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties);
71  void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties);
72  void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification);
73  void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification);
74  void cbSinkMainNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration);
75  void cbSourceMainNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration);
76 
77 #ifdef UNIT_TEST
78  friend class IAmCommandBackdoor; //this is to get access to the loaded plugins and be able to exchange the interfaces
79 #endif
80 private:
81  void unloadLibraries(void);
82  std::vector<IAmCommandSend*> mListInterfaces;
83  std::vector<void*> mListLibraryHandles;
84  std::vector<std::string> mListLibraryNames;
85 
86  CAmCommandReceiver *mCommandReceiver;
87 };
88 
89 }
90 
91 #endif /* COMMANDSENDER_H_ */
am_Error_e getListPlugins(std::vector< std::string > &interfaces) const
void cbNewSink(am_SinkType_s sink)
This class realizes the command Interface.
am_Error_e startupInterfaces(CAmCommandReceiver *iCommandReceiver)
uint16_t am_sinkClass_t
am_Error_e
the errors of the audiomanager.
This struct holds information about the configuration for notifications.
void cbSystemPropertyChanged(const am_SystemProperty_s &systemProperty)
void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
void cbNewMainConnection(const am_MainConnectionType_s mainConnection)
This struct holds the payload of a notification.
void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s &notification)
this type holds all information of sinks relevant to the HMI
int16_t am_timeSync_t
offset time that is introduced in milli seconds.
void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s &soundProperty)
void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s &soundProperty)
void cbRemovedSource(const am_sourceID_t source)
void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
void cbNewSource(const am_SourceType_s source)
struct describing system properties
CAmCommandSender(const std::vector< std::string > &listOfPluginDirectories)
struct describung mainsound property
void getInterfaceVersion(std::string &version) const
uint16_t am_sourceID_t
a source ID
void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s &notification)
am_ConnectionState_e
represents the connection state
void cbSourceMainNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s &mainNotificationConfiguration)
this type holds all information of connections relevant to the HMI
void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)
void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState)
uint16_t am_sourceClass_t
void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection)
this describes the availability of a sink or a source together with the latest change ...
void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s &availability)
void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume)
void cbSinkMainNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s &mainNotificationConfiguration)
void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState)
int16_t am_mainVolume_t
This is the volume presented on the command interface.
void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s &availability)
this type holds all information of sources relevant to the HMI
Copyright (C) 2012 - 2014, BMW AG.
This class is used to send data to the CommandInterface.
uint16_t am_sinkID_t
a sink ID
uint16_t am_mainConnectionID_t
a mainConnection ID
void cbRemovedSink(const am_sinkID_t sink)