libraries/extrabtrace/inc/extrabtrace.h
changeset 0 7f656887cf89
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 // extrabtrace.h
       
     2 // 
       
     3 // Copyright (c) 2010 Accenture. All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 // 
       
     9 // Initial Contributors:
       
    10 // Accenture - Initial contribution
       
    11 //
       
    12 #ifndef EXTRABTRACE_H
       
    13 #define EXTRABTRACE_H
       
    14 
       
    15 #include <fshell/common.mmh>
       
    16 
       
    17 #ifdef __KERNEL_MODE__
       
    18 #include <e32def.h>
       
    19 #else
       
    20 #include <e32std.h>
       
    21 #endif
       
    22 
       
    23 namespace ExtraBTrace
       
    24 	{
       
    25 
       
    26 	enum TCategory
       
    27 		{
       
    28 		/**
       
    29 		Supported by memoryaccess-fshell.ldd
       
    30 		*/
       
    31 		EPubSub = 213,
       
    32 
       
    33 		/**
       
    34 		Filesystem tracing from ffstracer (fshell addition).
       
    35 		*/
       
    36 		EFfsTrace = 214,
       
    37 
       
    38 		};
       
    39 
       
    40 	enum TPubSub
       
    41 		{
       
    42 		EPubSubIntPropertyChanged = 0,
       
    43 		EPubSubDataPropertyChanged = 1,
       
    44 		};
       
    45 
       
    46 	// As used by category EFfsTrace
       
    47 	enum TFfsTrace
       
    48 		{
       
    49 		EFfsDelete = 0,
       
    50 		EFfsRename,
       
    51 		EFfsReplace,
       
    52 		EFfsEntry,
       
    53 		EFfsFileSubClose,
       
    54 		EFfsFileOpen,
       
    55 		EFfsFileCreate,
       
    56 		EFfsFileReplace,
       
    57 		EFfsFileTemp,
       
    58 		EFfsFileRename,
       
    59 
       
    60 		EFfsPost = 128,
       
    61 		};
       
    62 	}
       
    63 
       
    64 #ifndef __KERNEL_MODE__
       
    65 
       
    66 class RExtraBtrace
       
    67 	{
       
    68 public:
       
    69 	IMPORT_C RExtraBtrace();
       
    70 	IMPORT_C TInt Connect();
       
    71 	IMPORT_C void Close();
       
    72 
       
    73 	IMPORT_C TInt EnableProfiling(TInt aSamplingPeriod); // in milliseconds. Pass aRate of zero to disable
       
    74 
       
    75 public:
       
    76 	IMPORT_C TInt Handle() const;
       
    77 
       
    78 private:
       
    79 	TInt32 iImpl[5];
       
    80 	};
       
    81 
       
    82 #endif // __KERNEL_MODE__
       
    83 
       
    84 // Include the actual btrace header - do this after RExtraBtrace so that in principle someone could subclass it in their custom header
       
    85 #ifdef FSHELL_CUSTOM_BTRACE_HEADER
       
    86 #include FSHELL_CUSTOM_BTRACE_HEADER
       
    87 #else
       
    88 #include <e32btrace.h>
       
    89 #endif
       
    90 
       
    91 #endif // EXTRABTRACE_H