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