summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfaceCAPI/test/CAmRoutingSenderService.h
blob: 8e858b401ba88d83643b18d0ee0384cb11696fcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/**
 *  Copyright (c) 2012 BMW
 *
 *  \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
 *
 *  \copyright
 *  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,
 *  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,
 *  subject to the following conditions:
 *  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 *  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.
 *  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
 *  THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 *  For further information see http://www.genivi.org/.
 */

#ifndef CAMROUTINGSENDERSERVICE_H_
#define CAMROUTINGSENDERSERVICE_H_

#include "audiomanagertypes.h"
#include <org/genivi/am/RoutingControlStubDefault.h>
#include <org/genivi/am/RoutingControlObserverProxy.h>

/** 
 * GENERATED FROM CMAKE. PLEASE USE cmake/CAmRoutingSenderService.h.in IF YOU WANT TO MAKE CHANGES.
 */

namespace am {

using namespace CommonAPI;

class CAmCommonAPIWrapper;

/** 
 * THE FOLLOWING DEFINES ARE POPULATED FROM THE CMAKELISTS.TXT .
 */
#define CAPI_SENDER_INTERFACE  "org.genivi.audiomanger.routingsender" 
#define CAPI_SENDER_INSTANCE  	"org.genivi.routingsender"  
#define CAPI_SENDER_PATH 		"/org/genivi/audiomanger/routingsender"  

#define CAPI_ROUTING_INTERFACE  "org.genivi.audiomanger.routinginterface"
#define CAPI_ROUTING_INSTANCE   "org.genivi.audiomanger"
#define CAPI_ROUTING_PATH 		 "/org/genivi/audiomanger/routinginterface"


/** Test class implementing the routing sender service.
*
*	Please see cmake/CAmRoutingSenderService.h.in	
*/
class CAmRoutingSenderService : public org::genivi::am::RoutingControlStubDefault {

	org::genivi::am::am_Domain_s mDomainData;
	org::genivi::am::am_Handle_s mAbortedHandle;
	bool mIsServiceAvailable;
	bool mIsDomainRegistred;
	bool mIsReady;
	CAmCommonAPIWrapper *mpWrapper;
	std::shared_ptr<org::genivi::am::RoutingControlObserverProxy<> > mRoutingInterfaceProxy;

public:

	CAmRoutingSenderService();
	CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper);
	CAmRoutingSenderService(CAmCommonAPIWrapper * aWrapper, std::shared_ptr<org::genivi::am::RoutingControlObserverProxy<> > aProxy);
	virtual ~CAmRoutingSenderService();

	void onServiceStatusEvent(const CommonAPI::AvailabilityStatus& serviceStatus);
	void onRoutingReadyRundown();
	void onRoutingReadyEvent();
	void registerDomain();
	void setAbortHandle(org::genivi::am::am_Handle_s handle);
	org::genivi::am::am_Error_e errorForHandle(const org::genivi::am::am_Handle_s & handle);

	virtual void asyncSetSourceState(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_SourceState_e sourceState);

	virtual void setDomainState(org::genivi::am::am_domainID_t domainID, org::genivi::am::am_DomainState_e domainState, org::genivi::am::am_Error_e& error);

	virtual void asyncSetSourceVolume(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_volume_t volume, org::genivi::am::am_RampType_pe ramp, org::genivi::am::am_time_t time);

	virtual void asyncSetSinkVolume(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_volume_t volume, org::genivi::am::am_RampType_pe ramp, org::genivi::am::am_time_t time);

	virtual void asyncConnect(org::genivi::am::am_Handle_s handle, org::genivi::am::am_connectionID_t connectionID, org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_ConnectionFormat_pe connectionFormat);

	virtual void asyncDisconnect(org::genivi::am::am_Handle_s handle, org::genivi::am::am_connectionID_t connectionID);

	virtual void asyncAbort(org::genivi::am::am_Handle_s handle);

	virtual void asyncSetSinkSoundProperties(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_SoundProperty_L listSoundProperties);

	virtual void asyncSetSinkSoundProperty(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_SoundProperty_s soundProperty);

	virtual void asyncSetSourceSoundProperties(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_SoundProperty_L listSoundProperties);

	virtual void asyncSetSourceSoundProperty(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_SoundProperty_s soundProperty);

	virtual void asyncCrossFade(org::genivi::am::am_Handle_s handle, org::genivi::am::am_crossfaderID_t crossfaderID, org::genivi::am::am_HotSink_e hotSink, org::genivi::am::am_RampType_pe rampType, org::genivi::am::am_time_t time);

	virtual void asyncSetVolumes(org::genivi::am::am_Handle_s handle, org::genivi::am::am_Volumes_L volumes);

	virtual void asyncSetSinkNotificationConfiguration(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sinkID_t sinkID, org::genivi::am::am_NotificationConfiguration_s notificationConfiguration);

	virtual void asyncSetSourceNotificationConfiguration(org::genivi::am::am_Handle_s handle, org::genivi::am::am_sourceID_t sourceID, org::genivi::am::am_NotificationConfiguration_s notificationConfiguration);

	static const char * ROUTING_SENDER_SERVICE;
	static const char * ROUTING_INTERFACE_SERVICE;
};


} /* namespace am */
#endif /* CAMROUTINGSENDERSERVICE_H_ */