AudioManager  7.6.6
Native Application Runtime Environment
IAmRouting.h
Go to the documentation of this file.
1 
23 #if !defined(EA_6B9C54C0_2366_4139_97CF_28563364DACA__INCLUDED_)
24 #define EA_6B9C54C0_2366_4139_97CF_28563364DACA__INCLUDED_
25 
26 #include <vector>
27 #include <string>
28 #include "audiomanagertypes.h"
29 
30 namespace am {
31 class CAmDbusWrapper;
32 class CAmSocketHandler;
33 }
34 
35 
36 #include "audiomanagertypes.h"
37 
38 #define RoutingVersion "5.0"
39 namespace am {
40 
57 {
58 
59 public:
61 
62  }
63 
64  virtual ~IAmRoutingReceive() {
65 
66  }
67 
71  virtual void getInterfaceVersion(std::string& version) const =0;
75  virtual void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
79  virtual void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
83  virtual void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
87  virtual void ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
91  virtual void ackSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
95  virtual void ackSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
99  virtual void ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
103  virtual void ackSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
107  virtual void ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
111  virtual void ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error) =0;
116  virtual void ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
121  virtual void ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
129  virtual am_Error_e peekDomain(const std::string& name, am_domainID_t& domainID) =0;
135  virtual am_Error_e registerDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
141  virtual am_Error_e deregisterDomain(const am_domainID_t domainID) =0;
146  virtual am_Error_e registerConverter(const am_Converter_s& converterData, am_converterID_t& converterID) =0;
151  virtual am_Error_e registerGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
157  virtual am_Error_e deregisterConverter(const am_converterID_t converterID) =0;
163  virtual am_Error_e deregisterGateway(const am_gatewayID_t gatewayID) =0;
171  virtual am_Error_e peekSink(const std::string& name, am_sinkID_t& sinkID) =0;
178  virtual am_Error_e registerSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
183  virtual am_Error_e deregisterSink(const am_sinkID_t sinkID) =0;
191  virtual am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID) =0;
198  virtual am_Error_e registerSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
203  virtual am_Error_e deregisterSource(const am_sourceID_t sourceID) =0;
209  virtual am_Error_e registerCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
215  virtual am_Error_e deregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
221  virtual am_Error_e peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID) =0;
227  virtual am_Error_e peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID) =0;
231  virtual void hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
237  virtual void hookDomainRegistrationComplete(const am_domainID_t domainID) =0;
241  virtual void hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
245  virtual void hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
249  virtual void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
253  virtual void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay) =0;
259  virtual void sendChangedData(const std::vector<am_EarlyData_s>& earlyData) =0;
265  virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
273  virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
277  virtual void confirmRoutingReady(const uint16_t handle, const am_Error_e error) =0;
281  virtual void confirmRoutingRundown(const uint16_t handle, const am_Error_e error) =0;
286  virtual am_Error_e updateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkFormats, const std::vector<bool>& convertionMatrix) =0;
291  virtual am_Error_e updateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkFormats, const std::vector<bool>& convertionMatrix) =0;
296  virtual am_Error_e updateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
307  virtual am_Error_e updateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_SoundProperty_s>& listSoundProperties, const std::vector<am_CustomConnectionFormat_t>& listConnectionFormats, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
311  virtual void ackSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listvolumes, const am_Error_e error) =0;
315  virtual void ackSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
319  virtual void ackSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
323  virtual void hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) =0;
327  virtual void hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) =0;
331  virtual am_Error_e getDomainOfSink(const am_sinkID_t sinkID, am_domainID_t& domainID) const =0;
335  virtual am_Error_e getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t& domainID) const =0;
339  virtual am_Error_e getDomainOfCrossfader(const am_crossfaderID_t crossfader, am_domainID_t& domainID) const = 0;
340 
341 };
342 
358 {
359 
360 public:
362 
363  }
364 
365  virtual ~IAmRoutingSend() {
366 
367  }
368 
372  virtual void getInterfaceVersion(std::string& version) const =0;
377  virtual am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) =0;
382  virtual void setRoutingReady(const uint16_t handle) =0;
387  virtual void setRoutingRundown(const uint16_t handle) =0;
393  virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
399  virtual am_Error_e asyncConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_CustomConnectionFormat_t connectionFormat) =0;
405  virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
413  virtual am_Error_e asyncSetSinkVolume(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
422  virtual am_Error_e asyncSetSourceVolume(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t ramp, const am_time_t time) =0;
427  virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
433  virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
439  virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
445  virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
451  virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
456  virtual am_Error_e asyncCrossFade(const am_Handle_s handle, const am_crossfaderID_t crossfaderID, const am_HotSink_e hotSink, const am_CustomRampType_t rampType, const am_time_t time) =0;
462  virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
468  virtual am_Error_e returnBusName(std::string& BusName) const =0;
474  virtual am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) =0;
479  virtual am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
484  virtual am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
489  virtual am_Error_e resyncConnectionState(const am_domainID_t domainID, std::vector<am_Connection_s>& listOfExistingConnections) =0;
490 
491 };
492 }
493 #endif // !defined(EA_6B9C54C0_2366_4139_97CF_28563364DACA__INCLUDED_)
virtual am_Error_e getSocketHandler(CAmSocketHandler *&socketHandler) const =0
This function returns the pointer to the socketHandler.
virtual am_Error_e registerGateway(const am_Gateway_s &gatewayData, am_gatewayID_t &gatewayID)=0
registers a gateway.
uint16_t am_connectionID_t
a connection ID
A Common-API wrapper class, which loads the common-api runtime and instantiates all necessary objects...
virtual void hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s &payload)=0
is called whenever a notified value needs to be send
uint16_t am_sinkClass_t
am_Error_e
the errors of the audiomanager.
virtual void ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)=0
acknowledges asyncSetSinkSoundProperty
am_InterruptState_e
This struct holds information about the configuration for notifications.
This struct describes the attribiutes of a sink.
virtual void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState)=0
is called when a domain changes its status.
This struct holds the payload of a notification.
virtual void sendChangedData(const std::vector< am_EarlyData_s > &earlyData)=0
this function is used to send out all data that has been changed in an early state.
This class implements everything from Audiomanager -> RoutingAdapter There are two rules that have to...
Definition: IAmRouting.h:357
virtual void ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)=0
acknowledges asyncSetSourceSoundProperty
virtual void hookDomainRegistrationComplete(const am_domainID_t domainID)=0
This hook is called when all elements from a domain are registered.
virtual ~IAmRoutingReceive()
Definition: IAmRouting.h:64
This struct describes the attribiutes of a domain.
uint16_t am_crossfaderID_t
a crossfader ID
uint16_t am_CustomConnectionFormat_t
This type classifies the format in which data is exchanged within a connection.
The am::CAmSocketHandler implements a mainloop for the AudioManager.
virtual void confirmRoutingReady(const uint16_t handle, const am_Error_e error)=0
confirms the setRoutingReady Command
virtual void ackSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)=0
The acknowledge of the SourceNotificationConfiguration.
int16_t am_timeSync_t
offset time that is introduced in milli seconds.
virtual void ackSetVolumes(const am_Handle_s handle, const std::vector< am_Volumes_s > &listvolumes, const am_Error_e error)=0
acknowledges a asyncSetSinkVolumes
virtual am_Error_e registerCrossfader(const am_Crossfader_s &crossfaderData, am_crossfaderID_t &crossfaderID)=0
this function registers a crossfader.
virtual am_Error_e updateConverter(const am_converterID_t converterID, const std::vector< am_CustomConnectionFormat_t > &listSourceFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkFormats, const std::vector< bool > &convertionMatrix)=0
updates data of an converter.
virtual void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)=0
acknowledges a asyncConnect
virtual am_Error_e peekSourceClassID(const std::string &name, am_sourceClass_t &sourceClassID)=0
this function peeks a sourceclassID.
uint16_t am_converterID_t
a converter ID
virtual void ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)=0
acknowledges a volume tick.
virtual void ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error)=0
acknowledges asyncCrossFade
virtual void confirmRoutingRundown(const uint16_t handle, const am_Error_e error)=0
confirms the setRoutingRundown Command
virtual am_Error_e registerDomain(const am_Domain_s &domainData, am_domainID_t &domainID)=0
registers a domain
virtual void hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)=0
is called when a low level interrupt changes it status.
virtual void ackSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error)=0
acknowledges asyncSetSinkSoundProperties
a handle is used for asynchronous operations and is uniquely assigned for each of this operations ...
virtual void hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s &availability)=0
is called when a sink changes its availability
uint16_t am_sourceID_t
a source ID
virtual void ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)=0
acknowledges a volume tick.
struct describing the sound property
virtual am_Error_e deregisterSink(const am_sinkID_t sinkID)=0
deregisters a sink.
virtual am_Error_e deregisterSource(const am_sourceID_t sourceID)=0
deregisters a source
virtual void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error)=0
acknowledges a asyncDisconnect
Routing Receive sendInterface description.
Definition: IAmRouting.h:56
virtual am_Error_e registerSink(const am_Sink_s &sinkData, am_sinkID_t &sinkID)=0
Registers a sink.
virtual am_Error_e deregisterConverter(const am_converterID_t converterID)=0
deregisters a converter.
virtual void getInterfaceVersion(std::string &version) const =0
This function returns the version of the interface.
This struct describes the attributes of a converter.
virtual void hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s &payload)=0
is called whenever a notified value needs to be send
virtual void ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)=0
acknowledges a asyncsetSourceVolume
am_HotSink_e
describes the active sink of a crossfader.
int16_t am_volume_t
The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE).
This struct describes the attribiutes of a crossfader.
virtual am_Error_e updateSource(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)=0
updates data of an source.
Copyright (C) 2012 - 2014, BMW AG.
uint16_t am_sourceClass_t
virtual am_Error_e deregisterDomain(const am_domainID_t domainID)=0
deregisters a domain.
this describes the availability of a sink or a source together with the latest change ...
This struct describes the attributes of a gateway.
virtual am_Error_e registerSource(const am_Source_s &sourceData, am_sourceID_t &sourceID)=0
registers a source.
uint16_t am_time_t
time in ms!
virtual void ackSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error)=0
The acknowledge of the SinkNotificationConfiguration.
virtual void ackSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error)=0
acknowledges asyncSetSourceSoundProperties
virtual am_Error_e peekSink(const std::string &name, am_sinkID_t &sinkID)=0
This function returns the ID to the given sinkName.
virtual am_Error_e deregisterGateway(const am_gatewayID_t gatewayID)=0
deregisters a gateway.
This wraps dbus and provides everything needed to anyone who wants to use dbus (including plugins)...
virtual am_Error_e updateGateway(const am_gatewayID_t gatewayID, const std::vector< am_CustomConnectionFormat_t > &listSourceFormats, const std::vector< am_CustomConnectionFormat_t > &listSinkFormats, const std::vector< bool > &convertionMatrix)=0
updates data of an gateway.
virtual am_Error_e getDomainOfSink(const am_sinkID_t sinkID, am_domainID_t &domainID) const =0
E_OK in case of success.
uint16_t am_domainID_t
a domain ID
virtual am_Error_e peekSource(const std::string &name, am_sourceID_t &sourceID)=0
This function returns the ID to the given sourceName.
virtual void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay)=0
is called when the timinginformation (delay) changed for a connection.
virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper *&dbusConnectionWrapper) const =0
this function is used to retrieve a pointer to the dBusConnectionWrapper
virtual am_Error_e registerConverter(const am_Converter_s &converterData, am_converterID_t &converterID)=0
registers a converter.
uint16_t am_gatewayID_t
a gateway ID
This struct describes the attribiutes of a source.
virtual am_Error_e updateSink(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector< am_SoundProperty_s > &listSoundProperties, const std::vector< am_CustomConnectionFormat_t > &listConnectionFormats, const std::vector< am_MainSoundProperty_s > &listMainSoundProperties)=0
updates data of an gateway.
uint16_t am_CustomRampType_t
The given ramp types here are just examples.
uint16_t am_sinkID_t
a sink ID
virtual void hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s &availability)=0
is called when a source changes its availability
virtual am_Error_e getDomainOfSource(const am_sourceID_t sourceID, am_domainID_t &domainID) const =0
E_OK in case of success.
virtual am_Error_e peekDomain(const std::string &name, am_domainID_t &domainID)=0
This function returns the ID to the given domainName.
am_SourceState_e
The source state reflects the state of the source.
virtual am_Error_e deregisterCrossfader(const am_crossfaderID_t crossfaderID)=0
this function deregisters a crossfader.
virtual am_Error_e peekSinkClassID(const std::string &name, am_sinkClass_t &sinkClassID)=0
this function peeks a sourceclassID.
virtual void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)=0
acknowledges a asyncsetSinkVolume
virtual am_Error_e getDomainOfCrossfader(const am_crossfaderID_t crossfader, am_domainID_t &domainID) const =0
E_OK in case of success.
virtual void ackSetSourceState(const am_Handle_s handle, const am_Error_e error)=0
acknowlegde for asyncSetSourceState
virtual ~IAmRoutingSend()
Definition: IAmRouting.h:365