0
|
1 |
/**
|
|
2 |
* Copyright (c) 2004-2009 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 the License "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 |
* Class declaration for MassStorageDebug
|
|
16 |
*
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
/**
|
|
23 |
@file
|
|
24 |
*/
|
|
25 |
|
|
26 |
#ifndef __MASSSTORAGEDEBUG_H__
|
|
27 |
#define __MASSSTORAGEDEBUG_H__
|
|
28 |
|
|
29 |
#include <e32std.h>
|
|
30 |
#include <e32svr.h>
|
|
31 |
|
|
32 |
//#define _USBMS_DEBUG_PRINT_
|
|
33 |
|
|
34 |
// Display some info during IN double-buffering
|
|
35 |
//#define PRINT_MSDC_MULTITHREADED_READ_INFO
|
|
36 |
|
|
37 |
|
|
38 |
#if defined(_USBMS_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
|
39 |
#define __PRINT(t) {RDebug::Print(t);}
|
|
40 |
#define __PRINT1(t,a) {RDebug::Print(t,a);}
|
|
41 |
#define __PRINT2(t,a,b) {RDebug::Print(t,a,b);}
|
|
42 |
#define __PRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
|
|
43 |
#define __PRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
|
|
44 |
#define __PRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
|
|
45 |
#define __PRINT8BIT1(t,a) {TFileName temp;temp.Copy(a);RDebug::Print(t,&temp);}
|
|
46 |
#define __PRINT1TEMP(t,a) {TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}
|
|
47 |
#define __PRINTERR(txt, err) {if(KErrNone != err) __PRINT1(txt, err);}
|
|
48 |
|
|
49 |
_LIT(KMsgIn, ">>%S\n");
|
|
50 |
_LIT(KMsgOut,"<<%S\n");
|
|
51 |
|
|
52 |
class TMSLogFn
|
|
53 |
{
|
|
54 |
protected:
|
|
55 |
TBuf<100> iName;
|
|
56 |
|
|
57 |
public:
|
|
58 |
TMSLogFn(const TDesC& aName){iName = aName; RDebug::Print(KMsgIn, &iName);};
|
|
59 |
~TMSLogFn(){RDebug::Print(KMsgOut, &iName);};
|
|
60 |
};
|
|
61 |
|
|
62 |
#define __FNLOG(name) TMSLogFn __fn_log__(_L(name))
|
|
63 |
|
|
64 |
#else
|
|
65 |
#define __PRINT(t)
|
|
66 |
#define __PRINT1(t,a)
|
|
67 |
#define __PRINT2(t,a,b)
|
|
68 |
#define __PRINT3(t,a,b,c)
|
|
69 |
#define __PRINT4(t,a,b,c,d)
|
|
70 |
#define __PRINT5(t,a,b,c,d,e)
|
|
71 |
#define __PRINT8BIT1(t,a)
|
|
72 |
#define __PRINT1TEMP(t,a)
|
|
73 |
#define __PRINTERR(txt,err)
|
|
74 |
#define __FNLOG(name)
|
|
75 |
#endif
|
|
76 |
|
|
77 |
#endif // __MASSSTORAGEDEBUG_H__
|