libraries/clogger/src/cflog.cpp
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // cflog.cpp
       
     2 // 
       
     3 // Copyright (c) 2006 - 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "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 // Accenture - Initial contribution
       
    11 //
       
    12 
       
    13 #include <cflog.h>
       
    14 
       
    15 #include <comms-infras/commsdebugutility.h>
       
    16 
       
    17 #define iFlog reinterpret_cast<RFileLogger*>(iCFLog)
       
    18 //class CCFLog
       
    19 
       
    20 
       
    21 CCFLogIf::CCFLogIf()
       
    22 	{
       
    23 	}
       
    24 
       
    25 void CCFLogIf::ConstructL()
       
    26 	{
       
    27 //	iCFLog = reintepret_cast<CCFLog*>(new(ELeave) RFileLogger);
       
    28 	}
       
    29 
       
    30 CCFLogIf::~CCFLogIf()
       
    31 	{
       
    32 //	iFlog->Close();
       
    33 //	delete iFlog;
       
    34 	}
       
    35 
       
    36 EXPORT_C CCFLogIf* CCFLogIf::NewL()
       
    37 	{
       
    38 /*
       
    39 	CCFLogIf* self = new(ELeave) CCFLogIf;
       
    40 	CleanupStack::PushL(self);
       
    41 	self->ConstructL();
       
    42 	CleanupStack::Pop(self);
       
    43 	return self;
       
    44 */
       
    45 	return NULL;
       
    46 	}
       
    47 
       
    48 EXPORT_C TInt CCFLogIf::Delete(CCFLogIf* aCFLogIf)
       
    49 	{
       
    50 	return 0;
       
    51 	}
       
    52 	
       
    53 EXPORT_C void CCFLogIf::Panic(TCFLogPanic aPanic)
       
    54 	{
       
    55 	_LIT(tcflogger, "TCFLogger-Clogger");
       
    56 	User::Panic(tcflogger, aPanic);	
       
    57 	}
       
    58 
       
    59 EXPORT_C CCFLogIf* CCFLogIf::Context()
       
    60 	{
       
    61 	return NULL;
       
    62 	}
       
    63 
       
    64 EXPORT_C void CCFLogIf::SetContext()
       
    65 	{
       
    66 	}
       
    67 
       
    68 
       
    69 EXPORT_C void CCFLogIf::Connect()
       
    70 	{
       
    71 	}
       
    72 
       
    73 EXPORT_C void Close()
       
    74 	{
       
    75 	}
       
    76 
       
    77 EXPORT_C void CCFLogIf::Write(const TDesC8& aSubsystem, const TDesC8& aComponent, const TDesC16& aText)
       
    78 	{
       
    79 	RFileLogger::Write(aSubsystem, aComponent, aText);
       
    80 	}
       
    81 
       
    82 EXPORT_C void CCFLogIf::WriteFormat(const TDesC8& aSubsystem, const TDesC8& aComponent, TRefByValue<const TDesC16> aFmt,...)
       
    83 	{
       
    84 	VA_LIST args;
       
    85 	VA_START(args, aFmt);
       
    86 
       
    87 	WriteFormat(aSubsystem, aComponent, aFmt, args);
       
    88 	VA_END(args);
       
    89 	}
       
    90 
       
    91 EXPORT_C void CCFLogIf::WriteFormat(const TDesC8& aSubsystem, const TDesC8& aComponent, TRefByValue<const TDesC16> aFmt, VA_LIST& aList)
       
    92 	{
       
    93 	RFileLogger::Write(aSubsystem, aComponent, aFmt, aList);
       
    94 	}
       
    95 
       
    96 EXPORT_C void CCFLogIf::Write(const TDesC8& aSubsystem, const TDesC8& aComponent, const TDesC8& aText)
       
    97 	{
       
    98 	RFileLogger::Write(aSubsystem, aComponent, aText);
       
    99 	}
       
   100 
       
   101 EXPORT_C void CCFLogIf::WriteFormat(const TDesC8& aSubsystem, const TDesC8& aComponent, TRefByValue<const TDesC8> aFmt,...)
       
   102 	{
       
   103 	VA_LIST args;
       
   104 	VA_START(args, aFmt);
       
   105 
       
   106 	WriteFormat(aSubsystem, aComponent, aFmt, args);
       
   107 	VA_END(args);
       
   108 	}
       
   109 
       
   110 EXPORT_C void CCFLogIf::WriteFormat(const TDesC8& aSubsystem, const TDesC8& aComponent, TRefByValue<const TDesC8> aFmt, VA_LIST& aList)
       
   111 	{
       
   112 	RFileLogger::Write(aSubsystem, aComponent, aFmt, aList);
       
   113 	}
       
   114 
       
   115 EXPORT_C void CCFLogIf::WriteBinary(const TDesC8& aSubsystem, const TDesC8& aComponent, const TDesC8& aData)
       
   116 	{
       
   117 	RFileLogger::WriteBinary(aSubsystem, aComponent, aData);
       
   118 	}
       
   119 
       
   120 EXPORT_C void CCFLogIf::HexDump(const TDesC8& aSubsystem, const TDesC8& aComponent, const TText* aHeader, const TText* aMargin, const TUint8* aPtr, TInt aLen)
       
   121 	{
       
   122 	RFileLogger::HexDump(aSubsystem, aComponent, aData);
       
   123 	}
       
   124