2cd6d6bc9385824905368c9362b3fad3e0b7b980
[profile/ivi/genivi/genivi-audio-manager.git] / PluginRoutingInterfaceCAPI / fidl / RoutingInterface.fidl
1 package org.genivi.am\r
2 import org.genivi.am.* from "../../AudioManagerDaemon/fidls/AudioManagerTypes.fidl"\r
3 \r
4 <**\r
5         @description : This class implements everything from Audiomanager -&gt; RoutingAdapter
6         @author : Christian Mueller
7 **>\r
8 \r
9 interface RoutingControl {\r
10         version {
11                 major 2
12                 minor 0
13         }
14 \r
15         <**
16                 @description : aborts an asynchronous action.
17 (at)return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if handle was not found\r
18         **>
19         method asyncAbort {
20                 in {
21                         am_Handle_s handle
22                 }
23         }
24
25         <**
26                 @description : connects a source to a sink
27 (at)return E_OK on success, E_UNKNOWN on error, E_WRONG_FORMAT in case am_ConnectionFormat_e does not match
28         **>
29         method asyncConnect {
30                 in {
31                         am_Handle_s handle
32                         am_connectionID_t connectionID
33                         am_sourceID_t sourceID
34                         am_sinkID_t sinkID
35                         am_CConnectionFormat_t connectionFormat
36                 }
37         }
38
39         <**
40                 @description : disconnect a connection with given connectionID
41 (at)return E_OK on success, E_UNKNOWN on error, E_NON_EXISTENT if connection was not found\r
42         **>
43         method asyncDisconnect {
44                 in {
45                         am_Handle_s handle
46                         am_connectionID_t connectionID
47                 }
48         }
49
50         <**
51                 @description : this method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly set the value. The difference is made through the ramptype.
52 (at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if new volume is out of range\r
53         **>
54         method asyncSetSinkVolume {
55                 in {
56                         am_Handle_s handle
57                         am_sinkID_t sinkID
58                         am_volume_t volume
59                         am_CRampType_t ramp
60                         am_time_t time
61                 }
62         }
63
64         <**
65                 @description : sets the volume of a source. This method is used to set the volume of a sink. This function is used to drive ramps, to mute or unmute or directly set the value. The difference is made through the ramptype.
66 (at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE if volume is out of range.\r
67 triggers the acknowledge ackSourceVolumeChange\r
68         **>
69         method asyncSetSourceVolume {
70                 in {
71                         am_Handle_s handle
72                         am_sourceID_t sourceID
73                         am_volume_t volume
74                         am_CRampType_t ramp
75                         am_time_t time
76                 }
77         }
78
79         <**
80                 @description : This function is used to set the source state of a particular source.
81 (at)return E_OK on success, E_UNKNOWN on error\r
82         **>
83         method asyncSetSourceState {
84                 in {
85                         am_Handle_s handle
86                         am_sourceID_t sourceID
87                         am_SourceState_e ^state
88                 }
89         }
90
91         <**
92                 @description : this function sets the sinksoundproperty.
93 (at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range\r
94         **>
95         method asyncSetSinkSoundProperties {
96                 in {
97                         am_Handle_s handle
98                         am_sinkID_t sinkID
99                         am_SoundProperty_L listSoundProperties
100                 }
101         }
102
103         <**
104                 @description : this function sets the sinksoundproperty.
105 (at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range\r
106         **>
107         method asyncSetSinkSoundProperty {
108                 in {
109                         am_Handle_s handle
110                         am_sinkID_t sinkID
111                         am_SoundProperty_s soundProperty
112                 }
113         }
114
115         <**
116                 @description : this function sets the sourcesoundproperty.
117 (at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range\r
118         **>
119         method asyncSetSourceSoundProperties {
120                 in {
121                         am_Handle_s handle
122                         am_sourceID_t sourceID
123                         am_SoundProperty_L listSoundProperties
124                 }
125         }
126
127         <**
128                 @description : this function sets the sourcesoundproperty.
129 (at)return E_OK on success, E_UNKNOWN on error, E_OUT_OF_RANGE in case the propery value is out of range\r
130         **>
131         method asyncSetSourceSoundProperty {
132                 in {
133                         am_Handle_s handle
134                         am_sourceID_t sourceID
135                         am_SoundProperty_s soundProperty
136                 }
137         }
138
139         <**
140                 @description : this function triggers crossfading.
141 (at)return E_OK on success, E_UNKNOWN on error\r
142         **>
143         method asyncCrossFade {
144                 in {
145                         am_Handle_s handle
146                         am_crossfaderID_t crossfaderID
147                         am_HotSink_e hotSink
148                         am_CRampType_t rampType
149                         am_time_t time
150                 }
151         }
152
153         <**
154                 @description : this function is used for early and late audio functions to set the domain state
155 (at)return E_OK on success, E_UNKNOWN on error\r
156         **>
157         method setDomainState {
158                 in {
159                         am_domainID_t domainID
160                         am_DomainState_e domainState
161                 }
162                 out {
163                         am_Error_e ^error
164                 }
165         }
166         method asyncSetVolumes {
167                 in {
168                         am_Handle_s handle
169                         am_Volumes_L volumes
170                 }
171         }
172         method asyncSetSinkNotificationConfiguration {
173                 in {
174                         am_Handle_s handle
175                         am_sinkID_t sinkID
176                         am_NotificationConfiguration_s notificationConfiguration
177                 }
178         }
179         method asyncSetSourceNotificationConfiguration {
180                 in {
181                         am_Handle_s handle
182                         am_sourceID_t sourceID
183                         am_NotificationConfiguration_s notificationConfiguration
184                 }
185         }
186 \r
187 }\r
188 \r
189 <**\r
190         @description : Routing Receive sendInterface description.
191         @author : Christian Mueller
192 **>\r
193 \r
194 interface RoutingControlObserver {\r
195         version {
196                 major 2
197                 minor 0
198         }
199 \r
200         <**
201                 @description : This attribute signals to the clients the current routing state.
202 A client should notify himself to this attribute in order to know the current state and act accordingly.\r
203         **>
204         attribute am_RoutingReady_e RoutingReady readonly
205
206         <**
207                 @description : acknowledges a asyncConnect
208         **>
209         method ackConnect {
210                 in {
211                         am_Handle_s handle
212                         am_connectionID_t connectionID
213
214                         <**
215                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
216                         **>
217                         am_Error_e ^error
218                 }
219         }
220
221         <**
222                 @description : acknowledges a asyncDisconnect
223         **>
224         method ackDisconnect {
225                 in {
226                         am_Handle_s handle
227                         am_connectionID_t connectionID
228
229                         <**
230                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
231                         **>
232                         am_Error_e ^error
233                 }
234         }
235
236         <**
237                 @description : acknowledges a asyncsetSinkVolume 
238         **>
239         method ackSetSinkVolumeChange {
240                 in {
241                         am_Handle_s handle
242
243                         <**
244                                 @description : The current actual value that is set 
245                         **>
246                         am_volume_t volume
247
248                         <**
249                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
250                         **>
251                         am_Error_e ^error
252                 }
253         }
254
255         <**
256                 @description : acknowledges a asyncsetSourceVolume
257         **>
258         method ackSetSourceVolumeChange {
259                 in {
260
261                         <**
262                                 @description : handle that belongs to the change 
263                         **>
264                         am_Handle_s handle
265
266                         <**
267                                 @description : the current volume
268                         **>
269                         am_volume_t volume
270
271                         <**
272                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
273                         **>
274                         am_Error_e ^error
275                 }
276         }
277
278         <**
279                 @description : acknowlegde for asyncSetSourceState
280         **>
281         method ackSetSourceState {
282                 in {
283                         am_Handle_s handle
284
285                         <**
286                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
287                         **>
288                         am_Error_e ^error
289                 }
290         }
291
292         <**
293                 @description : acknowledges asyncSetSinkSoundProperties
294         **>
295         method ackSetSinkSoundProperties {
296                 in {
297                         am_Handle_s handle
298
299                         <**
300                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
301                         **>
302                         am_Error_e ^error
303                 }
304         }
305
306         <**
307                 @description : acknowledges asyncSetSinkSoundProperty
308         **>
309         method ackSetSinkSoundProperty {
310                 in {
311                         am_Handle_s handle
312
313                         <**
314                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
315                         **>
316                         am_Error_e ^error
317                 }
318         }
319
320         <**
321                 @description : acknowledges asyncSetSourceSoundProperties
322         **>
323         method ackSetSourceSoundProperties {
324                 in {
325                         am_Handle_s handle
326
327                         <**
328                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
329                         **>
330                         am_Error_e ^error
331                 }
332         }
333
334         <**
335                 @description : acknowledges asyncSetSourceSoundProperty
336         **>
337         method ackSetSourceSoundProperty {
338                 in {
339                         am_Handle_s handle
340
341                         <**
342                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
343                         **>
344                         am_Error_e ^error
345                 }
346         }
347
348         <**
349                 @description : acknowledges asyncCrossFade
350         **>
351         method ackCrossFading {
352                 in {
353                         am_Handle_s handle
354
355                         <**
356                                 @description : this is the current hot sink, HS_INTERMEDIATE is here when a crossfading action did not reach the end
357                         **>
358                         am_HotSink_e hotSink
359
360                         <**
361                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
362                         **>
363                         am_Error_e ^error
364                 }
365         }
366
367         <**
368                 @description : acknowledges a volume tick. This can be used to display volumechanges during ramps
369         **>
370         method ackSourceVolumeTick {
371                 in {
372                         am_Handle_s handle
373                         am_sourceID_t sourceID
374                         am_volume_t volume
375                 }
376         }
377
378         <**
379                 @description : acknowledges a volume tick. This can be used to display volumechanges during ramps
380         **>
381         method ackSinkVolumeTick {
382                 in {
383                         am_Handle_s handle
384                         am_sinkID_t sinkID
385                         am_volume_t volume
386                 }
387         }
388
389         <**
390                 @description : This function returns the ID to the given domainName. If already a domain is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the domain. The other parameters of the domain will be overwritten when the domain is registered.
391 (at)return E_OK on success, E_UNKNOWN on error\r
392         **>
393         method peekDomain {
394                 in {
395                         String name
396                 }
397                 out {
398                         am_domainID_t domainID
399                         am_Error_e ^error
400                 }
401         }
402
403         <**
404                 @description : registers a domain
405 (at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error\r
406         **>
407         method registerDomain {
408                 in {
409
410                         <**
411                                 @description : domainID in am_Domain_s must be 0!
412                         **>
413                         am_Domain_s domainData
414                         String returnBusname
415                         String returnInterface
416                 }
417                 out {
418                         am_domainID_t domainID
419                         am_Error_e ^error
420                 }
421         }
422
423         <**
424                 @description : deregisters a domain. All sources, sinks, gateways and crossfaders from that domain will be removed as well.
425 (at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error\r
426         **>
427         method deregisterDomain {
428                 in {
429
430                         <**
431                                 @description : < the nonde of the bus
432                         **>
433                         am_domainID_t domainID
434                 }
435                 out {
436                         am_Error_e ^error
437                 }
438         }
439
440         <**
441                 @description : registers a gateway. (at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error
442         **>
443         method registerGateway {
444                 in {
445
446                         <**
447                                 @description : In a fixed setup, the gatewayID must be below 100. In a dynamic setup, the gatewayID shall be 0. listSourceFormats and listSinkFormats are empty at registration time. Values are taken over when sources and sinks are registered.
448
449
450                         **>
451                         am_Gateway_s gatewayData
452                 }
453                 out {
454                         am_gatewayID_t gatewayID
455                         am_Error_e ^error
456                 }
457         }
458
459         <**
460                 @description : deregisters a gateway. Also removes all sinks and sources of the controlling domain.
461 (at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error\r
462         **>
463         method deregisterGateway {
464                 in {
465
466                         <**
467                                 @description : domainID of the control domain
468                         **>
469                         am_gatewayID_t gatewayID
470                 }
471                 out {
472                         am_Error_e ^error
473                 }
474         }
475
476         <**
477                 @description : This function returns the ID to the given sinkName. If already a sink is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the sink. The other parameters of the sink will be overwritten when the sink is registered.
478 (at)return E_OK on success, E_UNKNOWN on error\r
479         **>
480         method peekSink {
481                 in {
482
483                         <**
484                                 @description : ID is not valid since not created yet
485                         **>
486                         String name
487                 }
488                 out {
489                         am_sinkID_t sinkID
490                         am_Error_e ^error
491                 }
492         }
493
494         <**
495                 @description : Registers a sink. If the sink is part of a gateway, the listconnectionFormats is copied to the gatewayInformation
496 (at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error\r
497         **>
498         method registerSink {
499                 in {
500
501                         <**
502                                 @description : In a fixed setup, the sinkID within am_Sink_s must be below 100. In a dynamic setup the sinkID must be 0 in am_Sink_s.
503                         **>
504                         am_Sink_s sinkData
505                 }
506                 out {
507                         am_sinkID_t sinkID
508                         am_Error_e ^error
509                 }
510         }
511
512         <**
513                 @description : deregisters a sink.
514 (at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error\r
515         **>
516         method deregisterSink {
517                 in {
518                         am_sinkID_t sinkID
519                 }
520                 out {
521                         am_Error_e ^error
522                 }
523         }
524
525         <**
526                 @description : This function returns the ID to the given sourceName. If already a source is registered with this name, it will return the corresponding ID, if not it will reserve an ID but not register the source. The other parameters of the source will be overwritten when the source is registered.
527 (at)return E_OK on success, E_UNKNOWN on error\r
528         **>
529         method peekSource {
530                 in {
531                         String name
532                 }
533                 out {
534                         am_sourceID_t sourceID
535                         am_Error_e ^error
536                 }
537         }
538
539         <**
540                 @description : registers a source.  If the source is part of a gateway, the listconnectionFormats is copied to the gatewayInformation
541 (at)return E_OK on success, E_UNKNOWN on error, E_ALREADY_EXIST if either name or sourceID already exists\r
542         **>
543         method registerSource {
544                 in {
545
546                         <**
547                                 @description : In a fixed setup, the sourceID within am_Source_s must be below 100. In a dynamic setup the sourceID must be 0 in am_Source_s
548                         **>
549                         am_Source_s sourceData
550                 }
551                 out {
552                         am_sourceID_t sourceID
553                         am_Error_e ^error
554                 }
555         }
556
557         <**
558                 @description : deregisters a source
559 (at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error\r
560         **>
561         method deregisterSource {
562                 in {
563                         am_sourceID_t sourceID
564                 }
565                 out {
566                         am_Error_e ^error
567                 }
568         }
569
570         <**
571                 @description : this function registers a crossfader.
572 (at)return E_OK on succes, E_ALREADY_EXISTENT if already registered E_UNKOWN on error\r
573         **>
574         method registerCrossfader {
575                 in {
576
577                         <**
578                                 @description : in a fixed setup, the crossfaderID must be below 100. In a dynamic setup the crossfasderID shall be 0
579                         **>
580                         am_Crossfader_s crossfaderData
581                 }
582                 out {
583                         am_crossfaderID_t crossfaderID
584                         am_Error_e ^error
585                 }
586         }
587
588         <**
589                 @description : this function deregisters a crossfader. removes all sources and sinks assiated as well.
590 (at)return E_OK on succes, E_NON_EXISTENT if not found E_UNKOWN on error\r
591         **>
592         method deregisterCrossfader {
593                 in {
594                         am_crossfaderID_t crossfaderID
595                 }
596                 out {
597                         am_Error_e ^error
598                 }
599         }
600
601         <**
602                 @description : this function peeks a sourceclassID. It is used by the RoutingPlugins to determine the SinkClassIDs of a sinkClass.
603 (at)return E_OK on succes, E_DATABASE_ERROR on error\r
604         **>
605         method peekSourceClassID {
606                 in {
607                         String name
608                 }
609                 out {
610                         am_sourceClass_t sourceClassID
611                         am_Error_e ^error
612                 }
613         }
614
615         <**
616                 @description : this function peeks a sourceclassID. It is used by the RoutingPlugins to determine the SinkClassIDs of a sinkClass.
617 (at)return E_OK on succes, E_DATABASE_ERROR on error\r
618         **>
619         method peekSinkClassID {
620                 in {
621                         String name
622                 }
623                 out {
624                         am_sinkClass_t sinkClassID
625                         am_Error_e ^error
626                 }
627         }
628
629         <**
630                 @description : is called when a low level interrupt changes it status.
631         **>
632         method hookInterruptStatusChange {
633                 in {
634                         am_sourceID_t sourceID
635                         am_InterruptState_e interruptState
636                 }
637         }
638
639         <**
640                 @description : This hook is called when all elements from a domain are registered.
641 Is used by the Controller to know when all expected domains are finally registered\r
642         **>
643         method hookDomainRegistrationComplete {
644                 in {
645                         am_domainID_t domainID
646                 }
647         }
648
649         <**
650                 @description : is called when a sink changes its availability
651         **>
652         method hookSinkAvailablityStatusChange {
653                 in {
654                         am_sinkID_t sinkID
655                         am_Availability_s availability
656                 }
657         }
658
659         <**
660                 @description : is called when a source changes its availability
661         **>
662         method hookSourceAvailablityStatusChange {
663                 in {
664                         am_sourceID_t sourceID
665                         am_Availability_s availability
666                 }
667         }
668
669         <**
670                 @description : is called when a domain changes its status. This used for early domains only
671         **>
672         method hookDomainStateChange {
673                 in {
674                         am_domainID_t domainID
675                         am_DomainState_e domainState
676                 }
677         }
678
679         <**
680                 @description : is called when the timinginformation (delay) changed for a connection.
681         **>
682         method hookTimingInformationChanged {
683                 in {
684                         am_connectionID_t connectionID
685                         am_timeSync_t delay
686                 }
687         }
688
689         <**
690                 @description : this function is used to send out all data that has been changed in an early state.
691 (at)return E_OK on success, E_UNKNOWN on error\r
692         **>
693         method sendChangedData {
694                 in {
695                         am_EarlyData_L earlyData
696                 }
697         }
698
699         <**
700                 @description : updates data of an gateway. (at)return E_OK on success, E_NON_EXISTENT if the gatewayID is not valid. 
701         **>
702         method updateGateway {
703                 in {
704
705                         <**
706                                 @description : This is the new gateway data that has been updated. Please note that changing source and sink IDs,
707
708                         **>
709                         am_gatewayID_t gatewayID
710                         am_ConnectionFormat_L listSourceFormats
711                         am_ConnectionFormat_L listSinkFormats
712                         am_Convertion_L convertionMatrix
713                 }
714                 out {
715                         am_Error_e ^error
716                 }
717         }
718
719         <**
720                 @description : updates data of an gateway. (at)return E_OK on success, E_NON_EXISTENT if the sinkID is not valid.
721         **>
722         method updateSink {
723                 in {
724
725                         <**
726                                 @description : The sinkID of the sink 
727                         **>
728                         am_sinkID_t sinkID
729                         am_sinkClass_t sinkClassID
730                         am_SoundProperty_L listSoundProperties
731                         am_ConnectionFormat_L listConnectionFormats
732                         am_MainSoundProperty_L listMainSoundProperties
733                 }
734                 out {
735                         am_Error_e ^error
736                 }
737         }
738
739         <**
740                 @description : updates data of an source. (at)return E_OK on success, E_NON_EXISTENT if the sourceID in the struct is not valid. 
741 Please note that only the following data out of am_Source_s have effect when they are changed:\r
742 sourceClassID,\r
743 listSoundProperties,\r
744 listConnectionFormats,\r
745 listMainSoundProperties\r
746         **>
747         method updateSource {
748                 in {
749
750                         <**
751                                 @description : the sourceID of the source
752                         **>
753                         am_sourceID_t sourceID
754                         am_sourceClass_t sourceClassID
755                         am_SoundProperty_L listSoundProperties
756                         am_ConnectionFormat_L listConnectionFormats
757                         am_MainSoundProperty_L listMainSoundProperties
758                 }
759                 out {
760                         am_Error_e ^error
761                 }
762         }
763
764         <**
765                 @description : acknowledges a asyncSetSinkVolumes
766         **>
767         method ackSetVolumes {
768                 in {
769                         am_Handle_s handle
770
771                         <**
772                                 @description : The list of volumes that have been set. ramp and time values have no meaning when the struct is used here.
773                         **>
774                         am_Volumes_L listvolumes
775
776                         <**
777                                 @description : E_OK on success, E_ABORTED if action was aborted, E_UNKNOWN on error
778                         **>
779                         am_Error_e ^error
780                 }
781         }
782
783         <**
784                 @description : The acknowledge of the SinkNotificationConfiguration
785         **>
786         method ackSinkNotificationConfiguration {
787                 in {
788                         am_Handle_s handle
789                         am_Error_e ^error
790                 }
791         }
792
793         <**
794                 @description : The acknowledge of the SourceNotificationConfiguration
795         **>
796         method ackSourceNotificationConfiguration {
797                 in {
798                         am_Handle_s handle
799                         am_Error_e ^error
800                 }
801         }
802
803         <**
804                 @description : is called whenever a notified value needs to be send
805         **>
806         method hookSinkNotificationDataChange {
807                 in {
808
809                         <**
810                                 @description : The sinkID of the sink where the data changed
811                         **>
812                         am_sinkID_t sinkID
813
814                         <**
815                                 @description : The payload
816                         **>
817                         am_NotificationPayload_s payload
818                 }
819         }
820
821         <**
822                 @description : is called whenever a notified value needs to be send
823         **>
824         method hookSourceNotificationDataChange {
825                 in {
826
827                         <**
828                                 @description : The sinkID of the sink where the data changed
829                         **>
830                         am_sourceID_t sourceID
831
832                         <**
833                                 @description : The payload
834                         **>
835                         am_NotificationPayload_s payload
836                 }
837         }
838         method confirmRoutingRundown {
839                 in {
840                         String domainName
841                 }
842         }
843 \r
844 }