|
1 /* |
|
2 * Copyright (c) 2006 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: Interface to Browser for handling embedded video requests. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <flogger.h> |
|
21 #include "BavpLogger.h" |
|
22 |
|
23 // Logging methods for debugging. Only used in the UDEB version not UREL. |
|
24 // |
|
25 // aWrite: The aWrite boolean is used to allow the Log() methods to be left in the |
|
26 // code, but not write to a log file. To write to the log file, set aWrite to |
|
27 // ETrue. You should always set aWrite to EFalse before checking in, |
|
28 // this will ensure the log file will not be filled with excessive entries. This |
|
29 // is important, because the Bavp requires on-hardware debugging. |
|
30 // |
|
31 // AudioVideo: The name of the directory (folder) where the log file is written. |
|
32 // The path "C:\Logs\AudioVideo" must be specified to enable the logging. If no |
|
33 // path is specified, no log file is created and populated. |
|
34 // |
|
35 // log: This is the file name that is created and logging entries added. |
|
36 // |
|
37 #ifdef _DEBUG |
|
38 void Log( TBool aWrite, TPtrC aData ) |
|
39 { |
|
40 if ( aWrite ) |
|
41 { |
|
42 RFileLogger::WriteFormat( _L( "AudioVideo" ), _L( "bavp.log" ), |
|
43 EFileLoggingModeAppend, _L( "%S" ), |
|
44 &aData ); |
|
45 } |
|
46 } |
|
47 |
|
48 void Log( TBool aWrite, TPtrC aData, TInt aInt ) |
|
49 { |
|
50 if ( aWrite ) |
|
51 { |
|
52 RFileLogger::WriteFormat( _L( "AudioVideo" ), _L( "bavp.log" ), |
|
53 EFileLoggingModeAppend, _L( "%S, %d" ), |
|
54 &aData, aInt ); |
|
55 } |
|
56 } |
|
57 |
|
58 void Log( TBool aWrite, const TPtrC s, const TPtrC p) |
|
59 { |
|
60 if ( aWrite ) |
|
61 { |
|
62 RFileLogger::WriteFormat( _L( "AudioVideo" ), _L( "bavp.log" ), |
|
63 EFileLoggingModeAppend, _L("%S, %S"), |
|
64 &s, &p); |
|
65 } |
|
66 } |
|
67 |
|
68 void Log( TBool aWrite, const TPtrC8 s, const TPtrC8 p) |
|
69 { |
|
70 if ( aWrite ) |
|
71 { |
|
72 RFileLogger::WriteFormat( _L( "AudioVideo" ), _L( "bavp.log" ), |
|
73 EFileLoggingModeAppend, _L8("%S %S"), |
|
74 &s, &p); |
|
75 } |
|
76 } |
|
77 #else |
|
78 void Log( TBool /*aWrite*/, TPtrC /*aData*/ ) |
|
79 { |
|
80 } |
|
81 |
|
82 void Log( TBool /*aWrite*/, TPtrC /*aData*/, TInt /*aInt*/ ) |
|
83 { |
|
84 } |
|
85 void Log( TBool /*aWrite*/, const TPtrC /*s*/, const TPtrC /*p*/) |
|
86 { |
|
87 } |
|
88 void Log( TBool /*aWrite*/, const TPtrC8 /*s*/, const TPtrC8 /*p*/) |
|
89 { |
|
90 } |
|
91 #endif |