|
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_ALFDEBUGEXTENSIONOIMPL_H |
|
21 #define C_ALFDEBUGEXTENSIONOIMPL_H |
|
22 |
|
23 #include "alfdebug.h" |
|
24 |
|
25 class CAlfEnv; |
|
26 class CAlfGenComponent; |
|
27 |
|
28 /** |
|
29 * ?one_line_short_description |
|
30 * ?more_complete_description |
|
31 * |
|
32 * @code |
|
33 * ?good_class_usage_example(s) |
|
34 * @endcode |
|
35 * |
|
36 * @lib ?library |
|
37 * @since S60 ?S60_version *** for example, S60 v3.0 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CAlfDebugExtensionImpl ): public CAlfDebugExtension |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 static CAlfDebugExtensionImpl* NewL( CAlfEnv& aEnv ); |
|
45 ~CAlfDebugExtensionImpl(); |
|
46 |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Sets the time factor that affects the internal absolute clock, which |
|
51 * is returned by Time(). Zero stops the progress of time completely, |
|
52 * 0.5 means that time progresses in half the speed compared to real |
|
53 * time (1.0). |
|
54 * |
|
55 * @param aTimeFactor Time factor. |
|
56 */ |
|
57 void SetTimeFactor(TReal32 aTimeFactor); |
|
58 |
|
59 /** |
|
60 * Determines the current time factor. |
|
61 * |
|
62 * @return Time factor. |
|
63 */ |
|
64 TReal32 TimeFactor(); |
|
65 |
|
66 /** |
|
67 * Determines the number of frames shown. |
|
68 * |
|
69 * @return Frame count since the system first began rendering. |
|
70 */ |
|
71 TUint FrameCount(); |
|
72 |
|
73 /** |
|
74 * Determines the current frame rate. The rate is calculated at most |
|
75 * once per second. Calling this less frequently causes the rate to be |
|
76 * calculated as an average since the last time this was called. |
|
77 * |
|
78 * @return Frames per second. |
|
79 * |
|
80 */ |
|
81 TReal32 FrameRate(); |
|
82 |
|
83 void ShowFrameRate( TBool aShow = ETrue ); |
|
84 |
|
85 void ShowServerHeapUsage( TInt aInterval = 500 ); |
|
86 |
|
87 /** |
|
88 * Measures performance from the server side. |
|
89 * @param aResult this will contain results of measurements. |
|
90 * @return error code. |
|
91 */ |
|
92 virtual TInt GetMeasurements( TAlfDebugServerMeasurements& aResult ); |
|
93 |
|
94 private: |
|
95 |
|
96 CAlfDebugExtensionImpl(); |
|
97 |
|
98 void ConstructL( CAlfEnv& aEnv ); |
|
99 |
|
100 private: // data |
|
101 |
|
102 CAlfEnv* iEnv; |
|
103 CAlfGenComponent* iComms; |
|
104 }; |
|
105 |
|
106 |
|
107 NONSHARABLE_CLASS( CAlfDebugFactoryImpl ) : public CAlfDebugFactory |
|
108 { |
|
109 public: |
|
110 ~CAlfDebugFactoryImpl(); |
|
111 CAlfDebugExtension* CreateDebugExtensionL( CAlfEnv* aEnv = NULL ); |
|
112 |
|
113 private: |
|
114 CAlfEnv* iOwnEnv; |
|
115 }; |
|
116 |
|
117 |
|
118 #endif // C_ALFDEBUGEXTENSIONOIMPL_H |