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 */ |
|
33 NONSHARABLE_CLASS( CRadioAudioRouter ) : public CBase |
|
34 { |
|
35 public: |
|
36 |
|
37 IMPORT_C static CRadioAudioRouter* NewL( MRadioAudioRoutingObserver& aAudioRoutingObserver ); |
|
38 |
|
39 IMPORT_C ~CRadioAudioRouter(); |
|
40 |
|
41 /** |
|
42 * Sets audio route |
|
43 * |
|
44 * @param aAudioRoute new audio route |
|
45 */ |
|
46 IMPORT_C void SetAudioRouteL( RadioEngine::TRadioAudioRoute aAudioRoute ); |
|
47 |
|
48 /** |
|
49 * Register routable audio which routing will be changed via this class. |
|
50 * |
|
51 * @param aRoutableAudio audio which routing will be added to routable |
|
52 * audios. Ownership is not moved. |
|
53 */ |
|
54 IMPORT_C void RegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio ); |
|
55 |
|
56 /** |
|
57 * Removes registration of routable audio. |
|
58 * |
|
59 * @param aRoutableAudio audio which routing registration will be |
|
60 * removed. Ownership is not moved. |
|
61 */ |
|
62 IMPORT_C void UnRegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio ); |
|
63 |
|
64 private: |
|
65 |
|
66 CRadioAudioRouter( MRadioAudioRoutingObserver& aAudioRoutingObserver ); |
|
67 |
|
68 void ConstructL(); |
|
69 |
|
70 private: // data |
|
71 |
|
72 /** |
|
73 * Reference to audio routing observer. Gets informed when audio routing |
|
74 * is changed. |
|
75 */ |
|
76 MRadioAudioRoutingObserver& iAudioRoutingObserver; |
|
77 |
|
78 /** |
|
79 * Contains routable audios. |
|
80 */ |
|
81 RArray<CRadioRoutableAudio*> iRoutableAudios; |
|
82 |
|
83 }; |
|
84 |
|
85 #endif // C_RADIOAUDIOROUTER_H |
|