|
1 /* |
|
2 * Copyright (c) 2007 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: Audio stream test component |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MEDIA_EVENT_H |
|
20 #define __MEDIA_EVENT_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include "Parameters.h" |
|
25 #include "EventTarget.h" |
|
26 //#include <StifTestModule.h> |
|
27 #include <StifLogger.h> |
|
28 |
|
29 class CMediaEvent: public CBase |
|
30 { |
|
31 public: |
|
32 static CMediaEvent *NewL(CStifLogger *aLogger, TTimeIntervalMicroSeconds32 aDelay, TTimeIntervalMicroSeconds32 aInterval, MEventTarget *aTarget, CParameters *aParameters, TInt aPriority=CActive::EPriorityStandard); |
|
33 static CMediaEvent *NewLC(CStifLogger *aLogger, TTimeIntervalMicroSeconds32 aDelay, TTimeIntervalMicroSeconds32 aInterval, MEventTarget *aTarget, CParameters *aParameters, TInt aPriority=CActive::EPriorityStandard); |
|
34 |
|
35 TInt GetCount() const; |
|
36 |
|
37 private: |
|
38 void ConstructL(TInt aPriority); |
|
39 ~CMediaEvent(); |
|
40 |
|
41 static TInt Tick(TAny* aObject); |
|
42 TInt DoTick(); |
|
43 |
|
44 protected: |
|
45 CMediaEvent(CStifLogger *aLogger, TTimeIntervalMicroSeconds32 aDelay, TTimeIntervalMicroSeconds32 aInterval, MEventTarget *aTarget , /*TMediaCommand aCommand,*/ CParameters *aParameters); |
|
46 |
|
47 private: |
|
48 //CTestModuleIf &iTestModuleIf; //Test Module Interface |
|
49 //CLogger &iLogger; //Test Module Logger |
|
50 CStifLogger *iLogger; |
|
51 |
|
52 TTimeIntervalMicroSeconds32 iDelay; |
|
53 TTimeIntervalMicroSeconds32 iInterval; |
|
54 MEventTarget *iEventTarget; |
|
55 CParameters *iParameters; |
|
56 |
|
57 CPeriodic *iPeriodic; |
|
58 TInt iCount; |
|
59 }; |
|
60 |
|
61 class CImmediateMediaEvent : CActive |
|
62 { |
|
63 public: |
|
64 static CImmediateMediaEvent *NewLC(CStifLogger *aLogger, MEventTarget *aTarget, CParameters *aParameters, TInt aPriority=CActive::EPriorityStandard); |
|
65 static CImmediateMediaEvent *NewL(CStifLogger *aLogger, MEventTarget *aTarget, CParameters *aParameters, TInt aPriority=CActive::EPriorityStandard); |
|
66 |
|
67 TBool FireExecute(); |
|
68 |
|
69 private: |
|
70 void ConstructL(); |
|
71 ~CImmediateMediaEvent(); |
|
72 CImmediateMediaEvent(CStifLogger *aLogger, MEventTarget *aTarget , CParameters *aParameters, TInt aPriority); |
|
73 |
|
74 void RunL(); |
|
75 void DoCancel(); |
|
76 |
|
77 private: |
|
78 //CTestModuleIf &iTestModuleIf; //Test Module Interface |
|
79 //CLogger &iLogger; //Test Module Logger |
|
80 CStifLogger *iLogger; |
|
81 |
|
82 MEventTarget *iEventTarget; |
|
83 CParameters *iParameters; |
|
84 |
|
85 TInt iCount; |
|
86 TBool iEnabled; |
|
87 }; |
|
88 |
|
89 #endif //__MEDIA_EVENT_H |