sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Trace API sl@0: // sl@0: // sl@0: sl@0: #ifndef UTRACE_H sl@0: #define UTRACE_H sl@0: sl@0: #ifdef __KERNEL_MODE__ sl@0: #include sl@0: #else //__KERNEL_MODE__ sl@0: #include sl@0: #endif //__KERNEL_MODE__ sl@0: #include sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @prototype sl@0: */ sl@0: sl@0: /** sl@0: Primary filter type. sl@0: The primary filter type used as classification information. sl@0: */ sl@0: typedef TUint8 TPrimaryFilter; sl@0: /** sl@0: Secondary filter type. sl@0: The secondary filter type used as classification information. sl@0: */ sl@0: typedef TUint32 TSecondaryFilter; sl@0: sl@0: sl@0: /** sl@0: The trace contains information used to debug an application sl@0: This can be used in both UREL and UDEB builds. sl@0: */ sl@0: const TPrimaryFilter KDebug = 253; sl@0: sl@0: sl@0: /** sl@0: Schema type. sl@0: Use the schema in conjunction with primary and secondary filters to determine sl@0: how a trace shall be interpreted. sl@0: The schema must represent a specific, well-documented, and consistent plan; sl@0: a way to define the structure and/or its content. sl@0: */ sl@0: typedef TUint8 TTraceSchema; sl@0: sl@0: /** sl@0: The schema is binary, or raw data. sl@0: */ sl@0: const TTraceSchema KBinary = 0;//Binary format sl@0: /** sl@0: The schema is ASCII text. sl@0: */ sl@0: const TTraceSchema KText = 1;//Text only sl@0: sl@0: /** sl@0: Maximum length of a formatted string sl@0: */ sl@0: const TInt KMaxPrintfSize = 256; sl@0: sl@0: sl@0: /**@internalComponent*/ sl@0: #define UTRACE_HEADER(aSize,aF1,aSchema,aContext,aPc) \ sl@0: ((((aSize)+(4&(TBool)aContext<<2)+(4&(TBool)aPc<<2))< buf; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: Kern::AppendFormat(buf,aFmt,list); sl@0: TUint8 oldFormat = iSchema; sl@0: iSchema = KText; sl@0: TBool logged = EFalse; sl@0: logged = Trace(buf.Ptr(),buf.Size()); sl@0: iSchema = oldFormat; sl@0: return logged; sl@0: } sl@0: sl@0: #else //__KERNEL_MODE__ sl@0: sl@0: /** sl@0: Prints a formatted string. sl@0: sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(const char* aFmt, ...) sl@0: { sl@0: TTruncateOverflow8 overflow; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: TPtrC8 fmt((const TText8*)aFmt); sl@0: TBuf8 buf; sl@0: buf.AppendFormatList(fmt,list,&overflow); sl@0: TUint8 oldFormat = iSchema; sl@0: iSchema = KText; sl@0: TBool logged = EFalse; sl@0: logged = Trace(buf.PtrZ(),buf.Size()); sl@0: iSchema = oldFormat; sl@0: return logged; sl@0: }; sl@0: sl@0: /** sl@0: Prints a formatted string. sl@0: sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(TRefByValue aFmt,...) sl@0: { sl@0: TTruncateOverflow16 overflow; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: TBuf buf; sl@0: buf.AppendFormatList(aFmt,list,&overflow); sl@0: TUint8 oldFormat = iSchema; sl@0: iSchema = KText; sl@0: TBool logged = EFalse; sl@0: #ifdef _UNICODE sl@0: TPtr8 p(buf.Collapse()); sl@0: logged = Trace(buf.PtrZ(), p.Size()); sl@0: #else sl@0: logged = Trace(buf.PtrZ(), buf.Size()); sl@0: #endif //_UNICODE sl@0: iSchema = oldFormat; sl@0: return logged; sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. sl@0: sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(const TDesC8& aDes) sl@0: { sl@0: TUint8 oldFormat = iSchema; sl@0: iSchema = KText; sl@0: TBool logged = EFalse; sl@0: logged = Trace(aDes.Ptr(), aDes.Size()); sl@0: iSchema = oldFormat; sl@0: return logged; sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. sl@0: sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(const TDesC16& aDes) sl@0: { sl@0: TUint8 oldFormat = iSchema; sl@0: iSchema = KText; sl@0: TBool logged = EFalse; sl@0: logged = Trace(aDes.Ptr(), aDes.Size()); sl@0: iSchema = oldFormat; sl@0: return logged; sl@0: }; sl@0: sl@0: #endif //__KERNEL_MODE__ sl@0: sl@0: /** sl@0: Sends a trace with no payload data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace() sl@0: { sl@0: if(iF2 > 0) sl@0: { sl@0: return UTraceSf0(iF1,iF2,iSchema,ContextID(),Pc()); sl@0: } sl@0: return UTracePf0(iF1,iSchema,ContextID(),Pc()); sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace containing 4 bytes of data. sl@0: sl@0: @param aData1 4 bytes of data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace(TUint32 aData1) sl@0: { sl@0: if(iF2 > 0) sl@0: { sl@0: return UTraceSf1(iF1,iF2,iSchema,ContextID(),Pc(), aData1); sl@0: } sl@0: return UTracePf1(iF1,iSchema,ContextID(),Pc(), aData1); sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace with 8 bytes of data. sl@0: sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace(TUint32 aData1, TUint32 aData2) sl@0: { sl@0: if(iF2 > 0) sl@0: { sl@0: return UTraceSf2(iF1,iF2,iSchema,ContextID(),Pc(), aData1, aData2); sl@0: } sl@0: return UTracePf2(iF1,iSchema,ContextID(),Pc(),aData1,aData2); sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace with 12 bytes of data. sl@0: Note: This method does not support secondary filtering. sl@0: sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: @param aData3 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace(TUint32 aData1, TUint32 aData2, TUint32 aData3) sl@0: { sl@0: if(iF2 > 0) sl@0: { sl@0: return EFalse; sl@0: } sl@0: return UTracePf3(iF1,iSchema,ContextID(),Pc(),aData1,aData2,aData3); sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace with variable length data. sl@0: sl@0: If the specified data is too big to fit into a single sl@0: trace record a multipart trace is generated. sl@0: sl@0: @param aData Address of addition data to add to trace. sl@0: Must be word aligned, i.e. a multiple of 4. sl@0: @param aSize Number of bytes of additional data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: TBool Trace(const TAny* aData, TInt aSize) sl@0: { sl@0: if(iF2 > 0) sl@0: { sl@0: return UTraceSfAny(iF1,iF2,iSchema,ContextID(),Pc(),aData,aSize); sl@0: } sl@0: return UTracePfAny(iF1,iSchema,ContextID(),Pc(),0,aData,aSize); sl@0: }; sl@0: sl@0: sl@0: //Static methods sl@0: #ifdef __KERNEL_MODE__ sl@0: sl@0: /** sl@0: Prints a formatted string in kernel mode only. sl@0: The trace is classified by primary filter only. sl@0: sl@0: The function uses Kern::AppendFormat() to do the formatting. sl@0: sl@0: Although it is safe to call this function from an ISR, it polls the output sl@0: serial port and may take a long time to complete, invalidating any sl@0: real-time guarantee. sl@0: sl@0: If called from an ISR, it is possible for output text to be intermingled sl@0: with other output text if one set of output interrupts or preempts another. sl@0: sl@0: Some of the formatting options may not work inside an ISR. sl@0: sl@0: Be careful not to use a string that is too long to fit onto the stack. sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Calling thread can either be in a critical section or not. sl@0: @pre Interrupts must be enabled. sl@0: @pre Kernel must be unlocked sl@0: @pre Call in any context. sl@0: @pre Suitable for use in a device driver sl@0: sl@0: @see Kern::AppendFormat() sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const char* aFmt, ...) sl@0: { sl@0: TBuf8 buf; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: Kern::AppendFormat(buf,aFmt,list); sl@0: return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.Ptr(),buf.Size()); sl@0: } sl@0: sl@0: #else //__KERNEL_MODE__ sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary filter only. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const char* aFmt, ...) sl@0: { sl@0: TTruncateOverflow8 overflow; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: TPtrC8 fmt((const TText8*)aFmt); sl@0: TBuf8 buf; sl@0: buf.AppendFormatList(fmt,list,&overflow); sl@0: return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.PtrZ(),buf.Size()); sl@0: }; sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary filter only. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, TRefByValue aFmt,...) sl@0: { sl@0: TTruncateOverflow16 overflow; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: TBuf buf; sl@0: buf.AppendFormatList(aFmt,list,&overflow); sl@0: #ifdef _UNICODE sl@0: TPtr8 p(buf.Collapse()); sl@0: return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.PtrZ(), p.Size()); sl@0: #else sl@0: return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc, 0, buf.PtrZ(), buf.Size()); sl@0: #endif //_UNICODE sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary filter only. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const TDesC8& aDes) sl@0: { sl@0: return UTracePfAny(aF1, KText, aIncludeContextID, aIncludePc,0, aDes.Ptr(), aDes.Size()); sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary filter only. sl@0: sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter aF1, TBool aIncludeContextID, TBool aIncludePc, const TDesC16& aDes) sl@0: { sl@0: TUTrace trace(aF1,KText,aIncludeContextID,aIncludePc); sl@0: return trace.Printf(aDes); sl@0: }; sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary and secondary filter. sl@0: sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, const char* aFmt, ...) sl@0: { sl@0: TTruncateOverflow8 overflow; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: TPtrC8 fmt((const TText8*)aFmt); sl@0: TBuf8 buf; sl@0: buf.AppendFormatList(fmt,list,&overflow); sl@0: return UTraceSfAny(aF1, aF2, KText, aIncludeContextID, aIncludePc, buf.PtrZ(),buf.Size()); sl@0: }; sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary and secondary filter. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, TRefByValue aFmt,...) sl@0: { sl@0: TTruncateOverflow16 overflow; sl@0: VA_LIST list; sl@0: VA_START(list,aFmt); sl@0: TBuf buf; sl@0: buf.AppendFormatList(aFmt,list,&overflow); sl@0: #ifdef _UNICODE sl@0: TPtr8 p(buf.Collapse()); sl@0: return UTraceSfAny(aF1, aF2, KText, aIncludeContextID, aIncludePc, buf.PtrZ(), p.Size()); sl@0: #else sl@0: return UTraceSfAny(aF1, aF2, KText, aIncludeContextID, aIncludePc, buf.PtrZ(), buf.Size()); sl@0: #endif //_UNICODE sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary and secondary filter. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, const TDesC8& aDes) sl@0: { sl@0: return UTraceSfAny(aF1, aF2, KText,aIncludeContextID, aIncludePc, aDes.Ptr(), aDes.Size()); sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary and secondary filter. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter aF1, TSecondaryFilter aF2, TBool aIncludeContextID, TBool aIncludePc, const TDesC16& aDes) sl@0: { sl@0: TUTrace trace(aF1,aF2,KText,aIncludeContextID,aIncludePc); sl@0: return trace.Printf(aDes); sl@0: }; sl@0: sl@0: #endif //__KERNEL_MODE_ sl@0: sl@0: /** sl@0: Sends a trace with no payload. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc) sl@0: { sl@0: return UTracePf0(aF1, aSchema, aIncludeContextID, aIncludePc); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with 4 bytes of data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1) sl@0: { sl@0: return UTracePf1(aF1, aSchema, aIncludeContextID, aIncludePc, aData1); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with 8 bytes of data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1, TUint32 aData2) sl@0: { sl@0: return UTracePf2(aF1, aSchema, aIncludeContextID, aIncludePc,aData1,aData2); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with 12 bytes of data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: @param aData3 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1, TUint32 aData2, TUint aData3) sl@0: { sl@0: return UTracePf3(aF1, aSchema, aIncludeContextID, aIncludePc,aData1,aData2,aData3); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with variable length data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: If the specified data is too big to fit into a single sl@0: trace record a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData Address of addition data to add to trace. sl@0: Must be word aligned, i.e. a multiple of 4. sl@0: @param aSize Number of bytes of additional data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter aF1, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, const TAny* aData, TInt aSize) sl@0: { sl@0: return UTracePfAny(aF1, aSchema, aIncludeContextID, aIncludePc, 0, aData, aSize); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with no payload. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc) sl@0: { sl@0: return UTraceSf0(aF1, aF2, aSchema, aIncludeContextID, aIncludePc); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with 4 bytes of data. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1) sl@0: { sl@0: return UTraceSf1(aF1, aF2, aSchema , aIncludeContextID, aIncludePc, aData1); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with 8 bytes of data. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, TUint32 aData1, TUint32 aData2) sl@0: { sl@0: return UTraceSf2(aF1, aF2, aSchema , aIncludeContextID, aIncludePc,aData1,aData2); sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with variable length data. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: If the specified data is too big to fit into a single sl@0: trace record a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData Address of addition data to add to trace. sl@0: Must be word aligned, i.e. a multiple of 4. sl@0: @param aSize Number of bytes of additional data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @see BTrace::TMultipart sl@0: */ sl@0: static TBool Trace(TPrimaryFilter aF1, TSecondaryFilter aF2, TTraceSchema aSchema, TBool aIncludeContextID, TBool aIncludePc, const TAny* aData, TInt aSize) sl@0: { sl@0: return UTraceSfAny(aF1, aF2, aSchema, aIncludeContextID, aIncludePc, aData, aSize); sl@0: } sl@0: sl@0: private: sl@0: sl@0: // See/Update comments below sl@0: TUTrace(){}; sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: enum TTraceInfoPresent sl@0: { sl@0: EContext = 0, sl@0: EPc = 1 sl@0: }; sl@0: sl@0: /** sl@0: Dummy class to toss away overflow sl@0: @internalComponent sl@0: */ sl@0: #ifndef __KERNEL_MODE__ sl@0: class TTruncateOverflow16 : public TDes16Overflow sl@0: { sl@0: public: sl@0: virtual void Overflow(TDes&) {}; sl@0: }; sl@0: /** sl@0: Dummy class to toss away overflow sl@0: @internalComponent sl@0: */ sl@0: class TTruncateOverflow8 : public TDes8Overflow sl@0: { sl@0: public: sl@0: virtual void Overflow(TDes8&) {}; sl@0: }; sl@0: #endif //__KERNEL_MODE__ sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: TBool ContextID() sl@0: { sl@0: return iPresent&1; sl@0: }; sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: TBool Pc() sl@0: { sl@0: return (iPresent&2)>>EPc; sl@0: }; sl@0: sl@0: private: sl@0: TPrimaryFilter iF1; sl@0: TTraceSchema iSchema; sl@0: TSecondaryFilter iF2; sl@0: TInt8 iPresent; sl@0: sl@0: TUint32 iReserved1; sl@0: TUint32 iReserved2; sl@0: }; sl@0: sl@0: #else //SYMBIAN_TRACE_ENABLE sl@0: sl@0: sl@0: class TUTrace sl@0: { sl@0: public: sl@0: /** sl@0: Construct a trace object with classification for sl@0: primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: */ sl@0: TUTrace(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){}; sl@0: sl@0: /** sl@0: Construct a trace object with classification for both sl@0: primary and secondary filters. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: */ sl@0: TUTrace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){}; sl@0: sl@0: /** sl@0: Set the classification and additional information. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: */ sl@0: void Set(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){}; sl@0: sl@0: /** sl@0: Set the classification and additional information. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: */ sl@0: void Set(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/){}; sl@0: #ifdef __KERNEL_MODE__ sl@0: sl@0: /** sl@0: Prints a formatted string in kernel mode only. sl@0: sl@0: The function uses Kern::AppendFormat() to do the formatting. sl@0: sl@0: Although it is safe to call this function from an ISR, it polls the output sl@0: serial port and may take a long time to complete, invalidating any sl@0: real-time guarantee. sl@0: sl@0: If called from an ISR, it is possible for output text to be intermingled sl@0: with other output text if one set of output interrupts or preempts another. sl@0: sl@0: Some of the formatting options may not work inside an ISR. sl@0: sl@0: Be careful not to use a string that is too long to fit onto the stack. sl@0: If the specified string is too big to fit into a single trace sl@0: a multipart trace is generated. sl@0: sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Calling thread can either be in a critical section or not. sl@0: @pre Interrupts must be enabled. sl@0: @pre Kernel must be unlocked sl@0: @pre Call in any context. sl@0: @pre Suitable for use in a device driver sl@0: @pre Classification information must be set up sl@0: sl@0: @see Kern::AppendFormat() sl@0: @See BTrace::TMultipart sl@0: */ sl@0: TBool Printf(const char* /*aFmt*/, ...) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: #else //__KERNEL_MODE__ sl@0: sl@0: /** sl@0: Prints a formatted string. sl@0: sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(const char* /*aFmt*/, ...) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Prints a formatted string. sl@0: sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(TRefByValue /*aFmt*/,...) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. sl@0: sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(const TDesC8& /*aDes*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. sl@0: sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Printf(const TDesC16& /*aDes*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: #endif // __KERNEL_MODE__ sl@0: sl@0: /** sl@0: Sends a trace with no payload data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace() sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace containing 4 bytes of data. sl@0: sl@0: @param aData1 4 bytes of data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace(TUint32 /*aData1*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace with 8 bytes of data. sl@0: sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace(TUint32 /*aData1*/, TUint32 /*aData2*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace with 12 bytes of data. sl@0: Note: This method does not support secondary filtering. sl@0: sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: @param aData3 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: */ sl@0: TBool Trace(TUint32 /*aData1*/, TUint32 /*aData2*/, TUint32 /*aData3*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Sends a trace with variable length data. sl@0: sl@0: If the specified data is too big to fit into a single sl@0: trace record a multipart trace is generated. sl@0: sl@0: @param aData Address of addition data to add to trace. sl@0: Must be word aligned, i.e. a multiple of 4. sl@0: @param aSize Number of bytes of additional data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Classification information must be set up sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: TBool Trace(const TAny* /*aData*/, TInt /*aSize*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: #ifdef __KERNEL_MODE__ sl@0: sl@0: /** sl@0: Prints a formatted string in kernel mode only. sl@0: The trace is classified by primary filter only. sl@0: sl@0: The function uses Kern::AppendFormat() to do the formatting. sl@0: sl@0: Although it is safe to call this function from an ISR, it polls the output sl@0: serial port and may take a long time to complete, invalidating any sl@0: real-time guarantee. sl@0: sl@0: If called from an ISR, it is possible for output text to be intermingled sl@0: with other output text if one set of output interrupts or preempts another. sl@0: sl@0: Some of the formatting options may not work inside an ISR. sl@0: sl@0: Be careful not to use a string that is too long to fit onto the stack. sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @pre Calling thread can either be in a critical section or not. sl@0: @pre Interrupts must be enabled. sl@0: @pre Kernel must be unlocked sl@0: @pre Call in any context. sl@0: @pre Suitable for use in a device driver sl@0: sl@0: @see Kern::AppendFormat() sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const char* /*aFmt*/, ...) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: #else //__KERNEL_MODE__ sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary filter only. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const char* /*aFmt*/, ...) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary filter only. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TRefByValue /*aFmt*/,...) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary filter only. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC8& /*aDes*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary filter only. sl@0: sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool PrintfPrimary(TPrimaryFilter /*aF1*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC16& /*aDes*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary and secondary filter. sl@0: sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const char* /*aFmt*/, ...) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: Prints a formatted string. The trace is classified by primary and secondary filter. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aFmt The format string. This must not be longer than 256 characters. sl@0: @param ... A variable number of arguments to be converted to text as dictated sl@0: by the format string. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TRefByValue /*aFmt*/,...) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary and secondary filter. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC8& /*aDes*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Prints a string. The trace is classified by primary and secondary filter. sl@0: sl@0: If the specified string is too long to fit into a single trace record sl@0: a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aDes The string. This can be of variable length. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool Printf(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TDesC16& /*aDes*/) sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: #endif //__KERNEL_MODE_ sl@0: sl@0: /** sl@0: Sends a trace with no payload. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Sends a trace with 4 bytes of data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/) sl@0: sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: /** sl@0: Sends a trace with 8 bytes of data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/, TUint32 /*aData2*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Sends a trace with 12 bytes of data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: @param aData3 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/, TUint32 /*aData2*/, TUint /*aData3*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Sends a trace with variable length data. The trace is classified sl@0: by primary filter only. sl@0: sl@0: If the specified data is too big to fit into a single sl@0: trace record a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData Address of addition data to add to trace. sl@0: Must be word aligned, i.e. a multiple of 4. sl@0: @param aSize Number of bytes of additional data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool TracePrimary(TPrimaryFilter /*aF1*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TAny* /*aData*/, TInt /*aSize*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Sends a trace with no payload. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Sends a trace with 4 bytes of data. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Sends a trace with 8 bytes of data. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData1 4 bytes of data sl@0: @param aData2 4 bytes of data sl@0: sl@0: @return The trace was/was not logged. sl@0: */ sl@0: static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, TUint32 /*aData1*/, TUint32 /*aData2*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: sl@0: /** sl@0: Sends a trace with variable length data. The trace is classified sl@0: by primary and secondary filter. sl@0: sl@0: If the specified data is too big to fit into a single sl@0: trace record a multipart trace is generated. sl@0: sl@0: @param aF1 Primary filter as classification information sl@0: @param aF2 Secondary filter as classification information sl@0: @param aSchema The schema used to determine the format of the content sl@0: @param aIncludeContextID Include context ID in the trace sl@0: @param aIncludePc Include program counter in the trace sl@0: @param aData Address of addition data to add to trace. sl@0: Must be word aligned, i.e. a multiple of 4. sl@0: @param aSize Number of bytes of additional data. sl@0: sl@0: @return The trace was/was not logged. sl@0: sl@0: @See BTrace::TMultipart sl@0: */ sl@0: static TBool Trace(TPrimaryFilter /*aF1*/, TSecondaryFilter /*aF2*/, TTraceSchema /*aSchema*/, TBool /*aIncludeContextID*/, TBool /*aIncludePc*/, const TAny* /*aData*/, TInt /*aSize*/) sl@0: { sl@0: return EFalse; sl@0: } sl@0: sl@0: private: sl@0: /** sl@0: Default constructor. This prevents accidental empty initialisation of traces. sl@0: */ sl@0: TUTrace(){}; sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: enum TTraceInfoPresent sl@0: { sl@0: EContext = 0, sl@0: EPc = 1 sl@0: }; sl@0: sl@0: /** sl@0: Dummy class to toss away overflow sl@0: @internalComponent sl@0: */ sl@0: #ifndef __KERNEL_MODE__ sl@0: class TTruncateOverflow16 : public TDes16Overflow sl@0: { sl@0: public: sl@0: virtual void Overflow(TDes&) {}; sl@0: }; sl@0: /** sl@0: Dummy class to toss away overflow sl@0: @internalComponent sl@0: */ sl@0: class TTruncateOverflow8 : public TDes8Overflow sl@0: { sl@0: public: sl@0: virtual void Overflow(TDes8&) {}; sl@0: }; sl@0: #endif //__KERNEL_MODE__ sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: TBool ContextID() sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: TBool Pc() sl@0: { sl@0: return EFalse; sl@0: }; sl@0: sl@0: private: sl@0: TPrimaryFilter iF1; sl@0: TTraceSchema iSchema; sl@0: TSecondaryFilter iF2; sl@0: TInt8 iPresent; sl@0: sl@0: TUint32 iReserved1; sl@0: TUint32 iReserved2; sl@0: }; sl@0: sl@0: #endif //SYMBIAN_TRACE_ENABLE sl@0: sl@0: sl@0: #endif //UTRACE_H