* Bug #100 - removed projecttypes.h which causes compiling conflicts
[profile/ivi/genivi/genivi-audio-manager.git] / include / command / IAmCommandReceive.h
1 /**\r
2  * Copyright (C) 2012 - 2014, BMW AG
3  *\r
4  * This file is part of GENIVI Project AudioManager.\r
5  *\r
6  * Contributions are licensed to the GENIVI Alliance under one or more\r
7  * Contribution License Agreements.\r
8  *\r
9  * \copyright\r
10  * This Source Code Form is subject to the terms of the\r
11  * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with\r
12  * this file, You can obtain one at http://mozilla.org/MPL/2.0/.\r
13  *\r
14  *\r
15  * \author Christian Linke, christian.linke@bmw.de BMW 2011 - 2014
16  *\r
17  * \file\r
18  * For further information see http://projects.genivi.org/audio-manager
19  *\r
20  * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. 
21  * PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN.
22  */\r
23 #if !defined(EA_FA7CC74B_CBCB_4356_89AE_B7F88A8CEC7F__INCLUDED_)
24 #define EA_FA7CC74B_CBCB_4356_89AE_B7F88A8CEC7F__INCLUDED_
25 \r
26 #include <vector>\r
27 #include <string>\r
28 #include "audiomanagertypes.h"\r
29 namespace am {\r
30 class CAmDbusWrapper;\r
31 class CAmSocketHandler;\r
32 }\r
33
34
35 #include "audiomanagertypes.h"
36
37 #define CommandReceiveVersion "2.0" 
38 namespace am {
39
40 /**
41  * The interface towards the Controlling Instance (e.g HMI). It handles the
42  * communication towards the HMI and other system components who need to interact
43  * with the audiomanagement.
44  * There are two rules that have to be kept in mind when implementing against this
45  * interface:\n
46  * \warning
47  * 1. CALLS TO THIS INTERFACE ARE NOT THREAD SAFE !!!! \n
48  * 2. YOU MAY NOT CALL THE CALLING INTERFACE DURING AN SYNCHRONOUS OR ASYNCHRONOUS
49  * CALL THAT EXPECTS A RETURN VALUE.\n
50  * \details
51  * Violation these rules may lead to unexpected behavior! Nevertheless you can
52  * implement thread safe by using the deferred-call pattern described on the wiki
53  * which also helps to implement calls that are forbidden.\n
54  * For more information, please check CAmSerializer
55  */
56 class IAmCommandReceive
57 {
58
59 public:
60         IAmCommandReceive() {
61
62         }
63
64         virtual ~IAmCommandReceive() {
65
66         }
67
68         virtual void getInterfaceVersion(std::string& version) const =0;
69         virtual am_Error_e connect(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID) =0;
70         virtual am_Error_e disconnect(const am_mainConnectionID_t mainConnectionID) =0;
71         virtual am_Error_e setVolume(const am_sinkID_t sinkID, const am_mainVolume_t volume) =0;
72         virtual am_Error_e volumeStep(const am_sinkID_t sinkID, const int16_t volumeStep) =0;
73         virtual am_Error_e setSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState) =0;
74         virtual am_Error_e setMainSinkSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID) =0;
75         virtual am_Error_e setMainSourceSoundProperty(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID) =0;
76         virtual am_Error_e setSystemProperty(const am_SystemProperty_s& property) =0;
77         virtual am_Error_e getListMainConnections(std::vector<am_MainConnectionType_s>& listConnections) const =0;
78         virtual am_Error_e getListMainSinks(std::vector<am_SinkType_s>& listMainSinks) const =0;
79         virtual am_Error_e getListMainSources(std::vector<am_SourceType_s>& listMainSources) const =0;
80         virtual am_Error_e getListMainSinkSoundProperties(const am_sinkID_t sinkID, std::vector<am_MainSoundProperty_s>& listSoundProperties) const =0;
81         virtual am_Error_e getListMainSourceSoundProperties(const am_sourceID_t sourceID, std::vector<am_MainSoundProperty_s>& listSourceProperties) const =0;
82         virtual am_Error_e getListSourceClasses(std::vector<am_SourceClass_s>& listSourceClasses) const =0;
83         virtual am_Error_e getListSinkClasses(std::vector<am_SinkClass_s>& listSinkClasses) const =0;
84         virtual am_Error_e getListSystemProperties(std::vector<am_SystemProperty_s>& listSystemProperties) const =0;
85         virtual am_Error_e getTimingInformation(const am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay) const =0;
86         virtual am_Error_e getDBusConnectionWrapper(CAmDbusWrapper*& dbusConnectionWrapper) const =0;
87         virtual am_Error_e getSocketHandler(CAmSocketHandler*& socketHandler) const =0;
88         virtual void confirmCommandReady(const uint16_t handle, const am_Error_e error) =0;
89         virtual void confirmCommandRundown(const uint16_t handle, const am_Error_e error) =0;
90         virtual am_Error_e getListMainSinkNotificationConfigurations(const am_sinkID_t sinkID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
91         virtual am_Error_e getListMainSourceNotificationConfigurations(const am_sourceID_t sourceID, std::vector<am_NotificationConfiguration_s>& listMainNotificationConfigurations) const =0;
92         virtual am_Error_e setMainSinkNotificationConfiguration(const am_sinkID_t sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
93         virtual am_Error_e setMainSourceNotificationConfiguration(const am_sourceID_t sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) =0;
94
95 };
96 }
97 #endif // !defined(EA_FA7CC74B_CBCB_4356_89AE_B7F88A8CEC7F__INCLUDED_)