epoc32/include/eikdebug.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/eikdebug.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/eikdebug.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,100 @@
     1.4 -eikdebug.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +
    1.21 +
    1.22 +/**
    1.23 + @file
    1.24 + @publishedAll
    1.25 + @deprecated
    1.26 +*/
    1.27 +
    1.28 +#ifndef __EIKDEBUG_H__
    1.29 +#define __EIKDEBUG_H__
    1.30 +
    1.31 +//#define UIKON_OOM_TESTING		// enabling the testing requires also adding the FBSRV.LIB to eiksrvs and console mmp file.
    1.32 +
    1.33 +#if defined(UIKON_OOM_TESTING)
    1.34 +#define __SHOW_FAIL_RATE(aFormatString, aFailRate) RDebug::Print(aFormatString,aFailRate)
    1.35 +#else
    1.36 +#define __SHOW_FAIL_RATE(aFormatString, aFailRate)
    1.37 +#endif
    1.38 +
    1.39 +//#define _LOGGING // enabling RDebug::Print
    1.40 +#ifdef _LOGGING
    1.41 +#include <e32debug.h>
    1.42 +
    1.43 +#define DEBUGPRINT1(_p1) RDebug::Print(_p1)
    1.44 +#define DEBUGPRINT2(_p1,_p2) RDebug::Print(_p1,_p2)
    1.45 +#define DEBUGPRINT3(_p1,_p2,_p3) RDebug::Print(_p1,_p2,_p3)
    1.46 +#define DEBUGPRINT4(_p1,_p2,_p3,_p4) RDebug::Print(_p1,_p2,_p3,_p4)
    1.47 +#else
    1.48 +#define DEBUGPRINT1(_p1)
    1.49 +#define DEBUGPRINT2(_p1,_p2)
    1.50 +#define DEBUGPRINT3(_p1,_p2,_p3)
    1.51 +#define DEBUGPRINT4(_p1,_p2,_p3,_p4)
    1.52 +#endif
    1.53 +
    1.54 +
    1.55 +
    1.56 +//
    1.57 +//	class CEikDebugPreferences
    1.58 +//
    1.59 +
    1.60 +/**
    1.61 +@internalComponent
    1.62 +*/
    1.63 +NONSHARABLE_CLASS(CEikDebugPreferences) : public CBase
    1.64 +	{
    1.65 +public:
    1.66 +	enum TFlag
    1.67 +		{
    1.68 +		EFlagDebugKeysOn				=0x00000001,
    1.69 +		EFlagOOMTestingOnAppStartUp		=0x00000002,
    1.70 +		EFlagOOMTestingOnEiksrvStartUp	=0x00000004,
    1.71 +		EFlagOOMTestingOnConsoleStartUp	=0x00000008
    1.72 +		};
    1.73 +public:
    1.74 +	IMPORT_C static CEikDebugPreferences* New();
    1.75 +	IMPORT_C static CEikDebugPreferences* NewL();
    1.76 +	IMPORT_C static CEikDebugPreferences* NewLC();
    1.77 +	IMPORT_C ~CEikDebugPreferences();
    1.78 +	IMPORT_C void StoreL(RFs& aFileServerSession);
    1.79 +	IMPORT_C TInt Restore(RFs& aFileServerSession); // can be used with or without a CTrapHandler being currently installed
    1.80 +	IMPORT_C void RestoreL(RFs& aFileServerSession);
    1.81 +	IMPORT_C void SetKeysOn(const TBool& aDebugKeysOn);
    1.82 +	IMPORT_C TBool KeysOn() const;
    1.83 +	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
    1.84 +	IMPORT_C void InternalizeL(RReadStream& aStream);
    1.85 +	inline void SetFlags(TUint aFlags);
    1.86 +	inline TUint Flags() const;
    1.87 +private:
    1.88 +	CEikDebugPreferences();
    1.89 +private:
    1.90 +	TUint iFlags;
    1.91 +	TUint iSpare;
    1.92 +	};
    1.93 +
    1.94 +inline void CEikDebugPreferences::SetFlags(TUint aFlags)
    1.95 +	{
    1.96 +	iFlags=aFlags;
    1.97 +	}
    1.98 +
    1.99 +inline TUint CEikDebugPreferences::Flags() const
   1.100 +	{
   1.101 +	return iFlags;
   1.102 +	}
   1.103 +
   1.104 +#endif	// __EIKDEBUG_H__