|
1 /* |
|
2 * Copyright (c) 2005 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 |
|
19 |
|
20 |
|
21 #ifndef CMCESPEAKERSINK_H |
|
22 #define CMCESPEAKERSINK_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <mcemediasink.h> |
|
27 |
|
28 // DATA TYPES |
|
29 const TMceSinkType KMceSpeakerSink = 2; |
|
30 |
|
31 const TInt KMceAudioRoutePrivate = 3; |
|
32 const TInt KMceAudioRoutePublic = 4; |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Class representing speaker in MCE. |
|
39 * |
|
40 * CMceSpeakerSink can be used to play out audio. |
|
41 * |
|
42 * Enable (un-mute) and Disable (mute) operations to it are considered |
|
43 * to be local, so they are not signalled to remote terminal. |
|
44 * |
|
45 * @lib mceclient.lib |
|
46 */ |
|
47 class CMceSpeakerSink: public CMceMediaSink |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 IMPORT_C static CMceSpeakerSink* NewL(); |
|
55 |
|
56 /** |
|
57 * Two-phased constructor. |
|
58 */ |
|
59 IMPORT_C static CMceSpeakerSink* NewLC(); |
|
60 |
|
61 /** |
|
62 * Destructor. |
|
63 */ |
|
64 IMPORT_C ~CMceSpeakerSink(); |
|
65 |
|
66 public: // Functions |
|
67 |
|
68 /** |
|
69 * Enables the sink explicitly. |
|
70 */ |
|
71 IMPORT_C void EnableL(); |
|
72 |
|
73 /** |
|
74 * Disables the sink explicitly. |
|
75 */ |
|
76 IMPORT_C void DisableL(); |
|
77 |
|
78 /** |
|
79 * Sets volume |
|
80 * @param aVolume volume value |
|
81 */ |
|
82 IMPORT_C void SetVolumeL( TInt aVolume ); |
|
83 |
|
84 /** |
|
85 * Gets current volume |
|
86 * @return value of current volume, |
|
87 */ |
|
88 IMPORT_C TInt VolumeL() const; |
|
89 |
|
90 /** |
|
91 * Gets maximum volume |
|
92 * @return value of mamimum volume, |
|
93 */ |
|
94 IMPORT_C TInt MaxVolumeL() const; |
|
95 |
|
96 /** |
|
97 * Sets audio routing |
|
98 * @param aRoute Required audio route, like KMceAudioRoutePublic. |
|
99 */ |
|
100 IMPORT_C void SetRoutingL( TInt aRoute ); |
|
101 |
|
102 /** |
|
103 * Gets current audio routing. |
|
104 * @return TInt Current audio routing. |
|
105 */ |
|
106 IMPORT_C TInt RoutingL() const; |
|
107 |
|
108 |
|
109 public: // from CMceMediaSink |
|
110 |
|
111 /** |
|
112 * Called endpoint proxy must be created |
|
113 * @return endpointProxy |
|
114 */ |
|
115 MMceEndPointProxy* CreateEndpointProxyL() const; |
|
116 |
|
117 /** |
|
118 * Should this endpoint use endpoint proxy |
|
119 * @return ETrue, this endpoint uses endpoint proxy |
|
120 */ |
|
121 TBool UsesEndpointProxy() const; |
|
122 |
|
123 private: |
|
124 |
|
125 /** |
|
126 * C++ default constructor. |
|
127 */ |
|
128 CMceSpeakerSink(); |
|
129 |
|
130 /** |
|
131 * second-phase constructor |
|
132 */ |
|
133 void ConstructL(); |
|
134 }; |
|
135 |
|
136 #endif |