sl@0
|
1 |
/**
|
sl@0
|
2 |
* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Class declaration for MassStorageDebug
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*
|
sl@0
|
18 |
*/
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
/**
|
sl@0
|
23 |
@file
|
sl@0
|
24 |
*/
|
sl@0
|
25 |
|
sl@0
|
26 |
#ifndef __MASSSTORAGEDEBUG_H__
|
sl@0
|
27 |
#define __MASSSTORAGEDEBUG_H__
|
sl@0
|
28 |
|
sl@0
|
29 |
#include <e32std.h>
|
sl@0
|
30 |
#include <e32svr.h>
|
sl@0
|
31 |
|
sl@0
|
32 |
//#define _USBMS_DEBUG_PRINT_
|
sl@0
|
33 |
|
sl@0
|
34 |
// Display some info during IN double-buffering
|
sl@0
|
35 |
//#define PRINT_MSDC_MULTITHREADED_READ_INFO
|
sl@0
|
36 |
|
sl@0
|
37 |
|
sl@0
|
38 |
#if defined(_USBMS_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
|
sl@0
|
39 |
#define __PRINT(t) {RDebug::Print(t);}
|
sl@0
|
40 |
#define __PRINT1(t,a) {RDebug::Print(t,a);}
|
sl@0
|
41 |
#define __PRINT2(t,a,b) {RDebug::Print(t,a,b);}
|
sl@0
|
42 |
#define __PRINT3(t,a,b,c) {RDebug::Print(t,a,b,c);}
|
sl@0
|
43 |
#define __PRINT4(t,a,b,c,d) {RDebug::Print(t,a,b,c,d);}
|
sl@0
|
44 |
#define __PRINT5(t,a,b,c,d,e) {RDebug::Print(t,a,b,c,d,e);}
|
sl@0
|
45 |
#define __PRINT8BIT1(t,a) {TFileName temp;temp.Copy(a);RDebug::Print(t,&temp);}
|
sl@0
|
46 |
#define __PRINT1TEMP(t,a) {TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}
|
sl@0
|
47 |
#define __PRINTERR(txt, err) {if(KErrNone != err) __PRINT1(txt, err);}
|
sl@0
|
48 |
|
sl@0
|
49 |
_LIT(KMsgIn, ">>%S\n");
|
sl@0
|
50 |
_LIT(KMsgOut,"<<%S\n");
|
sl@0
|
51 |
|
sl@0
|
52 |
class TMSLogFn
|
sl@0
|
53 |
{
|
sl@0
|
54 |
protected:
|
sl@0
|
55 |
TBuf<100> iName;
|
sl@0
|
56 |
|
sl@0
|
57 |
public:
|
sl@0
|
58 |
TMSLogFn(const TDesC& aName){iName = aName; RDebug::Print(KMsgIn, &iName);};
|
sl@0
|
59 |
~TMSLogFn(){RDebug::Print(KMsgOut, &iName);};
|
sl@0
|
60 |
};
|
sl@0
|
61 |
|
sl@0
|
62 |
#define __FNLOG(name) TMSLogFn __fn_log__(_L(name))
|
sl@0
|
63 |
|
sl@0
|
64 |
#else
|
sl@0
|
65 |
#define __PRINT(t)
|
sl@0
|
66 |
#define __PRINT1(t,a)
|
sl@0
|
67 |
#define __PRINT2(t,a,b)
|
sl@0
|
68 |
#define __PRINT3(t,a,b,c)
|
sl@0
|
69 |
#define __PRINT4(t,a,b,c,d)
|
sl@0
|
70 |
#define __PRINT5(t,a,b,c,d,e)
|
sl@0
|
71 |
#define __PRINT8BIT1(t,a)
|
sl@0
|
72 |
#define __PRINT1TEMP(t,a)
|
sl@0
|
73 |
#define __PRINTERR(txt,err)
|
sl@0
|
74 |
#define __FNLOG(name)
|
sl@0
|
75 |
#endif
|
sl@0
|
76 |
|
sl@0
|
77 |
#endif // __MASSSTORAGEDEBUG_H__
|