tracesrv/tracecore/btrace_handler/inc/TraceCorePluginIf.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 class for media plug-ins
       
    15 // 
       
    16 
       
    17 #ifndef __TRACECOREPLUGINIF_H__
       
    18 #define __TRACECOREPLUGINIF_H__
       
    19 
       
    20 
       
    21 // Include files
       
    22 #include <kernel/kernel.h>
       
    23 #include "TraceCoreMediaIf.h"
       
    24 
       
    25 
       
    26 // Forward declarations
       
    27 class DTraceCoreMediaPlugin;
       
    28 class TTraceMessage;
       
    29 
       
    30 /**
       
    31  * Interface class for media plug-ins
       
    32  */
       
    33 NONSHARABLE_CLASS( DTraceCorePluginIf ) : public DTraceCoreMediaIf
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Constructor
       
    39      */
       
    40     DTraceCorePluginIf();
       
    41     
       
    42     /**
       
    43      * Destructor
       
    44      */
       
    45     ~DTraceCorePluginIf();
       
    46     
       
    47     /**
       
    48      * Initializes this interface
       
    49      * 
       
    50      * @param aCallback Callback interface which is notified when ISI messages are received
       
    51      */
       
    52 	TInt Init( MTraceCoreMediaIfCallback& aCallback );
       
    53 	
       
    54 	/**
       
    55 	 * Sends a message
       
    56 	 *
       
    57 	 * @param aMsg The message to be sent
       
    58 	 */
       
    59 	TInt Send( TTraceMessage& aMsg );
       
    60 	
       
    61 	/**
       
    62 	 * Registers a media plug-in
       
    63 	 */
       
    64 	TInt RegisterPlugin( DTraceCoreMediaPlugin& aPlugin );
       
    65 	
       
    66 	/**
       
    67 	 * Unregisters a media plug-in
       
    68 	 */
       
    69 	void UnregisterPlugin( DTraceCoreMediaPlugin& aPlugin );
       
    70 	
       
    71 	/**
       
    72 	 * Message was received by plug-in
       
    73      * 
       
    74      * @param aMsg The message that was received
       
    75 	 */
       
    76 	void MessageReceived( TTraceMessage &aMsg );
       
    77 	
       
    78 private:
       
    79 
       
    80     /**
       
    81      * Media plug-in. Currently only one supported
       
    82      */
       
    83     DTraceCoreMediaPlugin* iMediaPlugin;
       
    84     };
       
    85 
       
    86 #endif // __TRACECOREPLUGINIF_H__
       
    87 
       
    88 // End of File