2 * Copyright (c) 2012 BMW
4 * \author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
8 * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9 * subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
12 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
13 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 * For further information see http://www.genivi.org/.
18 #ifndef MOCKCONTROLINTERFACE_H_
19 #define MOCKCONTROLINTERFACE_H_
21 #include "control/IAmControlReceive.h"
26 class MockIAmControlReceive : public IAmControlReceive {
28 MOCK_METHOD4(getRoute,
29 am_Error_e(const bool onlyfree, const am_sourceID_t sourceID, const am_sinkID_t sinkID, std::vector<am_Route_s>& returnList));
31 am_Error_e(am_Handle_s& handle, am_connectionID_t& connectionID, const am_ConnectionFormat_e format, const am_sourceID_t sourceID, const am_sinkID_t sinkID));
32 MOCK_METHOD2(disconnect,
33 am_Error_e(am_Handle_s& handle, const am_connectionID_t connectionID));
34 MOCK_METHOD5(crossfade,
35 am_Error_e(am_Handle_s& handle, const am_HotSink_e hotSource, const am_crossfaderID_t crossfaderID, const am_RampType_e rampType, const am_time_t rampTime));
36 MOCK_METHOD1(abortAction,
37 am_Error_e(const am_Handle_s handle));
38 MOCK_METHOD3(setSourceState,
39 am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SourceState_e state));
40 MOCK_METHOD5(setSinkVolume,
41 am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const am_volume_t volume, const am_RampType_e ramp, const am_time_t time));
42 MOCK_METHOD5(setSourceVolume,
43 am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_volume_t volume, const am_RampType_e rampType, const am_time_t time));
44 MOCK_METHOD3(setSinkSoundProperties,
45 am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const std::vector<am_SoundProperty_s>& soundProperty));
46 MOCK_METHOD3(setSinkSoundProperty,
47 am_Error_e(am_Handle_s& handle, const am_sinkID_t sinkID, const am_SoundProperty_s& soundProperty));
48 MOCK_METHOD3(setSourceSoundProperties,
49 am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const std::vector<am_SoundProperty_s>& soundProperty));
50 MOCK_METHOD3(setSourceSoundProperty,
51 am_Error_e(am_Handle_s& handle, const am_sourceID_t sourceID, const am_SoundProperty_s& soundProperty));
52 MOCK_METHOD2(setDomainState,
53 am_Error_e(const am_domainID_t domainID, const am_DomainState_e domainState));
54 MOCK_METHOD2(enterDomainDB,
55 am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID));
56 MOCK_METHOD2(enterMainConnectionDB,
57 am_Error_e(const am_MainConnection_s& mainConnectionData, am_mainConnectionID_t& connectionID));
58 MOCK_METHOD2(enterSinkDB,
59 am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID));
60 MOCK_METHOD2(enterCrossfaderDB,
61 am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID));
62 MOCK_METHOD2(enterGatewayDB,
63 am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID));
64 MOCK_METHOD2(enterSourceDB,
65 am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID));
66 MOCK_METHOD2(enterSinkClassDB,
67 am_Error_e(const am_SinkClass_s& sinkClass, am_sinkClass_t& sinkClassID));
68 MOCK_METHOD2(enterSourceClassDB,
69 am_Error_e(am_sourceClass_t& sourceClassID, const am_SourceClass_s& sourceClass));
70 MOCK_METHOD1(changeSinkClassInfoDB,
71 am_Error_e(const am_SinkClass_s& sinkClass));
72 MOCK_METHOD1(changeSourceClassInfoDB,
73 am_Error_e(const am_SourceClass_s& sourceClass));
74 MOCK_METHOD1(enterSystemPropertiesListDB,
75 am_Error_e(const std::vector<am_SystemProperty_s>& listSystemProperties));
76 MOCK_METHOD2(changeMainConnectionRouteDB,
77 am_Error_e(const am_mainConnectionID_t mainconnectionID, const std::vector<am_connectionID_t>& listConnectionID));
78 MOCK_METHOD2(changeMainConnectionStateDB,
79 am_Error_e(const am_mainConnectionID_t mainconnectionID, const am_ConnectionState_e connectionState));
80 MOCK_METHOD2(changeSinkMainVolumeDB,
81 am_Error_e(const am_mainVolume_t mainVolume, const am_sinkID_t sinkID));
82 MOCK_METHOD2(changeSinkAvailabilityDB,
83 am_Error_e(const am_Availability_s& availability, const am_sinkID_t sinkID));
84 MOCK_METHOD2(changDomainStateDB,
85 am_Error_e(const am_DomainState_e domainState, const am_domainID_t domainID));
86 MOCK_METHOD2(changeSinkMuteStateDB,
87 am_Error_e(const am_MuteState_e muteState, const am_sinkID_t sinkID));
88 MOCK_METHOD2(changeMainSinkSoundPropertyDB,
89 am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sinkID_t sinkID));
90 MOCK_METHOD2(changeMainSourceSoundPropertyDB,
91 am_Error_e(const am_MainSoundProperty_s& soundProperty, const am_sourceID_t sourceID));
92 MOCK_METHOD2(changeSourceAvailabilityDB,
93 am_Error_e(const am_Availability_s& availability, const am_sourceID_t sourceID));
94 MOCK_METHOD1(changeSystemPropertyDB,
95 am_Error_e(const am_SystemProperty_s& property));
96 MOCK_METHOD1(removeMainConnectionDB,
97 am_Error_e(const am_mainConnectionID_t mainConnectionID));
98 MOCK_METHOD1(removeSinkDB,
99 am_Error_e(const am_sinkID_t sinkID));
100 MOCK_METHOD1(removeSourceDB,
101 am_Error_e(const am_sourceID_t sourceID));
102 MOCK_METHOD1(removeGatewayDB,
103 am_Error_e(const am_gatewayID_t gatewayID));
104 MOCK_METHOD1(removeCrossfaderDB,
105 am_Error_e(const am_crossfaderID_t crossfaderID));
106 MOCK_METHOD1(removeDomainDB,
107 am_Error_e(const am_domainID_t domainID));
108 MOCK_METHOD1(removeSinkClassDB,
109 am_Error_e(const am_sinkClass_t sinkClassID));
110 MOCK_METHOD1(removeSourceClassDB,
111 am_Error_e(const am_sourceClass_t sourceClassID));
112 MOCK_CONST_METHOD2(getSourceClassInfoDB,
113 am_Error_e(const am_sourceID_t sourceID, am_SourceClass_s& classInfo));
114 MOCK_CONST_METHOD2(getSinkClassInfoDB,
115 am_Error_e(const am_sinkID_t sinkID, am_SinkClass_s& sinkClass));
116 MOCK_CONST_METHOD2(getSinkInfoDB,
117 am_Error_e(const am_sinkID_t sinkID, am_Sink_s& sinkData));
118 MOCK_CONST_METHOD2(getSourceInfoDB,
119 am_Error_e(const am_sourceID_t sourceID, am_Source_s& sourceData));
120 MOCK_CONST_METHOD2(getGatewayInfoDB,
121 am_Error_e(const am_gatewayID_t gatewayID, am_Gateway_s& gatewayData));
122 MOCK_CONST_METHOD2(getCrossfaderInfoDB,
123 am_Error_e(const am_crossfaderID_t crossfaderID, am_Crossfader_s& crossfaderData));
124 MOCK_CONST_METHOD2(getMainConnectionInfoDB,
125 am_Error_e(const am_mainConnectionID_t mainConnectionID, am_MainConnection_s& mainConnectionData));
126 MOCK_CONST_METHOD2(getListSinksOfDomain,
127 am_Error_e(const am_domainID_t domainID, std::vector<am_sinkID_t>& listSinkID));
128 MOCK_CONST_METHOD2(getListSourcesOfDomain,
129 am_Error_e(const am_domainID_t domainID, std::vector<am_sourceID_t>& listSourceID));
130 MOCK_CONST_METHOD2(getListCrossfadersOfDomain,
131 am_Error_e(const am_domainID_t domainID, std::vector<am_crossfaderID_t>& listCrossfadersID));
132 MOCK_CONST_METHOD2(getListGatewaysOfDomain,
133 am_Error_e(const am_domainID_t domainID, std::vector<am_gatewayID_t>& listGatewaysID));
134 MOCK_CONST_METHOD1(getListMainConnections,
135 am_Error_e(std::vector<am_MainConnection_s>& listMainConnections));
136 MOCK_CONST_METHOD1(getListDomains,
137 am_Error_e(std::vector<am_Domain_s>& listDomains));
138 MOCK_CONST_METHOD1(getListConnections,
139 am_Error_e(std::vector<am_Connection_s>& listConnections));
140 MOCK_CONST_METHOD1(getListSinks,
141 am_Error_e(std::vector<am_Sink_s>& listSinks));
142 MOCK_CONST_METHOD1(getListSources,
143 am_Error_e(std::vector<am_Source_s>& listSources));
144 MOCK_CONST_METHOD1(getListSourceClasses,
145 am_Error_e(std::vector<am_SourceClass_s>& listSourceClasses));
146 MOCK_CONST_METHOD1(getListHandles,
147 am_Error_e(std::vector<am_Handle_s>& listHandles));
148 MOCK_CONST_METHOD1(getListCrossfaders,
149 am_Error_e(std::vector<am_Crossfader_s>& listCrossfaders));
150 MOCK_CONST_METHOD1(getListGateways,
151 am_Error_e(std::vector<am_Gateway_s>& listGateways));
152 MOCK_CONST_METHOD1(getListSinkClasses,
153 am_Error_e(std::vector<am_SinkClass_s>& listSinkClasses));
154 MOCK_CONST_METHOD1(getListSystemProperties,
155 am_Error_e(std::vector<am_SystemProperty_s>& listSystemProperties));
156 MOCK_METHOD0(setCommandReady,
158 MOCK_METHOD0(setCommandRundown,
160 MOCK_METHOD0(setRoutingReady,
162 MOCK_METHOD0(setRoutingRundown,
164 MOCK_METHOD0(confirmControllerReady,
166 MOCK_METHOD0(confirmControllerRundown,
168 MOCK_METHOD1(getSocketHandler,
169 am_Error_e(CAmSocketHandler*& socketHandler));
170 MOCK_CONST_METHOD1(getInterfaceVersion,
171 void(std::string& version));