1 /* |
|
2 * Copyright (c) 2007 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: Observes audio output routing changes |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef SYSAPAUDIOROUTINGONBSERVER_H |
|
20 #define SYSAPAUDIOROUTINGONBSERVER_H |
|
21 |
|
22 #include <MTelephonyAudioRoutingObserver.h> |
|
23 class CSysApAppUi; |
|
24 |
|
25 /** |
|
26 * ?one_line_short_description |
|
27 * |
|
28 * ?more_complete_description |
|
29 * |
|
30 * @lib ?library |
|
31 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
32 */ |
|
33 class CSysApAudioRoutingObserver : public CBase, |
|
34 public MTelephonyAudioRoutingObserver |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Symbian two-phased constructor. |
|
41 * |
|
42 * @param aSysApAppUi reference to System Application's application UI class |
|
43 */ |
|
44 static CSysApAudioRoutingObserver* NewL( CSysApAppUi& aSysApAppUi ); |
|
45 |
|
46 /** |
|
47 * Destructor. |
|
48 */ |
|
49 virtual ~CSysApAudioRoutingObserver(); |
|
50 |
|
51 /** |
|
52 * Returns whether audio output is routed to IHF. |
|
53 * |
|
54 * @since S60 3.2 |
|
55 * @return TBool ETrue audios routed to IHF |
|
56 * EFalse audios not routed to IHF. |
|
57 */ |
|
58 TBool IhfEnabled() const; |
|
59 |
|
60 private: // from MTelephonyAudioRoutingObserver |
|
61 /** |
|
62 * Signals that available audio outputs have changed. |
|
63 * |
|
64 * @since S60 3.2 |
|
65 * @param CTelephonyAudioRouting& aTelephonyAudioRouting reference. |
|
66 * @see MTelephonyAudioRoutingObserver::AvailableOutputsChanged |
|
67 */ |
|
68 virtual void AvailableOutputsChanged( CTelephonyAudioRouting& aTelephonyAudioRouting); |
|
69 |
|
70 /** |
|
71 * Signals that current output has changed. |
|
72 * |
|
73 * @since 60 3.2 |
|
74 * @param CTelephonyAudioRouting& aTelephonyAudioRouting reference. |
|
75 * @see MTelephonyAudioRoutingObserver::OutputChanged |
|
76 */ |
|
77 virtual void OutputChanged( CTelephonyAudioRouting& aTelephonyAudioRouting); |
|
78 |
|
79 /** |
|
80 * Signals that CTelephonyAudioRouting::SetOutputL request issued by this |
|
81 * application (on CTelephonyAudioRouting instance) was serviced by the |
|
82 * Adaptation. |
|
83 * |
|
84 * @since S60 3.2 |
|
85 * @param CTelephonyAudioRouting& aTelephonyAudioRouting reference. |
|
86 * @param aError KErrNone if output requested by application is set, else |
|
87 * system-wide error code. |
|
88 * @see MTelephonyAudioRoutingObserver::SetOutputComplete |
|
89 */ |
|
90 virtual void SetOutputComplete( CTelephonyAudioRouting& aTelephonyAudioRouting, TInt aError); |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * C++ default constructor. |
|
96 */ |
|
97 CSysApAudioRoutingObserver(); |
|
98 |
|
99 /** |
|
100 * Constructor. |
|
101 * |
|
102 * @param aSysApAppUi reference to System Application's application UI class |
|
103 */ |
|
104 CSysApAudioRoutingObserver( CSysApAppUi& aSysApAppUi ); |
|
105 |
|
106 /** |
|
107 * Symbian 2nd-phase constructor. |
|
108 */ |
|
109 void ConstructL(); |
|
110 |
|
111 private: // data |
|
112 |
|
113 /** |
|
114 * Telephony audio routing instance. |
|
115 * Own. |
|
116 */ |
|
117 CTelephonyAudioRouting* iTelephonyAudioRouting; |
|
118 |
|
119 /** |
|
120 * System Application application UI class. |
|
121 */ |
|
122 CSysApAppUi& iSysApAppUi; |
|
123 |
|
124 }; |
|
125 |
|
126 |
|
127 #endif // SYSAPAUDIOROUTINGONBSERVER_H |
|