Update contrib.
1 // Copyright (c) 2005-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 "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\debug\d_logtofile.h
18 #ifndef __D_LOGTOFILE_H__
19 #define __D_LOGTOFILE_H__
22 #ifndef __KERNEL_MODE__
27 Data structure for CreateChunk call to ldd
29 struct TChunkCreateStr
31 TInt iSize; /**The size of the chunk to be created*/
32 TBuf8<10> iPattern; /**The matching pattern*/
36 The user side class for controlling trace handler hook.
38 class RLogToFileDevice : public RBusLogicalChannel
49 #ifndef __KERNEL_MODE__
52 inline TInt CreateChunk(TChunkCreateStr* aStr);
55 inline void RemoveChunk();
56 #endif //__KERNEL_MODE__
59 _LIT(KLogToFileName,"d_logtofile");
61 #ifndef __KERNEL_MODE__
63 inline TInt RLogToFileDevice::Open()
64 {return DoCreate(KLogToFileName,TVersion(1,0,0),KNullUnit,NULL,NULL);}
65 /**Creates a chunk. Returns user side handle*/
66 inline TInt RLogToFileDevice::CreateChunk(TChunkCreateStr* aStr)
67 {return DoControl(EControlCreateChunk, reinterpret_cast<TAny*>(aStr));}
68 /**Starts logging into the chunk*/
69 inline void RLogToFileDevice::Start()
70 {DoControl(EControlStart);}
71 /**Stops logging into the chunk. Returns the size of the log.*/
72 inline TInt RLogToFileDevice::Stop()
73 {return DoControl(EControlStop);}
74 /*Destroys the chunk*/
75 inline void RLogToFileDevice::RemoveChunk()
76 {DoControl(EControlRemoveChunk);}
77 #endif //__KERNEL_MODE__
78 #endif //__D_LOGTOFILE_H__