tracesrv/tracecore/btrace_handler/inc/TraceCoreSettings.h
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 #ifndef __TRACECORESETTINGS_H__
       
    18 #define __TRACECORESETTINGS_H__
       
    19 
       
    20 
       
    21 // Include files
       
    22 #include <kernel/kernel.h>
       
    23 
       
    24 
       
    25 /**
       
    26  * Interface for saving and restoring trace activation settings
       
    27  */
       
    28 class DTraceCoreSettings : public DBase
       
    29     {
       
    30 public:
       
    31 
       
    32     /**
       
    33      * Constructor
       
    34      *
       
    35      * @param aWriterType Type of writer 
       
    36      */
       
    37     IMPORT_C DTraceCoreSettings();
       
    38 
       
    39     /**
       
    40      * Destructor
       
    41      */    
       
    42     IMPORT_C virtual ~DTraceCoreSettings();
       
    43 
       
    44     /**
       
    45      * Registers this activation settings saver to TraceCore. Only one saver can register.
       
    46      */
       
    47     IMPORT_C TInt Register();
       
    48     
       
    49     /**
       
    50      * Write settings
       
    51      * 
       
    52      * @param aBuffer Buffer to save
       
    53      */
       
    54     virtual void Write( const TUint8* aBuffer, TUint32 aLength ) = 0;
       
    55     
       
    56     /**
       
    57      * Read settings
       
    58      * 
       
    59      * @param aBuffer Buffer where to read
       
    60      * @return ETrue if buffer copied
       
    61      */
       
    62     virtual TBool Read( TUint8* aBuffer, TUint32 aLength ) = 0;
       
    63     
       
    64 private:
       
    65     
       
    66     /**
       
    67      * Unregisters this activation settings saver from TraceCore.
       
    68      */
       
    69     TInt Unregister();
       
    70     };
       
    71 
       
    72 #endif //__TRACECOREACTIVATIONSETTINGSIF_H__
       
    73 
       
    74 // End of File