4 * Created on: Dec 9, 2011
8 #include "ControlSender.h"
9 #include "control/ControlSendInterface.h"
10 #include "control/ControlReceiveInterface.h"
11 #include "pluginTemplate.h"
14 std::string controlPluginFile= "/home/christian/workspace/gitserver/build/plugins/control/libPluginControlInterface.so";
16 ControlSender::ControlSender()
18 ControlSendInterface* (*createFunc)();
19 createFunc = getCreateFunction<ControlSendInterface*()>(controlPluginFile,mlibHandle);
21 assert(createFunc!=NULL);
23 mController = createFunc();
26 ControlSender::~ControlSender()
31 void ControlSender::hookAllPluginsLoaded()
33 mController->hookAllPluginsLoaded();
38 am_Error_e ControlSender::hookUserConnectionRequest(const am_sourceID_t sourceID, const am_sinkID_t sinkID, am_mainConnectionID_t & mainConnectionID)
40 return mController->hookUserConnectionRequest(sourceID,sinkID,mainConnectionID);
45 am_Error_e ControlSender::hookUserDisconnectionRequest(const am_mainConnectionID_t connectionID)
47 return mController->hookUserDisconnectionRequest(connectionID);
52 am_Error_e ControlSender::hookUserSetMainSinkSoundProperty(const am_sinkID_t sinkID, const am_MainSoundProperty_s & soundProperty)
54 return mController->hookUserSetMainSinkSoundProperty(sinkID,soundProperty);
59 am_Error_e ControlSender::hookUserSetMainSourceSoundProperty(const am_sourceID_t sourceID, const am_MainSoundProperty_s & soundProperty)
61 return mController->hookUserSetMainSourceSoundProperty(sourceID,soundProperty);
66 am_Error_e ControlSender::hookUserSetSystemProperty(const am_SystemProperty_s & property)
68 return mController->hookUserSetSystemProperty(property);
73 am_Error_e ControlSender::hookUserVolumeChange(const am_sinkID_t sinkID, const am_mainVolume_t newVolume)
75 return mController->hookUserVolumeChange(sinkID,newVolume);
80 am_Error_e ControlSender::hookUserVolumeStep(const am_sinkID_t sinkID, const int16_t increment)
82 return mController->hookUserVolumeStep(sinkID,increment);
87 am_Error_e ControlSender::hookUserSetSinkMuteState(const am_sinkID_t sinkID, const am_MuteState_e muteState)
89 return mController->hookUserSetSinkMuteState(sinkID,muteState);
94 am_Error_e ControlSender::hookSystemRegisterDomain(const am_Domain_s & domainData, am_domainID_t & domainID)
96 return mController->hookSystemRegisterDomain(domainData,domainID);
101 am_Error_e ControlSender::hookSystemDeregisterDomain(const am_domainID_t domainID)
103 return mController->hookSystemDeregisterDomain(domainID);
108 void ControlSender::hookSystemDomainRegistrationComplete(const am_domainID_t domainID)
110 return mController->hookSystemDomainRegistrationComplete(domainID);
115 am_Error_e ControlSender::hookSystemRegisterSink(const am_Sink_s & sinkData, am_sinkID_t & sinkID)
117 return mController->hookSystemRegisterSink(sinkData,sinkID);
122 am_Error_e ControlSender::hookSystemDeregisterSink(const am_sinkID_t sinkID)
124 return mController->hookSystemDeregisterSink(sinkID);
129 am_Error_e ControlSender::hookSystemRegisterSource(const am_Source_s & sourceData, am_sourceID_t & sourceID)
131 return mController->hookSystemRegisterSource(sourceData,sourceID);
136 am_Error_e ControlSender::hookSystemDeregisterSource(const am_sourceID_t sourceID)
138 return mController->hookSystemDeregisterSource(sourceID);
143 am_Error_e ControlSender::hookSystemRegisterGateway(const am_Gateway_s & gatewayData, am_gatewayID_t & gatewayID)
145 return mController->hookSystemRegisterGateway(gatewayData,gatewayID);
150 am_Error_e ControlSender::hookSystemDeregisterGateway(const am_gatewayID_t gatewayID)
152 return mController->hookSystemDeregisterGateway(gatewayID);
157 am_Error_e ControlSender::hookSystemRegisterCrossfader(const am_Crossfader_s & crossfaderData, am_crossfaderID_t & crossfaderID)
159 return mController->hookSystemRegisterCrossfader(crossfaderData,crossfaderID);
164 am_Error_e ControlSender::hookSystemDeregisterCrossfader(const am_crossfaderID_t crossfaderID)
166 return mController->hookSystemDeregisterCrossfader(crossfaderID);
171 void ControlSender::hookSystemSinkVolumeTick(const am_Handle_s handle, const am_sinkID_t sinkID, const am_volume_t volume)
173 return mController->hookSystemSinkVolumeTick(handle,sinkID,volume);
178 void ControlSender::hookSystemSourceVolumeTick(const am_Handle_s handle, const am_sourceID_t sourceID, const am_volume_t volume)
180 return mController->hookSystemSourceVolumeTick(handle,sourceID,volume);
185 void ControlSender::hookSystemInterruptStateChange(const am_sourceID_t sourceID, const am_InterruptState_e interruptState)
187 return mController->hookSystemInterruptStateChange(sourceID,interruptState);
192 void ControlSender::hookSystemSinkAvailablityStateChange(const am_sinkID_t sinkID, const am_Availability_s & availability)
194 return mController->hookSystemSinkAvailablityStateChange(sinkID,availability);
199 void ControlSender::hookSystemSourceAvailablityStateChange(const am_sourceID_t sourceID, const am_Availability_s & availability)
201 return mController->hookSystemSourceAvailablityStateChange(sourceID,availability);
206 void ControlSender::hookSystemDomainStateChange(const am_domainID_t domainID, const am_DomainState_e state)
208 return mController->hookSystemDomainStateChange(domainID,state);
213 void ControlSender::hookSystemReceiveEarlyData(const std::vector<am_EarlyData_s> & data)
215 return mController->hookSystemReceiveEarlyData(data);
220 void ControlSender::hookSystemSpeedChange(const am_speed_t speed)
222 return mController->hookSystemSpeedChange(speed);
227 void ControlSender::hookSystemTimingInformationChanged(const am_mainConnectionID_t mainConnectionID, const am_timeSync_t time)
229 return mController->hookSystemTimingInformationChanged(mainConnectionID,time);
234 void ControlSender::cbAckConnect(const am_Handle_s handle, const am_Error_e errorID)
236 return mController->cbAckConnect(handle,errorID);
241 void ControlSender::cbAckDisconnect(const am_Handle_s handle, const am_Error_e errorID)
243 return mController->cbAckDisconnect(handle,errorID);
248 void ControlSender::cbAckCrossFade(const am_Handle_s handle, const am_HotSink_e hostsink, const am_Error_e error)
250 return mController->cbAckCrossFade(handle,hostsink,error);
255 void ControlSender::cbAckSetSinkVolumeChange(const am_Handle_s handle, const am_volume_t volume, const am_Error_e error)
257 return mController->cbAckSetSinkVolumeChange(handle,volume,error);
262 void ControlSender::cbAckSetSourceVolumeChange(const am_Handle_s handle, const am_volume_t voulme, const am_Error_e error)
264 return mController->cbAckSetSourceVolumeChange(handle,voulme,error);
269 void ControlSender::cbAckSetSourceState(const am_Handle_s handle, const am_Error_e error)
271 return mController->cbAckSetSourceState(handle,error);
276 void ControlSender::cbAckSetSourceSoundProperty(const am_Handle_s handle, const am_Error_e error)
278 return mController->cbAckSetSourceSoundProperty(handle,error);
283 am_Error_e ControlSender::startupController(ControlReceiveInterface *controlreceiveinterface)
285 return mController->startupController(controlreceiveinterface);
288 am_Error_e ControlSender::stopController()
290 return mController->stopController();
293 void ControlSender::cbAckSetSinkSoundProperty(const am_Handle_s handle, const am_Error_e error)
295 return mController->cbAckSetSinkSoundProperty(handle,error);