|
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 "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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Implements the Flogger server side data writing |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include "comsdbgwriter.h" |
|
24 |
|
25 _LIT8(KTypeIdentifierBinary, "b"); |
|
26 |
|
27 COstv2Writer* COstv2Writer::NewL() |
|
28 { |
|
29 return new(ELeave) COstv2Writer(); |
|
30 } |
|
31 |
|
32 void COstv2Writer::LogString(const TDesC8& aString) |
|
33 { |
|
34 OstPrintf(iContext, aString); |
|
35 } |
|
36 |
|
37 void COstv2Writer::LogBinaryDump(const TDesC8& aBinaryString, const TDesC8& aSubSystem, const TDesC8& aComponent) |
|
38 { |
|
39 TUint32 length = static_cast<TUint32>(aBinaryString.Length()); |
|
40 TBuf8<sizeof(TUint32)> lengthString(4); |
|
41 lengthString[0] = static_cast<TUint8>((length & 0x000000ff) >> 0); |
|
42 lengthString[1] = static_cast<TUint8>((length & 0x0000ff00) >> 8); |
|
43 lengthString[2] = static_cast<TUint8>((length & 0x00ff0000) >> 16); |
|
44 lengthString[3] = static_cast<TUint8>((length & 0xff000000) >> 24); |
|
45 OstPrintf(iContext, "%S\t%S\t%S\t%S\t%S", &aSubSystem, &aComponent, &KTypeIdentifierBinary, &lengthString, &aBinaryString); |
|
46 } |
|
47 |
|
48 |
|
49 // NOPs for ost |
|
50 void COstv2Writer::ClearLogL() |
|
51 { |
|
52 } |
|
53 |
|
54 void COstv2Writer::FlushLogL() |
|
55 { |
|
56 } |
|
57 |
|
58 void COstv2Writer::SetForceFlush(const TBool /*aOn*/) |
|
59 { |
|
60 } |
|
61 |