summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/audiomanagertypes.h2840
-rwxr-xr-xinclude/command/IAmCommandReceive.h440
-rwxr-xr-xinclude/command/IAmCommandSend.h389
-rwxr-xr-xinclude/control/IAmControlReceive.h1278
-rwxr-xr-xinclude/control/IAmControlSend.h732
-rwxr-xr-xinclude/routing/IAmRoutingReceive.h645
-rwxr-xr-xinclude/routing/IAmRoutingSend.h369
7 files changed, 3427 insertions, 3266 deletions
diff --git a/include/audiomanagertypes.h b/include/audiomanagertypes.h
index b5bedd9..e10a464 100755
--- a/include/audiomanagertypes.h
+++ b/include/audiomanagertypes.h
@@ -1,1376 +1,1464 @@
-/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_4FF89D4E_BF3C_465a_85C9_1DC47E4FA742__INCLUDED_)
-#define EA_4FF89D4E_BF3C_465a_85C9_1DC47E4FA742__INCLUDED_
-
-#include <stdint.h>
-#include <string>
-#include <vector>
-
-namespace am {
-
-/**
- * a domain ID
- */
-typedef uint16_t am_domainID_t;
-
-/**
- * a crossfader ID
- */
-typedef uint16_t am_crossfaderID_t;
-
-/**
- * a connection ID
- */
-typedef uint16_t am_connectionID_t;
-
-/**
- * a source ID
- */
-typedef uint16_t am_sourceID_t;
-
-/**
- * a sink ID
- */
-typedef uint16_t am_sinkID_t;
-
-/**
- * a gateway ID
- */
-typedef uint16_t am_gatewayID_t;
-
-/**
- * a mainConnection ID
- */
-typedef uint16_t am_mainConnectionID_t;
-
-/**
- * speed
- */
-typedef uint16_t am_speed_t;
-
-/**
- * The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and
- * maximum can be limited by actual project.
- */
-typedef int16_t am_volume_t;
-static const am_volume_t AM_MUTE = -3000;
-
-/**
- * This is the volume presented on the command interface. It is in the duty of the
- * Controller to change the volumes given here into meaningful values on the
- * routing interface.
- * The range of this type is customer specific.
- */
-typedef int16_t am_mainVolume_t;
-
-typedef uint16_t am_sourceClass_t;
-
-typedef uint16_t am_sinkClass_t;
-
-/**
- * time in ms!
- */
-typedef uint16_t am_time_t;
-
-/**
- * offset time that is introduced in milli seconds.
- */
-typedef int16_t am_timeSync_t;
-
-/**
- * This type gives the information about reason for reason for Source/Sink change
- */
-typedef uint16_t am_CustomAvailabilityReason_t;
-static const am_CustomAvailabilityReason_t AR_UNKNOWN = 0;
-/** new media was entered */
-static const am_CustomAvailabilityReason_t AR_GENIVI_NEWMEDIA = 1;
-/** same media was entered */
-static const am_CustomAvailabilityReason_t AR_GENIVI_SAMEMEDIA = 2;
-/** there is no media or media is removed */
-static const am_CustomAvailabilityReason_t AR_GENIVI_NOMEDIA = 3;
-/** there was a temperature event */
-static const am_CustomAvailabilityReason_t AR_GENIVI_TEMPERATURE = 4;
-/** there was a voltage event */
-static const am_CustomAvailabilityReason_t AR_GENIVI_VOLTAGE = 5;
-/** fatal errors on reading or accessing media */
-static const am_CustomAvailabilityReason_t AR_GENIVI_ERRORMEDIA = 6;
-
-/**
- * This is a custom specific identifier of property. It can be used to
- * differentiate between interrupt source/sink, main source/sink, etc.
- */
-typedef uint16_t am_CustomClassProperty_t;
-static const am_CustomClassProperty_t CP_UNKNOWN = 0;
-static const am_CustomClassProperty_t CP_GENIVI_SOURCE_TYPE = 1;
-static const am_CustomClassProperty_t CP_GENIVI_SINK_TYPE = 2;
-
-/**
- * This type classifies the format in which data is exchanged within a connection.
- * The type itself is project specific although there are some standard formats
- * defined.
- */
-typedef uint16_t am_CustomConnectionFormat_t;
-static const am_CustomConnectionFormat_t CF_UNKNOWN = 0;
-static const am_CustomConnectionFormat_t CF_GENIVI_MONO = 1;
-static const am_CustomConnectionFormat_t CF_GENIVI_STEREO = 2;
-static const am_CustomConnectionFormat_t CF_GENIVI_ANALOG = 3;
-static const am_CustomConnectionFormat_t CF_GENIVI_AUTO = 4;
-
-/**
- * Here are all SoundProperties that can be set via the CommandInterface.
- * This type is product specific and can be changed or extended.
- */
-typedef uint16_t am_CustomMainSoundPropertyType_t;
-static const am_CustomMainSoundPropertyType_t MSP_UNKNOWN = 0;
-static const am_CustomMainSoundPropertyType_t MSP_GENIVI_TREBLE = 1;
-static const am_CustomMainSoundPropertyType_t MSP_GENIVI_MID = 2;
-static const am_CustomMainSoundPropertyType_t MSP_GENIVI_BASS = 3;
-
-/**
- * The notification types are project specific.
- */
-typedef uint16_t am_CustomNotificationType_t;
-static const am_CustomNotificationType_t NT_UNKNOWN = 0;
-
-/**
- * The given ramp types here are just examples. For products, different ramp types
- * can be defined here. It is in the responsibility of the product to make sure
- * that the routing plugins are aware of the ramp types used.
- */
-typedef uint16_t am_CustomRampType_t;
-static const am_CustomRampType_t RAMP_UNKNOWN = 0;
-/** sets directly the value without a ramp */
-static const am_CustomRampType_t RAMP_GENIVI_DIRECT = 1;
-/** Sets the volume as fast as possible */
-static const am_CustomRampType_t RAMP_GENIVI_NO_PLOP = 2;
-/** inverted exponential update, high gradient at the start - soft end */
-static const am_CustomRampType_t RAMP_GENIVI_EXP_INV = 3;
-/** continues update of volume */
-static const am_CustomRampType_t RAMP_GENIVI_LINEAR = 4;
-/** exponential update, soft start - high gradient at the end */
-static const am_CustomRampType_t RAMP_GENIVI_EXP = 5;
-
-/**
- * Within genivi only the some example properties are defined.
- * For products these should be changed or extended.
- */
-typedef uint16_t am_CustomSoundPropertyType_t;
-static const am_CustomSoundPropertyType_t SP_UNKNOWN = 0;
-static const am_CustomSoundPropertyType_t SP_GENIVI_TREBLE = 1;
-static const am_CustomSoundPropertyType_t SP_GENIVI_MID = 2;
-static const am_CustomSoundPropertyType_t SP_GENIVI_BASS = 3;
-
-/**
- * Describes the different system properties which are project specific.
- */
-typedef uint16_t am_CustomSystemPropertyType_t;
-static const am_CustomSystemPropertyType_t SYP_UNKNOWN = 0;
-
-/**
- * describes the active sink of a crossfader.
- */
-enum am_HotSink_e
-{
- /**
- * default
- */
- HS_UNKNOWN = 0,
- /**
- * sinkA is active
- */
- HS_SINKA = 1,
- /**
- * sinkB is active
- */
- HS_SINKB = 2,
- /**
- * the crossfader is in the transition state
- */
- HS_INTERMEDIATE = 3,
- HS_MAX
-};
-
-/**
- * with the help of this enum, sinks and sources can report their availability
- * state
- */
-enum am_Availability_e
-{
- /**
- * default
- */
- A_UNKNOWN = 0,
- /**
- * The source / sink is available
- */
- A_AVAILABLE = 1,
- /**
- * the source / sink is not available
- */
- A_UNAVAILABLE = 2,
- A_MAX
-};
-
-/**
- * represents the connection state
- */
-enum am_ConnectionState_e
-{
- CS_UNKNOWN = 0,
- /**
- * This means the connection is just building up
- */
- CS_CONNECTING = 1,
- /**
- * the connection is ready to be used
- */
- CS_CONNECTED = 2,
- /**
- * the connection is in the course to be knocked down
- */
- CS_DISCONNECTING = 3,
- /**
- * only relevant for connectionStatechanged. Is send after the connection was
- * removed
- */
- CS_DISCONNECTED = 4,
- /**
- * this means the connection is still build up but unused at the moment
- */
- CS_SUSPENDED = 5,
- CS_MAX
-};
-
-enum am_DomainState_e
-{
- /**
- * default
- */
- DS_UNKNOWN = 0,
- /**
- * the domain is controlled by the daemon
- */
- DS_CONTROLLED = 1,
- /**
- * the domain is independent starting up
- */
- DS_INDEPENDENT_STARTUP = 1,
- /**
- * the domain is independent running down
- */
- DS_INDEPENDENT_RUNDOWN = 2,
- DS_MAX
-};
-
-/**
- * This enum characterizes the data of the EarlyData_t
- */
-enum am_EarlyDataType_e
-{
- /**
- * default
- */
- ES_UNKNOWN = 0,
- /**
- * the source volume
- */
- ED_SOURCE_VOLUME = 1,
- /**
- * the sink volume
- */
- ED_SINK_VOLUME = 2,
- /**
- * a source property
- */
- ED_SOURCE_PROPERTY = 3,
- /**
- * a sink property
- */
- ED_SINK_PROPERTY = 4,
- /**
- * The interrupt state
- */
- ED_INTERRUPT_STATE = 5,
- ED_MAX
-};
-
-/**
- * the errors of the audiomanager. All possible errors are in here. This enum is
- * used widely as return parameter.
- */
-enum am_Error_e
-{
- /**
- * no error - positive reply
- */
- E_OK = 0,
- /**
- * default
- */
- E_UNKNOWN = 1,
- /**
- * value out of range
- */
- E_OUT_OF_RANGE = 2,
- /**
- * not used
- */
- E_NOT_USED = 3,
- /**
- * a database error occurred
- */
- E_DATABASE_ERROR = 4,
- /**
- * the desired object already exists
- */
- E_ALREADY_EXISTS = 5,
- /**
- * there is no change
- */
- E_NO_CHANGE = 6,
- /**
- * the desired action is not possible
- */
- E_NOT_POSSIBLE = 7,
- /**
- * the desired object is non existent
- */
- E_NON_EXISTENT = 8,
- /**
- * the asynchronous action was aborted
- */
- E_ABORTED = 9,
- /**
- * This error is returned in case a connect is issued with a connectionFormat that
- * cannot be selected for the connection. This could be either due to the
- * capabilities of a source or a sink or gateway compatibilities for example
- */
- E_WRONG_FORMAT = 10,
- E_MAX
-};
-
-enum am_MuteState_e
-{
- /**
- * default
- */
- MS_UNKNOWN = 0,
- /**
- * the source / sink is muted
- */
- MS_MUTED = 1,
- /**
- * the source / sink is unmuted
- */
- MS_UNMUTED = 2,
- MS_MAX
-};
-
-/**
- * The source state reflects the state of the source
- */
-enum am_SourceState_e
-{
- SS_UNKNNOWN = 0,
- /**
- * The source can be activly heared
- */
- SS_ON = 1,
- /**
- * The source cannot be heared
- */
- SS_OFF = 2,
- /**
- * The source is paused. Meaning it cannot be heared but should be prepared to
- * play again soon.
- */
- SS_PAUSED = 3,
- SS_MAX
-};
-
-/**
- * This enumeration is used to define the type of the action that is correlated to
- * a handle.
- */
-enum am_Handle_e
-{
- H_UNKNOWN = 0,
- H_CONNECT = 1,
- H_DISCONNECT = 2,
- H_SETSOURCESTATE = 3,
- H_SETSINKVOLUME = 4,
- H_SETSOURCEVOLUME = 5,
- H_SETSINKSOUNDPROPERTY = 6,
- H_SETSOURCESOUNDPROPERTY = 7,
- H_SETSINKSOUNDPROPERTIES = 8,
- H_SETSOURCESOUNDPROPERTIES = 9,
- H_CROSSFADE = 10,
- H_SETVOLUMES = 11,
- H_SETSINKNOTIFICATION = 12,
- H_SETSOURCENOTIFICATION = 13,
- H_MAX
-};
-
-enum am_InterruptState_e
-{
- /**
- * default
- */
- IS_UNKNOWN = 0,
- /**
- * the interrupt state is off - no interrupt
- */
- IS_OFF = 1,
- /**
- * the interrupt state is interrupted - the interrupt is active
- */
- IS_INTERRUPTED = 2,
- IS_MAX
-};
-
-/**
- * This datatype determines if a sourceID or a sinkID is used in the union
- * following
- */
-enum am_VolumeType_e
-{
- VT_UNKNOWN = 0,
- /**
- * the following type is a sink
- */
- VT_SINK = 1,
- /**
- * the following type is a source
- */
- VT_SOURCE = 2,
- VT_MAX
-};
-
-enum am_NotificationStatus_e
-{
- NS_UNKNOWN = 0,
- /**
- * No notification, the function is turned off
- */
- NS_OFF = 1,
- /**
- * Periodic notifications are sent out. The period in ms is given by
- * am_NotificationParameter
- */
- NS_PERIODIC = 2,
- /**
- * The notification is sent out when the minimum given by am_NotificationParameter
- * is reached.
- */
- NS_MINIMUM = 3,
- /**
- * The notification is sent out when the maximum given by am_NotificationParameter
- * is reached.
- */
- NS_MAXIMUM = 4,
- /**
- * The notification is sent out when a change happened. The Resolution of the
- * change is defined by am_NotificationParameter.
- */
- NS_CHANGE = 5,
- NS_MAX
-};
-
-/**
- * this describes the availability of a sink or a source together with the latest
- * change
- */
-struct am_Availability_s
-{
-
-public:
- /**
- * the current availability state
- */
- am_Availability_e availability;
- /**
- * the reason for the last change. This can be used to trigger events that deal
- * with state changes.
- */
- am_CustomAvailabilityReason_t availabilityReason;
-
-};
-
-/**
- * describes class properties
- */
-struct am_ClassProperty_s
-{
-
-public:
- /**
- * the property as enum
- */
- am_CustomClassProperty_t classProperty;
- /**
- * the value of the property
- */
- int16_t value;
-
-};
-
-/**
- * This struct describes the attribiutes of a crossfader.
- */
-struct am_Crossfader_s
-{
-
-public:
- /**
- * This is the ID of the crossfader, it is unique in the system. There are 2 ways,
- * ID can be created: either it is assigned during the registration process (in a
- * dynamic context, uniqueness will be ensured by the AudioManager daemon), or it
- * is a fixed (the project has to ensure the uniqueness of the ID).
- */
- am_crossfaderID_t crossfaderID;
- /**
- * The name of the crossfader. Must be unique in the whole system.
- */
- std::string name;
- /**
- * The sinkID of the SinkA. Sinks shall be registered before registering the
- * crossfader.
- */
- am_sinkID_t sinkID_A;
- /**
- * The sinkID of the SinkB. Sinks shall be registered before registering the
- * crossfader.
- */
- am_sinkID_t sinkID_B;
- /**
- * The sourceID of the crossfader source. The source shall be registered before
- * the crossfader.
- */
- am_sourceID_t sourceID;
- /**
- * This enum can have 3 states:
- *
- * HS_SINKA sinkA is the current hot one, sinkB is not audible
- * HS_SINKB sinkB is the current hot one, sinkB is not audible
- * HS_INTERMEDIATE the fader is stuck in between a cross-fading action. This
- * could be due to an abort or an error. Before using the crossfader, it must be
- * set to either HS_SINKA or HS_SINKB.
- */
- am_HotSink_e hotSink;
-
-};
-
-/**
- * This struct describes the attributes of a gateway.
- */
-struct am_Gateway_s
-{
-
-public:
- /**
- * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID
- * can be created: either it is assigned during the registration process (in a
- * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
- * is a fixed (the project has to ensure the uniqueness of the ID).
- */
- am_gatewayID_t gatewayID;
- /**
- * The name of the gateway. Must be unique in the whole system.
- */
- std::string name;
- /**
- * The sinkID of the gateway sink-end. The sink is a full blown sink with
- * connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of
- * a gateway as non-visible. Care needs to be taken that the connectionsFormats
- * match with the ones in the conversionMatrix. If the sink is located in the
- * controllingDomain, the ID needs to be retrieved by registering the sink before
- * registering the gateway. In case the sink is in a different domain, the ID
- * needs to be retrieved via peeking.
- */
- am_sinkID_t sinkID;
- /**
- * The sourceID of the gateway sink-end. The sink is a full blown source with
- * connectionFormats, sinkClassIDs etc... It makes sense to register the sources
- * of a gateway as non-visible. Care needs to be taken that the connectionsFormats
- * match with the ones in the conversionMatrix. If the source is located in the
- * controllingDomain, the ID needs to be retrieved by registering the source
- * before registering the gateway. In case the source is in a different domain,
- * the ID needs to be retrieved via peeking.
- */
- am_sourceID_t sourceID;
- /**
- * The ID of the sink. If the domain is the same like the controlling domain, the
- * ID is known due to registration. If the domain is different, the ID needs to be
- * retrieved via peeking.
- */
- am_domainID_t domainSinkID;
- /**
- * The ID of the source. If the domain is the same like the controlling domain,
- * the ID is known due to registration. If the domain is different, the ID needs
- * to be retrieved via peeking.
- */
- am_domainID_t domainSourceID;
- /**
- * This is the ID of the domain that registers the gateway.
- */
- am_domainID_t controlDomainID;
- /**
- * This is the list of available formats on the source side of the gateway. It is
- * not defined during the gateway registration but copied from the source
- * registration.
- */
- std::vector<am_CustomConnectionFormat_t> listSourceFormats;
- /**
- * This is the list of available formats on the sink side of the gateway. It is
- * not defined during the gateway registration but copied from the sink
- * registration.
- */
- std::vector<am_CustomConnectionFormat_t> listSinkFormats;
- /**
- * This is matrix holding information about the conversion capability of the
- * gateway, it's length is defined by the length(listSinkFormats) x
- * length(listSourceFormats).
- * If a SinkFormat can be converted into a SourceFormat, the vector will hold a 1,
- * if no conversion is possible, a 0.
- * The data is stored row orientated, where the rows are related to the
- * sinksFormats and the columns to the sourceFormats. The first value will hold
- * the conversion information from the first sourceFormat to the first sinkFormat
- * for example and the seventh value the information about the 3rd sinkFormat to
- * the 1st sourceFormat in case we would have 3 sourceFormats.
- *
- * This matrix
- * 110 011 000 111 001
- *
- * reads as this:
- * Source
- * ** 1 2 3
- * *********************
- * S 1* 1 1 0
- * i 2* 0 1 1
- * n 3* 0 0 0
- * k 4* 1 1 1
- * 5* 0 0 1
- */
- std::vector<bool> convertionMatrix;
-
-};
-
-/**
- * This represents one "hopp" in a route
- */
-struct am_RoutingElement_s
-{
-
-public:
- /**
- * the source ID
- */
- am_sourceID_t sourceID;
- /**
- * the sinkID
- */
- am_sinkID_t sinkID;
- /**
- * the domainID the routeElement is in
- */
- am_domainID_t domainID;
- /**
- * the connectionformat that is used for the route
- */
- am_CustomConnectionFormat_t connectionFormat;
-
-};
-
-/**
- * a list of routing elements that lead from source to sink
- */
-struct am_Route_s
-{
-
-public:
- /**
- * the sourceID where the route starts
- */
- am_sourceID_t sourceID;
- /**
- * the sinkID where the route ends
- */
- am_sinkID_t sinkID;
- /**
- * the actual route as list of routing elements
- */
- std::vector<am_RoutingElement_s> route;
-
-};
-
-/**
- * struct describing the sound property
- */
-struct am_SoundProperty_s
-{
-
-public:
- /**
- * the type of the property - a project specific enum
- */
- am_CustomSoundPropertyType_t type;
- /**
- * the actual value of the property
- */
- int16_t value;
-
-};
-
-/**
- * struct describing system properties
- */
-struct am_SystemProperty_s
-{
-
-public:
- /**
- * the type that is set
- */
- am_CustomSystemPropertyType_t type;
- /**
- * the value
- */
- int16_t value;
-
-};
-
-/**
- * struct describing sinkclasses
- */
-struct am_SinkClass_s
-{
-
-public:
- /**
- * the ID of the sinkClass
- */
- am_sinkClass_t sinkClassID;
- /**
- * the name of the sinkClass - must be unique in the system
- */
- std::string name;
- /**
- * the list of the class properties. These are pairs of a project specific enum
- * describing the type of the value and an integer holding the real value.
- */
- std::vector<am_ClassProperty_s> listClassProperties;
-
-};
-
-/**
- * struct describing source classes
- */
-struct am_SourceClass_s
-{
-
-public:
- /**
- * the source ID
- */
- am_sourceClass_t sourceClassID;
- /**
- * the name of the sourceClass - must be unique in the system
- */
- std::string name;
- /**
- * the list of the class properties. These are pairs of a project specific enum
- * describing the type of the value and an integer holding the real value.
- */
- std::vector<am_ClassProperty_s> listClassProperties;
-
-};
-
-/**
- * this type holds all information of sources relevant to the HMI
- */
-struct am_SourceType_s
-{
-
-public:
- /**
- * This is the ID of the source, it is unique in the system. There are 2 ways, ID
- * can be created: either it is assigned during the registration process (in a
- * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
- * is a fixed (the project has to ensure the uniqueness of the ID).
- */
- am_sourceID_t sourceID;
- /**
- * The name of the source. Must be unique in the whole system.
- */
- std::string name;
- /**
- * the availability of the source
- */
- am_Availability_s availability;
- /**
- * the sourceClassID, indicates the class the source is in. This information can
- * be used by the Controller to implement different behaviour for different
- * classes.
- */
- am_sourceClass_t sourceClassID;
-
-};
-
-/**
- * this type holds all information of sinks relevant to the HMI
- */
-struct am_SinkType_s
-{
-
-public:
- /**
- * This is the ID of the sink, it is unique in the system. There are 2 ways, ID
- * can be created: either it is assigned during the registration process (in a
- * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
- * is a fixed (the project has to ensure the uniqueness of the ID).
- */
- am_sinkID_t sinkID;
- /**
- * The name of the sink. Must be unique in the whole system.
- */
- std::string name;
- /**
- * This attribute reflects the availability of the sink. There are several reasons
- * why a sink could be not available for the moment: for example the shutdown of a
- * sink because of overtemperature or over- & undervoltage. The availability
- * consists of two pieces of information:
- *
- * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or
- * A_UNKNOWN
- * AvailabilityReason: this informs about the last reason for a change in
- * availability. The reasons itself are product specific.
- */
- am_Availability_s availability;
- /**
- * This is the representation of the Volume for the commandInterface. It is used
- * by the HMI to set the volume of a sink, the AudioManagerController has to
- * transform this into real source and sink volumes.
- */
- am_mainVolume_t volume;
- am_MuteState_e muteState;
- /**
- * The sinkClassID references to a sinkClass. With the help of classification,
- * rules can be setup to define the system behaviour.
- */
- am_sinkClass_t sinkClassID;
-
-};
-
-/**
- * a handle is used for asynchronous operations and is uniquely assigned for each
- * of this operations
- */
-struct am_Handle_s
-{
-
-public:
- /**
- * the handletype
- */
- am_Handle_e handleType:6;
- /**
- * the handle as value
- */
- uint16_t handle:10;
-
-};
-
-/**
- * struct describung mainsound property
- */
-struct am_MainSoundProperty_s
-{
-
-public:
- /**
- * the type of the property
- */
- am_CustomMainSoundPropertyType_t type;
- /**
- * the actual value
- */
- int16_t value;
-
-};
-
-/**
- * this type holds all information of connections relevant to the HMI
- */
-struct am_MainConnectionType_s
-{
-
-public:
- /**
- * the ID of the mainconnection
- */
- am_mainConnectionID_t mainConnectionID;
- /**
- * the sourceID where the connection starts
- */
- am_sourceID_t sourceID;
- /**
- * the sinkID where the connection ends
- */
- am_sinkID_t sinkID;
- /**
- * the delay of the mainconnection
- */
- am_timeSync_t delay;
- /**
- * the current connection state
- */
- am_ConnectionState_e connectionState;
-
-};
-
-/**
- * struct that holds attribiutes of a mainconnection
- */
-struct am_MainConnection_s
-{
-
-public:
- /**
- * the assigned ID
- */
- am_mainConnectionID_t mainConnectionID;
- /**
- * the current connection state
- */
- am_ConnectionState_e connectionState;
- /**
- * the sinkID
- */
- am_sinkID_t sinkID;
- /**
- * the sourceID
- */
- am_sourceID_t sourceID;
- /**
- * the delay of the connection
- */
- am_timeSync_t delay;
- /**
- * the list of sub connection IDs the mainconnection consists of
- */
- std::vector<am_connectionID_t> listConnectionID;
-
-};
-
-/**
- * This struct holds the payload of a notification.
- */
-struct am_NotificationPayload_s
-{
-
-public:
- /**
- * This defines the notification type
- */
- am_CustomNotificationType_t type;
- /**
- * This is finally the value of the notification. It's meaning depends on the
- * notificationType
- */
- int16_t value;
-
-};
-
-/**
- * This struct holds information about the configuration for notifications
- */
-struct am_NotificationConfiguration_s
-{
-
-public:
- /**
- * The notification type of the notification
- */
- am_CustomNotificationType_t type;
- /**
- * The Notification status. This can be periodic, min/max value based or even off
- * for example
- */
- am_NotificationStatus_e status;
- /**
- * This gives additional information to the notification status.
- * Relation between notification status and the value:
- * NS_PERIODIC - the period in ms
- * NS_MINIMUM - the minimum value that triggers the notification
- * NS_MAXIMUM - the maximum value that triggers the notifcation
- * NS_CHANGE - the resolution of the change value
- */
- int16_t parameter;
-
-};
-
-/**
- * This struct describes the attribiutes of a sink
- */
-struct am_Sink_s
-{
-
-public:
- /**
- * This is the ID of the sink, it is unique in the system. There are 2 ways, ID
- * can be created: either it is assigned during the registration process (in a
- * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
- * is a fixed (the project has to ensure the uniqueness of the ID).
- */
- am_sinkID_t sinkID;
- /**
- * The name of the sink. Must be unique in the whole system.
- */
- std::string name;
- /**
- * The domainID is the domain the sink belongs to. A sink can only be in one
- * domain.
- */
- am_domainID_t domainID;
- /**
- * The sinkClassID references to a sinkClass. With the help of classification,
- * rules can be setup to define the system behaviour.
- */
- am_sinkClass_t sinkClassID;
- /**
- * This is the volume of the sink. It is set by the AudioManagerController.
- */
- am_volume_t volume;
- /**
- * This Boolean flag indicates whether a sink is visible to the commandInterface
- * or not. If the User must have the possibility to choose the source in the HMI,
- * it must be visible. But there are also good reasons for invisible sinks, for
- * example if the sink is part of a crossfader or gateway. HMI relevant changes in
- * visible sinks will be automatically reported by the daemon to the
- * commandInterface.
- */
- bool visible;
- /**
- * This attribute reflects the availability of the sink. There are several reasons
- * why a sink could be not available for the moment: for example the shutdown of a
- * sink because of overtemperature or over- & undervoltage. The availability
- * consists of two pieces of information:
- *
- * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or
- * A_UNKNOWN
- * AvailabilityReason: this informs about the last reason for a change in
- * availability. The reasons itself are product specific.
- */
- am_Availability_s available;
- /**
- * This attribute reflects the muteState of the sink. The information is not the
- * "real" state of the sink, but the HMI representation for he commandInterface
- * controlled by the AudioManagerController.
- */
- am_MuteState_e muteState;
- /**
- * This is the representation of the Volume for the commandInterface. It is used
- * by the HMI to set the volume of a sink, the AudioManagerController has to
- * transform this into real source and sink volumes.
- */
- am_mainVolume_t mainVolume;
- /**
- * This is the list of soundProperties, that the sink is capable of. The
- * soundProperties itself are project specific. For sinks, a possible
- * soundProperty could be for example settings.
- */
- std::vector<am_SoundProperty_s> listSoundProperties;
- /**
- * This list holds information about the formats that the Source is capable of
- * supporting when delivering audio.
- */
- std::vector<am_CustomConnectionFormat_t> listConnectionFormats;
- /**
- * This is the list of the available mainSoundProperties. The principle is the
- * same than with soundProperties, but they are only visible to the
- * CommandInterface.
- */
- std::vector<am_MainSoundProperty_s> listMainSoundProperties;
- /**
- * This is the list of the MainNotificationConfigurations. These notifications
- * work on the level of command interface.
- */
- std::vector<am_NotificationConfiguration_s> listMainNotificationConfigurations;
- /**
- * This is the list of the NotificationConfigurations. These notifications work on
- * the level of RoutingPlugins.
- */
- std::vector<am_NotificationConfiguration_s> listNotificationConfigurations;
-
-};
-
-/**
- * This struct describes the attribiutes of a source
- */
-struct am_Source_s
-{
-
-public:
- /**
- * This is the ID of the source, it is unique in the system. There are 2 ways, ID
- * can be created: either it is assigned during the registration process (in a
- * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
- * is a fixed (the project has to ensure the uniqueness of the ID).
- */
- am_sourceID_t sourceID;
- /**
- * The domainID is the domain the source belongs to. A source can only be in one
- * domain.
- */
- am_domainID_t domainID;
- /**
- * The name of the source. Must be unique in the whole system.
- */
- std::string name;
- /**
- * the sourceClassID, indicates the class the source is in. This information can
- * be used by the Controller to implement different behaviour for different
- * classes.
- */
- am_sourceClass_t sourceClassID;
- /**
- * The source state is an indication towards the source if it is actively heard or
- * not. The source can use this information to implement features like automatic
- * spin down of CD's in case the CD is not the active source or AF following of a
- * tuner that is not actively heard. The source state is set by the
- * AudioManagerController.There are 3 possible states:
- *
- * SS_ON: the source is active
- * SS_OFF: the source is off
- * SS_PAUSED: the source is paused and not active.
- */
- am_SourceState_e sourceState;
- /**
- * This is the volume of the source. It is set by the AudioManagerController. It
- * is used to adopt different audiolevels in a system and mixing of sources (e.g.
- * navigation hints & music).
- */
- am_volume_t volume;
- /**
- * This Boolean flag indicates whether a source is visible to the commandInterface
- * or not. If the User must have the possibility to choose the source in the HMI,
- * it must be visible. But there are also good reasons for invisible sources, for
- * example if the source is part of a crossfader or gateway. HMI relevant changes
- * in visible sources will be automatically reported by the daemon to the
- * commandInterface.
- */
- bool visible;
- /**
- * This attribute reflects the availability of the source. There are several
- * reasons why a source could be not available for the moment. For example a CD
- * player which has no CD entered in the slot can be unavailable, or a USB player
- * with no or unreadable stick attached. Other scenarios involve the shutdown of a
- * source because of overtemperature or over- & undervoltage. The availability
- * consists of two informations:
- *
- * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or
- * A_UNKNOWN
- * AvailabilityReason: this informs about the last reason for a change in
- * availability. The reasons itself are product specific.
- */
- am_Availability_s available;
- /**
- * Some special sources can have special behaviors, the are so called "Low Level
- * Interrupts". Here the current status is documented. The information can be used
- * by the AudioManagerController to react to the changes by for example lowering
- * the volume of the mainSources. The two states are
- *
- * IS_OFF: the interrupt is not active at the moment
- * IS_INTERRUPTED: the interrupt is playing at the moment.
- */
- am_InterruptState_e interruptState;
- /**
- * This is the list of soundProperties, that the source is capable of. The
- * soundProperties itself are project specific. For sources, a possible
- * soundProperty could be navigation volume offset, for example.
- */
- std::vector<am_SoundProperty_s> listSoundProperties;
- /**
- * This list holds information about the formats that the Source is capable of
- * supporting when delivering audio.
- */
- std::vector<am_CustomConnectionFormat_t> listConnectionFormats;
- /**
- * This is the list of the available mainSoundProperties. The principle is the
- * same than with soundProperties, but they are only visible to the
- * CommandInterface.
- */
- std::vector<am_MainSoundProperty_s> listMainSoundProperties;
- /**
- * The list of MainNotificationConfigurations. These notifications work on the
- * level of CommandInterface.
- */
- std::vector<am_NotificationConfiguration_s> listMainNotificationConfigurations;
- /**
- * The list of MainNotificationConfigurations. These notifications work on the
- * level of RoutingInterface.
- */
- std::vector<am_NotificationConfiguration_s> listNotificationConfigurations;
-
-};
-
-/**
- * This struct describes the attribiutes of a domain
- */
-struct am_Domain_s
-{
-
-public:
- /**
- * the domain ID
- */
- am_domainID_t domainID;
- /**
- * the name of the domain
- */
- std::string name;
- /**
- * the busname. This is equal to a plugin name and is used to dispatch messages to
- * the elements of a plugin
- */
- std::string busname;
- /**
- * the name of the node
- */
- std::string nodename;
- /**
- * indicated if the domain is independent at startup or not
- */
- bool early;
- /**
- * indicates if the domain registration is complete or not
- */
- bool complete;
- /**
- * the current domain state
- */
- am_DomainState_e state;
-
-};
-
-/**
- * a connection
- */
-struct am_Connection_s
-{
-
-public:
- /**
- * the assigned ID
- */
- am_connectionID_t connectionID;
- /**
- * the source the audio flows from
- */
- am_sourceID_t sourceID;
- /**
- * the sink the audio flows to
- */
- am_sinkID_t sinkID;
- /**
- * the delay of the conneciton
- */
- am_timeSync_t delay;
- /**
- * the used connectionformat
- */
- am_CustomConnectionFormat_t connectionFormat;
-
-};
-
-/**
- * data type depends of am_EarlyDataType_e:
- * volume_t in case of ED_SOURCE_VOLUME, ED_SINK_VOLUME
- * soundProperty_t in case of ED_SOURCE_PROPERTY, ED_SINK_PROPERTY
- */
-union am_EarlyData_u
-{
-
-public:
- am_volume_t volume;
- am_SoundProperty_s soundProperty;
- am_InterruptState_e interruptState;
-
-};
-
-/**
- * data type depends of am_EarlyDataType_e:
- * sourceID in case of ED_SOURCE_VOLUME, ED_SOURCE_PROPERTY
- * sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY
- */
-union am_DataType_u
-{
-
-public:
- am_sinkID_t sink;
- am_sourceID_t source;
-
-};
-
-struct am_EarlyData_s
-{
-
-public:
- am_EarlyDataType_e type;
- am_DataType_u sinksource;
- am_EarlyData_u data;
-
-};
-
-/**
- * This types describe a mixed description for source and sinks volumes.
- */
-struct am_Volumes_s
-{
-
-public:
- /**
- * describes the type of the volume: source or sink.
- */
- am_VolumeType_e volumeType;
- /**
- * either sourceID or sinkID
- */
- am_DataType_u volumeID;
- /**
- * The volume
- */
- am_volume_t volume;
- /**
- * the ramp that shall be driven
- */
- am_CustomRampType_t ramp;
- /**
- * the time for the ramp
- */
- am_time_t time;
-
-};
-}
-#endif // !defined(EA_4FF89D4E_BF3C_465a_85C9_1DC47E4FA742__INCLUDED_)
+/**
+ * Copyright (C) 2012 - 2014, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
+ *
+ * \file
+ * For further information see http://projects.genivi.org/audio-manager
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
+ * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
+ */
+#if !defined(EA_71AFF0F7_316D_4cb5_9225_9B8C7D938A15__INCLUDED_)
+#define EA_71AFF0F7_316D_4cb5_9225_9B8C7D938A15__INCLUDED_
+
+#include <stdint.h>
+#include <string>
+#include <vector>
+
+namespace am {
+
+/**
+ * a domain ID
+ */
+typedef uint16_t am_domainID_t;
+
+/**
+ * a crossfader ID
+ */
+typedef uint16_t am_crossfaderID_t;
+
+/**
+ * a connection ID
+ */
+typedef uint16_t am_connectionID_t;
+
+/**
+ * a source ID
+ */
+typedef uint16_t am_sourceID_t;
+
+/**
+ * a sink ID
+ */
+typedef uint16_t am_sinkID_t;
+
+/**
+ * a converter ID
+ */
+typedef uint16_t am_converterID_t;
+
+/**
+ * a gateway ID
+ */
+typedef uint16_t am_gatewayID_t;
+
+/**
+ * a mainConnection ID
+ */
+typedef uint16_t am_mainConnectionID_t;
+
+/**
+ * speed
+ */
+typedef uint16_t am_speed_t;
+
+/**
+ * The unit is 0.1 db steps,The smallest value -3000 (=AM_MUTE). The minimum and
+ * maximum can be limited by actual project.
+ */
+typedef int16_t am_volume_t;
+static const am_volume_t AM_MUTE = -3000;
+
+/**
+ * This is the volume presented on the command interface. It is in the duty of the
+ * Controller to change the volumes given here into meaningful values on the
+ * routing interface.
+ * The range of this type is customer specific.
+ */
+typedef int16_t am_mainVolume_t;
+
+typedef uint16_t am_sourceClass_t;
+
+typedef uint16_t am_sinkClass_t;
+
+/**
+ * time in ms!
+ */
+typedef uint16_t am_time_t;
+
+/**
+ * offset time that is introduced in milli seconds.
+ */
+typedef int16_t am_timeSync_t;
+
+/**
+ * This type gives the information about reason for reason for Source/Sink change
+ */
+typedef uint16_t am_CustomAvailabilityReason_t;
+static const am_CustomAvailabilityReason_t AR_UNKNOWN = 0;
+/** new media was entered */
+static const am_CustomAvailabilityReason_t AR_GENIVI_NEWMEDIA = 1;
+/** same media was entered */
+static const am_CustomAvailabilityReason_t AR_GENIVI_SAMEMEDIA = 2;
+/** there is no media or media is removed */
+static const am_CustomAvailabilityReason_t AR_GENIVI_NOMEDIA = 3;
+/** there was a temperature event */
+static const am_CustomAvailabilityReason_t AR_GENIVI_TEMPERATURE = 4;
+/** there was a voltage event */
+static const am_CustomAvailabilityReason_t AR_GENIVI_VOLTAGE = 5;
+/** fatal errors on reading or accessing media */
+static const am_CustomAvailabilityReason_t AR_GENIVI_ERRORMEDIA = 6;
+
+/**
+ * This is a custom specific identifier of property. It can be used to
+ * differentiate between interrupt source/sink, main source/sink, etc.
+ */
+typedef uint16_t am_CustomClassProperty_t;
+static const am_CustomClassProperty_t CP_UNKNOWN = 0;
+static const am_CustomClassProperty_t CP_GENIVI_SOURCE_TYPE = 1;
+static const am_CustomClassProperty_t CP_GENIVI_SINK_TYPE = 2;
+
+/**
+ * This type classifies the format in which data is exchanged within a connection.
+ * The type itself is project specific although there are some standard formats
+ * defined.
+ */
+typedef uint16_t am_CustomConnectionFormat_t;
+static const am_CustomConnectionFormat_t CF_UNKNOWN = 0;
+static const am_CustomConnectionFormat_t CF_GENIVI_MONO = 1;
+static const am_CustomConnectionFormat_t CF_GENIVI_STEREO = 2;
+static const am_CustomConnectionFormat_t CF_GENIVI_ANALOG = 3;
+static const am_CustomConnectionFormat_t CF_GENIVI_AUTO = 4;
+
+/**
+ * Here are all SoundProperties that can be set via the CommandInterface.
+ * This type is product specific and can be changed or extended.
+ */
+typedef uint16_t am_CustomMainSoundPropertyType_t;
+static const am_CustomMainSoundPropertyType_t MSP_UNKNOWN = 0;
+static const am_CustomMainSoundPropertyType_t MSP_GENIVI_TREBLE = 1;
+static const am_CustomMainSoundPropertyType_t MSP_GENIVI_MID = 2;
+static const am_CustomMainSoundPropertyType_t MSP_GENIVI_BASS = 3;
+
+/**
+ * The notification types are project specific.
+ */
+typedef uint16_t am_CustomNotificationType_t;
+static const am_CustomNotificationType_t NT_UNKNOWN = 0;
+
+/**
+ * The given ramp types here are just examples. For products, different ramp types
+ * can be defined here. It is in the responsibility of the product to make sure
+ * that the routing plugins are aware of the ramp types used.
+ */
+typedef uint16_t am_CustomRampType_t;
+static const am_CustomRampType_t RAMP_UNKNOWN = 0;
+/** sets directly the value without a ramp */
+static const am_CustomRampType_t RAMP_GENIVI_DIRECT = 1;
+/** Sets the volume as fast as possible */
+static const am_CustomRampType_t RAMP_GENIVI_NO_PLOP = 2;
+/** inverted exponential update, high gradient at the start - soft end */
+static const am_CustomRampType_t RAMP_GENIVI_EXP_INV = 3;
+/** continues update of volume */
+static const am_CustomRampType_t RAMP_GENIVI_LINEAR = 4;
+/** exponential update, soft start - high gradient at the end */
+static const am_CustomRampType_t RAMP_GENIVI_EXP = 5;
+
+/**
+ * Within genivi only the some example properties are defined.
+ * For products these should be changed or extended.
+ */
+typedef uint16_t am_CustomSoundPropertyType_t;
+static const am_CustomSoundPropertyType_t SP_UNKNOWN = 0;
+static const am_CustomSoundPropertyType_t SP_GENIVI_TREBLE = 1;
+static const am_CustomSoundPropertyType_t SP_GENIVI_MID = 2;
+static const am_CustomSoundPropertyType_t SP_GENIVI_BASS = 3;
+
+/**
+ * Describes the different system properties which are project specific.
+ */
+typedef uint16_t am_CustomSystemPropertyType_t;
+static const am_CustomSystemPropertyType_t SYP_UNKNOWN = 0;
+
+/**
+ * describes the active sink of a crossfader.
+ */
+enum am_HotSink_e
+{
+ /**
+ * default
+ */
+ HS_UNKNOWN = 0,
+ /**
+ * sinkA is active
+ */
+ HS_SINKA = 1,
+ /**
+ * sinkB is active
+ */
+ HS_SINKB = 2,
+ /**
+ * the crossfader is in the transition state
+ */
+ HS_INTERMEDIATE = 3,
+ HS_MAX
+};
+
+/**
+ * with the help of this enum, sinks and sources can report their availability
+ * state
+ */
+enum am_Availability_e
+{
+ /**
+ * default
+ */
+ A_UNKNOWN = 0,
+ /**
+ * The source / sink is available
+ */
+ A_AVAILABLE = 1,
+ /**
+ * the source / sink is not available
+ */
+ A_UNAVAILABLE = 2,
+ A_MAX
+};
+
+/**
+ * represents the connection state
+ */
+enum am_ConnectionState_e
+{
+ CS_UNKNOWN = 0,
+ /**
+ * This means the connection is just building up
+ */
+ CS_CONNECTING = 1,
+ /**
+ * the connection is ready to be used
+ */
+ CS_CONNECTED = 2,
+ /**
+ * the connection is in the course to be knocked down
+ */
+ CS_DISCONNECTING = 3,
+ /**
+ * only relevant for connectionStatechanged. Is send after the connection was
+ * removed
+ */
+ CS_DISCONNECTED = 4,
+ /**
+ * this means the connection is still build up but unused at the moment
+ */
+ CS_SUSPENDED = 5,
+ CS_MAX
+};
+
+enum am_DomainState_e
+{
+ /**
+ * default
+ */
+ DS_UNKNOWN = 0,
+ /**
+ * the domain is controlled by the daemon
+ */
+ DS_CONTROLLED = 1,
+ /**
+ * the domain is independent starting up
+ */
+ DS_INDEPENDENT_STARTUP = 1,
+ /**
+ * the domain is independent running down
+ */
+ DS_INDEPENDENT_RUNDOWN = 2,
+ DS_MAX
+};
+
+/**
+ * This enum characterizes the data of the EarlyData_t
+ */
+enum am_EarlyDataType_e
+{
+ /**
+ * default
+ */
+ ES_UNKNOWN = 0,
+ /**
+ * the source volume
+ */
+ ED_SOURCE_VOLUME = 1,
+ /**
+ * the sink volume
+ */
+ ED_SINK_VOLUME = 2,
+ /**
+ * a source property
+ */
+ ED_SOURCE_PROPERTY = 3,
+ /**
+ * a sink property
+ */
+ ED_SINK_PROPERTY = 4,
+ /**
+ * The interrupt state
+ */
+ ED_INTERRUPT_STATE = 5,
+ ED_MAX
+};
+
+/**
+ * the errors of the audiomanager. All possible errors are in here. This enum is
+ * used widely as return parameter.
+ */
+enum am_Error_e
+{
+ /**
+ * no error - positive reply
+ */
+ E_OK = 0,
+ /**
+ * default
+ */
+ E_UNKNOWN = 1,
+ /**
+ * value out of range
+ */
+ E_OUT_OF_RANGE = 2,
+ /**
+ * not used
+ */
+ E_NOT_USED = 3,
+ /**
+ * a database error occurred
+ */
+ E_DATABASE_ERROR = 4,
+ /**
+ * the desired object already exists
+ */
+ E_ALREADY_EXISTS = 5,
+ /**
+ * there is no change
+ */
+ E_NO_CHANGE = 6,
+ /**
+ * the desired action is not possible
+ */
+ E_NOT_POSSIBLE = 7,
+ /**
+ * the desired object is non existent
+ */
+ E_NON_EXISTENT = 8,
+ /**
+ * the asynchronous action was aborted
+ */
+ E_ABORTED = 9,
+ /**
+ * This error is returned in case a connect is issued with a connectionFormat that
+ * cannot be selected for the connection. This could be either due to the
+ * capabilities of a source or a sink or gateway compatibilities for example
+ */
+ E_WRONG_FORMAT = 10,
+ E_MAX
+};
+
+enum am_MuteState_e
+{
+ /**
+ * default
+ */
+ MS_UNKNOWN = 0,
+ /**
+ * the source / sink is muted
+ */
+ MS_MUTED = 1,
+ /**
+ * the source / sink is unmuted
+ */
+ MS_UNMUTED = 2,
+ MS_MAX
+};
+
+/**
+ * The source state reflects the state of the source
+ */
+enum am_SourceState_e
+{
+ SS_UNKNNOWN = 0,
+ /**
+ * The source can be activly heared
+ */
+ SS_ON = 1,
+ /**
+ * The source cannot be heared
+ */
+ SS_OFF = 2,
+ /**
+ * The source is paused. Meaning it cannot be heared but should be prepared to
+ * play again soon.
+ */
+ SS_PAUSED = 3,
+ SS_MAX
+};
+
+/**
+ * This enumeration is used to define the type of the action that is correlated to
+ * a handle.
+ */
+enum am_Handle_e
+{
+ H_UNKNOWN = 0,
+ H_CONNECT = 1,
+ H_DISCONNECT = 2,
+ H_SETSOURCESTATE = 3,
+ H_SETSINKVOLUME = 4,
+ H_SETSOURCEVOLUME = 5,
+ H_SETSINKSOUNDPROPERTY = 6,
+ H_SETSOURCESOUNDPROPERTY = 7,
+ H_SETSINKSOUNDPROPERTIES = 8,
+ H_SETSOURCESOUNDPROPERTIES = 9,
+ H_CROSSFADE = 10,
+ H_SETVOLUMES = 11,
+ H_SETSINKNOTIFICATION = 12,
+ H_SETSOURCENOTIFICATION = 13,
+ H_MAX
+};
+
+enum am_InterruptState_e
+{
+ /**
+ * default
+ */
+ IS_UNKNOWN = 0,
+ /**
+ * the interrupt state is off - no interrupt
+ */
+ IS_OFF = 1,
+ /**
+ * the interrupt state is interrupted - the interrupt is active
+ */
+ IS_INTERRUPTED = 2,
+ IS_MAX
+};
+
+/**
+ * This datatype determines if a sourceID or a sinkID is used in the union
+ * following
+ */
+enum am_VolumeType_e
+{
+ VT_UNKNOWN = 0,
+ /**
+ * the following type is a sink
+ */
+ VT_SINK = 1,
+ /**
+ * the following type is a source
+ */
+ VT_SOURCE = 2,
+ VT_MAX
+};
+
+enum am_NotificationStatus_e
+{
+ NS_UNKNOWN = 0,
+ /**
+ * No notification, the function is turned off
+ */
+ NS_OFF = 1,
+ /**
+ * Periodic notifications are sent out. The period in ms is given by
+ * am_NotificationParameter
+ */
+ NS_PERIODIC = 2,
+ /**
+ * The notification is sent out when the minimum given by am_NotificationParameter
+ * is reached.
+ */
+ NS_MINIMUM = 3,
+ /**
+ * The notification is sent out when the maximum given by am_NotificationParameter
+ * is reached.
+ */
+ NS_MAXIMUM = 4,
+ /**
+ * The notification is sent out when a change happened. The Resolution of the
+ * change is defined by am_NotificationParameter.
+ */
+ NS_CHANGE = 5,
+ NS_MAX
+};
+
+/**
+ * this describes the availability of a sink or a source together with the latest
+ * change
+ */
+struct am_Availability_s
+{
+
+public:
+ /**
+ * the current availability state
+ */
+ am_Availability_e availability;
+ /**
+ * the reason for the last change. This can be used to trigger events that deal
+ * with state changes.
+ */
+ am_CustomAvailabilityReason_t availabilityReason;
+
+};
+
+/**
+ * describes class properties
+ */
+struct am_ClassProperty_s
+{
+
+public:
+ /**
+ * the property as enum
+ */
+ am_CustomClassProperty_t classProperty;
+ /**
+ * the value of the property
+ */
+ int16_t value;
+
+};
+
+/**
+ * This struct describes the attribiutes of a crossfader.
+ */
+struct am_Crossfader_s
+{
+
+public:
+ /**
+ * This is the ID of the crossfader, it is unique in the system. There are 2 ways,
+ * ID can be created: either it is assigned during the registration process (in a
+ * dynamic context, uniqueness will be ensured by the AudioManager daemon), or it
+ * is a fixed (the project has to ensure the uniqueness of the ID).
+ */
+ am_crossfaderID_t crossfaderID;
+ /**
+ * The name of the crossfader. Must be unique in the whole system.
+ */
+ std::string name;
+ /**
+ * The sinkID of the SinkA. Sinks shall be registered before registering the
+ * crossfader.
+ */
+ am_sinkID_t sinkID_A;
+ /**
+ * The sinkID of the SinkB. Sinks shall be registered before registering the
+ * crossfader.
+ */
+ am_sinkID_t sinkID_B;
+ /**
+ * The sourceID of the crossfader source. The source shall be registered before
+ * the crossfader.
+ */
+ am_sourceID_t sourceID;
+ /**
+ * This enum can have 3 states:
+ *
+ * HS_SINKA sinkA is the current hot one, sinkB is not audible
+ * HS_SINKB sinkB is the current hot one, sinkB is not audible
+ * HS_INTERMEDIATE the fader is stuck in between a cross-fading action. This
+ * could be due to an abort or an error. Before using the crossfader, it must be
+ * set to either HS_SINKA or HS_SINKB.
+ */
+ am_HotSink_e hotSink;
+
+};
+
+/**
+ * This struct describes the attributes of a converter.
+ */
+struct am_Converter_s
+{
+
+public:
+ /**
+ * This is the ID of the converter, it is unique in the system. There are 2 ways,
+ * ID can be created: either it is assigned during the registration process (in a
+ * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
+ * is a fixed (the project has to ensure the uniqueness of the ID).
+ */
+ am_converterID_t converterID;
+ /**
+ * The name of the converter. Must be unique in the whole system.
+ */
+ std::string name;
+ /**
+ * The sinkID of the convertersink-end. The sink is a full blown sink with
+ * connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of
+ * a gateway as non-visible. Care needs to be taken that the connectionsFormats
+ * match with the ones in the conversionMatrix. If the sink is located in the
+ * controllingDomain, the ID needs to be retrieved by registering the sink before
+ * registering the gateway. In case the sink is in a different domain, the ID
+ * needs to be retrieved via peeking.
+ */
+ am_sinkID_t sinkID;
+ /**
+ * The sourceID of the converter sink-end. The sink is a full blown source with
+ * connectionFormats, sinkClassIDs etc... It makes sense to register the sources
+ * of a gateway as non-visible. Care needs to be taken that the connectionsFormats
+ * match with the ones in the conversionMatrix. If the source is located in the
+ * controllingDomain, the ID needs to be retrieved by registering the source
+ * before registering the gateway. In case the source is in a different domain,
+ * the ID needs to be retrieved via peeking.
+ */
+ am_sourceID_t sourceID;
+ /**
+ * This is the ID of the domain that registers the converter.
+ */
+ am_domainID_t domainID;
+ /**
+ * This is the list of available formats on the source side of the converter. It
+ * is not defined during the gateway registration but copied from the source
+ * registration.
+ */
+ std::vector<am_CustomConnectionFormat_t> listSourceFormats;
+ /**
+ * This is the list of available formats on the sink side of the gateway. It is
+ * not defined during the converter registration but copied from the sink
+ * registration.
+ */
+ std::vector<am_CustomConnectionFormat_t> listSinkFormats;
+ /**
+ * This is matrix holding information about the conversion capability of the
+ * converter, it's length is defined by the length(listSinkFormats) x
+ * length(listSourceFormats).
+ * If a SinkFormat can be converted into a SourceFormat, the vector will hold a 1,
+ * if no conversion is possible, a 0.
+ * The data is stored row orientated, where the rows are related to the
+ * sinksFormats and the columns to the sourceFormats. The first value will hold
+ * the conversion information from the first sourceFormat to the first sinkFormat
+ * for example and the seventh value the information about the 3rd sinkFormat to
+ * the 1st sourceFormat in case we would have 3 sourceFormats.
+ *
+ * This matrix
+ * 110 011 000 111 001
+ *
+ * reads as this:
+ * Source
+ * ** 1 2 3
+ * *********************
+ * S 1* 1 1 0
+ * i 2* 0 1 1
+ * n 3* 0 0 0
+ * k 4* 1 1 1
+ * 5* 0 0 1
+ */
+ std::vector<bool> convertionMatrix;
+
+};
+
+/**
+ * This struct describes the attributes of a gateway.
+ */
+struct am_Gateway_s
+{
+
+public:
+ /**
+ * This is the ID of the gateway, it is unique in the system. There are 2 ways, ID
+ * can be created: either it is assigned during the registration process (in a
+ * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
+ * is a fixed (the project has to ensure the uniqueness of the ID).
+ */
+ am_gatewayID_t gatewayID;
+ /**
+ * The name of the gateway. Must be unique in the whole system.
+ */
+ std::string name;
+ /**
+ * The sinkID of the gateway sink-end. The sink is a full blown sink with
+ * connectionFormats, sinkClassIDs etc... It makes sense to register the sinks of
+ * a gateway as non-visible. Care needs to be taken that the connectionsFormats
+ * match with the ones in the conversionMatrix. If the sink is located in the
+ * controllingDomain, the ID needs to be retrieved by registering the sink before
+ * registering the gateway. In case the sink is in a different domain, the ID
+ * needs to be retrieved via peeking.
+ */
+ am_sinkID_t sinkID;
+ /**
+ * The sourceID of the gateway sink-end. The sink is a full blown source with
+ * connectionFormats, sinkClassIDs etc... It makes sense to register the sources
+ * of a gateway as non-visible. Care needs to be taken that the connectionsFormats
+ * match with the ones in the conversionMatrix. If the source is located in the
+ * controllingDomain, the ID needs to be retrieved by registering the source
+ * before registering the gateway. In case the source is in a different domain,
+ * the ID needs to be retrieved via peeking.
+ */
+ am_sourceID_t sourceID;
+ /**
+ * The ID of the sink. If the domain is the same like the controlling domain, the
+ * ID is known due to registration. If the domain is different, the ID needs to be
+ * retrieved via peeking.
+ */
+ am_domainID_t domainSinkID;
+ /**
+ * The ID of the source. If the domain is the same like the controlling domain,
+ * the ID is known due to registration. If the domain is different, the ID needs
+ * to be retrieved via peeking.
+ */
+ am_domainID_t domainSourceID;
+ /**
+ * This is the ID of the domain that registers the gateway.
+ */
+ am_domainID_t controlDomainID;
+ /**
+ * This is the list of available formats on the source side of the gateway. It is
+ * not defined during the gateway registration but copied from the source
+ * registration.
+ */
+ std::vector<am_CustomConnectionFormat_t> listSourceFormats;
+ /**
+ * This is the list of available formats on the sink side of the gateway. It is
+ * not defined during the gateway registration but copied from the sink
+ * registration.
+ */
+ std::vector<am_CustomConnectionFormat_t> listSinkFormats;
+ /**
+ * This is matrix holding information about the conversion capability of the
+ * gateway, it's length is defined by the length(listSinkFormats) x
+ * length(listSourceFormats).
+ * If a SinkFormat can be converted into a SourceFormat, the vector will hold a 1,
+ * if no conversion is possible, a 0.
+ * The data is stored row orientated, where the rows are related to the
+ * sinksFormats and the columns to the sourceFormats. The first value will hold
+ * the conversion information from the first sourceFormat to the first sinkFormat
+ * for example and the seventh value the information about the 3rd sinkFormat to
+ * the 1st sourceFormat in case we would have 3 sourceFormats.
+ *
+ * This matrix
+ * 110 011 000 111 001
+ *
+ * reads as this:
+ * Source
+ * ** 1 2 3
+ * *********************
+ * S 1* 1 1 0
+ * i 2* 0 1 1
+ * n 3* 0 0 0
+ * k 4* 1 1 1
+ * 5* 0 0 1
+ */
+ std::vector<bool> convertionMatrix;
+
+};
+
+/**
+ * This represents one "hopp" in a route
+ */
+struct am_RoutingElement_s
+{
+
+public:
+ /**
+ * the source ID
+ */
+ am_sourceID_t sourceID;
+ /**
+ * the sinkID
+ */
+ am_sinkID_t sinkID;
+ /**
+ * the domainID the routeElement is in
+ */
+ am_domainID_t domainID;
+ /**
+ * the connectionformat that is used for the route
+ */
+ am_CustomConnectionFormat_t connectionFormat;
+
+};
+
+/**
+ * a list of routing elements that lead from source to sink
+ */
+struct am_Route_s
+{
+
+public:
+ /**
+ * the sourceID where the route starts
+ */
+ am_sourceID_t sourceID;
+ /**
+ * the sinkID where the route ends
+ */
+ am_sinkID_t sinkID;
+ /**
+ * the actual route as list of routing elements
+ */
+ std::vector<am_RoutingElement_s> route;
+
+};
+
+/**
+ * struct describing the sound property
+ */
+struct am_SoundProperty_s
+{
+
+public:
+ /**
+ * the type of the property - a project specific enum
+ */
+ am_CustomSoundPropertyType_t type;
+ /**
+ * the actual value of the property
+ */
+ int16_t value;
+
+};
+
+/**
+ * struct describing system properties
+ */
+struct am_SystemProperty_s
+{
+
+public:
+ /**
+ * the type that is set
+ */
+ am_CustomSystemPropertyType_t type;
+ /**
+ * the value
+ */
+ int16_t value;
+
+};
+
+/**
+ * struct describing sinkclasses
+ */
+struct am_SinkClass_s
+{
+
+public:
+ /**
+ * the ID of the sinkClass
+ */
+ am_sinkClass_t sinkClassID;
+ /**
+ * the name of the sinkClass - must be unique in the system
+ */
+ std::string name;
+ /**
+ * the list of the class properties. These are pairs of a project specific enum
+ * describing the type of the value and an integer holding the real value.
+ */
+ std::vector<am_ClassProperty_s> listClassProperties;
+
+};
+
+/**
+ * struct describing source classes
+ */
+struct am_SourceClass_s
+{
+
+public:
+ /**
+ * the source ID
+ */
+ am_sourceClass_t sourceClassID;
+ /**
+ * the name of the sourceClass - must be unique in the system
+ */
+ std::string name;
+ /**
+ * the list of the class properties. These are pairs of a project specific enum
+ * describing the type of the value and an integer holding the real value.
+ */
+ std::vector<am_ClassProperty_s> listClassProperties;
+
+};
+
+/**
+ * this type holds all information of sources relevant to the HMI
+ */
+struct am_SourceType_s
+{
+
+public:
+ /**
+ * This is the ID of the source, it is unique in the system. There are 2 ways, ID
+ * can be created: either it is assigned during the registration process (in a
+ * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
+ * is a fixed (the project has to ensure the uniqueness of the ID).
+ */
+ am_sourceID_t sourceID;
+ /**
+ * The name of the source. Must be unique in the whole system.
+ */
+ std::string name;
+ /**
+ * the availability of the source
+ */
+ am_Availability_s availability;
+ /**
+ * the sourceClassID, indicates the class the source is in. This information can
+ * be used by the Controller to implement different behaviour for different
+ * classes.
+ */
+ am_sourceClass_t sourceClassID;
+
+};
+
+/**
+ * this type holds all information of sinks relevant to the HMI
+ */
+struct am_SinkType_s
+{
+
+public:
+ /**
+ * This is the ID of the sink, it is unique in the system. There are 2 ways, ID
+ * can be created: either it is assigned during the registration process (in a
+ * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
+ * is a fixed (the project has to ensure the uniqueness of the ID).
+ */
+ am_sinkID_t sinkID;
+ /**
+ * The name of the sink. Must be unique in the whole system.
+ */
+ std::string name;
+ /**
+ * This attribute reflects the availability of the sink. There are several reasons
+ * why a sink could be not available for the moment: for example the shutdown of a
+ * sink because of overtemperature or over- & undervoltage. The availability
+ * consists of two pieces of information:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or
+ * A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in
+ * availability. The reasons itself are product specific.
+ */
+ am_Availability_s availability;
+ /**
+ * This is the representation of the Volume for the commandInterface. It is used
+ * by the HMI to set the volume of a sink, the AudioManagerController has to
+ * transform this into real source and sink volumes.
+ */
+ am_mainVolume_t volume;
+ am_MuteState_e muteState;
+ /**
+ * The sinkClassID references to a sinkClass. With the help of classification,
+ * rules can be setup to define the system behaviour.
+ */
+ am_sinkClass_t sinkClassID;
+
+};
+
+/**
+ * a handle is used for asynchronous operations and is uniquely assigned for each
+ * of this operations
+ */
+struct am_Handle_s
+{
+
+public:
+ /**
+ * the handletype
+ */
+ am_Handle_e handleType:6;
+ /**
+ * the handle as value
+ */
+ uint16_t handle:10;
+
+};
+
+/**
+ * struct describung mainsound property
+ */
+struct am_MainSoundProperty_s
+{
+
+public:
+ /**
+ * the type of the property
+ */
+ am_CustomMainSoundPropertyType_t type;
+ /**
+ * the actual value
+ */
+ int16_t value;
+
+};
+
+/**
+ * this type holds all information of connections relevant to the HMI
+ */
+struct am_MainConnectionType_s
+{
+
+public:
+ /**
+ * the ID of the mainconnection
+ */
+ am_mainConnectionID_t mainConnectionID;
+ /**
+ * the sourceID where the connection starts
+ */
+ am_sourceID_t sourceID;
+ /**
+ * the sinkID where the connection ends
+ */
+ am_sinkID_t sinkID;
+ /**
+ * the delay of the mainconnection
+ */
+ am_timeSync_t delay;
+ /**
+ * the current connection state
+ */
+ am_ConnectionState_e connectionState;
+
+};
+
+/**
+ * struct that holds attribiutes of a mainconnection
+ */
+struct am_MainConnection_s
+{
+
+public:
+ /**
+ * the assigned ID
+ */
+ am_mainConnectionID_t mainConnectionID;
+ /**
+ * the current connection state
+ */
+ am_ConnectionState_e connectionState;
+ /**
+ * the sinkID
+ */
+ am_sinkID_t sinkID;
+ /**
+ * the sourceID
+ */
+ am_sourceID_t sourceID;
+ /**
+ * the delay of the connection
+ */
+ am_timeSync_t delay;
+ /**
+ * the list of sub connection IDs the mainconnection consists of
+ */
+ std::vector<am_connectionID_t> listConnectionID;
+
+};
+
+/**
+ * This struct holds the payload of a notification.
+ */
+struct am_NotificationPayload_s
+{
+
+public:
+ /**
+ * This defines the notification type
+ */
+ am_CustomNotificationType_t type;
+ /**
+ * This is finally the value of the notification. It's meaning depends on the
+ * notificationType
+ */
+ int16_t value;
+
+};
+
+/**
+ * This struct holds information about the configuration for notifications
+ */
+struct am_NotificationConfiguration_s
+{
+
+public:
+ /**
+ * The notification type of the notification
+ */
+ am_CustomNotificationType_t type;
+ /**
+ * The Notification status. This can be periodic, min/max value based or even off
+ * for example
+ */
+ am_NotificationStatus_e status;
+ /**
+ * This gives additional information to the notification status.
+ * Relation between notification status and the value:
+ * NS_PERIODIC - the period in ms
+ * NS_MINIMUM - the minimum value that triggers the notification
+ * NS_MAXIMUM - the maximum value that triggers the notifcation
+ * NS_CHANGE - the resolution of the change value
+ */
+ int16_t parameter;
+
+};
+
+/**
+ * This struct describes the attribiutes of a sink
+ */
+struct am_Sink_s
+{
+
+public:
+ /**
+ * This is the ID of the sink, it is unique in the system. There are 2 ways, ID
+ * can be created: either it is assigned during the registration process (in a
+ * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
+ * is a fixed (the project has to ensure the uniqueness of the ID).
+ */
+ am_sinkID_t sinkID;
+ /**
+ * The name of the sink. Must be unique in the whole system.
+ */
+ std::string name;
+ /**
+ * The domainID is the domain the sink belongs to. A sink can only be in one
+ * domain.
+ */
+ am_domainID_t domainID;
+ /**
+ * The sinkClassID references to a sinkClass. With the help of classification,
+ * rules can be setup to define the system behaviour.
+ */
+ am_sinkClass_t sinkClassID;
+ /**
+ * This is the volume of the sink. It is set by the AudioManagerController.
+ */
+ am_volume_t volume;
+ /**
+ * This Boolean flag indicates whether a sink is visible to the commandInterface
+ * or not. If the User must have the possibility to choose the source in the HMI,
+ * it must be visible. But there are also good reasons for invisible sinks, for
+ * example if the sink is part of a crossfader or gateway. HMI relevant changes in
+ * visible sinks will be automatically reported by the daemon to the
+ * commandInterface.
+ */
+ bool visible;
+ /**
+ * This attribute reflects the availability of the sink. There are several reasons
+ * why a sink could be not available for the moment: for example the shutdown of a
+ * sink because of overtemperature or over- & undervoltage. The availability
+ * consists of two pieces of information:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or
+ * A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in
+ * availability. The reasons itself are product specific.
+ */
+ am_Availability_s available;
+ /**
+ * This attribute reflects the muteState of the sink. The information is not the
+ * "real" state of the sink, but the HMI representation for he commandInterface
+ * controlled by the AudioManagerController.
+ */
+ am_MuteState_e muteState;
+ /**
+ * This is the representation of the Volume for the commandInterface. It is used
+ * by the HMI to set the volume of a sink, the AudioManagerController has to
+ * transform this into real source and sink volumes.
+ */
+ am_mainVolume_t mainVolume;
+ /**
+ * This is the list of soundProperties, that the sink is capable of. The
+ * soundProperties itself are project specific. For sinks, a possible
+ * soundProperty could be for example settings.
+ */
+ std::vector<am_SoundProperty_s> listSoundProperties;
+ /**
+ * This list holds information about the formats that the Source is capable of
+ * supporting when delivering audio.
+ */
+ std::vector<am_CustomConnectionFormat_t> listConnectionFormats;
+ /**
+ * This is the list of the available mainSoundProperties. The principle is the
+ * same than with soundProperties, but they are only visible to the
+ * CommandInterface.
+ */
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+ /**
+ * This is the list of the MainNotificationConfigurations. These notifications
+ * work on the level of command interface.
+ */
+ std::vector<am_NotificationConfiguration_s> listMainNotificationConfigurations;
+ /**
+ * This is the list of the NotificationConfigurations. These notifications work on
+ * the level of RoutingPlugins.
+ */
+ std::vector<am_NotificationConfiguration_s> listNotificationConfigurations;
+
+};
+
+/**
+ * This struct describes the attribiutes of a source
+ */
+struct am_Source_s
+{
+
+public:
+ /**
+ * This is the ID of the source, it is unique in the system. There are 2 ways, ID
+ * can be created: either it is assigned during the registration process (in a
+ * dynamic context, uniqueness will be ensured by the AudioManagerDaemon), or it
+ * is a fixed (the project has to ensure the uniqueness of the ID).
+ */
+ am_sourceID_t sourceID;
+ /**
+ * The domainID is the domain the source belongs to. A source can only be in one
+ * domain.
+ */
+ am_domainID_t domainID;
+ /**
+ * The name of the source. Must be unique in the whole system.
+ */
+ std::string name;
+ /**
+ * the sourceClassID, indicates the class the source is in. This information can
+ * be used by the Controller to implement different behaviour for different
+ * classes.
+ */
+ am_sourceClass_t sourceClassID;
+ /**
+ * The source state is an indication towards the source if it is actively heard or
+ * not. The source can use this information to implement features like automatic
+ * spin down of CD's in case the CD is not the active source or AF following of a
+ * tuner that is not actively heard. The source state is set by the
+ * AudioManagerController.There are 3 possible states:
+ *
+ * SS_ON: the source is active
+ * SS_OFF: the source is off
+ * SS_PAUSED: the source is paused and not active.
+ */
+ am_SourceState_e sourceState;
+ /**
+ * This is the volume of the source. It is set by the AudioManagerController. It
+ * is used to adopt different audiolevels in a system and mixing of sources (e.g.
+ * navigation hints & music).
+ */
+ am_volume_t volume;
+ /**
+ * This Boolean flag indicates whether a source is visible to the commandInterface
+ * or not. If the User must have the possibility to choose the source in the HMI,
+ * it must be visible. But there are also good reasons for invisible sources, for
+ * example if the source is part of a crossfader or gateway. HMI relevant changes
+ * in visible sources will be automatically reported by the daemon to the
+ * commandInterface.
+ */
+ bool visible;
+ /**
+ * This attribute reflects the availability of the source. There are several
+ * reasons why a source could be not available for the moment. For example a CD
+ * player which has no CD entered in the slot can be unavailable, or a USB player
+ * with no or unreadable stick attached. Other scenarios involve the shutdown of a
+ * source because of overtemperature or over- & undervoltage. The availability
+ * consists of two informations:
+ *
+ * Availablility: the status itself, can be A_AVAILABLE, A_UNAVAILABLE or
+ * A_UNKNOWN
+ * AvailabilityReason: this informs about the last reason for a change in
+ * availability. The reasons itself are product specific.
+ */
+ am_Availability_s available;
+ /**
+ * Some special sources can have special behaviors, the are so called "Low Level
+ * Interrupts". Here the current status is documented. The information can be used
+ * by the AudioManagerController to react to the changes by for example lowering
+ * the volume of the mainSources. The two states are
+ *
+ * IS_OFF: the interrupt is not active at the moment
+ * IS_INTERRUPTED: the interrupt is playing at the moment.
+ */
+ am_InterruptState_e interruptState;
+ /**
+ * This is the list of soundProperties, that the source is capable of. The
+ * soundProperties itself are project specific. For sources, a possible
+ * soundProperty could be navigation volume offset, for example.
+ */
+ std::vector<am_SoundProperty_s> listSoundProperties;
+ /**
+ * This list holds information about the formats that the Source is capable of
+ * supporting when delivering audio.
+ */
+ std::vector<am_CustomConnectionFormat_t> listConnectionFormats;
+ /**
+ * This is the list of the available mainSoundProperties. The principle is the
+ * same than with soundProperties, but they are only visible to the
+ * CommandInterface.
+ */
+ std::vector<am_MainSoundProperty_s> listMainSoundProperties;
+ /**
+ * The list of MainNotificationConfigurations. These notifications work on the
+ * level of CommandInterface.
+ */
+ std::vector<am_NotificationConfiguration_s> listMainNotificationConfigurations;
+ /**
+ * The list of MainNotificationConfigurations. These notifications work on the
+ * level of RoutingInterface.
+ */
+ std::vector<am_NotificationConfiguration_s> listNotificationConfigurations;
+
+};
+
+/**
+ * This struct describes the attribiutes of a domain
+ */
+struct am_Domain_s
+{
+
+public:
+ /**
+ * the domain ID
+ */
+ am_domainID_t domainID;
+ /**
+ * the name of the domain
+ */
+ std::string name;
+ /**
+ * the busname. This is equal to a plugin name and is used to dispatch messages to
+ * the elements of a plugin
+ */
+ std::string busname;
+ /**
+ * the name of the node
+ */
+ std::string nodename;
+ /**
+ * indicated if the domain is independent at startup or not
+ */
+ bool early;
+ /**
+ * indicates if the domain registration is complete or not
+ */
+ bool complete;
+ /**
+ * the current domain state
+ */
+ am_DomainState_e state;
+
+};
+
+/**
+ * a connection
+ */
+struct am_Connection_s
+{
+
+public:
+ /**
+ * the assigned ID
+ */
+ am_connectionID_t connectionID;
+ /**
+ * the source the audio flows from
+ */
+ am_sourceID_t sourceID;
+ /**
+ * the sink the audio flows to
+ */
+ am_sinkID_t sinkID;
+ /**
+ * the delay of the conneciton
+ */
+ am_timeSync_t delay;
+ /**
+ * the used connectionformat
+ */
+ am_CustomConnectionFormat_t connectionFormat;
+
+};
+
+/**
+ * data type depends of am_EarlyDataType_e:
+ * volume_t in case of ED_SOURCE_VOLUME, ED_SINK_VOLUME
+ * soundProperty_t in case of ED_SOURCE_PROPERTY, ED_SINK_PROPERTY
+ */
+union am_EarlyData_u
+{
+
+public:
+ am_volume_t volume;
+ am_SoundProperty_s soundProperty;
+ am_InterruptState_e interruptState;
+
+};
+
+/**
+ * data type depends of am_EarlyDataType_e:
+ * sourceID in case of ED_SOURCE_VOLUME, ED_SOURCE_PROPERTY
+ * sinkID in case of ED_SINK_VOLUME, ED_SINK_PROPERTY
+ */
+union am_DataType_u
+{
+
+public:
+ am_sinkID_t sink;
+ am_sourceID_t source;
+
+};
+
+struct am_EarlyData_s
+{
+
+public:
+ am_EarlyDataType_e type;
+ am_DataType_u sinksource;
+ am_EarlyData_u data;
+
+};
+
+/**
+ * This types describe a mixed description for source and sinks volumes.
+ */
+struct am_Volumes_s
+{
+
+public:
+ /**
+ * describes the type of the volume: source or sink.
+ */
+ am_VolumeType_e volumeType;
+ /**
+ * either sourceID or sinkID
+ */
+ am_DataType_u volumeID;
+ /**
+ * The volume
+ */
+ am_volume_t volume;
+ /**
+ * the ramp that shall be driven
+ */
+ am_CustomRampType_t ramp;
+ /**
+ * the time for the ramp
+ */
+ am_time_t time;
+
+};
+}
+#endif // !defined(EA_71AFF0F7_316D_4cb5_9225_9B8C7D938A15__INCLUDED_)
diff --git a/include/command/IAmCommandReceive.h b/include/command/IAmCommandReceive.h
index 4adb073..83ab577 100755
--- a/include/command/IAmCommandReceive.h
+++ b/include/command/IAmCommandReceive.h
@@ -1,220 +1,220 @@
-/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_833F8CB5_893B_4670_B004_4A31D1707950__INCLUDED_)
-#define EA_833F8CB5_893B_4670_B004_4A31D1707950__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-namespace am {
-class CAmDbusWrapper;
-class CAmSocketHandler;
-}
-
-
-#include "audiomanagertypes.h"
-
-#define CommandReceiveVersion "3.0"
-namespace am {
-
-/**
- * The interface towards the Controlling Instance (e.g HMI). It handles the
- * communication towards the HMI and other system components who need to interact
- * with the audiomanagement.
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmCommandReceive
-{
-
-public:
- IAmCommandReceive() {
-
- }
-
- virtual ~IAmCommandReceive() {
-
- }
-
- /**
- * This function returns the version of the interface.
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * connects a source to sink
- * @return E_OK on success, E_NOT_POSSIBLE on failure, E_ALREADY_EXISTS if the
- * connection does already exists
- */
- virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
- /**
- * disconnects a mainConnection
- * @return E_OK on successes, E_NON_EXISTENT if the connection does not exist,
- * E_NOT_POSSIBLE on error.
- */
- virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) =0;
- /**
- * sets the volume for a sink
- * @return E_OK on success, E_UNKOWN on error, E_OUT_OF_RANGE in case the value is
- * out of range
- */
- virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
- /**
- * This function is used to increment or decrement the current volume for a sink.
- * @return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the value is
- * not in the given volume range.
- */
- virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) =0;
- /**
- * sets the mute state of a sink
- * @return E_OK on success, E_UNKNOWN on error. If the mute state is already the
- * desired one, the Daemon will return E_OK.
- */
- virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
- /**
- * 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
- * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in
- * case of an error
- */
- 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. Equalizer Values. Since the
- * capabilities of the system can differ, the exact key value pairs can be
- * extended in each product
- * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in
- * case of an error
- */
- virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
- /**
- * is used to set a specific system property.
- * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in
- * case of an error
- */
- virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0;
- /**
- * returns the actual list of MainConnections
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const =0;
- /**
- * returns the actual list of Sinks
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const =0;
- /**
- * returns the actual list of Sources
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const =0;
- /**
- * This is used to retrieve all source sound properties related to a source.
- * Returns a vector of the sound properties and values as pair
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- 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.
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const =0;
- /**
- * This is used to retrieve SourceClass Information of all source classes
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
- /**
- * This is used to retrieve SinkClass Information of all sink classes
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
- /**
- * Retrieves a complete list of all systemProperties.
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
- /**
- * returns the delay in ms that the audiopath for the given mainConnection has
- * @return E_OK on success, E_NOT_POSSIBLE if timing information is not yet
- * retrieved, E_DATABASE_ERROR on read error on the database
- */
- virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const =0;
- /**
- * this function is used to retrieve a pointer to the dBusConnectionWrapper
- * @return E_OK if pointer is valid, E_UKNOWN if AudioManager was compiled without
- * DBus Support
- */
- virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
- /**
- * 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,
- */
- virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
- /**
- * asynchronous confirmation of setCommandReady.
- */
- virtual void confirmCommandReady(const uint16_t handle, const am_Error_e error) =0;
- /**
- * asynchronous confirmation of setCommandRundown
- */
- virtual void confirmCommandRundown(const uint16_t handle, const am_Error_e error) =0;
- /**
- * Retrieves the list of MainNotifications for a sink. Does not return the
- * possible ones.
- */
- 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 source. Does not return the
- * possible ones.
- */
- virtual am_Error_e getListMainSourceNotificationConfigurations(const am_sourceID_t sourceID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
- /**
- * sets a MainNotificationConfiuration. This can be used to turn on an off
- * notifications an to change the mode of the configuration.
- * @return E_OK on success, E_NON_EXISTENT if sinkID does not exists,
- * E_DATABASE_ERROR on error
- */
- virtual am_Error_e setMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
- /**
- * sets a MainNotificationConfiuration. This can be used to turn on an off
- * notifications an to change the mode of the configuration.
- * @return E_OK on success, E_NON_EXISTENT if sourceID does not exists,
- * E_DATABASE_ERROR on error
- */
- virtual am_Error_e setMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
-
-};
-}
-#endif // !defined(EA_833F8CB5_893B_4670_B004_4A31D1707950__INCLUDED_)
+/**
+ * Copyright (C) 2012 - 2014, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
+ *
+ * \file
+ * For further information see http://projects.genivi.org/audio-manager
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
+ * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
+ */
+#if !defined(EA_F12AFDAB_E710_43e4_8DC1_1035427769BE__INCLUDED_)
+#define EA_F12AFDAB_E710_43e4_8DC1_1035427769BE__INCLUDED_
+
+#include <vector>
+#include <string>
+#include "audiomanagertypes.h"
+namespace am {
+class CAmDbusWrapper;
+class CAmSocketHandler;
+}
+
+
+#include "audiomanagertypes.h"
+
+#define CommandReceiveVersion "3.0"
+namespace am {
+
+/**
+ * The interface towards the Controlling Instance (e.g HMI). It handles the
+ * communication towards the HMI and other system components who need to interact
+ * with the audiomanagement.
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmCommandReceive
+{
+
+public:
+ IAmCommandReceive() {
+
+ }
+
+ virtual ~IAmCommandReceive() {
+
+ }
+
+ /**
+ * This function returns the version of the interface.
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * connects a source to sink
+ * @return E_OK on success, E_NOT_POSSIBLE on failure, E_ALREADY_EXISTS if the
+ * connection does already exists
+ */
+ virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
+ /**
+ * disconnects a mainConnection
+ * @return E_OK on successes, E_NON_EXISTENT if the connection does not exist,
+ * E_NOT_POSSIBLE on error.
+ */
+ virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) =0;
+ /**
+ * sets the volume for a sink
+ * @return E_OK on success, E_UNKOWN on error, E_OUT_OF_RANGE in case the value is
+ * out of range
+ */
+ virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
+ /**
+ * This function is used to increment or decrement the current volume for a sink.
+ * @return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if the value is
+ * not in the given volume range.
+ */
+ virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) =0;
+ /**
+ * sets the mute state of a sink
+ * @return E_OK on success, E_UNKNOWN on error. If the mute state is already the
+ * desired one, the Daemon will return E_OK.
+ */
+ virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * 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
+ * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in
+ * case of an error
+ */
+ 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. Equalizer Values. Since the
+ * capabilities of the system can differ, the exact key value pairs can be
+ * extended in each product
+ * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in
+ * case of an error
+ */
+ virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
+ /**
+ * is used to set a specific system property.
+ * @return E_OK on success, E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in
+ * case of an error
+ */
+ virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0;
+ /**
+ * returns the actual list of MainConnections
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const =0;
+ /**
+ * returns the actual list of Sinks
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const =0;
+ /**
+ * returns the actual list of Sources
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const =0;
+ /**
+ * This is used to retrieve all source sound properties related to a source.
+ * Returns a vector of the sound properties and values as pair
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ 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.
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const =0;
+ /**
+ * This is used to retrieve SourceClass Information of all source classes
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
+ /**
+ * This is used to retrieve SinkClass Information of all sink classes
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
+ /**
+ * Retrieves a complete list of all systemProperties.
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
+ /**
+ * returns the delay in ms that the audiopath for the given mainConnection has
+ * @return E_OK on success, E_NOT_POSSIBLE if timing information is not yet
+ * retrieved, E_DATABASE_ERROR on read error on the database
+ */
+ virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const =0;
+ /**
+ * this function is used to retrieve a pointer to the dBusConnectionWrapper
+ * @return E_OK if pointer is valid, E_UKNOWN if AudioManager was compiled without
+ * DBus Support
+ */
+ virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
+ /**
+ * 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,
+ */
+ virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
+ /**
+ * asynchronous confirmation of setCommandReady.
+ */
+ virtual void confirmCommandReady(const uint16_t handle, const am_Error_e error) =0;
+ /**
+ * asynchronous confirmation of setCommandRundown
+ */
+ virtual void confirmCommandRundown(const uint16_t handle, const am_Error_e error) =0;
+ /**
+ * Retrieves the list of MainNotifications for a sink. Does not return the
+ * possible ones.
+ */
+ 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 source. Does not return the
+ * possible ones.
+ */
+ virtual am_Error_e getListMainSourceNotificationConfigurations(const am_sourceID_t sourceID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
+ /**
+ * sets a MainNotificationConfiuration. This can be used to turn on an off
+ * notifications an to change the mode of the configuration.
+ * @return E_OK on success, E_NON_EXISTENT if sinkID does not exists,
+ * E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e setMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+ /**
+ * sets a MainNotificationConfiuration. This can be used to turn on an off
+ * notifications an to change the mode of the configuration.
+ * @return E_OK on success, E_NON_EXISTENT if sourceID does not exists,
+ * E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e setMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+
+};
+}
+#endif // !defined(EA_F12AFDAB_E710_43e4_8DC1_1035427769BE__INCLUDED_)
diff --git a/include/command/IAmCommandSend.h b/include/command/IAmCommandSend.h
index a69b0df..1751290 100755
--- a/include/command/IAmCommandSend.h
+++ b/include/command/IAmCommandSend.h
@@ -1,194 +1,195 @@
-/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_B654431C_A920_4376_9B2F_3FF803354EAD__INCLUDED_)
-#define EA_B654431C_A920_4376_9B2F_3FF803354EAD__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-namespace am {
-class IAmCommandReceive;
-}
-
-#include "IAmCommandReceive.h"
-#include "audiomanagertypes.h"
-
-#define CommandSendVersion "3.0"
-namespace am {
-
-/**
- * This interface handles all communication from the AudioManagerDaemon towards
- * the system. It is designed in such a way that only callbacks with no return
- * types are implemented. So when the CommandInterfacePlugins are designed in such
- * a way that they broadcast signals to any node who is interested in the
- * particular information (like signals on Dbus for example), more information can
- * be retrieved via the CommandReceiveInterface.
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmCommandSend
-{
-
-public:
- IAmCommandSend() {
-
- }
-
- virtual ~IAmCommandSend() {
-
- }
-
- /**
- * returns the interface version as string.
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * This command starts the interface, the plugin itself. This is not meant to
- * start communication with the HMI itself. It is a good idea to implement here
- * everything that sets up the basic communication like DbusCommunication etc...
- * Be aware of side effects with systemd and socketbased communication!
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e startupInterface(IAmCommandReceive* commandreceiveinterface) =0;
- /**
- * This function will indirectly be called by the Controller and is used to start
- * the Communication. Before this command, all communication will be ignored by
- * the AudioManager.
- * After the Plugin is ready, it will asynchronously answer with
- * condfirmCommandReady, the handle that is handed over must be returned.
- */
- virtual void setCommandReady(const uint16_t handle) =0;
- /**
- * This function will indirectly be called by the Controller and is used to stop
- * the Communication. After this command, all communication will be ignored by the
- * AudioManager. The plugin has to be prepared that either the power will be
- * switched off or the Interface is started again with setCommandReady
- * After the Plugin is ready to rundown, it will asynchronously answer with
- * condfirmCommandRundown, the handle that is handed over must be returned.
- */
- virtual void setCommandRundown(const uint16_t handle) =0;
- /**
- * Callback that is called when the number of connections change
- */
- virtual void cbNewMainConnection(const am_MainConnectionType_s& mainConnection) =0;
- /**
- * Callback that is called when the number of connections change
- */
- virtual void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection) =0;
- /**
- * Callback that is called when the number of sinks change
- */
- virtual void cbNewSink(const am_SinkType_s& sink) =0;
- /**
- * Callback that is called when the number of sinks change
- */
- virtual void cbRemovedSink(const am_sinkID_t sinkID) =0;
- /**
- * Callback that is called when the number of sources change
- */
- virtual void cbNewSource(const am_SourceType_s& source) =0;
- /**
- * Callback that is called when the number of sources change
- */
- virtual void cbRemovedSource(const am_sourceID_t source) =0;
- /**
- * this callback is fired if the number of sink classes changed
- */
- virtual void cbNumberOfSinkClassesChanged() =0;
- /**
- * this callback is fired if the number of source classes changed
- */
- virtual void cbNumberOfSourceClassesChanged() =0;
- /**
- * This callback is called when the ConnectionState of a connection changed.
- */
- virtual void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) =0;
- /**
- * this callback indicates that a sinkSoundProperty has changed.
- */
- virtual void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * this callback indicates that a sourceSoundProperty has changed.
- */
- virtual void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * this callback is called when the availability of a sink has changed
- */
- virtual void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
- /**
- * this callback is called when the availability of source has changed.
- */
- virtual void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
- /**
- * this callback indicates a volume change on the indicated sink
- */
- virtual void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
- /**
- * this callback indicates a mute state change on a sink.
- */
- virtual void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
- /**
- * is fired if a systemProperty changed
- */
- virtual void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty) =0;
- /**
- * This callback is fired if the timinginformation for a mainConnectionID changed
- */
- virtual void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
- /**
- * This callback is called when a sink is updated.
- */
- virtual void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
- /**
- * This callback is called when a source is updated.
- */
- virtual void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
- /**
- * This callback is called when a notificated value of a sink changes.
- */
- virtual void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification) =0;
- /**
- * This callback is called when a notifcated value of a source changes.
- */
- virtual void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification) =0;
- /**
- * This callback is triggered when a mainNotificationConfiguration is changed.
- */
- virtual void cbMainSinkNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
- /**
- * This callback is triggered when a mainNotificationConfiguration is changed.
- */
- virtual void cbMainSourceNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
-
-};
-}
-#endif // !defined(EA_B654431C_A920_4376_9B2F_3FF803354EAD__INCLUDED_)
+/**
+ * Copyright (C) 2012 - 2014, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
+ *
+ * \file
+ * For further information see http://projects.genivi.org/audio-manager
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
+ * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
+ */
+#if !defined(EA_42416EED_29C4_4b4c_A98B_010EF2513C35__INCLUDED_)
+#define EA_42416EED_29C4_4b4c_A98B_010EF2513C35__INCLUDED_
+
+#include <vector>
+#include <string>
+#include "audiomanagertypes.h"
+
+namespace am {
+class IAmCommandReceive;
+}
+
+#include "IAmCommandReceive.h"
+#include "audiomanagertypes.h"
+
+#define CommandSendVersion "3.0"
+namespace am {
+
+/**
+ * This interface handles all communication from the AudioManagerDaemon towards
+ * the system. It is designed in such a way that only callbacks with no return
+ * types are implemented. So when the CommandInterfacePlugins are designed in such
+ * a way that they broadcast signals to any node who is interested in the
+ * particular information (like signals on Dbus for example), more information can
+ * be retrieved via the CommandReceiveInterface.
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmCommandSend
+{
+
+public:
+ IAmCommandSend() {
+
+ }
+
+ virtual ~IAmCommandSend() {
+
+ }
+
+ /**
+ * returns the interface version as string.
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * This command starts the interface, the plugin itself. This is not meant to
+ * start communication with the HMI itself. It is a good idea to implement here
+ * everything that sets up the basic communication like DbusCommunication etc...
+ * Be aware of side effects with systemd and socketbased communication!
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e startupInterface(IAmCommandReceive* commandreceiveinterface) =0;
+ /**
+ * This function will indirectly be called by the Controller and is used to start
+ * the Communication. Before this command, all communication will be ignored by
+ * the AudioManager.
+ * After the Plugin is ready, it will asynchronously answer with
+ * condfirmCommandReady, the handle that is handed over must be returned.
+ */
+ virtual void setCommandReady(const uint16_t handle) =0;
+ /**
+ * This function will indirectly be called by the Controller and is used to stop
+ * the Communication. After this command, all communication will be ignored by the
+ * AudioManager. The plugin has to be prepared that either the power will be
+ * switched off or the Interface is started again with setCommandReady
+ * After the Plugin is ready to rundown, it will asynchronously answer with
+ * condfirmCommandRundown, the handle that is handed over must be returned.
+ */
+ virtual void setCommandRundown(const uint16_t handle) =0;
+ /**
+ * Callback that is called when the number of connections change
+ */
+ virtual void cbNewMainConnection(const am_MainConnectionType_s& mainConnection) =0;
+ /**
+ * Callback that is called when the number of connections change
+ */
+ virtual void cbRemovedMainConnection(const am_mainConnectionID_t mainConnection) =0;
+ /**
+ * Callback that is called when the number of sinks change
+ */
+ virtual void cbNewSink(const am_SinkType_s& sink) =0;
+ /**
+ * Callback that is called when the number of sinks change
+ */
+ virtual void cbRemovedSink(const am_sinkID_t sinkID) =0;
+ /**
+ * Callback that is called when the number of sources change
+ */
+ virtual void cbNewSource(const am_SourceType_s& source) =0;
+ /**
+ * Callback that is called when the number of sources change
+ */
+ virtual void cbRemovedSource(const am_sourceID_t source) =0;
+ /**
+ * this callback is fired if the number of sink classes changed
+ */
+ virtual void cbNumberOfSinkClassesChanged() =0;
+ /**
+ * this callback is fired if the number of source classes changed
+ */
+ virtual void cbNumberOfSourceClassesChanged() =0;
+ /**
+ * This callback is called when the ConnectionState of a connection changed.
+ */
+ virtual void cbMainConnectionStateChanged(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState) =0;
+ /**
+ * this callback indicates that a sinkSoundProperty has changed.
+ */
+ virtual void cbMainSinkSoundPropertyChanged(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * this callback indicates that a sourceSoundProperty has changed.
+ */
+ virtual void cbMainSourceSoundPropertyChanged(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * this callback is called when the availability of a sink has changed
+ */
+ virtual void cbSinkAvailabilityChanged(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * this callback is called when the availability of source has changed.
+ */
+ virtual void cbSourceAvailabilityChanged(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * this callback indicates a volume change on the indicated sink
+ */
+ virtual void cbVolumeChanged(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
+ /**
+ * this callback indicates a mute state change on a sink.
+ */
+ virtual void cbSinkMuteStateChanged(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * is fired if a systemProperty changed
+ */
+ virtual void cbSystemPropertyChanged(const am_SystemProperty_s& systemProperty) =0;
+ /**
+ * This callback is fired if the timinginformation for a mainConnectionID changed
+ */
+ virtual void cbTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
+ /**
+ * This callback is called when a sink is updated.
+ */
+ virtual void cbSinkUpdated(const am_sinkID_t sinkID, const am_sinkClass_t sinkClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
+ /**
+ * This callback is called when a source is updated.
+ */
+ virtual void cbSourceUpdated(const am_sourceID_t sourceID, const am_sourceClass_t sourceClassID, const std::vector<am_MainSoundProperty_s>& listMainSoundProperties) =0;
+ /**
+ * This callback is called when a notificated value of a sink changes.
+ */
+ virtual void cbSinkNotification(const am_sinkID_t sinkID, const am_NotificationPayload_s& notification) =0;
+ /**
+ * This callback is called when a notifcated value of a source changes.
+ */
+ virtual void cbSourceNotification(const am_sourceID_t sourceID, const am_NotificationPayload_s& notification) =0;
+ /**
+ * This callback is triggered when a mainNotificationConfiguration is changed.
+ */
+ virtual void cbMainSinkNotificationConfigurationChanged(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+ /**
+ * This callback is triggered when a mainNotificationConfiguration is changed.
+ */
+ virtual void cbMainSourceNotificationConfigurationChanged(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+
+};
+}
+#endif // !defined(EA_42416EED_29C4_4b4c_A98B_010EF2513C35__INCLUDED_)
diff --git a/include/control/IAmControlReceive.h b/include/control/IAmControlReceive.h
index 92281b9..79c0981 100755
--- a/include/control/IAmControlReceive.h
+++ b/include/control/IAmControlReceive.h
@@ -1,620 +1,658 @@
-/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_D35033D8_8C54_4c3b_B0E4_9C98516FDF3C__INCLUDED_)
-#define EA_D35033D8_8C54_4c3b_B0E4_9C98516FDF3C__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-namespace am {
-class CAmSocketHandler;
-}
-
-#include "audiomanagertypes.h"
-#include "NodeStateManager.h"
-
-#define ControlReceiveVersion "3.0"
-namespace am {
-
-/**
- * This interface gives access to all important functions of the audiomanager that
- * are used by the AudioManagerController to control the system.
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmControlReceive
-{
-
-public:
- IAmControlReceive() {
-
- }
-
- virtual ~IAmControlReceive() {
-
- }
-
- /**
- * This function returns the version of the interface
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * calculates a route from source to sink.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList) =0;
- /**
- * With this function, elementary connects can be triggered by the controller.
- * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT of
- * connectionFormats do not match, E_NO_CHANGE if the desired connection is
- * already build up
- */
- virtual am_Error_e connect(am_Handle_s& handle, am_connectionID_t& connectionID, const am_CustomConnectionFormat_t format, const am_sourceID_t sourceID, const am_sinkID_t sinkID) =0;
- /**
- * is used to disconnect a connection
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was
- * not found, E_NO_CHANGE if no change is neccessary
- */
- virtual am_Error_e disconnect(am_Handle_s& handle, const am_connectionID_t connectionID) =0;
- /**
- * triggers a cross fade.
- * @return E_OK on success, E_UNKNOWN on error E_NO_CHANGE if no change is
- * neccessary
- */
- virtual am_Error_e crossfade(am_Handle_s& handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_CustomRampType_t rampType, const am_time_t rampTime) =0;
- /**
- * with this method, all actions that have a handle assigned can be stopped.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e abortAction(const am_Handle_s handle) =0;
- /**
- * this method sets a source state for a source. This function will trigger the
- * callback cbAckSetSourceState
- * @return E_OK on success, E_NO_CHANGE if the desired value is already correct,
- * E_UNKNOWN on error, E_NO_CHANGE if no change is neccessary
- */
- virtual am_Error_e setSourceState(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
- /**
- * with this function, setting of sinks volumes is done. The behavior of the
- * volume set is depended on the given ramp and time information.
- * This function is not only used to ramp volume, but also to mute and direct set
- * the level. Exact behavior is depended on the selected mute ramps.
- * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired
- * value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other
- * error.
- */
- virtual am_Error_e setSinkVolume(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;
- /**
- * with this function, setting of source volumes is done. The behavior of the
- * volume set is depended on the given ramp and time information.
- * This function is not only used to ramp volume, but also to mute and direct set
- * the level. Exact behavior is depended on the selected mute ramps.
- * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired
- * value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other
- * error.
- */
- virtual am_Error_e setSourceVolume(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t rampType, const am_time_t time) =0;
- /**
- * is used to set several sinkSoundProperties at a time
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
- * of range, E_NO_CHANGE if no change is neccessary
- */
- virtual am_Error_e setSinkSoundProperties(am_Handle_s& handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& soundProperty) =0;
- /**
- * is used to set sinkSoundProperties
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
- * of range, E_NO_CHANGE if no change is neccessary
- */
- virtual am_Error_e setSinkSoundProperty(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
- /**
- * is used to set several SourceSoundProperties at a time
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
- * of range. E_NO_CHANGE if no change is neccessary
- */
- virtual am_Error_e setSourceSoundProperties(am_Handle_s& handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& soundProperty) =0;
- /**
- * is used to set sourceSoundProperties
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
- * of range. E_NO_CHANGE if no change is neccessary
- */
- virtual am_Error_e setSourceSoundProperty(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
- /**
- * sets the domain state of a domain
- * @return E_OK on success, E_UNKNOWN on error, E_NO_CHANGE if no change is
- * neccessary
- */
- virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
- /**
- * enters a domain in the database, creates and ID
- * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
- * database, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterDomainDB(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
- /**
- * enters a mainconnection in the database, creates and ID
- * @return E_OK on success, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterMainConnectionDB(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID) =0;
- /**
- * enters a sink in the database.
- * The sinkID in am_Sink_s shall be 0 in case of a dynamic added source A sinkID
- * greater than 100 will be assigned. If a specific sinkID with a value <100 is
- * given, the given value will be used. This is for a static setup where the ID's
- * are predefined.
- * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
- * database, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterSinkDB(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
- /**
- * enters a crossfader in the database.
- * The crossfaderID in am_Crossfader_s shall be 0 in case of a dynamic added
- * source A crossfaderID greater than 100 will be assigned. If a specific
- * crossfaderID with a value <100 is given, the given value will be used. This is
- * for a static setup where the ID's are predefined.
- * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
- * database, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterCrossfaderDB(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
- /**
- * enters a gateway in the database.
- * The gatewayID in am_Gateway_s shall be 0 in case of a dynamic added source A
- * gatewayID greater than 100 will be assigned. If a specific gatewayID with a
- * value <100 is given, the given value will be used. This is for a static setup
- * where the ID's are predefined.
- * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
- * database, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterGatewayDB(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
- /**
- * enters a source in the database.
- * The sourceID in am_Source_s shall be 0 in case of a dynamic added source A
- * sourceID greater than 100 will be assigned. If a specific sourceID with a value
- * <100 is given, the given value will be used. This is for a static setup where
- * the ID's are predefined.
- * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
- * database, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterSourceDB(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
- /**
- * Enters a sourceClass into the database.
- * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
- * database, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterSinkClassDB(const am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID) =0;
- /**
- * Enters a sourceClass into the database.
- * The sourceClassID in am_sourceClass_s shall be 0 in case of a dynamic added
- * source A sourceClassID greater than 100 will be assigned. If a specific
- * sourceClassID with a value <100 is given, the given value will be used. This is
- * for a static setup where the ID's are predefined.
- * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
- * database, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterSourceClassDB(am_sourceClass_t& sourceClassID, const am_SourceClass_s& sourceClass) =0;
- /**
- * changes class information of a sinkclass.
- * The properties will overwrite the values of the sinkClassID given in the
- * sinkClass.
- * It is the duty of the controller to check if the property is valid. If it does
- * not exist, the daemon will not return an error.
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
- * sinkClassID was not found.
- */
- virtual am_Error_e changeSinkClassInfoDB(const am_SinkClass_s& sinkClass) =0;
- /**
- * changes class information of a sourceClass.
- * The properties will overwrite the values of the sourceClassID given in the
- * sourceClass.
- * It is the duty of the controller to check if the property is valid. If it does
- * not exist, the daemon will not return an error.
- * @return E_OK on success, E_DATABASE_ERROR on error and E_NON_EXISTENT if the
- * ClassID does not exist.
- */
- virtual am_Error_e changeSourceClassInfoDB(const am_SourceClass_s& sourceClass) =0;
- /**
- * This function is used to enter the system Properties into the database.
- * All entries in the database will be erased before entering the new List. It
- * should only be called once at system startup.
- * @return E_OK on success, E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e enterSystemPropertiesListDB(const std::vector<am_SystemProperty_s>& listSystemProperties) =0;
- /**
- * changes the mainConnectionState of MainConnection
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
- * mainconnection
- */
- virtual am_Error_e changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const std::vector<am_connectionID_t>& listConnectionID) =0;
- /**
- * changes the mainConnectionState of MainConnection
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
- * mainconnection
- */
- virtual am_Error_e changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState) =0;
- /**
- * changes the sink volume of a sink
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
- * not found
- */
- virtual am_Error_e changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID) =0;
- /**
- * changes the availablility of a sink
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
- * not found
- */
- virtual am_Error_e changeSinkAvailabilityDB(const am_Availability_s& availability, const am_sinkID_t sinkID) =0;
- /**
- * changes the domainstate of a domain
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
- * was not found
- */
- virtual am_Error_e changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID) =0;
- /**
- * changes the mute state of a sink
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
- * not found
- */
- virtual am_Error_e changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID) =0;
- /**
- * changes the mainsinksoundproperty of a sink
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
- * not found
- */
- virtual am_Error_e changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
- /**
- * changes the mainsourcesoundproperty of a sink
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
- * was not found
- */
- virtual am_Error_e changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
- /**
- * changes the availablility of a source
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
- * was not found
- */
- virtual am_Error_e changeSourceAvailabilityDB(const am_Availability_s& availability, const am_sourceID_t sourceID) =0;
- /**
- * changes a systemProperty
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if property
- * was not found
- */
- virtual am_Error_e changeSystemPropertyDB(const am_SystemProperty_s& property) =0;
- /**
- * removes a mainconnection from the DB
- * @return E_OK on success, E_NON_EXISTENT if main connection was not found,
- * E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID) =0;
- /**
- * removes a sink from the DB
- * @return E_OK on success, E_NON_EXISTENT if sink was not found, E_DATABASE_ERROR
- * if the database had an error
- */
- virtual am_Error_e removeSinkDB(const am_sinkID_t sinkID) =0;
- /**
- * removes a source from the DB
- * @return E_OK on success, E_NON_EXISTENT if source was not found,
- * E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e removeSourceDB(const am_sourceID_t sourceID) =0;
- /**
- * removes a gateway from the DB
- * @return E_OK on success, E_NON_EXISTENT if gateway was not found,
- * E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e removeGatewayDB(const am_gatewayID_t gatewayID) =0;
- /**
- * removes a crossfader from the DB
- * @return E_OK on success, E_NON_EXISTENT if crossfader was not found,
- * E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e removeCrossfaderDB(const am_crossfaderID_t crossfaderID) =0;
- /**
- * removes a domain from the DB
- * @return E_OK on success, E_NON_EXISTENT if domain was not found,
- * E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e removeDomainDB(const am_domainID_t domainID) =0;
- /**
- * removes a domain from the DB
- * @return E_OK on success, E_NON_EXISTENT if domain was not found,
- * E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e removeSinkClassDB(const am_sinkClass_t sinkClassID) =0;
- /**
- * removes a domain from the DB
- * @return E_OK on success, E_NON_EXISTENT if domain was not found,
- * E_DATABASE_ERROR if the database had an error
- */
- virtual am_Error_e removeSourceClassDB(const am_sourceClass_t sourceClassID) =0;
- /**
- * returns the ClassInformation of a source
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
- * was not found
- */
- virtual am_Error_e getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s& classInfo) const =0;
- /**
- * returns the ClassInformation of a sink
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
- * not found
- */
- virtual am_Error_e getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass) const =0;
- /**
- * returns the sinkData of a sink
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
- * not found
- */
- virtual am_Error_e getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s& sinkData) const =0;
- /**
- * returns the sourcekData of a source
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
- * not found
- */
- virtual am_Error_e getSourceInfoDB(const am_sourceID_t sourceID, am_Source_s& sourceData) const =0;
- /**
- * return source and sink of a gateway
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if gateway
- * was not found
- */
- virtual am_Error_e getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData) const =0;
- /**
- * returns sources and the sink of a crossfader
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
- * crossfader was not found
- */
- virtual am_Error_e getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData) const =0;
- /**
- * returns sources and the sink of a crossfader
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
- * crossfader was not found
- */
- virtual am_Error_e getMainConnectionInfoDB(const am_mainConnectionID_t mainConnectionID, am_MainConnection_s& mainConnectionData) const =0;
- /**
- * returns all sinks of a domain
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
- * was not found
- */
- virtual am_Error_e getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID) const =0;
- /**
- * returns all source of a domain
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
- * was not found
- */
- virtual am_Error_e getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID) const =0;
- /**
- * returns all crossfaders of a domain
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
- * was not found
- */
- virtual am_Error_e getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID) const =0;
- /**
- * returns all gateways of a domain
- * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
- * was not found
- */
- virtual am_Error_e getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID) const =0;
- /**
- * returns a complete list of all MainConnections
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListMainConnections(std::vector<am_MainConnection_s>& listMainConnections) const =0;
- /**
- * returns a complete list of all domains
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListDomains(std::vector<am_Domain_s>& listDomains) const =0;
- /**
- * returns a complete list of all Connections
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListConnections(std::vector<am_Connection_s>& listConnections) const =0;
- /**
- * returns a list of all sinks
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListSinks(std::vector<am_Sink_s>& listSinks) const =0;
- /**
- * returns a list of all sources
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListSources(std::vector<am_Source_s>& listSources) const =0;
- /**
- * returns a list of all source classes
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
- /**
- * returns a list of all handles
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListHandles(std::vector<am_Handle_s>& listHandles) const =0;
- /**
- * returns a list of all crossfaders
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListCrossfaders(std::vector<am_Crossfader_s>& listCrossfaders) const =0;
- /**
- * returns a list of gateways
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListGateways(std::vector<am_Gateway_s>& listGateways) const =0;
- /**
- * returns a list of all sink classes
- * @return E_OK on success, E_DATABASE_ERROR on error
- */
- virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
- /**
- * returns the list of SystemProperties
- */
- virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
- /**
- * sets the command interface to ready. Will send setCommandReady to each of the
- * plugins. The corresponding answer is confirmCommandReady.
- */
- virtual void setCommandReady() =0;
- /**
- * sets the command interface into the rundown state. Will send setCommandRundown
- * to each of the plugins. The corresponding answer is confirmCommandRundown.
- */
- virtual void setCommandRundown() =0;
- /**
- * sets the routinginterface to ready. Will send the command setRoutingReady to
- * each of the plugins. The related answer is confirmRoutingReady.
- */
- virtual void setRoutingReady() =0;
- /**
- * sets the routinginterface to the rundown state. Will send the command
- * setRoutingRundown to each of the plugins. The related answer is
- * confirmRoutingRundown.
- */
- virtual void setRoutingRundown() =0;
- /**
- * acknowledges the setControllerReady call.
- */
- virtual void confirmControllerReady(const am_Error_e error) =0;
- /**
- * Acknowledges the setControllerRundown call.
- */
- virtual void confirmControllerRundown(const am_Error_e error) =0;
- /**
- * 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,
- */
- virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) =0;
- /**
- * Change the data of the source.
- */
- virtual am_Error_e changeSourceDB(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;
- /**
- * Change the data of the sink.
- */
- virtual am_Error_e changeSinkDB(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;
- /**
- * changes Gateway Data
- */
- virtual am_Error_e changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
- /**
- * with this function, setting of multiple volumes at a time is done. The behavior
- * of the volume set is depended on the given ramp and time information.
- * This function is not only used to ramp volume, but also to mute and direct set
- * the level. Exact behavior is depended on the selected mute ramps.
- * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired
- * value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other
- * error.
- */
- virtual am_Error_e setVolumes(am_Handle_s& handle, const std::vector<am_Volumes_s>& listVolumes) =0;
- /**
- * set a sink notification configuration
- */
- virtual am_Error_e setSinkNotificationConfiguration(am_Handle_s& handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * set a source notification configuration
- */
- virtual am_Error_e setSourceNotificationConfiguration(am_Handle_s& handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * Sends out the main notificiation of a sink
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual void sendMainSinkNotificationPayload(const am_sinkID_t sinkID, const am_NotificationPayload_s& notificationPayload) =0;
- /**
- * Sends out the main notificiation of a source
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual void sendMainSourceNotificationPayload(const am_sourceID_t sourceID, const am_NotificationPayload_s& notificationPayload) =0;
- /**
- * change the mainNotificationConfiguration of a sink
- * @return E_OK when successful, E_DATABASE on error
- */
- virtual am_Error_e changeMainSinkNotificationConfigurationDB(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
- /**
- * change the mainNotificationConfiguration of a source
- * @return E_OK when successful, E_DATABASE on error
- */
- virtual am_Error_e changeMainSourceNotificationConfigurationDB(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
- /**
- * Retrieves the Restart Reason Property
- * @return E_OK on success E_UNKNOWN if property could not be retrieved.
- */
- virtual am_Error_e getRestartReasonPropertyNSM(NsmRestartReason_e& restartReason) =0;
- /**
- * Retrieves the shutdown reason property
- * @return E_OK on success E_UNKNOWN if property could not be retrieved.
- */
- virtual am_Error_e getShutdownReasonPropertyNSM(NsmShutdownReason_e& ShutdownReason) =0;
- /**
- * Retrieves the running reason
- * @return E_OK on success E_UNKNOWN if property could not be retrieved.
- */
- virtual am_Error_e getRunningReasonPropertyNSM(NsmRunningReason_e& nsmRunningReason) =0;
- /**
- * @return NsmErrorStatus_Ok in case of success
- */
- virtual NsmErrorStatus_e getNodeStateNSM(NsmNodeState_e& nsmNodeState) =0;
- /**
- * Retrieves the current session state
- * @return NsmErrorStatus_Ok on success E_UNKNOWN if property could not be
- * retrieved.
- */
- virtual NsmErrorStatus_e getSessionStateNSM(const std::string& sessionName, const NsmSeat_e seatID, NsmSessionState_e& sessionState) =0;
- /**
- * Retrieves the current applicationmode
- * @return NsmErrorStatus_Ok on success E_UNKNOWN if property could not be
- * retrieved.
- */
- virtual NsmErrorStatus_e getApplicationModeNSM(NsmApplicationMode_e& applicationMode) =0;
- /**
- * Registers the AudioManager as shutdown client
- * @return NsmErrorStatus_Ok on success
- * The interface for the client will be provided by the AudioManagerDeamon,
- * therefore is no need to mention it here.
- */
- virtual NsmErrorStatus_e registerShutdownClientNSM(const uint32_t shutdownMode, const uint32_t timeoutMs) =0;
- /**
- * unregisters the AudioManager as shutdown client
- * @return NsmErrorStatus_Ok on success
- */
- virtual NsmErrorStatus_e unRegisterShutdownClientNSM(const uint32_t shutdownMode) =0;
- /**
- * @return E_OK on success, E_UNKOWN if interface could not be reached
- */
- virtual am_Error_e getInterfaceVersionNSM(uint32_t& version) =0;
- /**
- * Sends out the lifecyclerequest complete to the NSM
- * @return NsmErrorStatus_Ok in case of success
- */
- virtual NsmErrorStatus_e sendLifecycleRequestCompleteNSM(const uint32_t RequestId, const NsmErrorStatus_e status) =0;
-
-};
-}
-#endif // !defined(EA_D35033D8_8C54_4c3b_B0E4_9C98516FDF3C__INCLUDED_)
+/**
+ * Copyright (C) 2012 - 2014, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
+ *
+ * \file
+ * For further information see http://projects.genivi.org/audio-manager
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
+ * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
+ */
+#if !defined(EA_770423FB_365F_4c4b_824E_276D1AE06003__INCLUDED_)
+#define EA_770423FB_365F_4c4b_824E_276D1AE06003__INCLUDED_
+
+#include <vector>
+#include <string>
+#include "audiomanagertypes.h"
+namespace am {
+class CAmSocketHandler;
+}
+
+
+#include "audiomanagertypes.h"
+#include "NodeStateManager.h"
+
+#define ControlReceiveVersion "3.0"
+namespace am {
+
+/**
+ * This interface gives access to all important functions of the audiomanager that
+ * are used by the AudioManagerController to control the system.
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmControlReceive
+{
+
+public:
+ IAmControlReceive() {
+
+ }
+
+ virtual ~IAmControlReceive() {
+
+ }
+
+ /**
+ * This function returns the version of the interface
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * calculates a route from source to sink.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e getRoute(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList) =0;
+ /**
+ * With this function, elementary connects can be triggered by the controller.
+ * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT of
+ * connectionFormats do not match, E_NO_CHANGE if the desired connection is
+ * already build up
+ */
+ virtual am_Error_e connect(am_Handle_s& handle, am_connectionID_t& connectionID, const am_CustomConnectionFormat_t format, const am_sourceID_t sourceID, const am_sinkID_t sinkID) =0;
+ /**
+ * is used to disconnect a connection
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was
+ * not found, E_NO_CHANGE if no change is neccessary
+ */
+ virtual am_Error_e disconnect(am_Handle_s& handle, const am_connectionID_t connectionID) =0;
+ /**
+ * triggers a cross fade.
+ * @return E_OK on success, E_UNKNOWN on error E_NO_CHANGE if no change is
+ * neccessary
+ */
+ virtual am_Error_e crossfade(am_Handle_s& handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_CustomRampType_t rampType, const am_time_t rampTime) =0;
+ /**
+ * with this method, all actions that have a handle assigned can be stopped.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e abortAction(const am_Handle_s handle) =0;
+ /**
+ * this method sets a source state for a source. This function will trigger the
+ * callback cbAckSetSourceState
+ * @return E_OK on success, E_NO_CHANGE if the desired value is already correct,
+ * E_UNKNOWN on error, E_NO_CHANGE if no change is neccessary
+ */
+ virtual am_Error_e setSourceState(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
+ /**
+ * with this function, setting of sinks volumes is done. The behavior of the
+ * volume set is depended on the given ramp and time information.
+ * This function is not only used to ramp volume, but also to mute and direct set
+ * the level. Exact behavior is depended on the selected mute ramps.
+ * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired
+ * value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other
+ * error.
+ */
+ virtual am_Error_e setSinkVolume(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;
+ /**
+ * with this function, setting of source volumes is done. The behavior of the
+ * volume set is depended on the given ramp and time information.
+ * This function is not only used to ramp volume, but also to mute and direct set
+ * the level. Exact behavior is depended on the selected mute ramps.
+ * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired
+ * value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other
+ * error.
+ */
+ virtual am_Error_e setSourceVolume(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_CustomRampType_t rampType, const am_time_t time) =0;
+ /**
+ * is used to set several sinkSoundProperties at a time
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
+ * of range, E_NO_CHANGE if no change is neccessary
+ */
+ virtual am_Error_e setSinkSoundProperties(am_Handle_s& handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& soundProperty) =0;
+ /**
+ * is used to set sinkSoundProperties
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
+ * of range, E_NO_CHANGE if no change is neccessary
+ */
+ virtual am_Error_e setSinkSoundProperty(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * is used to set several SourceSoundProperties at a time
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
+ * of range. E_NO_CHANGE if no change is neccessary
+ */
+ virtual am_Error_e setSourceSoundProperties(am_Handle_s& handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& soundProperty) =0;
+ /**
+ * is used to set sourceSoundProperties
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if property is out
+ * of range. E_NO_CHANGE if no change is neccessary
+ */
+ virtual am_Error_e setSourceSoundProperty(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * sets the domain state of a domain
+ * @return E_OK on success, E_UNKNOWN on error, E_NO_CHANGE if no change is
+ * neccessary
+ */
+ virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
+ /**
+ * enters a domain in the database, creates and ID
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterDomainDB(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
+ /**
+ * enters a mainconnection in the database, creates and ID
+ * @return E_OK on success, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterMainConnectionDB(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID) =0;
+ /**
+ * enters a sink in the database.
+ * The sinkID in am_Sink_s shall be 0 in case of a dynamic added source A sinkID
+ * greater than 100 will be assigned. If a specific sinkID with a value <100 is
+ * given, the given value will be used. This is for a static setup where the ID's
+ * are predefined.
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterSinkDB(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
+ /**
+ * enters a crossfader in the database.
+ * The crossfaderID in am_Crossfader_s shall be 0 in case of a dynamic added
+ * source A crossfaderID greater than 100 will be assigned. If a specific
+ * crossfaderID with a value <100 is given, the given value will be used. This is
+ * for a static setup where the ID's are predefined.
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterCrossfaderDB(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
+ /**
+ * enters a gateway in the database.
+ * The gatewayID in am_Gateway_s shall be 0 in case of a dynamic added source A
+ * gatewayID greater than 100 will be assigned. If a specific gatewayID with a
+ * value <100 is given, the given value will be used. This is for a static setup
+ * where the ID's are predefined.
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterGatewayDB(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
+ /**
+ * enters a converter in the database.
+ * The converterID in am_Converter_s shall be 0 in case of a dynamic added source
+ * A converterID greater than 100 will be assigned. If a specific gatewayID with a
+ * value <100 is given, the given value will be used. This is for a static setup
+ * where the ID's are predefined.
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterConverterDB(const am_Converter_s& converterData, am_converterID_t& converterID) =0;
+ /**
+ * enters a source in the database.
+ * The sourceID in am_Source_s shall be 0 in case of a dynamic added source A
+ * sourceID greater than 100 will be assigned. If a specific sourceID with a value
+ * <100 is given, the given value will be used. This is for a static setup where
+ * the ID's are predefined.
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterSourceDB(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
+ /**
+ * Enters a sourceClass into the database.
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterSinkClassDB(const am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID) =0;
+ /**
+ * Enters a sourceClass into the database.
+ * The sourceClassID in am_sourceClass_s shall be 0 in case of a dynamic added
+ * source A sourceClassID greater than 100 will be assigned. If a specific
+ * sourceClassID with a value <100 is given, the given value will be used. This is
+ * for a static setup where the ID's are predefined.
+ * @return E_OK on success, E_ALREADY_EXISTENT if the ID or name is already in the
+ * database, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterSourceClassDB(am_sourceClass_t& sourceClassID, const am_SourceClass_s& sourceClass) =0;
+ /**
+ * changes class information of a sinkclass.
+ * The properties will overwrite the values of the sinkClassID given in the
+ * sinkClass.
+ * It is the duty of the controller to check if the property is valid. If it does
+ * not exist, the daemon will not return an error.
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
+ * sinkClassID was not found.
+ */
+ virtual am_Error_e changeSinkClassInfoDB(const am_SinkClass_s& sinkClass) =0;
+ /**
+ * changes class information of a sourceClass.
+ * The properties will overwrite the values of the sourceClassID given in the
+ * sourceClass.
+ * It is the duty of the controller to check if the property is valid. If it does
+ * not exist, the daemon will not return an error.
+ * @return E_OK on success, E_DATABASE_ERROR on error and E_NON_EXISTENT if the
+ * ClassID does not exist.
+ */
+ virtual am_Error_e changeSourceClassInfoDB(const am_SourceClass_s& sourceClass) =0;
+ /**
+ * This function is used to enter the system Properties into the database.
+ * All entries in the database will be erased before entering the new List. It
+ * should only be called once at system startup.
+ * @return E_OK on success, E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e enterSystemPropertiesListDB(const std::vector<am_SystemProperty_s>& listSystemProperties) =0;
+ /**
+ * changes the mainConnectionState of MainConnection
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
+ * mainconnection
+ */
+ virtual am_Error_e changeMainConnectionRouteDB(const am_mainConnectionID_t mainconnectionID, const std::vector<am_connectionID_t>& listConnectionID) =0;
+ /**
+ * changes the mainConnectionState of MainConnection
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
+ * mainconnection
+ */
+ virtual am_Error_e changeMainConnectionStateDB(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState) =0;
+ /**
+ * changes the sink volume of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e changeSinkMainVolumeDB(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the availablility of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e changeSinkAvailabilityDB(const am_Availability_s& availability, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the domainstate of a domain
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
+ * was not found
+ */
+ virtual am_Error_e changDomainStateDB(const am_DomainState_e domainState, const am_domainID_t domainID) =0;
+ /**
+ * changes the mute state of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e changeSinkMuteStateDB(const am_MuteState_e muteState, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the mainsinksoundproperty of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e changeMainSinkSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
+ /**
+ * changes the mainsourcesoundproperty of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
+ * was not found
+ */
+ virtual am_Error_e changeMainSourceSoundPropertyDB(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
+ /**
+ * changes the availablility of a source
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
+ * was not found
+ */
+ virtual am_Error_e changeSourceAvailabilityDB(const am_Availability_s& availability, const am_sourceID_t sourceID) =0;
+ /**
+ * changes a systemProperty
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if property
+ * was not found
+ */
+ virtual am_Error_e changeSystemPropertyDB(const am_SystemProperty_s& property) =0;
+ /**
+ * removes a mainconnection from the DB
+ * @return E_OK on success, E_NON_EXISTENT if main connection was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeMainConnectionDB(const am_mainConnectionID_t mainConnectionID) =0;
+ /**
+ * removes a sink from the DB
+ * @return E_OK on success, E_NON_EXISTENT if sink was not found, E_DATABASE_ERROR
+ * if the database had an error
+ */
+ virtual am_Error_e removeSinkDB(const am_sinkID_t sinkID) =0;
+ /**
+ * removes a source from the DB
+ * @return E_OK on success, E_NON_EXISTENT if source was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeSourceDB(const am_sourceID_t sourceID) =0;
+ /**
+ * removes a gateway from the DB
+ * @return E_OK on success, E_NON_EXISTENT if gateway was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeGatewayDB(const am_gatewayID_t gatewayID) =0;
+ /**
+ * removes a converter from the DB
+ * @return E_OK on success, E_NON_EXISTENT if gateway was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeConverterDB(const am_converterID_t converterID) =0;
+ /**
+ * removes a crossfader from the DB
+ * @return E_OK on success, E_NON_EXISTENT if crossfader was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeCrossfaderDB(const am_crossfaderID_t crossfaderID) =0;
+ /**
+ * removes a domain from the DB
+ * @return E_OK on success, E_NON_EXISTENT if domain was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeDomainDB(const am_domainID_t domainID) =0;
+ /**
+ * removes a domain from the DB
+ * @return E_OK on success, E_NON_EXISTENT if domain was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeSinkClassDB(const am_sinkClass_t sinkClassID) =0;
+ /**
+ * removes a domain from the DB
+ * @return E_OK on success, E_NON_EXISTENT if domain was not found,
+ * E_DATABASE_ERROR if the database had an error
+ */
+ virtual am_Error_e removeSourceClassDB(const am_sourceClass_t sourceClassID) =0;
+ /**
+ * returns the ClassInformation of a source
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if source
+ * was not found
+ */
+ virtual am_Error_e getSourceClassInfoDB(const am_sourceID_t sourceID, am_SourceClass_s& classInfo) const =0;
+ /**
+ * returns the ClassInformation of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e getSinkClassInfoDB(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass) const =0;
+ /**
+ * returns the sinkData of a sink
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e getSinkInfoDB(const am_sinkID_t sinkID, am_Sink_s& sinkData) const =0;
+ /**
+ * returns the sourcekData of a source
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if sink was
+ * not found
+ */
+ virtual am_Error_e getSourceInfoDB(const am_sourceID_t sourceID, am_Source_s& sourceData) const =0;
+ /**
+ * return source and sink of a converter
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if gateway
+ * was not found
+ */
+ virtual am_Error_e getConverterInfoDB(const am_converterID_t converterID, am_Converter_s& converterData) const =0;
+ /**
+ * return source and sink of a gateway
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if gateway
+ * was not found
+ */
+ virtual am_Error_e getGatewayInfoDB(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData) const =0;
+ /**
+ * returns sources and the sink of a crossfader
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
+ * crossfader was not found
+ */
+ virtual am_Error_e getCrossfaderInfoDB(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData) const =0;
+ /**
+ * returns sources and the sink of a crossfader
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if
+ * crossfader was not found
+ */
+ virtual am_Error_e getMainConnectionInfoDB(const am_mainConnectionID_t mainConnectionID, am_MainConnection_s& mainConnectionData) const =0;
+ /**
+ * returns all sinks of a domain
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
+ * was not found
+ */
+ virtual am_Error_e getListSinksOfDomain(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID) const =0;
+ /**
+ * returns all source of a domain
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
+ * was not found
+ */
+ virtual am_Error_e getListSourcesOfDomain(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID) const =0;
+ /**
+ * returns all crossfaders of a domain
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
+ * was not found
+ */
+ virtual am_Error_e getListCrossfadersOfDomain(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID) const =0;
+ /**
+ * returns all converters of a domain
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
+ * was not found
+ */
+ virtual am_Error_e getListConvertersOfDomain(const am_domainID_t domainID, std::vector<am_converterID_t>& listConverterID) const =0;
+ /**
+ * returns all gateways of a domain
+ * @return E_OK on success, E_DATABASE_ERROR on error, E_NON_EXISTENT if domain
+ * was not found
+ */
+ virtual am_Error_e getListGatewaysOfDomain(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID) const =0;
+ /**
+ * returns a complete list of all MainConnections
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListMainConnections(std::vector<am_MainConnection_s>& listMainConnections) const =0;
+ /**
+ * returns a complete list of all domains
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListDomains(std::vector<am_Domain_s>& listDomains) const =0;
+ /**
+ * returns a complete list of all Connections
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListConnections(std::vector<am_Connection_s>& listConnections) const =0;
+ /**
+ * returns a list of all sinks
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListSinks(std::vector<am_Sink_s>& listSinks) const =0;
+ /**
+ * returns a list of all sources
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListSources(std::vector<am_Source_s>& listSources) const =0;
+ /**
+ * returns a list of all source classes
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
+ /**
+ * returns a list of all handles
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListHandles(std::vector<am_Handle_s>& listHandles) const =0;
+ /**
+ * returns a list of all crossfaders
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListCrossfaders(std::vector<am_Crossfader_s>& listCrossfaders) const =0;
+ /**
+ * returns a list of converters
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListConverters(std::vector<am_Converter_s>& listConverters) const =0;
+ /**
+ * returns a list of gateways
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListGateways(std::vector<am_Gateway_s>& listGateways) const =0;
+ /**
+ * returns a list of all sink classes
+ * @return E_OK on success, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
+ /**
+ * returns the list of SystemProperties
+ */
+ virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
+ /**
+ * sets the command interface to ready. Will send setCommandReady to each of the
+ * plugins. The corresponding answer is confirmCommandReady.
+ */
+ virtual void setCommandReady() =0;
+ /**
+ * sets the command interface into the rundown state. Will send setCommandRundown
+ * to each of the plugins. The corresponding answer is confirmCommandRundown.
+ */
+ virtual void setCommandRundown() =0;
+ /**
+ * sets the routinginterface to ready. Will send the command setRoutingReady to
+ * each of the plugins. The related answer is confirmRoutingReady.
+ */
+ virtual void setRoutingReady() =0;
+ /**
+ * sets the routinginterface to the rundown state. Will send the command
+ * setRoutingRundown to each of the plugins. The related answer is
+ * confirmRoutingRundown.
+ */
+ virtual void setRoutingRundown() =0;
+ /**
+ * acknowledges the setControllerReady call.
+ */
+ virtual void confirmControllerReady(const am_Error_e error) =0;
+ /**
+ * Acknowledges the setControllerRundown call.
+ */
+ virtual void confirmControllerRundown(const am_Error_e error) =0;
+ /**
+ * 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,
+ */
+ virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) =0;
+ /**
+ * Change the data of the source.
+ */
+ virtual am_Error_e changeSourceDB(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;
+ /**
+ * Change the data of the sink.
+ */
+ virtual am_Error_e changeSinkDB(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;
+ /**
+ * changes converter Data
+ */
+ virtual am_Error_e changeConverterDB(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
+ /**
+ * changes Gateway Data
+ */
+ virtual am_Error_e changeGatewayDB(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
+ /**
+ * with this function, setting of multiple volumes at a time is done. The behavior
+ * of the volume set is depended on the given ramp and time information.
+ * This function is not only used to ramp volume, but also to mute and direct set
+ * the level. Exact behavior is depended on the selected mute ramps.
+ * @return E_OK on success, E_NO_CHANGE if the volume is already on the desired
+ * value, E_OUT_OF_RANGE is the volume is out of range, E_UNKNOWN on every other
+ * error.
+ */
+ virtual am_Error_e setVolumes(am_Handle_s& handle, const std::vector<am_Volumes_s>& listVolumes) =0;
+ /**
+ * set a sink notification configuration
+ */
+ virtual am_Error_e setSinkNotificationConfiguration(am_Handle_s& handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * set a source notification configuration
+ */
+ virtual am_Error_e setSourceNotificationConfiguration(am_Handle_s& handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * Sends out the main notificiation of a sink
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual void sendMainSinkNotificationPayload(const am_sinkID_t sinkID, const am_NotificationPayload_s& notificationPayload) =0;
+ /**
+ * Sends out the main notificiation of a source
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual void sendMainSourceNotificationPayload(const am_sourceID_t sourceID, const am_NotificationPayload_s& notificationPayload) =0;
+ /**
+ * change the mainNotificationConfiguration of a sink
+ * @return E_OK when successful, E_DATABASE on error
+ */
+ virtual am_Error_e changeMainSinkNotificationConfigurationDB(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+ /**
+ * change the mainNotificationConfiguration of a source
+ * @return E_OK when successful, E_DATABASE on error
+ */
+ virtual am_Error_e changeMainSourceNotificationConfigurationDB(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
+ /**
+ * Retrieves the Restart Reason Property
+ * @return E_OK on success E_UNKNOWN if property could not be retrieved.
+ */
+ virtual am_Error_e getRestartReasonPropertyNSM(NsmRestartReason_e& restartReason) =0;
+ /**
+ * Retrieves the shutdown reason property
+ * @return E_OK on success E_UNKNOWN if property could not be retrieved.
+ */
+ virtual am_Error_e getShutdownReasonPropertyNSM(NsmShutdownReason_e& ShutdownReason) =0;
+ /**
+ * Retrieves the running reason
+ * @return E_OK on success E_UNKNOWN if property could not be retrieved.
+ */
+ virtual am_Error_e getRunningReasonPropertyNSM(NsmRunningReason_e& nsmRunningReason) =0;
+ /**
+ * @return NsmErrorStatus_Ok in case of success
+ */
+ virtual NsmErrorStatus_e getNodeStateNSM(NsmNodeState_e& nsmNodeState) =0;
+ /**
+ * Retrieves the current session state
+ * @return NsmErrorStatus_Ok on success E_UNKNOWN if property could not be
+ * retrieved.
+ */
+ virtual NsmErrorStatus_e getSessionStateNSM(const std::string& sessionName, const NsmSeat_e seatID, NsmSessionState_e& sessionState) =0;
+ /**
+ * Retrieves the current applicationmode
+ * @return NsmErrorStatus_Ok on success E_UNKNOWN if property could not be
+ * retrieved.
+ */
+ virtual NsmErrorStatus_e getApplicationModeNSM(NsmApplicationMode_e& applicationMode) =0;
+ /**
+ * Registers the AudioManager as shutdown client
+ * @return NsmErrorStatus_Ok on success
+ * The interface for the client will be provided by the AudioManagerDeamon,
+ * therefore is no need to mention it here.
+ */
+ virtual NsmErrorStatus_e registerShutdownClientNSM(const uint32_t shutdownMode, const uint32_t timeoutMs) =0;
+ /**
+ * unregisters the AudioManager as shutdown client
+ * @return NsmErrorStatus_Ok on success
+ */
+ virtual NsmErrorStatus_e unRegisterShutdownClientNSM(const uint32_t shutdownMode) =0;
+ /**
+ * @return E_OK on success, E_UNKOWN if interface could not be reached
+ */
+ virtual am_Error_e getInterfaceVersionNSM(uint32_t& version) =0;
+ /**
+ * Sends out the lifecyclerequest complete to the NSM
+ * @return NsmErrorStatus_Ok in case of success
+ */
+ virtual NsmErrorStatus_e sendLifecycleRequestCompleteNSM(const uint32_t RequestId, const NsmErrorStatus_e status) =0;
+
+};
+}
+#endif // !defined(EA_770423FB_365F_4c4b_824E_276D1AE06003__INCLUDED_)
diff --git a/include/control/IAmControlSend.h b/include/control/IAmControlSend.h
index 092ca43..f547a81 100755
--- a/include/control/IAmControlSend.h
+++ b/include/control/IAmControlSend.h
@@ -1,358 +1,374 @@
-/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_EC5ACE73_7EE6_4535_B8AA_54B1C4AC7007__INCLUDED_)
-#define EA_EC5ACE73_7EE6_4535_B8AA_54B1C4AC7007__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-namespace am {
-class IAmControlReceive;
-}
-
-#include "IAmControlReceive.h"
-#include "audiomanagertypes.h"
-#include "NodeStateManager.h"
-
-#define ControlSendVersion "3.0"
-namespace am {
-
-/**
- * This interface is presented by the AudioManager controller.
- * All the hooks represent system events that need to be handled. The callback
- * functions are used to handle for example answers to function calls on the
- * AudioManagerCoreInterface.
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmControlSend
-{
-
-public:
- IAmControlSend() {
-
- }
-
- virtual ~IAmControlSend() {
-
- }
-
- /**
- * This function returns the version of the interface
- * returns E_OK, E_UNKOWN if version is unknown.
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * Starts up the controller.
- */
- virtual am_Error_e startupController(IAmControlReceive* controlreceiveinterface) =0;
- /**
- * this message is used tell the controller that it should get ready. This message
- * must be acknowledged via confirmControllerReady.
- */
- virtual void setControllerReady() =0;
- /**
- * This message tells the controller that he should prepare everything for the
- * power to be switched off. This message must be acknowledged via
- * confirmControllerRundown.
- * The method will give the signal as integer that was responsible for calling the
- * setControllerRundown.
- * This function is called from the signal handler, either direct (when the
- * program is killed) or from within the mainloop (if the program is terminated).
- */
- virtual void setControllerRundown(const int16_t signal) =0;
- /**
- * is called when a connection request comes in via the command interface
- * @return E_OK on success, E_NOT_POSSIBLE on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
- /**
- * is called when a disconnection request comes in via the command interface
- * @return E_OK on success, E_NOT_POSSIBLE on error, E_NON_EXISTENT if connection
- * does not exists
- */
- virtual am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) =0;
- /**
- * sets a user MainSinkSoundProperty
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * sets a user MainSourceSoundProperty
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
- /**
- * sets a user SystemProperty
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) =0;
- /**
- * sets a user volume
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) =0;
- /**
- * sets a user volume as increment
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) =0;
- /**
- * sets the mute state of a sink
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
- /**
- * is called when a routing adaptor registers its domain
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
- /**
- * is called when a routing adaptor wants to derigister a domain
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) =0;
- /**
- * is called when a domain registered all the elements
- */
- virtual void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) =0;
- /**
- * is called when a routing adaptor registers a sink
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
- /**
- * is called when a routing adaptor deregisters a sink
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) =0;
- /**
- * is called when a routing adaptor registers a source
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
- /**
- * is called when a routing adaptor deregisters a source
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) =0;
- /**
- * is called when a routing adaptor registers a gateway
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
- /**
- * is called when a routing adaptor deregisters a gateway
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) =0;
- /**
- * is called when a routing adaptor registers a crossfader
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
- * exists
- */
- virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
- /**
- * is called when a routing adaptor deregisters a crossfader
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
- */
- virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
- /**
- * volumeticks. therse are used to indicate volumechanges during a ramp
- */
- virtual void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
- /**
- * volumeticks. therse are used to indicate volumechanges during a ramp
- */
- virtual void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
- /**
- * is called when an low level interrupt changed its state
- */
- virtual void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
- /**
- * id called when a sink changed its availability
- */
- virtual void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
- /**
- * id called when a source changed its availability
- */
- virtual void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
- /**
- * id called when domainstate was changed
- */
- virtual void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) =0;
- /**
- * when early data was received
- */
- virtual void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) =0;
- /**
- * this hook provides information about speed changes.
- * The quantization and sampling rate of the speed can be adjusted at compile time
- * of the AudioManagerDaemon.
- */
- virtual void hookSystemSpeedChange(const am_speed_t speed) =0;
- /**
- * this hook is fired whenever the timing information of a mainconnection has
- * changed.
- */
- virtual void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
- /**
- * ack for connect
- */
- virtual void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) =0;
- /**
- * ack for disconnect
- */
- virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) =0;
- /**
- * ack for crossfading
- */
- virtual void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) =0;
- /**
- * ack for sink volume changes
- */
- virtual void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
- /**
- * ack for source volume changes
- */
- virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) =0;
- /**
- * ack for setting of source states
- */
- virtual void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sourcesoundproperties
- */
- virtual void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sourcesoundproperties
- */
- virtual void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sinksoundproperties
- */
- virtual void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * ack for setting of sinksoundproperties
- */
- virtual void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * This function is used by the routing algorithm to retrieve a priorized list of
- * connectionFormats from the Controller.
- * @return E_OK in case of successfull priorisation.
- */
- virtual am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t>& listPrioConnectionFormats) =0;
- /**
- * confirms the setCommandReady call
- */
- virtual void confirmCommandReady(const am_Error_e error) =0;
- /**
- * confirms the setRoutingReady call
- */
- virtual void confirmRoutingReady(const am_Error_e error) =0;
- /**
- * confirms the setCommandRundown call
- */
- virtual void confirmCommandRundown(const am_Error_e error) =0;
- /**
- * confirms the setRoutingRundown command
- */
- virtual void confirmRoutingRundown(const am_Error_e error) =0;
- /**
- * update form the SinkData
- */
- virtual am_Error_e hookSystemUpdateSink(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;
- /**
- * update from the source Data
- */
- virtual am_Error_e hookSystemUpdateSource(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 the Gateway Data
- */
- virtual am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
- /**
- * ack for mulitple volume changes
- */
- virtual void cbAckSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error) =0;
- /**
- * The acknowledge of the sink notification configuration
- */
- virtual void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * The acknowledge of the source notification configuration
- */
- virtual void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * new sinkNotification data is there!
- */
- virtual void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) =0;
- /**
- * new sourceNotification data is there!
- */
- virtual void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) =0;
- /**
- * sets a user MainSinkNotificationConfiguration
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * sets a user MainSourceNotificationConfiguration
- * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
- */
- virtual am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * This hook is connected to the NodeState signal of the NodeStateManager
- */
- virtual void hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId) =0;
- /**
- * This hook is connected to the NodeApplicationMode signal of the NodeStateManager
- */
- virtual void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) =0;
- /**
- * the sessionstate change was send by the NSM
- */
- virtual void hookSystemSessionStateChanged(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID) =0;
- /**
- * A lifecycle request comes in from the NSM and must be processed.
- * @return NsmErrorStatus_Ok if successful
- * The controller has to respond to this message with LifecycleRequestComplete.
- */
- virtual NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) =0;
-
-};
-}
-#endif // !defined(EA_EC5ACE73_7EE6_4535_B8AA_54B1C4AC7007__INCLUDED_)
+/**
+ * Copyright (C) 2012 - 2014, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
+ *
+ * \file
+ * For further information see http://projects.genivi.org/audio-manager
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
+ * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
+ */
+#if !defined(EA_0ABDDE72_16AD_4b27_A4DA_434305082DD5__INCLUDED_)
+#define EA_0ABDDE72_16AD_4b27_A4DA_434305082DD5__INCLUDED_
+
+#include <vector>
+#include <string>
+#include "audiomanagertypes.h"
+
+namespace am {
+class IAmControlReceive;
+}
+
+#include "IAmControlReceive.h"
+#include "audiomanagertypes.h"
+#include "NodeStateManager.h"
+
+#define ControlSendVersion "3.0"
+namespace am {
+
+/**
+ * This interface is presented by the AudioManager controller.
+ * All the hooks represent system events that need to be handled. The callback
+ * functions are used to handle for example answers to function calls on the
+ * AudioManagerCoreInterface.
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmControlSend
+{
+
+public:
+ IAmControlSend() {
+
+ }
+
+ virtual ~IAmControlSend() {
+
+ }
+
+ /**
+ * This function returns the version of the interface
+ * returns E_OK, E_UNKOWN if version is unknown.
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * Starts up the controller.
+ */
+ virtual am_Error_e startupController(IAmControlReceive* controlreceiveinterface) =0;
+ /**
+ * this message is used tell the controller that it should get ready. This message
+ * must be acknowledged via confirmControllerReady.
+ */
+ virtual void setControllerReady() =0;
+ /**
+ * This message tells the controller that he should prepare everything for the
+ * power to be switched off. This message must be acknowledged via
+ * confirmControllerRundown.
+ * The method will give the signal as integer that was responsible for calling the
+ * setControllerRundown.
+ * This function is called from the signal handler, either direct (when the
+ * program is killed) or from within the mainloop (if the program is terminated).
+ */
+ virtual void setControllerRundown(const int16_t signal) =0;
+ /**
+ * is called when a connection request comes in via the command interface
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
+ /**
+ * is called when a disconnection request comes in via the command interface
+ * @return E_OK on success, E_NOT_POSSIBLE on error, E_NON_EXISTENT if connection
+ * does not exists
+ */
+ virtual am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) =0;
+ /**
+ * sets a user MainSinkSoundProperty
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * sets a user MainSourceSoundProperty
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) =0;
+ /**
+ * sets a user SystemProperty
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) =0;
+ /**
+ * sets a user volume
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) =0;
+ /**
+ * sets a user volume as increment
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) =0;
+ /**
+ * sets the mute state of a sink
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
+ /**
+ * is called when a routing adaptor registers its domain
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
+ /**
+ * is called when a routing adaptor wants to derigister a domain
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) =0;
+ /**
+ * is called when a domain registered all the elements
+ */
+ virtual void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) =0;
+ /**
+ * is called when a routing adaptor registers a sink
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
+ /**
+ * is called when a routing adaptor deregisters a sink
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) =0;
+ /**
+ * is called when a routing adaptor registers a source
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
+ /**
+ * is called when a routing adaptor deregisters a source
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) =0;
+ /**
+ * is called when a routing adaptor registers a converter
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterConverter(const am_Converter_s& converterData, am_converterID_t& converterID) =0;
+ /**
+ * is called when a routing adaptor registers a gateway
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
+ /**
+ * is called when a routing adaptor deregisters a converter
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterConverter(const am_converterID_t converterID) =0;
+ /**
+ * is called when a routing adaptor deregisters a gateway
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) =0;
+ /**
+ * is called when a routing adaptor registers a crossfader
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXISTENT if already
+ * exists
+ */
+ virtual am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
+ /**
+ * is called when a routing adaptor deregisters a crossfader
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if not found
+ */
+ virtual am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
+ /**
+ * volumeticks. therse are used to indicate volumechanges during a ramp
+ */
+ virtual void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
+ /**
+ * volumeticks. therse are used to indicate volumechanges during a ramp
+ */
+ virtual void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
+ /**
+ * is called when an low level interrupt changed its state
+ */
+ virtual void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
+ /**
+ * id called when a sink changed its availability
+ */
+ virtual void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * id called when a source changed its availability
+ */
+ virtual void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * id called when domainstate was changed
+ */
+ virtual void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) =0;
+ /**
+ * when early data was received
+ */
+ virtual void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) =0;
+ /**
+ * this hook provides information about speed changes.
+ * The quantization and sampling rate of the speed can be adjusted at compile time
+ * of the AudioManagerDaemon.
+ */
+ virtual void hookSystemSpeedChange(const am_speed_t speed) =0;
+ /**
+ * this hook is fired whenever the timing information of a mainconnection has
+ * changed.
+ */
+ virtual void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) =0;
+ /**
+ * ack for connect
+ */
+ virtual void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) =0;
+ /**
+ * ack for disconnect
+ */
+ virtual void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) =0;
+ /**
+ * ack for crossfading
+ */
+ virtual void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) =0;
+ /**
+ * ack for sink volume changes
+ */
+ virtual void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
+ /**
+ * ack for source volume changes
+ */
+ virtual void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) =0;
+ /**
+ * ack for setting of source states
+ */
+ virtual void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sourcesoundproperties
+ */
+ virtual void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sourcesoundproperties
+ */
+ virtual void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sinksoundproperties
+ */
+ virtual void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * ack for setting of sinksoundproperties
+ */
+ virtual void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * This function is used by the routing algorithm to retrieve a priorized list of
+ * connectionFormats from the Controller.
+ * @return E_OK in case of successfull priorisation.
+ */
+ virtual am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_CustomConnectionFormat_t> listPossibleConnectionFormats, std::vector<am_CustomConnectionFormat_t>& listPrioConnectionFormats) =0;
+ /**
+ * confirms the setCommandReady call
+ */
+ virtual void confirmCommandReady(const am_Error_e error) =0;
+ /**
+ * confirms the setRoutingReady call
+ */
+ virtual void confirmRoutingReady(const am_Error_e error) =0;
+ /**
+ * confirms the setCommandRundown call
+ */
+ virtual void confirmCommandRundown(const am_Error_e error) =0;
+ /**
+ * confirms the setRoutingRundown command
+ */
+ virtual void confirmRoutingRundown(const am_Error_e error) =0;
+ /**
+ * update form the SinkData
+ */
+ virtual am_Error_e hookSystemUpdateSink(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;
+ /**
+ * update from the source Data
+ */
+ virtual am_Error_e hookSystemUpdateSource(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 the Converter Data
+ */
+ virtual am_Error_e hookSystemUpdateConverter(const am_converterID_t converterID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
+ /**
+ * updates the Gateway Data
+ */
+ virtual am_Error_e hookSystemUpdateGateway(const am_gatewayID_t gatewayID, const std::vector<am_CustomConnectionFormat_t>& listSourceConnectionFormats, const std::vector<am_CustomConnectionFormat_t>& listSinkConnectionFormats, const std::vector<bool>& convertionMatrix) =0;
+ /**
+ * ack for mulitple volume changes
+ */
+ virtual void cbAckSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes, const am_Error_e error) =0;
+ /**
+ * The acknowledge of the sink notification configuration
+ */
+ virtual void cbAckSetSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * The acknowledge of the source notification configuration
+ */
+ virtual void cbAckSetSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * new sinkNotification data is there!
+ */
+ virtual void hookSinkNotificationDataChanged(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) =0;
+ /**
+ * new sourceNotification data is there!
+ */
+ virtual void hookSourceNotificationDataChanged(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) =0;
+ /**
+ * sets a user MainSinkNotificationConfiguration
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * sets a user MainSourceNotificationConfiguration
+ * @return E_OK on success, E_OUT_OF_RANGE if out of range, E_UNKNOWN on error
+ */
+ virtual am_Error_e hookUserSetMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * This hook is connected to the NodeState signal of the NodeStateManager
+ */
+ virtual void hookSystemNodeStateChanged(const NsmNodeState_e NodeStateId) =0;
+ /**
+ * This hook is connected to the NodeApplicationMode signal of the NodeStateManager
+ */
+ virtual void hookSystemNodeApplicationModeChanged(const NsmApplicationMode_e ApplicationModeId) =0;
+ /**
+ * the sessionstate change was send by the NSM
+ */
+ virtual void hookSystemSessionStateChanged(const std::string& sessionName, const NsmSeat_e seatID, const NsmSessionState_e sessionStateID) =0;
+ /**
+ * A lifecycle request comes in from the NSM and must be processed.
+ * @return NsmErrorStatus_Ok if successful
+ * The controller has to respond to this message with LifecycleRequestComplete.
+ */
+ virtual NsmErrorStatus_e hookSystemLifecycleRequest(const uint32_t Request, const uint32_t RequestId) =0;
+
+};
+}
+#endif // !defined(EA_0ABDDE72_16AD_4b27_A4DA_434305082DD5__INCLUDED_)
diff --git a/include/routing/IAmRoutingReceive.h b/include/routing/IAmRoutingReceive.h
index 796c28f..de9e55b 100755
--- a/include/routing/IAmRoutingReceive.h
+++ b/include/routing/IAmRoutingReceive.h
@@ -1,314 +1,331 @@
-/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_C540B86A_9F4A_4ae5_A68A_8A0FD52A7149__INCLUDED_)
-#define EA_C540B86A_9F4A_4ae5_A68A_8A0FD52A7149__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-namespace am {
-class CAmDbusWrapper;
-class CAmSocketHandler;
-}
-
-
-#include "audiomanagertypes.h"
-
-#define RoutingReceiveVersion "3.0"
-namespace am {
-
-/**
- * Routing Receive sendInterface description. This class implements everything
- * from RoutingAdapter -> Audiomanager
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmRoutingReceive
-{
-
-public:
- IAmRoutingReceive() {
-
- }
-
- virtual ~IAmRoutingReceive() {
-
- }
-
- /**
- * This function returns the version of the interface
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * acknowledges a asyncConnect
- */
- virtual void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
- /**
- * acknowledges a asyncDisconnect
- */
- virtual void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
- /**
- * acknowledges a asyncsetSinkVolume
- */
- virtual void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
- /**
- * acknowledges a asyncsetSourceVolume
- */
- virtual void ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
- /**
- * acknowlegde for asyncSetSourceState
- */
- virtual void ackSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * acknowledges asyncSetSinkSoundProperties
- */
- virtual void ackSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * acknowledges asyncSetSinkSoundProperty
- */
- virtual void ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * acknowledges asyncSetSourceSoundProperties
- */
- virtual void ackSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * acknowledges asyncSetSourceSoundProperty
- */
- virtual void ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * acknowledges asyncCrossFade
- */
- virtual void ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error) =0;
- /**
- * acknowledges a volume tick. This can be used to display volumechanges during
- * ramps
- */
- virtual void ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
- /**
- * acknowledges a volume tick. This can be used to display volumechanges during
- * ramps
- */
- virtual void ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
- /**
- * This function returns the ID to the given domainName. If already a domain is
- * registered with this name, it will return the corresponding ID, if not it will
- * reserve an ID but not register the domain. The other parameters of the domain
- * will be overwritten when the domain is registered.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e peekDomain(const std::string& name, am_domainID_t& domainID) =0;
- /**
- * registers a domain
- * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on
- * error
- */
- virtual am_Error_e registerDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
- /**
- * deregisters a domain. All sources, sinks, gateways and crossfaders from that
- * domain will be removed as well.
- * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
- */
- virtual am_Error_e deregisterDomain(const am_domainID_t domainID) =0;
- /**
- * registers a gateway. @return E_OK on succes, E_ALREADY_EXISTENT if already
- * registered E_UNKOWN on error
- */
- virtual am_Error_e registerGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
- /**
- * deregisters a gateway. Also removes all sinks and sources of the controlling
- * domain.
- * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
- */
- virtual am_Error_e deregisterGateway(const am_gatewayID_t gatewayID) =0;
- /**
- * This function returns the ID to the given sinkName. If already a sink is
- * registered with this name, it will return the corresponding ID, if not it will
- * reserve an ID but not register the sink. The other parameters of the sink will
- * be overwritten when the sink is registered.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e peekSink(const std::string& name, am_sinkID_t& sinkID) =0;
- /**
- * Registers a sink. If the sink is part of a gateway, the listconnectionFormats
- * is copied to the gatewayInformation
- * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on
- * error
- */
- virtual am_Error_e registerSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
- /**
- * deregisters a sink.
- * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
- */
- virtual am_Error_e deregisterSink(const am_sinkID_t sinkID) =0;
- /**
- * This function returns the ID to the given sourceName. If already a source is
- * registered with this name, it will return the corresponding ID, if not it will
- * reserve an ID but not register the source. The other parameters of the source
- * will be overwritten when the source is registered.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID) =0;
- /**
- * registers a source. If the source is part of a gateway, the
- * listconnectionFormats is copied to the gatewayInformation
- * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXIST if either name or
- * sourceID already exists
- */
- virtual am_Error_e registerSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
- /**
- * deregisters a source
- * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
- */
- virtual am_Error_e deregisterSource(const am_sourceID_t sourceID) =0;
- /**
- * this function registers a crossfader.
- * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on
- * error
- */
- virtual am_Error_e registerCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
- /**
- * this function deregisters a crossfader. removes all sources and sinks assiated
- * as well.
- * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
- */
- virtual am_Error_e deregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
- /**
- * this function peeks a sourceclassID. It is used by the RoutingPlugins to
- * determine the SinkClassIDs of a sinkClass.
- * @return E_OK on succes, E_DATABASE_ERROR on error
- */
- virtual am_Error_e peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID) =0;
- /**
- * this function peeks a sourceclassID. It is used by the RoutingPlugins to
- * determine the SinkClassIDs of a sinkClass.
- * @return E_OK on succes, E_DATABASE_ERROR on error
- */
- virtual am_Error_e peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID) =0;
- /**
- * is called when a low level interrupt changes it status.
- */
- virtual void hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
- /**
- * This hook is called when all elements from a domain are registered.
- * Is used by the Controller to know when all expected domains are finally
- * registered
- */
- virtual void hookDomainRegistrationComplete(const am_domainID_t domainID) =0;
- /**
- * is called when a sink changes its availability
- */
- virtual void hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
- /**
- * is called when a source changes its availability
- */
- virtual void hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
- /**
- * is called when a domain changes its status. This used for early domains only
- */
- virtual void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
- /**
- * is called when the timinginformation (delay) changed for a connection.
- */
- virtual void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay) =0;
- /**
- * this function is used to send out all data that has been changed in an early
- * state.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual void sendChangedData(const std::vector<am_EarlyData_s>& earlyData) =0;
- /**
- * this function is used to retrieve a pointer to the dBusConnectionWrapper
- * @return E_OK if pointer is valid, E_UKNOWN if AudioManager was compiled without
- * DBus Support
- */
- virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
- /**
- * 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,
- */
- virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
- /**
- * confirms the setRoutingReady Command
- */
- virtual void confirmRoutingReady(const uint16_t handle, const am_Error_e error) =0;
- /**
- * confirms the setRoutingRundown Command
- */
- virtual void confirmRoutingRundown(const uint16_t handle, const am_Error_e error) =0;
- /**
- * updates data of an gateway. @return E_OK on success, E_NON_EXISTENT if the
- * gatewayID is not valid.
- */
- 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. @return E_OK on success, E_NON_EXISTENT if the
- * sinkID is not valid.
- */
- 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 source. @return E_OK on success, E_NON_EXISTENT if the
- * sourceID in the struct is not valid.
- * Please note that only the following data out of am_Source_s have effect when
- * they are changed:
- * sourceClassID,
- * listSoundProperties,
- * listConnectionFormats,
- * listMainSoundProperties
- */
- 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;
- /**
- * acknowledges a asyncSetSinkVolumes
- */
- virtual void ackSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listvolumes, const am_Error_e error) =0;
- /**
- * The acknowledge of the SinkNotificationConfiguration
- */
- virtual void ackSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * The acknowledge of the SourceNotificationConfiguration
- */
- virtual void ackSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
- /**
- * is called whenever a notified value needs to be send
- */
- virtual void hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) =0;
- /**
- * is called whenever a notified value needs to be send
- */
- virtual void hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) =0;
-
-};
-}
-#endif // !defined(EA_C540B86A_9F4A_4ae5_A68A_8A0FD52A7149__INCLUDED_)
+/**
+ * Copyright (C) 2012 - 2014, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
+ *
+ * \file
+ * For further information see http://projects.genivi.org/audio-manager
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
+ * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
+ */
+#if !defined(EA_CFDD6028_596E_4fde_8D52_BED642D0842D__INCLUDED_)
+#define EA_CFDD6028_596E_4fde_8D52_BED642D0842D__INCLUDED_
+
+#include <vector>
+#include <string>
+#include "audiomanagertypes.h"
+
+namespace am {
+class CAmDbusWrapper;
+class CAmSocketHandler;
+}
+
+
+#include "audiomanagertypes.h"
+
+#define RoutingReceiveVersion "3.0"
+namespace am {
+
+/**
+ * Routing Receive sendInterface description. This class implements everything
+ * from RoutingAdapter -> Audiomanager
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmRoutingReceive
+{
+
+public:
+ IAmRoutingReceive() {
+
+ }
+
+ virtual ~IAmRoutingReceive() {
+
+ }
+
+ /**
+ * This function returns the version of the interface
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * acknowledges a asyncConnect
+ */
+ virtual void ackConnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
+ /**
+ * acknowledges a asyncDisconnect
+ */
+ virtual void ackDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID, const am_Error_e error) =0;
+ /**
+ * acknowledges a asyncsetSinkVolume
+ */
+ virtual void ackSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
+ /**
+ * acknowledges a asyncsetSourceVolume
+ */
+ virtual void ackSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) =0;
+ /**
+ * acknowlegde for asyncSetSourceState
+ */
+ virtual void ackSetSourceState(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncSetSinkSoundProperties
+ */
+ virtual void ackSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncSetSinkSoundProperty
+ */
+ virtual void ackSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncSetSourceSoundProperties
+ */
+ virtual void ackSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncSetSourceSoundProperty
+ */
+ virtual void ackSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * acknowledges asyncCrossFade
+ */
+ virtual void ackCrossFading(const am_Handle_s handle, const am_HotSink_e hotSink, const am_Error_e error) =0;
+ /**
+ * acknowledges a volume tick. This can be used to display volumechanges during
+ * ramps
+ */
+ virtual void ackSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) =0;
+ /**
+ * acknowledges a volume tick. This can be used to display volumechanges during
+ * ramps
+ */
+ virtual void ackSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) =0;
+ /**
+ * This function returns the ID to the given domainName. If already a domain is
+ * registered with this name, it will return the corresponding ID, if not it will
+ * reserve an ID but not register the domain. The other parameters of the domain
+ * will be overwritten when the domain is registered.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e peekDomain(const std::string& name, am_domainID_t& domainID) =0;
+ /**
+ * registers a domain
+ * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on
+ * error
+ */
+ virtual am_Error_e registerDomain(const am_Domain_s& domainData, am_domainID_t& domainID) =0;
+ /**
+ * deregisters a domain. All sources, sinks, gateways and crossfaders from that
+ * domain will be removed as well.
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ */
+ virtual am_Error_e deregisterDomain(const am_domainID_t domainID) =0;
+ /**
+ * registers a converter. @return E_OK on succes, E_ALREADY_EXISTENT if already
+ * registered E_UNKOWN on error
+ */
+ virtual am_Error_e registerConverter(const am_Converter_s& converterData, am_converterID_t& converterID) =0;
+ /**
+ * registers a gateway. @return E_OK on succes, E_ALREADY_EXISTENT if already
+ * registered E_UNKOWN on error
+ */
+ virtual am_Error_e registerGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) =0;
+ /**
+ * deregisters a converter. Also removes all sinks and sources of the controlling
+ * domain.
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ */
+ virtual am_Error_e deregisterConverter(const am_converterID_t converterID) =0;
+ /**
+ * deregisters a gateway. Also removes all sinks and sources of the controlling
+ * domain.
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ */
+ virtual am_Error_e deregisterGateway(const am_gatewayID_t gatewayID) =0;
+ /**
+ * This function returns the ID to the given sinkName. If already a sink is
+ * registered with this name, it will return the corresponding ID, if not it will
+ * reserve an ID but not register the sink. The other parameters of the sink will
+ * be overwritten when the sink is registered.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e peekSink(const std::string& name, am_sinkID_t& sinkID) =0;
+ /**
+ * Registers a sink. If the sink is part of a gateway, the listconnectionFormats
+ * is copied to the gatewayInformation
+ * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on
+ * error
+ */
+ virtual am_Error_e registerSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) =0;
+ /**
+ * deregisters a sink.
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ */
+ virtual am_Error_e deregisterSink(const am_sinkID_t sinkID) =0;
+ /**
+ * This function returns the ID to the given sourceName. If already a source is
+ * registered with this name, it will return the corresponding ID, if not it will
+ * reserve an ID but not register the source. The other parameters of the source
+ * will be overwritten when the source is registered.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e peekSource(const std::string& name, am_sourceID_t& sourceID) =0;
+ /**
+ * registers a source. If the source is part of a gateway, the
+ * listconnectionFormats is copied to the gatewayInformation
+ * @return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXIST if either name or
+ * sourceID already exists
+ */
+ virtual am_Error_e registerSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) =0;
+ /**
+ * deregisters a source
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ */
+ virtual am_Error_e deregisterSource(const am_sourceID_t sourceID) =0;
+ /**
+ * this function registers a crossfader.
+ * @return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on
+ * error
+ */
+ virtual am_Error_e registerCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) =0;
+ /**
+ * this function deregisters a crossfader. removes all sources and sinks assiated
+ * as well.
+ * @return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error
+ */
+ virtual am_Error_e deregisterCrossfader(const am_crossfaderID_t crossfaderID) =0;
+ /**
+ * this function peeks a sourceclassID. It is used by the RoutingPlugins to
+ * determine the SinkClassIDs of a sinkClass.
+ * @return E_OK on succes, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e peekSourceClassID(const std::string& name, am_sourceClass_t& sourceClassID) =0;
+ /**
+ * this function peeks a sourceclassID. It is used by the RoutingPlugins to
+ * determine the SinkClassIDs of a sinkClass.
+ * @return E_OK on succes, E_DATABASE_ERROR on error
+ */
+ virtual am_Error_e peekSinkClassID(const std::string& name, am_sinkClass_t& sinkClassID) =0;
+ /**
+ * is called when a low level interrupt changes it status.
+ */
+ virtual void hookInterruptStatusChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) =0;
+ /**
+ * This hook is called when all elements from a domain are registered.
+ * Is used by the Controller to know when all expected domains are finally
+ * registered
+ */
+ virtual void hookDomainRegistrationComplete(const am_domainID_t domainID) =0;
+ /**
+ * is called when a sink changes its availability
+ */
+ virtual void hookSinkAvailablityStatusChange(const am_sinkID_t sinkID, const am_Availability_s& availability) =0;
+ /**
+ * is called when a source changes its availability
+ */
+ virtual void hookSourceAvailablityStatusChange(const am_sourceID_t sourceID, const am_Availability_s& availability) =0;
+ /**
+ * is called when a domain changes its status. This used for early domains only
+ */
+ virtual void hookDomainStateChange(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
+ /**
+ * is called when the timinginformation (delay) changed for a connection.
+ */
+ virtual void hookTimingInformationChanged(const am_connectionID_t connectionID, const am_timeSync_t delay) =0;
+ /**
+ * this function is used to send out all data that has been changed in an early
+ * state.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual void sendChangedData(const std::vector<am_EarlyData_s>& earlyData) =0;
+ /**
+ * this function is used to retrieve a pointer to the dBusConnectionWrapper
+ * @return E_OK if pointer is valid, E_UKNOWN if AudioManager was compiled without
+ * DBus Support
+ */
+ virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
+ /**
+ * 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,
+ */
+ virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
+ /**
+ * confirms the setRoutingReady Command
+ */
+ virtual void confirmRoutingReady(const uint16_t handle, const am_Error_e error) =0;
+ /**
+ * confirms the setRoutingRundown Command
+ */
+ virtual void confirmRoutingRundown(const uint16_t handle, const am_Error_e error) =0;
+ /**
+ * updates data of an converter. @return E_OK on success, E_NON_EXISTENT if the
+ * gatewayID is not valid.
+ */
+ 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 gateway. @return E_OK on success, E_NON_EXISTENT if the
+ * gatewayID is not valid.
+ */
+ 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. @return E_OK on success, E_NON_EXISTENT if the
+ * sinkID is not valid.
+ */
+ 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 source. @return E_OK on success, E_NON_EXISTENT if the
+ * sourceID in the struct is not valid.
+ * Please note that only the following data out of am_Source_s have effect when
+ * they are changed:
+ * sourceClassID,
+ * listSoundProperties,
+ * listConnectionFormats,
+ * listMainSoundProperties
+ */
+ 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;
+ /**
+ * acknowledges a asyncSetSinkVolumes
+ */
+ virtual void ackSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listvolumes, const am_Error_e error) =0;
+ /**
+ * The acknowledge of the SinkNotificationConfiguration
+ */
+ virtual void ackSinkNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * The acknowledge of the SourceNotificationConfiguration
+ */
+ virtual void ackSourceNotificationConfiguration(const am_Handle_s handle, const am_Error_e error) =0;
+ /**
+ * is called whenever a notified value needs to be send
+ */
+ virtual void hookSinkNotificationDataChange(const am_sinkID_t sinkID, const am_NotificationPayload_s& payload) =0;
+ /**
+ * is called whenever a notified value needs to be send
+ */
+ virtual void hookSourceNotificationDataChange(const am_sourceID_t sourceID, const am_NotificationPayload_s& payload) =0;
+
+};
+}
+#endif // !defined(EA_CFDD6028_596E_4fde_8D52_BED642D0842D__INCLUDED_)
diff --git a/include/routing/IAmRoutingSend.h b/include/routing/IAmRoutingSend.h
index d9aeb3c..c9b3d01 100755
--- a/include/routing/IAmRoutingSend.h
+++ b/include/routing/IAmRoutingSend.h
@@ -1,184 +1,185 @@
-/**
- * Copyright (C) 2012 - 2014, BMW AG
- *
- * This file is part of GENIVI Project AudioManager.
- *
- * Contributions are licensed to the GENIVI Alliance under one or more
- * Contribution License Agreements.
- *
- * \copyright
- * This Source Code Form is subject to the terms of the
- * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
- * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- *
- * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
- *
- * \file
- * For further information see http://projects.genivi.org/audio-manager
- *
- * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
- * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
- */
-#if !defined(EA_75F8849C_0F4B_4641_B0B9_01DE137E6938__INCLUDED_)
-#define EA_75F8849C_0F4B_4641_B0B9_01DE137E6938__INCLUDED_
-
-#include <vector>
-#include <string>
-#include "audiomanagertypes.h"
-namespace am {
-class IAmRoutingReceive;
-}
-
-#include "audiomanagertypes.h"
-#include "IAmRoutingReceive.h"
-
-#define RoutingSendVersion "3.0"
-namespace am {
-
-/**
- * This class implements everything from Audiomanager -> RoutingAdapter
- * There are two rules that have to be kept in mind when implementing against this
- * interface:\n
- * \warning
- * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
- * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
- * CALL THAT EXPECTS A RETURN VALUE.\n
- * \details
- * Violation these rules may lead to unexpected behavior! Nevertheless you can
- * implement thread safe by using the deferred-call pattern described on the wiki
- * which also helps to implement calls that are forbidden.\n
- * For more information, please check CAmSerializer
- */
-class IAmRoutingSend
-{
-
-public:
- IAmRoutingSend() {
-
- }
-
- virtual ~IAmRoutingSend() {
-
- }
-
- /**
- * This function returns the version of the interface
- */
- virtual void getInterfaceVersion(std::string& version) const =0;
- /**
- * starts up the interface. In the implementations, here is the best place for
- * init routines.
- */
- virtual am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) =0;
- /**
- * indicates that the routing now ready to be used. Should be used as trigger to
- * register all sinks, sources, etc...
- */
- virtual void setRoutingReady(const uint16_t handle) =0;
- /**
- * indicates that the routing plugins need to be prepared to switch the power off
- * or be ready again.
- */
- virtual void setRoutingRundown(const uint16_t handle) =0;
- /**
- * aborts an asynchronous action.
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not
- * found
- */
- virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
- /**
- * connects a source to a sink
- * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case
- * am_ConnectionFormat_e does not match
- */
- 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;
- /**
- * disconnect a connection with given connectionID
- * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was
- * not found
- */
- virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
- /**
- * this method is used to set the volume of a sink. This function is used to drive
- * ramps, to mute or unmute or directly set the value. The difference is made
- * through the ramptype.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is
- * out of range
- */
- 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;
- /**
- * sets the volume of a source. This method is used to set the volume of a sink.
- * This function is used to drive ramps, to mute or unmute or directly set the
- * value. The difference is made through the ramptype.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
- * range.
- * triggers the acknowledge ackSourceVolumeChange
- */
- 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;
- /**
- * This function is used to set the source state of a particular source.
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
- /**
- * this function sets the sinksoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
- /**
- * this function sets the sinksoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
- /**
- * this function sets the sourcesoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
- /**
- * this function sets the sourcesoundproperty.
- * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
- * value is out of range
- */
- virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
- /**
- * this function triggers crossfading.
- * @return E_OK on success, E_UNKNOWN on error
- */
- 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;
- /**
- * this function is used for early and late audio functions to set the domain
- * state
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
- /**
- * this method is used to retrieve the busname during startup of the plugin. Needs
- * to be implemented
- * @return E_OK on success, E_UNKNOWN on error
- */
- virtual am_Error_e returnBusName(std::string& BusName) const =0;
- /**
- * This command sets multiple source or and sink volumes within a domain at a time.
- * It can be used to synchronize volume setting events.
- * @return E_OK on success, E_UNKNOWN on error.
- */
- virtual am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) =0;
- /**
- * sets the notification configuration of a sink.
- * @return E_OK on success, E_UNKNOWN on error.
- */
- virtual am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
- /**
- * sets the notification configuration of a source.
- * @return E_OK on success, E_UNKNOWN on error.
- */
- virtual am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
-
-};
-}
-#endif // !defined(EA_75F8849C_0F4B_4641_B0B9_01DE137E6938__INCLUDED_)
+/**
+ * Copyright (C) 2012 - 2014, BMW AG
+ *
+ * This file is part of GENIVI Project AudioManager.
+ *
+ * Contributions are licensed to the GENIVI Alliance under one or more
+ * Contribution License Agreements.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
+ *
+ * \file
+ * For further information see http://projects.genivi.org/audio-manager
+ *
+ * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL.
+ * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
+ */
+#if !defined(EA_F78CD115_BEE9_4caa_9112_1C297F24E2EB__INCLUDED_)
+#define EA_F78CD115_BEE9_4caa_9112_1C297F24E2EB__INCLUDED_
+
+#include <vector>
+#include <string>
+#include "audiomanagertypes.h"
+
+namespace am {
+class IAmRoutingReceive;
+}
+
+#include "IAmRoutingReceive.h"
+#include "audiomanagertypes.h"
+
+#define RoutingSendVersion "3.0"
+namespace am {
+
+/**
+ * This class implements everything from Audiomanager -> RoutingAdapter
+ * There are two rules that have to be kept in mind when implementing against this
+ * interface:\n
+ * \warning
+ * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
+ * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
+ * CALL THAT EXPECTS A RETURN VALUE.\n
+ * \details
+ * Violation these rules may lead to unexpected behavior! Nevertheless you can
+ * implement thread safe by using the deferred-call pattern described on the wiki
+ * which also helps to implement calls that are forbidden.\n
+ * For more information, please check CAmSerializer
+ */
+class IAmRoutingSend
+{
+
+public:
+ IAmRoutingSend() {
+
+ }
+
+ virtual ~IAmRoutingSend() {
+
+ }
+
+ /**
+ * This function returns the version of the interface
+ */
+ virtual void getInterfaceVersion(std::string& version) const =0;
+ /**
+ * starts up the interface. In the implementations, here is the best place for
+ * init routines.
+ */
+ virtual am_Error_e startupInterface(IAmRoutingReceive* routingreceiveinterface) =0;
+ /**
+ * indicates that the routing now ready to be used. Should be used as trigger to
+ * register all sinks, sources, etc...
+ */
+ virtual void setRoutingReady(const uint16_t handle) =0;
+ /**
+ * indicates that the routing plugins need to be prepared to switch the power off
+ * or be ready again.
+ */
+ virtual void setRoutingRundown(const uint16_t handle) =0;
+ /**
+ * aborts an asynchronous action.
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not
+ * found
+ */
+ virtual am_Error_e asyncAbort(const am_Handle_s handle) =0;
+ /**
+ * connects a source to a sink
+ * @return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case
+ * am_ConnectionFormat_e does not match
+ */
+ 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;
+ /**
+ * disconnect a connection with given connectionID
+ * @return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was
+ * not found
+ */
+ virtual am_Error_e asyncDisconnect(const am_Handle_s handle, const am_connectionID_t connectionID) =0;
+ /**
+ * this method is used to set the volume of a sink. This function is used to drive
+ * ramps, to mute or unmute or directly set the value. The difference is made
+ * through the ramptype.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is
+ * out of range
+ */
+ 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;
+ /**
+ * sets the volume of a source. This method is used to set the volume of a sink.
+ * This function is used to drive ramps, to mute or unmute or directly set the
+ * value. The difference is made through the ramptype.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of
+ * range.
+ * triggers the acknowledge ackSourceVolumeChange
+ */
+ 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;
+ /**
+ * This function is used to set the source state of a particular source.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e asyncSetSourceState(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SourceState_e state) =0;
+ /**
+ * this function sets the sinksoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSinkSoundProperties(const am_Handle_s handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
+ /**
+ * this function sets the sinksoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSinkSoundProperty(const am_Handle_s handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * this function sets the sourcesoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSourceSoundProperties(const am_Handle_s handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& listSoundProperties) =0;
+ /**
+ * this function sets the sourcesoundproperty.
+ * @return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery
+ * value is out of range
+ */
+ virtual am_Error_e asyncSetSourceSoundProperty(const am_Handle_s handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty) =0;
+ /**
+ * this function triggers crossfading.
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ 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;
+ /**
+ * this function is used for early and late audio functions to set the domain
+ * state
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e setDomainState(const am_domainID_t domainID, const am_DomainState_e domainState) =0;
+ /**
+ * this method is used to retrieve the busname during startup of the plugin. Needs
+ * to be implemented
+ * @return E_OK on success, E_UNKNOWN on error
+ */
+ virtual am_Error_e returnBusName(std::string& BusName) const =0;
+ /**
+ * This command sets multiple source or and sink volumes within a domain at a time.
+ * It can be used to synchronize volume setting events.
+ * @return E_OK on success, E_UNKNOWN on error.
+ */
+ virtual am_Error_e asyncSetVolumes(const am_Handle_s handle, const std::vector<am_Volumes_s>& listVolumes) =0;
+ /**
+ * sets the notification configuration of a sink.
+ * @return E_OK on success, E_UNKNOWN on error.
+ */
+ virtual am_Error_e asyncSetSinkNotificationConfiguration(const am_Handle_s handle, const am_sinkID_t sinkID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+ /**
+ * sets the notification configuration of a source.
+ * @return E_OK on success, E_UNKNOWN on error.
+ */
+ virtual am_Error_e asyncSetSourceNotificationConfiguration(const am_Handle_s handle, const am_sourceID_t sourceID, const am_NotificationConfiguration_s& notificationConfiguration) =0;
+
+};
+}
+#endif // !defined(EA_F78CD115_BEE9_4caa_9112_1C297F24E2EB__INCLUDED_)