|
1 /* |
|
2 * Copyright (c) 2006 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: Header of EffectControlBaseImpl class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef EFFECTCONTROLBASEIMPL_H |
|
20 #define EFFECTCONTROLBASEIMPL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <ControlObserver.h> |
|
24 #include <mmf/common/mmfcontrollerframework.h> |
|
25 |
|
26 class MCustomCommand; |
|
27 |
|
28 namespace multimedia |
|
29 { |
|
30 class MStreamControl; |
|
31 class MEffectControl; |
|
32 class CEffectControlBase; |
|
33 |
|
34 enum TEffectControlBaseEvent |
|
35 { |
|
36 EControllerLoaded, |
|
37 EControllerUnloaded |
|
38 }; |
|
39 |
|
40 |
|
41 class CEffectControlBaseImpl : public CActive, public MControlObserver |
|
42 { |
|
43 |
|
44 public: |
|
45 static CEffectControlBaseImpl* NewL( CEffectControlBase& aParent, TUid aCIUid ); |
|
46 virtual ~CEffectControlBaseImpl(); |
|
47 TInt AddedToStreamControl( MStreamControl& aStreamControl, |
|
48 MCustomCommand& aCustomCommand, |
|
49 MEffectControl& aEffect ); |
|
50 TInt RemovedFromStreamControl( MStreamControl& aStreamControl ); |
|
51 void StreamControlDeleted( MStreamControl& aStreamControl ); |
|
52 TBool IsConnected(); |
|
53 TInt Connect(); |
|
54 TInt Disconnect(); |
|
55 TInt CustomCommandSync(TInt aFunction, |
|
56 const TDesC8& aDataTo1, |
|
57 const TDesC8& aDataTo2, |
|
58 TDes8& aDataFrom); |
|
59 TInt CustomCommandSync(TInt aFunction, |
|
60 const TDesC8& aDataTo1, |
|
61 const TDesC8& aDataTo2); |
|
62 void CustomCommandAsync(TInt aFunction, |
|
63 const TDesC8& aDataTo1, |
|
64 const TDesC8& aDataTo2, |
|
65 TDes8& aDataFrom, |
|
66 TRequestStatus& aStatus); |
|
67 void CustomCommandAsync(TInt aFunction, |
|
68 const TDesC8& aDataTo1, |
|
69 const TDesC8& aDataTo2, |
|
70 TRequestStatus& aStatus); |
|
71 TInt CustomCommandSync( const TMMFMessageDestinationPckg& aDestination, |
|
72 TInt aFunction, |
|
73 const TDesC8& aDataTo1, |
|
74 const TDesC8& aDataTo2, |
|
75 TDes8& aDataFrom ); |
|
76 TInt CustomCommandSync( const TMMFMessageDestinationPckg& aDestination, |
|
77 TInt aFunction, |
|
78 const TDesC8& aDataTo1, |
|
79 const TDesC8& aDataTo2 ); |
|
80 void CustomCommandAsync( const TMMFMessageDestinationPckg& aDestination, |
|
81 TInt aFunction, |
|
82 const TDesC8& aDataTo1, |
|
83 const TDesC8& aDataTo2, |
|
84 TDes8& aDataFrom, |
|
85 TRequestStatus& aStatus ); |
|
86 void CustomCommandAsync( const TMMFMessageDestinationPckg& aDestination, |
|
87 TInt aFunction, |
|
88 const TDesC8& aDataTo1, |
|
89 const TDesC8& aDataTo2, |
|
90 TRequestStatus& aStatus ); |
|
91 |
|
92 TInt GetMessageHandle(TMMFMessageDestinationPckg &aPckg); |
|
93 MCustomCommand* GetCustomCommand(); |
|
94 |
|
95 protected: |
|
96 // From CActive begins |
|
97 void RunL(); |
|
98 void DoCancel(); |
|
99 TInt RunError( TInt aError ); |
|
100 // From CActive ends |
|
101 |
|
102 // From MControlObserver begins |
|
103 void Event( MControl* aControl, TUint aEventType, TAny* aEventObject ); |
|
104 // From MControlObserver ends |
|
105 |
|
106 private: |
|
107 CEffectControlBaseImpl( CEffectControlBase& aParent, TUid aCIUid ); |
|
108 void ConstructL(); |
|
109 |
|
110 enum CIFBuilderParserFunctions |
|
111 { |
|
112 ECIFCreateMessageHandler, |
|
113 ECIFRemoveMessageHandler |
|
114 }; |
|
115 // Messages sent to builder parser |
|
116 TInt BuilderParserMessage(CIFBuilderParserFunctions aCommand); |
|
117 |
|
118 |
|
119 private: |
|
120 CEffectControlBase& iParent; |
|
121 TUid iCIUid; |
|
122 TMMFMessageDestinationPckg iMsgHndlrHandlePckg; |
|
123 MStreamControl* iStreamControl; |
|
124 MCustomCommand* iCustomCommand; |
|
125 MEffectControl* iEffect; |
|
126 TMMFMessageDestinationPckg iBuilderHandle; |
|
127 }; |
|
128 } // namespace multimedia |
|
129 |
|
130 #endif // EFFECTCONTROLBASEIMPL_H |
|
131 |
|
132 // End of file |