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