* Typo: Dbus address fixed.
[profile/ivi/genivi/genivi-audio-manager.git] / PluginCommandInterfaceCAPI / src-gen / org / genivi / am / CommandControlStubDefault.cpp
1 /*
2 * This file was generated by the CommonAPI Generators. 
3 * Used org.genivi.commonapi.core 2.1.2.201309301424.
4 * Used org.franca.core 0.8.9.201308271211.
5 *
6 *  Copyright (c) 2012 BMW
7 *  
8 *   \author Aleksandar Donchev, aleksander.donchev@partner.bmw.de BMW 2013
9 *  
10 *   \copyright
11 *   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,
12 *   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,
13 *   subject to the following conditions:
14 *   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
15 *   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.
16 *   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
17 *   THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18 *    For further information see http://www.genivi.org/.
19 *  
20 */
21 #include <org/genivi/am/CommandControlStubDefault.h>
22
23 namespace org {
24 namespace genivi {
25 namespace am {
26
27 CommandControlStubDefault::CommandControlStubDefault():
28         remoteEventHandler_(this) {
29 }
30
31 CommandControlStubRemoteEvent* CommandControlStubDefault::initStubAdapter(const std::shared_ptr<CommandControlStubAdapter>& stubAdapter) {
32     stubAdapter_ = stubAdapter;
33     return &remoteEventHandler_;
34 }
35
36
37 /**
38  * connects a source to sink
39 (at)return E_OK on success, E_NOT_POSSIBLE on
40  *  failure, E_ALREADY_EXISTS if the connection does already exists
41  */
42 void CommandControlStubDefault::connect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) {
43     // Call old style methods in default 
44     connect(sourceID, sinkID, mainConnectionID, error);
45 }
46 void CommandControlStubDefault::connect(am_sourceID_t sourceID, am_sinkID_t sinkID, am_mainConnectionID_t& mainConnectionID, am_Error_e& error) {
47     // No operation in default
48 }
49
50 /**
51  * disconnects a mainConnection
52 (at)return E_OK on successes, E_NON_EXISTENT if
53  *  the connection does not exist, E_NOT_POSSIBLE on error.
54  */
55 void CommandControlStubDefault::disconnect(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_Error_e& error) {
56     // Call old style methods in default 
57     disconnect(mainConnectionID, error);
58 }
59 void CommandControlStubDefault::disconnect(am_mainConnectionID_t mainConnectionID, am_Error_e& error) {
60     // No operation in default
61 }
62
63 /**
64  * sets the volume for a sink
65 (at)return E_OK on success, E_UNKOWN on error,
66  *  E_OUT_OF_RANGE in case the value is out of range
67  */
68 void CommandControlStubDefault::setVolume(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_mainVolume_t volume, am_Error_e& error) {
69     // Call old style methods in default 
70     setVolume(sinkID, volume, error);
71 }
72 void CommandControlStubDefault::setVolume(am_sinkID_t sinkID, am_mainVolume_t volume, am_Error_e& error) {
73     // No operation in default
74 }
75
76 /**
77  * This function is used to increment or decrement the current volume for a
78  *  sink.
79 (at)return E_OK on success, E_UNKNOWN on error and E_OUT_OF_RANGE if
80  *  the value is not in the given volume range.
81  */
82 void CommandControlStubDefault::volumeStep(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, int16_t volumeStep_, am_Error_e& error) {
83     // Call old style methods in default 
84     volumeStep(sinkID, volumeStep_, error);
85 }
86 void CommandControlStubDefault::volumeStep(am_sinkID_t sinkID, int16_t volumeStep_, am_Error_e& error) {
87     // No operation in default
88 }
89
90 /**
91  * sets the mute state of a sink
92 (at)return E_OK on success, E_UNKNOWN on error.
93  *  If the mute state is already the desired one, the Daemon will return E_OK.
94  */
95 void CommandControlStubDefault::setSinkMuteState(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MuteState_e muteState, am_Error_e& error) {
96     // Call old style methods in default 
97     setSinkMuteState(sinkID, muteState, error);
98 }
99 void CommandControlStubDefault::setSinkMuteState(am_sinkID_t sinkID, am_MuteState_e muteState, am_Error_e& error) {
100     // No operation in default
101 }
102
103 /**
104  * This method is used to set sound properties, e.g. Equalizer Values. Since the
105  *  capabilities of the system can differ, the exact key value pairs can be
106  *  extended in each product
107 (at)return E_OK on success, E_OUT_OF_RANGE if value
108  *  exceeds range, E_UNKNOWN in case of an error
109  */
110 void CommandControlStubDefault::setMainSinkSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_s soundProperty, am_Error_e& error) {
111     // Call old style methods in default 
112     setMainSinkSoundProperty(sinkID, soundProperty, error);
113 }
114 void CommandControlStubDefault::setMainSinkSoundProperty(am_sinkID_t sinkID, am_MainSoundProperty_s soundProperty, am_Error_e& error) {
115     // No operation in default
116 }
117
118 /**
119  * This method is used to set sound properties, e.g. Equalizer Values. Since the
120  *  capabilities of the system can differ, the exact key value pairs can be
121  *  extended in each product
122 (at)return E_OK on success, E_OUT_OF_RANGE if value
123  *  exceeds range, E_UNKNOWN in case of an error
124  */
125 void CommandControlStubDefault::setMainSourceSoundProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_s soundProperty, am_Error_e& error) {
126     // Call old style methods in default 
127     setMainSourceSoundProperty(sourceID, soundProperty, error);
128 }
129 void CommandControlStubDefault::setMainSourceSoundProperty(am_sourceID_t sourceID, am_MainSoundProperty_s soundProperty, am_Error_e& error) {
130     // No operation in default
131 }
132
133 /**
134  * is used to set a specific system property.
135 (at)return E_OK on success,
136  *  E_OUT_OF_RANGE if value exceeds range, E_UNKNOWN in case of an error
137  */
138 void CommandControlStubDefault::setSystemProperty(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_s property, am_Error_e& error) {
139     // Call old style methods in default 
140     setSystemProperty(property, error);
141 }
142 void CommandControlStubDefault::setSystemProperty(am_SystemProperty_s property, am_Error_e& error) {
143     // No operation in default
144 }
145
146 /**
147  * returns the actual list of MainConnections
148 (at)return E_OK on success,
149  *  E_DATABASE_ERROR on error
150  */
151 void CommandControlStubDefault::getListMainConnections(const std::shared_ptr<CommonAPI::ClientId> clientId, am_MainConnection_L& listConnections, am_Error_e& error) {
152     // Call old style methods in default 
153     getListMainConnections(listConnections, error);
154 }
155 void CommandControlStubDefault::getListMainConnections(am_MainConnection_L& listConnections, am_Error_e& error) {
156     // No operation in default
157 }
158
159 /**
160  * returns the actual list of Sinks
161 (at)return E_OK on success, E_DATABASE_ERROR
162  *  on error
163  */
164 void CommandControlStubDefault::getListMainSinks(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkType_L& listMainSinks, am_Error_e& error) {
165     // Call old style methods in default 
166     getListMainSinks(listMainSinks, error);
167 }
168 void CommandControlStubDefault::getListMainSinks(am_SinkType_L& listMainSinks, am_Error_e& error) {
169     // No operation in default
170 }
171
172 /**
173  * returns the actual list of Sources
174 (at)return E_OK on success,
175  *  E_DATABASE_ERROR on error
176  */
177 void CommandControlStubDefault::getListMainSources(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceType_L& listMainSources, am_Error_e& error) {
178     // Call old style methods in default 
179     getListMainSources(listMainSources, error);
180 }
181 void CommandControlStubDefault::getListMainSources(am_SourceType_L& listMainSources, am_Error_e& error) {
182     // No operation in default
183 }
184
185 /**
186  * This is used to retrieve all source sound properties related to a source.
187  *  Returns a vector of the sound properties and values as pair
188 (at)return E_OK
189  *  on success, E_DATABASE_ERROR on error
190  */
191 void CommandControlStubDefault::getListMainSinkSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) {
192     // Call old style methods in default 
193     getListMainSinkSoundProperties(sinkID, listSoundProperties, error);
194 }
195 void CommandControlStubDefault::getListMainSinkSoundProperties(am_sinkID_t sinkID, am_MainSoundProperty_L& listSoundProperties, am_Error_e& error) {
196     // No operation in default
197 }
198
199 /**
200  * This is used to retrieve all source sound properties related to a
201  *  source.
202 (at)return E_OK on success, E_DATABASE_ERROR on error
203  */
204 void CommandControlStubDefault::getListMainSourceSoundProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) {
205     // Call old style methods in default 
206     getListMainSourceSoundProperties(sourceID, listSourceProperties, error);
207 }
208 void CommandControlStubDefault::getListMainSourceSoundProperties(am_sourceID_t sourceID, am_MainSoundProperty_L& listSourceProperties, am_Error_e& error) {
209     // No operation in default
210 }
211
212 /**
213  * This is used to retrieve SourceClass Information of all source classes
214  *  
215 (at)return E_OK on success, E_DATABASE_ERROR on error
216  */
217 void CommandControlStubDefault::getListSourceClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SourceClass_L& listSourceClasses, am_Error_e& error) {
218     // Call old style methods in default 
219     getListSourceClasses(listSourceClasses, error);
220 }
221 void CommandControlStubDefault::getListSourceClasses(am_SourceClass_L& listSourceClasses, am_Error_e& error) {
222     // No operation in default
223 }
224
225 /**
226  * This is used to retrieve SinkClass Information of all sink classes 
227 (at)return
228  *  E_OK on success, E_DATABASE_ERROR on error
229  */
230 void CommandControlStubDefault::getListSinkClasses(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SinkClass_L& listSinkClasses, am_Error_e& error) {
231     // Call old style methods in default 
232     getListSinkClasses(listSinkClasses, error);
233 }
234 void CommandControlStubDefault::getListSinkClasses(am_SinkClass_L& listSinkClasses, am_Error_e& error) {
235     // No operation in default
236 }
237
238 /**
239  * Retrieves a complete list of all systemProperties.
240 (at)return E_OK on success,
241  *  E_DATABASE_ERROR on error
242  */
243 void CommandControlStubDefault::getListSystemProperties(const std::shared_ptr<CommonAPI::ClientId> clientId, am_SystemProperty_L& listSystemProperties, am_Error_e& error) {
244     // Call old style methods in default 
245     getListSystemProperties(listSystemProperties, error);
246 }
247 void CommandControlStubDefault::getListSystemProperties(am_SystemProperty_L& listSystemProperties, am_Error_e& error) {
248     // No operation in default
249 }
250
251 /**
252  * returns the delay in ms that the audiopath for the given mainConnection
253  *  has
254 (at)return E_OK on success, E_NOT_POSSIBLE if timing information is not
255  *  yet retrieved, E_DATABASE_ERROR on read error on the database
256  */
257 void CommandControlStubDefault::getTimingInformation(const std::shared_ptr<CommonAPI::ClientId> clientId, am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay, am_Error_e& error) {
258     // Call old style methods in default 
259     getTimingInformation(mainConnectionID, delay, error);
260 }
261 void CommandControlStubDefault::getTimingInformation(am_mainConnectionID_t mainConnectionID, am_timeSync_t& delay, am_Error_e& error) {
262     // No operation in default
263 }
264
265 /**
266  * Retrieves the list of MainNotifications for a sink. Does not return the
267  *  possible ones.
268  */
269 void CommandControlStubDefault::getListMainSinkNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) {
270     // Call old style methods in default 
271     getListMainSinkNotificationConfigurations(sinkID, listMainNotificationConfigurations, error);
272 }
273 void CommandControlStubDefault::getListMainSinkNotificationConfigurations(am_sinkID_t sinkID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) {
274     // No operation in default
275 }
276
277 /**
278  * Retrieves the list of MainNotifications for a source. Does not return the
279  *  possible ones.
280  */
281 void CommandControlStubDefault::getListMainSourceNotificationConfigurations(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) {
282     // Call old style methods in default 
283     getListMainSourceNotificationConfigurations(sourceID, listMainNotificationConfigurations, error);
284 }
285 void CommandControlStubDefault::getListMainSourceNotificationConfigurations(am_sourceID_t sourceID, am_NotificationConfiguration_L& listMainNotificationConfigurations, am_Error_e& error) {
286     // No operation in default
287 }
288
289 /**
290  * sets a MainNotificationConfiuration. This can be used to turn on an off
291  *  notifications an to change the mode of the configuration.
292 (at)return E_OK on
293  *  success, E_NON_EXISTENT if sinkID does not exists, E_DATABASE_ERROR on error
294  */
295 void CommandControlStubDefault::setMainSinkNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sinkID_t sinkID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) {
296     // Call old style methods in default 
297     setMainSinkNotificationConfiguration(sinkID, mainNotificationConfiguration, error);
298 }
299 void CommandControlStubDefault::setMainSinkNotificationConfiguration(am_sinkID_t sinkID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) {
300     // No operation in default
301 }
302
303 /**
304  * sets a MainNotificationConfiuration. This can be used to turn on an off
305  *  notifications an to change the mode of the configuration.
306 (at)return E_OK on
307  *  success, E_NON_EXISTENT if sourceID does not exists, E_DATABASE_ERROR on error
308  */
309 void CommandControlStubDefault::setMainSourceNotificationConfiguration(const std::shared_ptr<CommonAPI::ClientId> clientId, am_sourceID_t sourceID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) {
310     // Call old style methods in default 
311     setMainSourceNotificationConfiguration(sourceID, mainNotificationConfiguration, error);
312 }
313 void CommandControlStubDefault::setMainSourceNotificationConfiguration(am_sourceID_t sourceID, am_NotificationConfiguration_s mainNotificationConfiguration, am_Error_e& error) {
314     // No operation in default
315 }
316
317
318 /**
319  * Callback that is called when the number of connections change
320  */
321 void CommandControlStubDefault::fireNewMainConnectionEvent(const am_MainConnectionType_s& mainConnection) {
322     stubAdapter_->fireNewMainConnectionEvent(mainConnection);
323 }
324 /**
325  * Callback that is called when the number of connections change
326  */
327 void CommandControlStubDefault::fireRemovedMainConnectionEvent(const am_mainConnectionID_t& mainConnection) {
328     stubAdapter_->fireRemovedMainConnectionEvent(mainConnection);
329 }
330 /**
331  * Callback that is called when the number of sinks change
332  */
333 void CommandControlStubDefault::fireNewSinkEvent(const am_SinkType_s& sink) {
334     stubAdapter_->fireNewSinkEvent(sink);
335 }
336 /**
337  * Callback that is called when the number of sinks change
338  */
339 void CommandControlStubDefault::fireRemovedSinkEvent(const am_sinkID_t& sinkID) {
340     stubAdapter_->fireRemovedSinkEvent(sinkID);
341 }
342 /**
343  * Callback that is called when the number of sources change
344  */
345 void CommandControlStubDefault::fireNewSourceEvent(const am_SourceType_s& source) {
346     stubAdapter_->fireNewSourceEvent(source);
347 }
348 /**
349  * Callback that is called when the number of sources change
350  */
351 void CommandControlStubDefault::fireRemovedSourceEvent(const am_sourceID_t& source) {
352     stubAdapter_->fireRemovedSourceEvent(source);
353 }
354 /**
355  * this callback is fired if the number of sink classes changed
356  */
357 void CommandControlStubDefault::fireNumberOfSinkClassesChangedEvent() {
358     stubAdapter_->fireNumberOfSinkClassesChangedEvent();
359 }
360 /**
361  * this callback is fired if the number of source classes changed
362  */
363 void CommandControlStubDefault::fireNumberOfSourceClassesChangedEvent() {
364     stubAdapter_->fireNumberOfSourceClassesChangedEvent();
365 }
366 /**
367  * This callback is called when the ConnectionState of a connection changed.
368  */
369 void CommandControlStubDefault::fireMainConnectionStateChangedEvent(const am_mainConnectionID_t& connectionID, const am_ConnectionState_e& connectionState) {
370     stubAdapter_->fireMainConnectionStateChangedEvent(connectionID, connectionState);
371 }
372 /**
373  * this callback indicates that a sinkSoundProperty has changed.
374  */
375 void CommandControlStubDefault::fireMainSinkSoundPropertyChangedEvent(const am_sinkID_t& sinkID, const am_MainSoundProperty_s& soundProperty) {
376     stubAdapter_->fireMainSinkSoundPropertyChangedEvent(sinkID, soundProperty);
377 }
378 /**
379  * this callback indicates that a sourceSoundProperty has changed.
380  */
381 void CommandControlStubDefault::fireMainSourceSoundPropertyChangedEvent(const am_sourceID_t& sourceID, const am_MainSoundProperty_s& soundProperty) {
382     stubAdapter_->fireMainSourceSoundPropertyChangedEvent(sourceID, soundProperty);
383 }
384 /**
385  * this callback is called when the availability of a sink has changed
386  */
387 void CommandControlStubDefault::fireSinkAvailabilityChangedEvent(const am_sinkID_t& sinkID, const am_Availability_s& availability) {
388     stubAdapter_->fireSinkAvailabilityChangedEvent(sinkID, availability);
389 }
390 /**
391  * this callback is called when the availability of source has changed.
392  */
393 void CommandControlStubDefault::fireSourceAvailabilityChangedEvent(const am_sourceID_t& sourceID, const am_Availability_s& availability) {
394     stubAdapter_->fireSourceAvailabilityChangedEvent(sourceID, availability);
395 }
396 /**
397  * this callback indicates a volume change on the indicated sink
398  */
399 void CommandControlStubDefault::fireVolumeChangedEvent(const am_sinkID_t& sinkID, const am_mainVolume_t& volume) {
400     stubAdapter_->fireVolumeChangedEvent(sinkID, volume);
401 }
402 /**
403  * this callback indicates a mute state change on a sink.
404  */
405 void CommandControlStubDefault::fireSinkMuteStateChangedEvent(const am_sinkID_t& sinkID, const am_MuteState_e& muteState) {
406     stubAdapter_->fireSinkMuteStateChangedEvent(sinkID, muteState);
407 }
408 /**
409  * is fired if a systemProperty changed
410  */
411 void CommandControlStubDefault::fireSystemPropertyChangedEvent(const am_SystemProperty_s& systemProperty) {
412     stubAdapter_->fireSystemPropertyChangedEvent(systemProperty);
413 }
414 /**
415  * This callback is fired if the timinginformation for a mainConnectionID changed
416  */
417 void CommandControlStubDefault::fireTimingInformationChangedEvent(const am_mainConnectionID_t& mainConnectionID, const am_timeSync_t& time) {
418     stubAdapter_->fireTimingInformationChangedEvent(mainConnectionID, time);
419 }
420 /**
421  * This callback is called when a sink is updated.
422  */
423 void CommandControlStubDefault::fireSinkUpdatedEvent(const am_sinkID_t& sinkID, const am_sinkClass_t& sinkClassID, const am_MainSoundProperty_L& listMainSoundProperties) {
424     stubAdapter_->fireSinkUpdatedEvent(sinkID, sinkClassID, listMainSoundProperties);
425 }
426 /**
427  * This callback is called when a source is updated.
428  */
429 void CommandControlStubDefault::fireSourceUpdatedEvent(const am_sourceID_t& sourceID, const am_sourceClass_t& sourceClassID, const am_MainSoundProperty_L& listMainSoundProperties) {
430     stubAdapter_->fireSourceUpdatedEvent(sourceID, sourceClassID, listMainSoundProperties);
431 }
432 /**
433  * This callback is called when a notificated value of a sink changes.
434  */
435 void CommandControlStubDefault::fireSinkNotificationEvent(const am_sinkID_t& sinkID, const am_NotificationPayload_s& notification) {
436     stubAdapter_->fireSinkNotificationEvent(sinkID, notification);
437 }
438 /**
439  * This callback is called when a notifcated value of a source changes.
440  */
441 void CommandControlStubDefault::fireSourceNotificationEvent(const am_sourceID_t& sourceID, const am_NotificationPayload_s& notification) {
442     stubAdapter_->fireSourceNotificationEvent(sourceID, notification);
443 }
444 /**
445  * This callback is triggered when a mainNotificationConfiguration is changed.
446  */
447 void CommandControlStubDefault::fireMainSinkNotificationConfigurationChangedEvent(const am_sinkID_t& sinkID, const am_NotificationConfiguration_s& mainNotificationConfiguration) {
448     stubAdapter_->fireMainSinkNotificationConfigurationChangedEvent(sinkID, mainNotificationConfiguration);
449 }
450 /**
451  * This callback is triggered when a mainNotificationConfiguration is changed.
452  */
453 void CommandControlStubDefault::fireMainSourceNotificationConfigurationChangedEvent(const am_sourceID_t& sourceID, const am_NotificationConfiguration_s& mainNotificationConfiguration) {
454     stubAdapter_->fireMainSourceNotificationConfigurationChangedEvent(sourceID, mainNotificationConfiguration);
455 }
456
457
458 CommandControlStubDefault::RemoteEventHandler::RemoteEventHandler(CommandControlStubDefault* defaultStub):
459         defaultStub_(defaultStub) {
460 }
461
462 } // namespace am
463 } // namespace genivi
464 } // namespace org