tracesrv/tracecore/btrace_handler/inc/TraceCoreActivation.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 // Interface to activation bitmap classes
       
    15 //
       
    16 
       
    17 #ifndef __TRACECOREACTIVATION_H__
       
    18 #define __TRACECOREACTIVATION_H__
       
    19 
       
    20 
       
    21 class MTraceCoreActivation;
       
    22 class DTraceCoreSettings;
       
    23 
       
    24 
       
    25 /**
       
    26  * Interface to get change notification from activation classes
       
    27  */
       
    28 NONSHARABLE_CLASS( MTraceCoreActivationNotification )
       
    29     {
       
    30 public:
       
    31 
       
    32     /**
       
    33      * Notification that the activation state has changed
       
    34      * 
       
    35      * @param aActivation the activation interface that was updated
       
    36      * @param aFromSettings ETrue if activation was due to settings read, EFalse if from some other source
       
    37      * @param aComponentId Component ID of the activation
       
    38      */
       
    39     virtual void ActivationChanged( MTraceCoreActivation& aActivation, TBool aFromSettings,
       
    40             TUint32 aComponentId ) = 0;
       
    41     };
       
    42 
       
    43 
       
    44 /**
       
    45  * Interface to activation classes
       
    46  */
       
    47 NONSHARABLE_CLASS( MTraceCoreActivation )
       
    48     {
       
    49 public:
       
    50 
       
    51     /**
       
    52      * Checks if this bitmap supports the given component ID
       
    53      */
       
    54     virtual TBool IsComponentSupported( TUint32 aComponentID ) = 0;
       
    55     
       
    56     /**
       
    57      * Gets activated groups for this component ID
       
    58      * @param aComponentId the component ID
       
    59      */
       
    60     virtual RArray<TUint> GetActivatedGroups( const TUint32 aComponentId ) = 0;
       
    61     
       
    62     /**
       
    63      * Updates this activation object from the given settings
       
    64      * 
       
    65      * @param aSettings the settings to be read
       
    66      */
       
    67     virtual void ReadFromSettings( DTraceCoreSettings& aSettings ) = 0;
       
    68     
       
    69     /**
       
    70      * Updates the settings with the content of this activation object
       
    71      * 
       
    72      * @param aSettings the settings to be written
       
    73      */
       
    74     virtual void WriteToSettings( DTraceCoreSettings& aSettings ) = 0;
       
    75     
       
    76     /**
       
    77      * Registers an activation notification interface
       
    78      */
       
    79     virtual TInt RegisterActivationNotification( MTraceCoreActivationNotification& aNotification ) = 0;
       
    80     
       
    81      /**
       
    82      * Activate trace group.
       
    83      * Method can be called only from Symbian OS thread context. 
       
    84      * Activation of groupID/ComponentID from IRQs, IDFCs is not allowed.
       
    85      *
       
    86      * @param aComponentId The component ID
       
    87      * @param aGroupId The group ID
       
    88      */
       
    89     virtual void ActivateTrace( const TUint32 aComponentId, const TUint32 aGroupId ) = 0;
       
    90     
       
    91     /**
       
    92      * Deactivate trace group
       
    93      *
       
    94      * Method can be called only from Symbian OS thread context.
       
    95      * Activation of groupID/ComponentID from IRQs, IDFCs is not allowed.
       
    96      * 
       
    97      * @param aComponentId The component ID
       
    98      * @param aGroupId The group ID
       
    99      */
       
   100     virtual void DeactivateTrace( const TUint32 aComponentId, const TUint32 aGroupId ) = 0;
       
   101 
       
   102     /**
       
   103      * Deactivates all groups from a component
       
   104      * 
       
   105      * @param aComponentId The component ID
       
   106      */
       
   107     virtual void DeactivateAll( const TUint32 aComponentId ) = 0;
       
   108 
       
   109     /**
       
   110      * Reactivate all currently activated traces
       
   111      * 
       
   112      * @return KErrNone if refresh successful
       
   113      */
       
   114     virtual TInt RefreshActivations() { return KErrNotFound; };
       
   115     };
       
   116 
       
   117     
       
   118 #endif // __TRACECOREACTIVATION_H__