|
1 /* |
|
2 * Copyright (c) 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_ALFDEBUGEXTENSION_H |
|
21 #define C_ALFDEBUGEXTENSION_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 _LIT( KAlfDebugExtensionLibraryName, "alfdebug.dll" ); |
|
26 const TInt KAlfDebugExtensionLibraryEntryOrdinal = 1; |
|
27 |
|
28 class CAlfEnv; |
|
29 |
|
30 /** |
|
31 * Measurement structure for server. |
|
32 */ |
|
33 struct TAlfDebugServerMeasurements |
|
34 { |
|
35 TUint32 iTimeStamp; |
|
36 TInt iServerCells; |
|
37 TInt iServerMemory; |
|
38 TInt iServerFree; |
|
39 TUint iFrameCount; |
|
40 }; |
|
41 |
|
42 /** |
|
43 * ?one_line_short_description |
|
44 * ?more_complete_description |
|
45 * |
|
46 * @code |
|
47 * ?good_class_usage_example(s) |
|
48 * @endcode |
|
49 * |
|
50 * @lib ?library |
|
51 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
52 */ |
|
53 NONSHARABLE_CLASS( CAlfDebugExtension ) : public CBase |
|
54 { |
|
55 |
|
56 public: |
|
57 |
|
58 /** |
|
59 * Sets the time factor that affects the internal absolute clock, which |
|
60 * is returned by Time(). Zero stops the progress of time completely, |
|
61 * 0.5 means that time progresses in half the speed compared to real |
|
62 * time (1.0). |
|
63 * |
|
64 * @param aTimeFactor Time factor. |
|
65 */ |
|
66 virtual void SetTimeFactor(TReal32 aTimeFactor) = 0; |
|
67 |
|
68 /** |
|
69 * Determines the current time factor. |
|
70 * |
|
71 * @return Time factor. |
|
72 */ |
|
73 virtual TReal32 TimeFactor() = 0; |
|
74 |
|
75 /** |
|
76 * Determines the number of frames shown. |
|
77 * |
|
78 * @return Frame count since the system first began rendering. |
|
79 */ |
|
80 virtual TUint FrameCount() = 0; |
|
81 |
|
82 /** |
|
83 * Determines the current frame rate. The rate is calculated at most |
|
84 * once per second. Calling this less frequently causes the rate to be |
|
85 * calculated as an average since the last time this was called. |
|
86 * |
|
87 * @return Frames per second. |
|
88 * |
|
89 */ |
|
90 virtual TReal32 FrameRate() = 0; |
|
91 |
|
92 |
|
93 /** |
|
94 * Shows the frame rate on screen |
|
95 * |
|
96 * @param aInterval Interval in milliseconds when the framerate is |
|
97 * measured and shown |
|
98 * |
|
99 * Special cased (from alfdebugextensionconstants.h) |
|
100 * KAlfDebugHideFraweRate (0) Hides the framerate counter |
|
101 * KAlfDebugShowFraweRateAfterDrawLoop (-1) Updates frame rate |
|
102 * on screen when a drawing sequence ends (idle-idle) |
|
103 * KAlfDebugShowFraweRateWhenQueried (-2) updates the screen |
|
104 * when user calls FrameCount(). |
|
105 * |
|
106 */ |
|
107 virtual void ShowFrameRate( TInt aInterval = 500 ) = 0; |
|
108 |
|
109 virtual void ShowServerHeapUsage( TBool aShow = ETrue ) = 0; |
|
110 |
|
111 /** |
|
112 * Measures performance from the server side. |
|
113 * @param aResult this will contain results of measurements. |
|
114 * @return error code. |
|
115 */ |
|
116 virtual TInt GetMeasurements( TAlfDebugServerMeasurements& aResult ) = 0; |
|
117 |
|
118 }; |
|
119 |
|
120 |
|
121 NONSHARABLE_CLASS( CAlfDebugFactory ) : public CBase |
|
122 { |
|
123 public: |
|
124 virtual CAlfDebugExtension* CreateDebugExtensionL( CAlfEnv* aEnv = NULL ) = 0; |
|
125 }; |
|
126 |
|
127 |
|
128 IMPORT_C CAlfDebugFactory* CreateDebugExtensionFactoryL(); |
|
129 |
|
130 |
|
131 #endif // C_ALFDEBUGEXTENSION_H |