epoc32/include/eikdebug.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedAll
       
    21  @deprecated
       
    22 */
       
    23 
       
    24 #ifndef __EIKDEBUG_H__
       
    25 #define __EIKDEBUG_H__
       
    26 
       
    27 //#define UIKON_OOM_TESTING		// enabling the testing requires also adding the FBSRV.LIB to eiksrvs and console mmp file.
       
    28 
       
    29 #if defined(UIKON_OOM_TESTING)
       
    30 #define __SHOW_FAIL_RATE(aFormatString, aFailRate) RDebug::Print(aFormatString,aFailRate)
       
    31 #else
       
    32 #define __SHOW_FAIL_RATE(aFormatString, aFailRate)
       
    33 #endif
       
    34 
       
    35 //#define _LOGGING // enabling RDebug::Print
       
    36 #ifdef _LOGGING
       
    37 #include <e32debug.h>
       
    38 
       
    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)
       
    43 #else
       
    44 #define DEBUGPRINT1(_p1)
       
    45 #define DEBUGPRINT2(_p1,_p2)
       
    46 #define DEBUGPRINT3(_p1,_p2,_p3)
       
    47 #define DEBUGPRINT4(_p1,_p2,_p3,_p4)
       
    48 #endif
       
    49 
       
    50 
       
    51 
       
    52 //
       
    53 //	class CEikDebugPreferences
       
    54 //
       
    55 
       
    56 /**
       
    57 @internalComponent
       
    58 */
       
    59 NONSHARABLE_CLASS(CEikDebugPreferences) : public CBase
       
    60 	{
       
    61 public:
       
    62 	enum TFlag
       
    63 		{
       
    64 		EFlagDebugKeysOn				=0x00000001,
       
    65 		EFlagOOMTestingOnAppStartUp		=0x00000002,
       
    66 		EFlagOOMTestingOnEiksrvStartUp	=0x00000004,
       
    67 		EFlagOOMTestingOnConsoleStartUp	=0x00000008
       
    68 		};
       
    69 public:
       
    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;
       
    83 private:
       
    84 	CEikDebugPreferences();
       
    85 private:
       
    86 	TUint iFlags;
       
    87 	TUint iSpare;
       
    88 	};
       
    89 
       
    90 inline void CEikDebugPreferences::SetFlags(TUint aFlags)
       
    91 	{
       
    92 	iFlags=aFlags;
       
    93 	}
       
    94 
       
    95 inline TUint CEikDebugPreferences::Flags() const
       
    96 	{
       
    97 	return iFlags;
       
    98 	}
       
    99 
       
   100 #endif	// __EIKDEBUG_H__