|
1 /* |
|
2 * Copyright (c) 2002-2004 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: This module contains the implementation of CPEAudioRoutingMonitor class |
|
15 * member functions |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDES |
|
21 #include <talogger.h> |
|
22 #include "cpeaudioroutingmonitor.h" |
|
23 #include "cpeaudiodata.h" |
|
24 |
|
25 // EXTERNAL DATA STRUCTURES |
|
26 // None. |
|
27 |
|
28 // EXTERNAL FUNCTION PROTOTYPES |
|
29 // None. |
|
30 |
|
31 // CONSTANTS |
|
32 // None |
|
33 |
|
34 // MACROS |
|
35 // None. |
|
36 |
|
37 // LOCAL CONSTANTS AND MACROS |
|
38 // None. |
|
39 |
|
40 // MODULE DATA STRUCTURES |
|
41 // None. |
|
42 |
|
43 // LOCAL FUNCTION PROTOTYPES |
|
44 // None. |
|
45 |
|
46 // ==================== LOCAL FUNCTIONS ===================================== |
|
47 //None. |
|
48 |
|
49 // ================= MEMBER FUNCTIONS ======================================= |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // CPEAudioRoutingMonitor::CPEAudioRoutingMonitor |
|
53 // C++ default constructor can NOT contain any code, that |
|
54 // might leave. |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 CPEAudioRoutingMonitor::CPEAudioRoutingMonitor( |
|
58 CPEAudioData& aOwner ) |
|
59 : iOwner( aOwner ) |
|
60 { |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CPEAudioRoutingMonitor::NewL |
|
65 // Two-phased constructor. |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 CPEAudioRoutingMonitor* CPEAudioRoutingMonitor::NewL( |
|
69 CPEAudioData& aOwner ) |
|
70 { |
|
71 CPEAudioRoutingMonitor* self = |
|
72 new ( ELeave ) CPEAudioRoutingMonitor( aOwner ); |
|
73 |
|
74 return self; |
|
75 } |
|
76 |
|
77 CPEAudioRoutingMonitor::~CPEAudioRoutingMonitor() |
|
78 { |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CPEAudioRoutingMonitor::AvailableOutputsChanged |
|
83 // AvailableOutput mode changed event received. |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 void CPEAudioRoutingMonitor::AvailableOutputsChanged( |
|
87 CTelephonyAudioRouting& aTelephonyAudioRouting ) |
|
88 { |
|
89 TEFLOGSTRING( KTAINT, |
|
90 "AUD CPEAudioRoutingMonitor::AvailableOutputsChanged" ); |
|
91 iOwner.SendMessage( MEngineMonitor::EPEMessageAvailableAudioOutputsChanged, |
|
92 aTelephonyAudioRouting ); |
|
93 } |
|
94 |
|
95 // ----------------------------------------------------------------------------- |
|
96 // CPEAudioRoutingMonitor::OutputChanged |
|
97 // Output mode changed event received. |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 void CPEAudioRoutingMonitor::OutputChanged( |
|
101 CTelephonyAudioRouting& aTelephonyAudioRouting ) |
|
102 { |
|
103 TEFLOGSTRING( KTAINT, "AUD CPEAudioRoutingMonitor::OutputChanged" ); |
|
104 iOwner.SendMessage( MEngineMonitor::EPEMessageAudioOutputChanged, |
|
105 aTelephonyAudioRouting.Output() ); |
|
106 } |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // CPEAudioRoutingMonitor::SetOutputComplete |
|
110 // OutputComplete mode changed event received. |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 void CPEAudioRoutingMonitor::SetOutputComplete( |
|
114 CTelephonyAudioRouting& aTelephonyAudioRouting, |
|
115 TInt aError ) |
|
116 { |
|
117 TEFLOGSTRING2( KTAINT, |
|
118 "AUD CPEAudioRoutingMonitor::SetOutputComplete, aError: %d", |
|
119 aError ); |
|
120 if ( aError == KErrNone ) |
|
121 { |
|
122 iOwner.SendMessage( MEngineMonitor::EPEMessageAudioOutputChanged, |
|
123 aTelephonyAudioRouting.Output() ); |
|
124 } |
|
125 else |
|
126 { |
|
127 TEFLOGSTRING( KTAERROR, |
|
128 "AUD CPEAUDIOROUTINGMONITOR::SETOUTPUTCOMPLETE SETOUTPUTL FAILED" ); |
|
129 } |
|
130 } |
|
131 |
|
132 // ================= OTHER EXPORTED FUNCTIONS =============================== |
|
133 //None |
|
134 |
|
135 // End of File |