williamr@2
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
|
williamr@2
|
17 |
|
williamr@2
|
18 |
/**
|
williamr@2
|
19 |
@file
|
williamr@2
|
20 |
@publishedAll
|
williamr@2
|
21 |
@deprecated
|
williamr@2
|
22 |
*/
|
williamr@2
|
23 |
|
williamr@2
|
24 |
#ifndef __EIKDEBUG_H__
|
williamr@2
|
25 |
#define __EIKDEBUG_H__
|
williamr@2
|
26 |
|
williamr@2
|
27 |
//#define UIKON_OOM_TESTING // enabling the testing requires also adding the FBSRV.LIB to eiksrvs and console mmp file.
|
williamr@2
|
28 |
|
williamr@2
|
29 |
#if defined(UIKON_OOM_TESTING)
|
williamr@2
|
30 |
#define __SHOW_FAIL_RATE(aFormatString, aFailRate) RDebug::Print(aFormatString,aFailRate)
|
williamr@2
|
31 |
#else
|
williamr@2
|
32 |
#define __SHOW_FAIL_RATE(aFormatString, aFailRate)
|
williamr@2
|
33 |
#endif
|
williamr@2
|
34 |
|
williamr@2
|
35 |
//#define _LOGGING // enabling RDebug::Print
|
williamr@2
|
36 |
#ifdef _LOGGING
|
williamr@2
|
37 |
#include <e32debug.h>
|
williamr@2
|
38 |
|
williamr@2
|
39 |
#define DEBUGPRINT1(_p1) RDebug::Print(_p1)
|
williamr@2
|
40 |
#define DEBUGPRINT2(_p1,_p2) RDebug::Print(_p1,_p2)
|
williamr@2
|
41 |
#define DEBUGPRINT3(_p1,_p2,_p3) RDebug::Print(_p1,_p2,_p3)
|
williamr@2
|
42 |
#define DEBUGPRINT4(_p1,_p2,_p3,_p4) RDebug::Print(_p1,_p2,_p3,_p4)
|
williamr@2
|
43 |
#else
|
williamr@2
|
44 |
#define DEBUGPRINT1(_p1)
|
williamr@2
|
45 |
#define DEBUGPRINT2(_p1,_p2)
|
williamr@2
|
46 |
#define DEBUGPRINT3(_p1,_p2,_p3)
|
williamr@2
|
47 |
#define DEBUGPRINT4(_p1,_p2,_p3,_p4)
|
williamr@2
|
48 |
#endif
|
williamr@2
|
49 |
|
williamr@2
|
50 |
|
williamr@2
|
51 |
|
williamr@2
|
52 |
//
|
williamr@2
|
53 |
// class CEikDebugPreferences
|
williamr@2
|
54 |
//
|
williamr@2
|
55 |
|
williamr@2
|
56 |
/**
|
williamr@2
|
57 |
@internalComponent
|
williamr@2
|
58 |
*/
|
williamr@2
|
59 |
NONSHARABLE_CLASS(CEikDebugPreferences) : public CBase
|
williamr@2
|
60 |
{
|
williamr@2
|
61 |
public:
|
williamr@2
|
62 |
enum TFlag
|
williamr@2
|
63 |
{
|
williamr@2
|
64 |
EFlagDebugKeysOn =0x00000001,
|
williamr@2
|
65 |
EFlagOOMTestingOnAppStartUp =0x00000002,
|
williamr@2
|
66 |
EFlagOOMTestingOnEiksrvStartUp =0x00000004,
|
williamr@2
|
67 |
EFlagOOMTestingOnConsoleStartUp =0x00000008
|
williamr@2
|
68 |
};
|
williamr@2
|
69 |
public:
|
williamr@2
|
70 |
IMPORT_C static CEikDebugPreferences* New();
|
williamr@2
|
71 |
IMPORT_C static CEikDebugPreferences* NewL();
|
williamr@2
|
72 |
IMPORT_C static CEikDebugPreferences* NewLC();
|
williamr@2
|
73 |
IMPORT_C ~CEikDebugPreferences();
|
williamr@2
|
74 |
IMPORT_C void StoreL(RFs& aFileServerSession);
|
williamr@2
|
75 |
IMPORT_C TInt Restore(RFs& aFileServerSession); // can be used with or without a CTrapHandler being currently installed
|
williamr@2
|
76 |
IMPORT_C void RestoreL(RFs& aFileServerSession);
|
williamr@2
|
77 |
IMPORT_C void SetKeysOn(const TBool& aDebugKeysOn);
|
williamr@2
|
78 |
IMPORT_C TBool KeysOn() const;
|
williamr@2
|
79 |
IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
|
williamr@2
|
80 |
IMPORT_C void InternalizeL(RReadStream& aStream);
|
williamr@2
|
81 |
inline void SetFlags(TUint aFlags);
|
williamr@2
|
82 |
inline TUint Flags() const;
|
williamr@2
|
83 |
private:
|
williamr@2
|
84 |
CEikDebugPreferences();
|
williamr@2
|
85 |
private:
|
williamr@2
|
86 |
TUint iFlags;
|
williamr@2
|
87 |
TUint iSpare;
|
williamr@2
|
88 |
};
|
williamr@2
|
89 |
|
williamr@2
|
90 |
inline void CEikDebugPreferences::SetFlags(TUint aFlags)
|
williamr@2
|
91 |
{
|
williamr@2
|
92 |
iFlags=aFlags;
|
williamr@2
|
93 |
}
|
williamr@2
|
94 |
|
williamr@2
|
95 |
inline TUint CEikDebugPreferences::Flags() const
|
williamr@2
|
96 |
{
|
williamr@2
|
97 |
return iFlags;
|
williamr@2
|
98 |
}
|
williamr@2
|
99 |
|
williamr@2
|
100 |
#endif // __EIKDEBUG_H__
|