tracesrv/tracecore/btrace_handler/src/tracecore_ext.cpp
changeset 56 aa2539c91954
equal deleted inserted replaced
54:a151135b0cf9 56:aa2539c91954
       
     1 // Copyright (c) 2007-2010 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 // Trace Core 
       
    15 //
       
    16 
       
    17 #include <e32def.h>
       
    18 #include <e32btrace.h>
       
    19 
       
    20 #include "TraceCore.h"
       
    21 #include "TraceCoreDebug.h"
       
    22 
       
    23 DECLARE_STANDARD_EXTENSION()
       
    24     {    
       
    25     TC_TRACE( ETraceLevelNormal, Kern::Printf( "DECLARE_STANDARD_EXTENSION Start Trace Core" ) );
       
    26     TInt ret;
       
    27     DTraceCore* tracecore = DTraceCore::CreateInstance();
       
    28     if ( tracecore != NULL )
       
    29         {
       
    30         ret = KErrNone;
       
    31         POSTCODE( Kern::Printf("[POST][TraceCore][Start][OK]"); )
       
    32         }
       
    33     else
       
    34         {
       
    35         //TODO: don't fail phone's startup sequence when DTraceCore obj is not created
       
    36         //TODO: fail only in debug mode
       
    37         ret = KErrNoMemory;
       
    38         POSTCODE( Kern::Printf("[POST][TraceCore][Start][FAIL][%d]", ret ); )
       
    39         }
       
    40     
       
    41     return ret;
       
    42     }