tracesrv/tracecore/plugins/xti_if/common/inc/TraceCoreMessageUtils.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 // Utility functions for messaging
       
    15 
       
    16 #ifndef __TIsaIfMessageUtils_H__
       
    17 #define __TIsaIfMessageUtils_H__
       
    18 
       
    19 
       
    20 // Include files
       
    21 #include <kernel/kernel.h>
       
    22 
       
    23 
       
    24 // Forward declarations
       
    25 class TTraceMessage;
       
    26 
       
    27 
       
    28 /**
       
    29  * Utility functions for messaging
       
    30  */
       
    31 class TXtiIfMessageUtils
       
    32 	{
       
    33 public:
       
    34     /**
       
    35      * Get the message length 
       
    36      * 
       
    37      * @param aMsg Message to be sent.
       
    38      * @return length of one of symbian error codes
       
    39      */
       
    40     static TInt GetMessageLength( const TTraceMessage& aMsg );
       
    41     
       
    42     /**
       
    43      * Merges the header and data into a single buffer
       
    44      * 
       
    45      * @param aMsg Message to be sent.
       
    46      * @param aMsgBlock The message block where data is merged
       
    47      * @return Symbian error code
       
    48      */
       
    49     static TInt MergeHeaderAndData( const TTraceMessage& aMsg, TDes8& aTarget );
       
    50 	};
       
    51     
       
    52 
       
    53 #endif /*__TRACECOREISAUTILS_H__*/