4 * Created on: Dec 9, 2011
8 #include "ControlSender.h"
9 #include "PluginTemplate.h"
13 ControlSender::ControlSender(std::string controlPluginFile)
17 ControlSendInterface* (*createFunc)();
18 createFunc = getCreateFunction<ControlSendInterface*()>(controlPluginFile,mlibHandle);
19 assert(createFunc!=NULL);
20 mController = createFunc();
23 ControlSender::~ControlSender()
28 void ControlSender::hookAllPluginsLoaded()
30 mController->hookAllPluginsLoaded();
35 am_Error_e ControlSender::hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
37 return mController->hookUserConnectionRequest(sourceID,sinkID,mainConnectionID);
42 am_Error_e ControlSender::hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID)
44 return mController->hookUserDisconnectionRequest(connectionID);
49 am_Error_e ControlSender::hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
51 return mController->hookUserSetMainSinkSoundProperty(sinkID,soundProperty);
56 am_Error_e ControlSender::hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s & soundProperty)
58 return mController->hookUserSetMainSourceSoundProperty(sourceID,soundProperty);
63 am_Error_e ControlSender::hookUserSetSystemProperty(const am_SystemProperty_s & property)
65 return mController->hookUserSetSystemProperty(property);
70 am_Error_e ControlSender::hookUserVolumeChange(const am_sinkID_t sinkID, const am_mainVolume_t newVolume)
72 return mController->hookUserVolumeChange(sinkID,newVolume);
77 am_Error_e ControlSender::hookUserVolumeStep(const am_sinkID_t sinkID, const int16_t increment)
79 return mController->hookUserVolumeStep(sinkID,increment);
84 am_Error_e ControlSender::hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
86 return mController->hookUserSetSinkMuteState(sinkID,muteState);
91 am_Error_e ControlSender::hookSystemRegisterDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
93 return mController->hookSystemRegisterDomain(domainData,domainID);
98 am_Error_e ControlSender::hookSystemDeregisterDomain(const am_domainID_t domainID)
100 return mController->hookSystemDeregisterDomain(domainID);
105 void ControlSender::hookSystemDomainRegistrationComplete(const am_domainID_t domainID)
107 return mController->hookSystemDomainRegistrationComplete(domainID);
112 am_Error_e ControlSender::hookSystemRegisterSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
114 return mController->hookSystemRegisterSink(sinkData,sinkID);
119 am_Error_e ControlSender::hookSystemDeregisterSink(const am_sinkID_t sinkID)
121 return mController->hookSystemDeregisterSink(sinkID);
126 am_Error_e ControlSender::hookSystemRegisterSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
128 return mController->hookSystemRegisterSource(sourceData,sourceID);
133 am_Error_e ControlSender::hookSystemDeregisterSource(const am_sourceID_t sourceID)
135 return mController->hookSystemDeregisterSource(sourceID);
140 am_Error_e ControlSender::hookSystemRegisterGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
142 return mController->hookSystemRegisterGateway(gatewayData,gatewayID);
147 am_Error_e ControlSender::hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)
149 return mController->hookSystemDeregisterGateway(gatewayID);
154 am_Error_e ControlSender::hookSystemRegisterCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
156 return mController->hookSystemRegisterCrossfader(crossfaderData,crossfaderID);
161 am_Error_e ControlSender::hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)
163 return mController->hookSystemDeregisterCrossfader(crossfaderID);
168 void ControlSender::hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
170 return mController->hookSystemSinkVolumeTick(handle,sinkID,volume);
175 void ControlSender::hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
177 return mController->hookSystemSourceVolumeTick(handle,sourceID,volume);
182 void ControlSender::hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
184 return mController->hookSystemInterruptStateChange(sourceID,interruptState);
189 void ControlSender::hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s & availability)
191 return mController->hookSystemSinkAvailablityStateChange(sinkID,availability);
196 void ControlSender::hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s & availability)
198 return mController->hookSystemSourceAvailablityStateChange(sourceID,availability);
203 void ControlSender::hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state)
205 return mController->hookSystemDomainStateChange(domainID,state);
210 void ControlSender::hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s> & data)
212 return mController->hookSystemReceiveEarlyData(data);
217 void ControlSender::hookSystemSpeedChange(const am_speed_t speed)
219 return mController->hookSystemSpeedChange(speed);
224 void ControlSender::hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
226 return mController->hookSystemTimingInformationChanged(mainConnectionID,time);
231 void ControlSender::cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)
233 return mController->cbAckConnect(handle,errorID);
238 void ControlSender::cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID)
240 return mController->cbAckDisconnect(handle,errorID);
245 void ControlSender::cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)
247 return mController->cbAckCrossFade(handle,hostsink,error);
252 void ControlSender::cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
254 return mController->cbAckSetSinkVolumeChange(handle,volume,error);
259 void ControlSender::cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
261 return mController->cbAckSetSourceVolumeChange(handle,volume,error);
266 void ControlSender::cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error)
268 return mController->cbAckSetSourceState(handle,error);
273 void ControlSender::cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
275 return mController->cbAckSetSourceSoundProperty(handle,error);
280 am_Error_e ControlSender::startupController(ControlReceiveInterface *controlreceiveinterface)
282 return mController->startupController(controlreceiveinterface);
285 am_Error_e ControlSender::stopController()
287 return mController->stopController();
290 void ControlSender::cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
292 return mController->cbAckSetSinkSoundProperty(handle,error);