|
1 /* |
|
2 * Copyright (c) 2010 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef HELLOTRACEFN_H_ |
|
20 #define HELLOTRACEFN_H_ |
|
21 |
|
22 #include <e32base.h> // CBase |
|
23 |
|
24 class CHelloTraceFn : public CBase |
|
25 { |
|
26 public: |
|
27 |
|
28 // Note the Trace Builder will only parse this if it's in a cpp file |
|
29 // but not from here :( |
|
30 // Also if you add a new enum you need to reparse the enum - it doesn't |
|
31 // get automatically reparsed by the Trace Compiler :( |
|
32 enum TFnEnum |
|
33 { |
|
34 EExample1, |
|
35 EExample2 = 2, |
|
36 // EExample3 = EExample2 + 1, // The Trace Builder can't parse this :( |
|
37 }; |
|
38 |
|
39 public: |
|
40 static CHelloTraceFn* NewL(); |
|
41 static CHelloTraceFn* NewLC(); |
|
42 ~CHelloTraceFn(); |
|
43 |
|
44 public: // Fn entry / exit tracing examples |
|
45 void Simple(); |
|
46 void OutputsParams(TInt aParam, TFnEnum aEnumParam); |
|
47 void OutputsParams2(TInt aParam, TFnEnum aEnumParam); |
|
48 void OutputsParams3(TInt aParam, TFnEnum aEnumParam); |
|
49 void OutputsSignedIntegers(TInt8 aParam8, TInt16 aParam16, |
|
50 TInt32 aParam32, TInt64 aParam64); |
|
51 void OutputsUnsignedIntegers(TUint8 aParam8, TUint16 aParam16, |
|
52 TUint32 aParam32, TUint64 aParam64); |
|
53 |
|
54 TInt OutputsTIntReturnValue(); |
|
55 TInt64 OutputsTInt64ReturnValue(); |
|
56 TFnEnum OutputsTFnEnumReturnValue(); |
|
57 |
|
58 CActive* OutputsUnknownPtrType(CActive* aActive); |
|
59 CActive& OutputsUnknownRefType(CActive& aActive); |
|
60 |
|
61 void OutputMissingParams(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam); |
|
62 |
|
63 #ifdef _DEBUG |
|
64 void PreProcessedFn(TInt aDbgParam); |
|
65 #else |
|
66 void PreProcessedFn(); |
|
67 #endif |
|
68 |
|
69 static void StaticOutputsParamsL(TInt aParam); |
|
70 |
|
71 // duplicate all the function and put the impl in the header file HelloTraceFnDup.h |
|
72 void SimpleDup(); |
|
73 void OutputsParamsDup(TInt aParam, TFnEnum aEnumParam); |
|
74 void OutputsSignedIntegersDup(TInt8 aParam8, TInt16 aParam16, |
|
75 TInt32 aParam32, TInt64 aParam64); |
|
76 void OutputsUnsignedIntegersDup(TUint8 aParam8, TUint16 aParam16, |
|
77 TUint32 aParam32, TUint64 aParam64); |
|
78 |
|
79 TInt OutputsTIntReturnValueDup(); |
|
80 TInt64 OutputsTInt64ReturnValueDup(); |
|
81 TFnEnum OutputsTFnEnumReturnValueDup(); |
|
82 |
|
83 CActive* OutputsUnknownPtrTypeDup(CActive* aActive); |
|
84 CActive& OutputsUnknownRefTypeDup(CActive& aActive); |
|
85 |
|
86 void OutputMissingParamsDup(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam); |
|
87 |
|
88 #ifdef _DEBUG |
|
89 void PreProcessedFnDup(TInt aDbgParam); |
|
90 #else |
|
91 void PreProcessedFnDup(); |
|
92 #endif |
|
93 static void StaticOutputsParamsDupL(TInt aParam); |
|
94 |
|
95 // duplicate all the function again and put the impl in the header file HelloTraceFnDup2.h |
|
96 void SimpleDup2(); |
|
97 void OutputsParamsDup2(TInt aParam, TFnEnum aEnumParam); |
|
98 void OutputsSignedIntegersDup2(TInt8 aParam8, TInt16 aParam16, |
|
99 TInt32 aParam32, TInt64 aParam64); |
|
100 void OutputsUnsignedIntegersDup2(TUint8 aParam8, TUint16 aParam16, |
|
101 TUint32 aParam32, TUint64 aParam64); |
|
102 |
|
103 TInt OutputsTIntReturnValueDup2(); |
|
104 TInt64 OutputsTInt64ReturnValueDup2(); |
|
105 TFnEnum OutputsTFnEnumReturnValueDup2(); |
|
106 |
|
107 CActive* OutputsUnknownPtrTypeDup2(CActive* aActive); |
|
108 CActive& OutputsUnknownRefTypeDup2(CActive& aActive); |
|
109 |
|
110 void OutputMissingParamsDup2(TInt aUsedParam, TInt aCommentParam, TInt aMissingParam); |
|
111 |
|
112 #ifdef _DEBUG |
|
113 void PreProcessedFnDup2(TInt aDbgParam); |
|
114 #else |
|
115 void PreProcessedFnDup2(); |
|
116 #endif |
|
117 static void StaticOutputsParamsDup2L(TInt aParam); |
|
118 |
|
119 |
|
120 private: |
|
121 CHelloTraceFn(); |
|
122 }; |
|
123 |
|
124 #endif /* HELLOTRACEFN_H_ */ |