* removed all documentation to new place
[profile/ivi/genivi/genivi-audio-manager.git] / AudioManagerDaemon / include / CAmControlSender.h
1 /**
2  * Copyright (C) 2012, BMW AG
3  *
4  * This file is part of GENIVI Project AudioManager.
5  *
6  * Contributions are licensed to the GENIVI Alliance under one or more
7  * Contribution License Agreements.
8  *
9  * \copyright
10  * This Source Code Form is subject to the terms of the
11  * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with
12  * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
13  *
14  *
15  * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
16  *
17  * \file CAmControlSender.h
18  * For further information see http://www.genivi.org/.
19  *
20  */
21
22 #ifndef CONTROLSENDER_H_
23 #define CONTROLSENDER_H_
24
25 #ifdef UNIT_TEST
26 #include "../test/IAmControlBackdoor.h"
27 #endif
28
29 #include "control/IAmControlSend.h"
30
31 namespace am
32 {
33
34 /**
35  * sends data to the commandInterface, takes the file of the library that needs to be loaded
36  */
37 class CAmControlSender
38 {
39 public:
40     CAmControlSender(std::string controlPluginFile);
41     ~CAmControlSender();
42     am_Error_e startupController(IAmControlReceive* controlreceiveinterface) ;
43     void setControllerReady() ;
44     void setControllerRundown() ;
45     am_Error_e hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) ;
46     am_Error_e hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID) ;
47     am_Error_e hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty) ;
48     am_Error_e hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty) ;
49     am_Error_e hookUserSetSystemProperty(const am_SystemProperty_s& property) ;
50     am_Error_e hookUserVolumeChange(const am_sinkID_t SinkID, const am_mainVolume_t newVolume) ;
51     am_Error_e hookUserVolumeStep(const am_sinkID_t SinkID, const int16_t increment) ;
52     am_Error_e hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) ;
53     am_Error_e hookSystemRegisterDomain(const am_Domain_s& domainData, am_domainID_t& domainID) ;
54     am_Error_e hookSystemDeregisterDomain(const am_domainID_t domainID) ;
55     void hookSystemDomainRegistrationComplete(const am_domainID_t domainID) ;
56     am_Error_e hookSystemRegisterSink(const am_Sink_s& sinkData, am_sinkID_t& sinkID) ;
57     am_Error_e hookSystemDeregisterSink(const am_sinkID_t sinkID) ;
58     am_Error_e hookSystemRegisterSource(const am_Source_s& sourceData, am_sourceID_t& sourceID) ;
59     am_Error_e hookSystemDeregisterSource(const am_sourceID_t sourceID) ;
60     am_Error_e hookSystemRegisterGateway(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID) ;
61     am_Error_e hookSystemDeregisterGateway(const am_gatewayID_t gatewayID) ;
62     am_Error_e hookSystemRegisterCrossfader(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID) ;
63     am_Error_e hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID) ;
64     void hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume) ;
65     void hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume) ;
66     void hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState) ;
67     void hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s& availability) ;
68     void hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s& availability) ;
69     void hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state) ;
70     void hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s>& data) ;
71     void hookSystemSpeedChange(const am_speed_t speed) ;
72     void hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time) ;
73     void cbAckConnect(const am_Handle_s handle, const am_Error_e errorID) ;
74     void cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID) ;
75     void cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error) ;
76     void cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error) ;
77     void cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error) ;
78     void cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error) ;
79     void cbAckSetSourceSoundProperties(const am_Handle_s handle, const am_Error_e error) ;
80     void cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error) ;
81     void cbAckSetSinkSoundProperties(const am_Handle_s handle, const am_Error_e error) ;
82     void cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error) ;
83     am_Error_e getConnectionFormatChoice(const am_sourceID_t sourceID, const am_sinkID_t sinkID, const am_Route_s listRoute, const std::vector<am_ConnectionFormat_e> listPossibleConnectionFormats, std::vector<am_ConnectionFormat_e>& listPrioConnectionFormats) ;
84     void getInterfaceVersion(std::string& version) const ;
85     void confirmCommandReady() ;
86     void confirmRoutingReady() ;
87     void confirmCommandRundown() ;
88     void confirmRoutingRundown() ;
89
90 #ifdef UNIT_TEST
91     friend class IAmControlBackdoor;
92 #endif
93 private:
94     void* mlibHandle; //!< pointer to the loaded control plugin interface
95     IAmControlSend* mController; //!< pointer to the ControlSend interface
96 };
97
98 }
99
100 #endif /* CONTROLSENDER_H_ */