|
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: Declarations for class TMSCenRepAudioHandler |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TMSCENREPAUDIOHANDLER_H |
|
19 #define TMSCENREPAUDIOHANDLER_H |
|
20 |
|
21 #include "tmspubsubobserver.h" |
|
22 #include "tmscenrepobserver.h" |
|
23 #include "tmsserver.h" |
|
24 |
|
25 namespace TMS { |
|
26 |
|
27 class TMSPubSubListener; |
|
28 class TMSCenRepListener; |
|
29 |
|
30 /** |
|
31 * Handles call adding from calls not done by the plugin. |
|
32 * |
|
33 */ |
|
34 class TMSCenRepAudioHandler : public TMSPubSubObserver, |
|
35 public TMSCenRepObserver |
|
36 { |
|
37 public: |
|
38 //Constructors and descructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructing for the monitor. |
|
42 * |
|
43 * @param aObserver the observer for getting notification |
|
44 * @param aLine the line to monitor |
|
45 * @param aLineId line identifier |
|
46 */ |
|
47 static TMSCenRepAudioHandler* NewL(TMSServer* aServer); |
|
48 |
|
49 /** |
|
50 * C++ default destructor |
|
51 */ |
|
52 virtual ~TMSCenRepAudioHandler(); |
|
53 |
|
54 void SetLoudSpeakerVol(TInt vol); |
|
55 void SetEarPieceVol(TInt vol); |
|
56 |
|
57 // from base class TMSPubSubObserver |
|
58 /** |
|
59 * Handler for changed event. |
|
60 * @param aUid uid of setting |
|
61 * @param aKey id of setting |
|
62 * @param aStatus status of completed AO operation |
|
63 */ |
|
64 virtual void HandleNotifyPSL(const TUid aUid, const TInt& aKey, |
|
65 const TRequestStatus& aStatus); |
|
66 |
|
67 // from base class TMSCenRepObserver |
|
68 /** |
|
69 * Handler for changed event. |
|
70 * @param aUid uid of setting |
|
71 * @param aVal value |
|
72 */ |
|
73 virtual void HandleNotifyCenRepL(const TUid aUid, const TUint32 aKey, |
|
74 TInt aVal); |
|
75 |
|
76 protected: |
|
77 // From CActive |
|
78 /** |
|
79 * From CActive |
|
80 * RunL |
|
81 */ |
|
82 void RunL(); |
|
83 |
|
84 /** |
|
85 * From CActive |
|
86 * Catches errors if RunL leaves |
|
87 * @param aError error code |
|
88 * @return error code |
|
89 */ |
|
90 TInt RunError(TInt aError); |
|
91 |
|
92 /** |
|
93 * From CActive |
|
94 * Cancels the monitor |
|
95 */ |
|
96 void DoCancel(); |
|
97 |
|
98 private: |
|
99 /** |
|
100 * C++ default constructor |
|
101 * @param aObserver the observer for status change (incoming call) |
|
102 * @param aLine the line associated with the call |
|
103 * @param aLineId line identifier |
|
104 */ |
|
105 TMSCenRepAudioHandler(TMSServer* aServer); |
|
106 |
|
107 /** |
|
108 * Constructs the monitor in the second phase. |
|
109 */ |
|
110 void ConstructL(); |
|
111 |
|
112 private: |
|
113 // data |
|
114 |
|
115 /** |
|
116 * Mute listening from Publish&Subscribe. |
|
117 */ |
|
118 TMSPubSubListener* iMuteListener; |
|
119 |
|
120 /** |
|
121 * Incall loudspeaker listening from Central Repository. |
|
122 */ |
|
123 TMSCenRepListener* iIncallLoudspeakerVolumeListener; |
|
124 |
|
125 /** |
|
126 * Incall ear volume listening from Central Repository. |
|
127 */ |
|
128 TMSCenRepListener* iIncallEarVolumeListener; |
|
129 |
|
130 /** |
|
131 * Audio streams handler. |
|
132 */ |
|
133 //CSPAudioStreams* iAudioStreams; |
|
134 |
|
135 /** |
|
136 * Call count |
|
137 */ |
|
138 TInt iCallCount; |
|
139 TMSServer* iTMSSer; |
|
140 }; |
|
141 |
|
142 } //namespace TMS |
|
143 |
|
144 #endif // TMSCENREPAUDIOHANDLER_H |