first release !
[profile/ivi/genivi/genivi-audio-manager.git] / AudioManagerDaemon / test / database / MockInterfaces.h
1 /**
2 * Copyright (C) 2011, BMW AG
3 *
4 * GeniviAudioMananger AudioManagerDaemon
5 *
6 * \file MockInterfaces.h
7 *
8 * \date 20-Oct-2011 3:42:04 PM
9 * \author Christian Mueller (christian.ei.mueller@bmw.de)
10 *
11 * \section License
12 * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
13 * Copyright (C) 2011, BMW AG Christian Mueller  Christian.ei.mueller@bmw.de
14 *
15 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
17 * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
18 * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
19 * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
20 * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
21 * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
22 *
23 * THIS CODE HAS BEEN GENERATED BY ENTERPRISE ARCHITECT GENIVI MODEL. PLEASE CHANGE ONLY IN ENTERPRISE ARCHITECT AND GENERATE AGAIN
24 */
25
26 #ifndef MOCKROUTINGINTERFACE_H_
27 #define MOCKROUTINGINTERFACE_H_
28
29 #include <control/ControlSendInterface.h>
30 #include <command/CommandSendInterface.h>
31 #include <gtest/gtest.h>
32 #include <gmock/gmock.h>
33
34 namespace am {
35
36 class MockCommandSendInterface : public CommandSendInterface {
37  public:
38   MOCK_METHOD1(startupInterface,
39       am_Error_e(CommandReceiveInterface* commandreceiveinterface));
40   MOCK_METHOD0(stopInterface,
41       am_Error_e());
42   MOCK_METHOD0(cbCommunicationReady,
43       am_Error_e());
44   MOCK_METHOD0(cbCommunicationRundown,
45       am_Error_e());
46   MOCK_METHOD0(cbNumberOfMainConnectionsChanged,
47       void());
48   MOCK_METHOD0(cbNumberOfSinksChanged,
49       void());
50   MOCK_METHOD0(cbNumberOfSourcesChanged,
51       void());
52   MOCK_METHOD0(cbNumberOfSinkClassesChanged,
53       void());
54   MOCK_METHOD0(cbNumberOfSourceClassesChanged,
55       void());
56   MOCK_METHOD2(cbMainConnectionStateChanged,
57       void(const am_mainConnectionID_t connectionID, const am_ConnectionState_e connectionState));
58   MOCK_METHOD2(cbMainSinkSoundPropertyChanged,
59       void(const am_sinkID_t sinkID, const am_MainSoundProperty_s soundProperty));
60   MOCK_METHOD2(cbMainSourceSoundPropertyChanged,
61       void(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty));
62   MOCK_METHOD2(cbSinkAvailabilityChanged,
63       void(const am_sinkID_t sinkID, const am_Availability_s& availability));
64   MOCK_METHOD2(cbSourceAvailabilityChanged,
65       void(const am_sourceID_t sourceID, const am_Availability_s& availability));
66   MOCK_METHOD2(cbVolumeChanged,
67       void(const am_sinkID_t sinkID, const am_mainVolume_t volume));
68   MOCK_METHOD2(cbSinkMuteStateChanged,
69       void(const am_sinkID_t sinkID, const am_MuteState_e muteState));
70   MOCK_METHOD1(cbSystemPropertyChanged,
71       void(const am_SystemProperty_s& systemProperty));
72   MOCK_METHOD2(cbTimingInformationChanged,
73       void(const am_mainConnectionID_t mainConnection, const am_timeSync_t time));
74 };
75
76
77
78 class MockControlSendInterface : public ControlSendInterface {
79  public:
80   MOCK_METHOD1(startupController,
81       am_Error_e(ControlReceiveInterface* controlreceiveinterface));
82   MOCK_METHOD0(stopController,
83       am_Error_e());
84   MOCK_METHOD0(hookAllPluginsLoaded,
85       void());
86   MOCK_METHOD3(hookUserConnectionRequest,
87       am_Error_e(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID));
88   MOCK_METHOD1(hookUserDisconnectionRequest,
89       am_Error_e(const am_mainConnectionID_t connectionID));
90   MOCK_METHOD2(hookUserSetMainSinkSoundProperty,
91       am_Error_e(const am_sinkID_t sinkID, const am_MainSoundProperty_s& soundProperty));
92   MOCK_METHOD2(hookUserSetMainSourceSoundProperty,
93       am_Error_e(const am_sourceID_t sourceID, const am_MainSoundProperty_s& soundProperty));
94   MOCK_METHOD1(hookUserSetSystemProperty,
95       am_Error_e(const am_SystemProperty_s& property));
96   MOCK_METHOD2(hookUserVolumeChange,
97       am_Error_e(const am_sinkID_t SinkID, const am_mainVolume_t newVolume));
98   MOCK_METHOD2(hookUserVolumeStep,
99       am_Error_e(const am_sinkID_t SinkID, const int16_t increment));
100   MOCK_METHOD2(hookUserSetSinkMuteState,
101       am_Error_e(const am_sinkID_t sinkID, const am_MuteState_e muteState));
102   MOCK_METHOD2(hookSystemRegisterDomain,
103       am_Error_e(const am_Domain_s& domainData, am_domainID_t& domainID));
104   MOCK_METHOD1(hookSystemDeregisterDomain,
105       am_Error_e(const am_domainID_t domainID));
106   MOCK_METHOD1(hookSystemDomainRegistrationComplete,
107       void(const am_domainID_t domainID));
108   MOCK_METHOD2(hookSystemRegisterSink,
109       am_Error_e(const am_Sink_s& sinkData, am_sinkID_t& sinkID));
110   MOCK_METHOD1(hookSystemDeregisterSink,
111       am_Error_e(const am_sinkID_t sinkID));
112   MOCK_METHOD2(hookSystemRegisterSource,
113       am_Error_e(const am_Source_s& sourceData, am_sourceID_t& sourceID));
114   MOCK_METHOD1(hookSystemDeregisterSource,
115       am_Error_e(const am_sourceID_t sourceID));
116   MOCK_METHOD2(hookSystemRegisterGateway,
117       am_Error_e(const am_Gateway_s& gatewayData, am_gatewayID_t& gatewayID));
118   MOCK_METHOD1(hookSystemDeregisterGateway,
119       am_Error_e(const am_gatewayID_t gatewayID));
120   MOCK_METHOD2(hookSystemRegisterCrossfader,
121       am_Error_e(const am_Crossfader_s& crossfaderData, am_crossfaderID_t& crossfaderID));
122   MOCK_METHOD1(hookSystemDeregisterCrossfader,
123       am_Error_e(const am_crossfaderID_t crossfaderID));
124   MOCK_METHOD3(hookSystemSinkVolumeTick,
125       void(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume));
126   MOCK_METHOD3(hookSystemSourceVolumeTick,
127       void(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume));
128   MOCK_METHOD2(hookSystemInterruptStateChange,
129       void(const am_sourceID_t sourceID, const am_InterruptState_e interruptState));
130   MOCK_METHOD2(hookSystemSinkAvailablityStateChange,
131       void(const am_sinkID_t sinkID, const am_Availability_s& availability));
132   MOCK_METHOD2(hookSystemSourceAvailablityStateChange,
133       void(const am_sourceID_t sourceID, const am_Availability_s& availability));
134   MOCK_METHOD2(hookSystemDomainStateChange,
135       void(const am_domainID_t domainID, const am_DomainState_e state));
136   MOCK_METHOD1(hookSystemReceiveEarlyData,
137       void(const std::vector<am_EarlyData_s>& data));
138   MOCK_METHOD1(hookSystemSpeedChange,
139       void(const am_speed_t speed));
140   MOCK_METHOD2(hookSystemTimingInformationChanged,
141       void(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time));
142   MOCK_METHOD2(cbAckConnect,
143       void(const am_Handle_s handle, const am_Error_e errorID));
144   MOCK_METHOD2(cbAckDisconnect,
145       void(const am_Handle_s handle, const am_Error_e errorID));
146   MOCK_METHOD3(cbAckCrossFade,
147       void(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error));
148   MOCK_METHOD3(cbAckSetSinkVolumeChange,
149       void(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error));
150   MOCK_METHOD3(cbAckSetSourceVolumeChange,
151       void(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error));
152   MOCK_METHOD2(cbAckSetSourceState,
153       void(const am_Handle_s handle, const am_Error_e error));
154   MOCK_METHOD2(cbAckSetSourceSoundProperty,
155       void(const am_Handle_s handle, const am_Error_e error));
156   MOCK_METHOD2(cbAckSetSinkSoundProperty,
157       void(const am_Handle_s handle, const am_Error_e error));
158 };
159
160 }  // namespace am
161
162
163
164 #endif /* MOCKROUTINGINTERFACE_H_ */