|
1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef T_CAUDIO_OUTPUT_H |
|
21 #define T_CAUDIO_OUTPUT_H |
|
22 |
|
23 //User Includes |
|
24 #include "datawrapperbase.h" |
|
25 |
|
26 //Epoc Includes |
|
27 #include <audiooutput.h>//CAudioOutput |
|
28 #include <audiooutputmessagetypes.h> |
|
29 #include <maudiooutputobserver.h> |
|
30 #include <sounddevice.h>//CMMFDevSound |
|
31 |
|
32 class CT_CAudioOutputData : public CDataWrapperBase, public MAudioOutputObserver |
|
33 { |
|
34 public: |
|
35 static CT_CAudioOutputData* NewL(); |
|
36 virtual TAny* GetObject(); |
|
37 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); |
|
38 CT_CAudioOutputData(); |
|
39 |
|
40 private: |
|
41 void DestroyData(); |
|
42 |
|
43 protected: |
|
44 void DoCmdNewL(const TTEFSectionName& aSection); |
|
45 void DoCmdDestructor(); |
|
46 |
|
47 void DoCmdAudioOutput(); |
|
48 void DoCmdDefaultAudioOutput(); |
|
49 void DoCmdRegisterObserverL(); |
|
50 void DoCmdSecureOutput(); |
|
51 void DoCmdSetAudioOutputL(const TTEFSectionName& aSection); |
|
52 void DoCmdSetSecureOutputL(const TTEFSectionName& aSection); |
|
53 void DoCmdUnregisterObserver(); |
|
54 |
|
55 public: |
|
56 /** |
|
57 * From MAudioOutputObserver. |
|
58 */ |
|
59 void DefaultAudioOutputChanged( CAudioOutput& aAudioOutput, CAudioOutput::TAudioOutputPreference aNewDefault ); |
|
60 |
|
61 private: |
|
62 /** |
|
63 * Wrapped object |
|
64 */ |
|
65 CAudioOutput* iAudioOutput; |
|
66 /** |
|
67 * Pref of audio output |
|
68 */ |
|
69 CAudioOutput::TAudioOutputPreference audioOutputPref; |
|
70 /** |
|
71 * Secure Output(DoCmdSecureOutput) |
|
72 */ |
|
73 TBool iSecureOutput; |
|
74 /** |
|
75 * Enum for output options |
|
76 */ |
|
77 static const TEnumEntryTable iEnumOutputOptions[]; |
|
78 }; |
|
79 |
|
80 |
|
81 #endif //T_CAUDIO_OUTPUT_H |
|
82 |