|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_RADIOAUDIOROUTER_H |
|
19 #define C_RADIOAUDIOROUTER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 #include "radioenginedef.h" |
|
24 |
|
25 // Forward declarations |
|
26 class CRadioRoutableAudio; |
|
27 class MRadioAudioRoutingObserver; |
|
28 |
|
29 /** |
|
30 * CRadioAudioRouter |
|
31 * |
|
32 * Contains functionality for playing and routing startup sound |
|
33 * |
|
34 */ |
|
35 NONSHARABLE_CLASS( CRadioAudioRouter ) : public CBase |
|
36 { |
|
37 public: |
|
38 |
|
39 IMPORT_C static CRadioAudioRouter* NewL( MRadioAudioRoutingObserver& aAudioRoutingObserver ); |
|
40 |
|
41 IMPORT_C ~CRadioAudioRouter(); |
|
42 |
|
43 /** |
|
44 * Sets audio route |
|
45 * |
|
46 * @param aAudioRoute new audio route |
|
47 */ |
|
48 IMPORT_C void SetAudioRouteL( RadioEngine::TRadioAudioRoute aAudioRoute ); |
|
49 |
|
50 /** |
|
51 * Register routable audio which routing will be changed via this class. |
|
52 * |
|
53 * @param aRoutableAudio audio which routing will be added to routable |
|
54 * audios. Ownership is not moved. |
|
55 */ |
|
56 IMPORT_C void RegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio ); |
|
57 |
|
58 /** |
|
59 * Removes registration of routable audio. |
|
60 * |
|
61 * @param aRoutableAudio audio which routing registration will be |
|
62 * removed. Ownership is not moved. |
|
63 */ |
|
64 IMPORT_C void UnRegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio ); |
|
65 |
|
66 private: |
|
67 |
|
68 CRadioAudioRouter( MRadioAudioRoutingObserver& aAudioRoutingObserver ); |
|
69 |
|
70 void ConstructL(); |
|
71 |
|
72 private: // data |
|
73 |
|
74 /** |
|
75 * Reference to audio routing observer. Gets informed when audio routing |
|
76 * is changed. |
|
77 */ |
|
78 MRadioAudioRoutingObserver& iAudioRoutingObserver; |
|
79 |
|
80 /** |
|
81 * Contains routable audios. |
|
82 */ |
|
83 RArray<CRadioRoutableAudio*> iRoutableAudios; |
|
84 |
|
85 }; |
|
86 |
|
87 #endif // C_RADIOAUDIOROUTER_H |