1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
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
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #ifndef __EIKDEBUG_H__
25 #define __EIKDEBUG_H__
27 //#define UIKON_OOM_TESTING // enabling the testing requires also adding the FBSRV.LIB to eiksrvs and console mmp file.
29 #if defined(UIKON_OOM_TESTING)
30 #define __SHOW_FAIL_RATE(aFormatString, aFailRate) RDebug::Print(aFormatString,aFailRate)
32 #define __SHOW_FAIL_RATE(aFormatString, aFailRate)
35 //#define _LOGGING // enabling RDebug::Print
39 #define DEBUGPRINT1(_p1) RDebug::Print(_p1)
40 #define DEBUGPRINT2(_p1,_p2) RDebug::Print(_p1,_p2)
41 #define DEBUGPRINT3(_p1,_p2,_p3) RDebug::Print(_p1,_p2,_p3)
42 #define DEBUGPRINT4(_p1,_p2,_p3,_p4) RDebug::Print(_p1,_p2,_p3,_p4)
44 #define DEBUGPRINT1(_p1)
45 #define DEBUGPRINT2(_p1,_p2)
46 #define DEBUGPRINT3(_p1,_p2,_p3)
47 #define DEBUGPRINT4(_p1,_p2,_p3,_p4)
53 // class CEikDebugPreferences
59 NONSHARABLE_CLASS(CEikDebugPreferences) : public CBase
64 EFlagDebugKeysOn =0x00000001,
65 EFlagOOMTestingOnAppStartUp =0x00000002,
66 EFlagOOMTestingOnEiksrvStartUp =0x00000004,
67 EFlagOOMTestingOnConsoleStartUp =0x00000008
70 IMPORT_C static CEikDebugPreferences* New();
71 IMPORT_C static CEikDebugPreferences* NewL();
72 IMPORT_C static CEikDebugPreferences* NewLC();
73 IMPORT_C ~CEikDebugPreferences();
74 IMPORT_C void StoreL(RFs& aFileServerSession);
75 IMPORT_C TInt Restore(RFs& aFileServerSession); // can be used with or without a CTrapHandler being currently installed
76 IMPORT_C void RestoreL(RFs& aFileServerSession);
77 IMPORT_C void SetKeysOn(const TBool& aDebugKeysOn);
78 IMPORT_C TBool KeysOn() const;
79 IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
80 IMPORT_C void InternalizeL(RReadStream& aStream);
81 inline void SetFlags(TUint aFlags);
82 inline TUint Flags() const;
84 CEikDebugPreferences();
90 inline void CEikDebugPreferences::SetFlags(TUint aFlags)
95 inline TUint CEikDebugPreferences::Flags() const
100 #endif // __EIKDEBUG_H__