|
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: Telephony Multimedia Service |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CS_UPLINK_H |
|
19 #define CS_UPLINK_H |
|
20 |
|
21 #include <glib.h> |
|
22 #include "tmscsdevsound.h" |
|
23 |
|
24 namespace TMS { |
|
25 |
|
26 /** |
|
27 * Provides uplink functionality. |
|
28 * |
|
29 */ |
|
30 NONSHARABLE_CLASS(TMSCSUplink) : public TMSCSPDevSound |
|
31 { |
|
32 public: |
|
33 |
|
34 static TMSCSUplink* NewL(TMSCSPDevSoundObserver& aObserver); |
|
35 |
|
36 virtual ~TMSCSUplink(); |
|
37 |
|
38 /** |
|
39 * Determines mic mute state. |
|
40 * |
|
41 * @return ETrue - mic is muted, EFalse - mic is not muted. |
|
42 */ |
|
43 TBool IsMuted(); |
|
44 |
|
45 /** |
|
46 * Set mic muted. |
|
47 */ |
|
48 void SetMuted(); |
|
49 |
|
50 /** |
|
51 * Set mic unmuted. |
|
52 */ |
|
53 void SetUnmuted(); |
|
54 |
|
55 /** |
|
56 * Set mic gain. |
|
57 */ |
|
58 void SetGain(gint aGain); |
|
59 |
|
60 /** |
|
61 * Get mic muted. |
|
62 */ |
|
63 gint Gain(); |
|
64 |
|
65 /** |
|
66 * Get max gain. |
|
67 */ |
|
68 gint MaxGain(); |
|
69 |
|
70 // from base class MDevSoundObserver |
|
71 |
|
72 /** |
|
73 * From MDevSoundObserver |
|
74 * Notification from Devsound that stream (mic) is |
|
75 * activated successfully. |
|
76 */ |
|
77 void BufferToBeEmptied(CMMFBuffer* aBuffer); |
|
78 |
|
79 /** |
|
80 * From MDevSoundObserver |
|
81 * Notification from devsound that downstream(mic) activation |
|
82 * feiled. |
|
83 */ |
|
84 void RecordError(TInt aError); |
|
85 |
|
86 private: |
|
87 |
|
88 // from base class MCSPDevSound |
|
89 |
|
90 /** |
|
91 * From MCSPDevSound. |
|
92 * Tries to activate the mic stream. |
|
93 */ |
|
94 void DoActivateL(); |
|
95 |
|
96 protected: |
|
97 |
|
98 TMSCSUplink(TMSCSPDevSoundObserver& aObserver); |
|
99 void ConstructL(); |
|
100 }; |
|
101 |
|
102 } //namespace TMS |
|
103 |
|
104 #endif // CS_UPLINK_H |