sysanadatacapture/piprofiler/piprofiler_api/inc/ProfilerEngineAPI.h
changeset 1 3ff3fecb12fe
equal deleted inserted replaced
0:f0f2b8682603 1:3ff3fecb12fe
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "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 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PROFILERCONTROLLER_H
       
    20 #define PROFILERCONTROLLER_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <s32stor.h>
       
    24 
       
    25 class CProfilerSettings;
       
    26 
       
    27 class CProfilerEngineAPI : public CBase
       
    28 {
       
    29 public:
       
    30     enum TProfilerEngineTraceMode 
       
    31         { 
       
    32         EProfilerEngineDebugOutputMode, 
       
    33         EProfilerEngineFileSystemMode 
       
    34         };
       
    35     
       
    36 	~CProfilerEngineAPI();
       
    37 
       
    38 	IMPORT_C static CProfilerEngineAPI* NewL();
       
    39 	void ConstructL();
       
    40 
       
    41 	IMPORT_C void SaveSettings();
       
    42 	IMPORT_C void LoadSettings();
       
    43 
       
    44 	// controlling all sampler plugins
       
    45 	IMPORT_C TInt StartProfiling();
       
    46 	IMPORT_C TBool StopProfiling();
       
    47 	IMPORT_C TInt LaunchProfiler();
       
    48 
       
    49 	// controlling separate plugins
       
    50 	IMPORT_C TInt StartSampler(TUint32 aUid);
       
    51 	IMPORT_C TInt StopSampler(TUint32 aUid);
       
    52 	IMPORT_C TInt EnableSampler(TUint32 aUid);
       
    53 	IMPORT_C TInt DisableSampler(TUint32 aUid);
       
    54 	IMPORT_C TInt EnableWriter(TUint32 aUid);
       
    55 	IMPORT_C TInt DisableWriter(TUint32 aUid);
       
    56 
       
    57 	// for meeting the HTI requirements
       
    58 	IMPORT_C TInt SetSettings(TUint aSamplerId, TDes& aSettings);
       
    59     IMPORT_C TInt SetTraceMode(TProfilerEngineTraceMode aMode, TDes& aTraceDataStruct);
       
    60     IMPORT_C TInt GetSamplerInfo(TUint aSamplerId, TDes& aCompleteSamplerInfo);
       
    61 	
       
    62 	// old implementations
       
    63 	IMPORT_C TBool GetSamplerVersion(TDes& version);
       
    64 
       
    65 	IMPORT_C void LeaveProfilerBG(TBool aVal);
       
    66 	
       
    67 	
       
    68 public:
       
    69 	TBool DriveIsValidL(const TDesC& drive);
       
    70 	IMPORT_C CProfilerSettings* Settings() const;
       
    71 
       
    72 private:
       
    73 
       
    74 	CProfilerEngineAPI();
       
    75 
       
    76 	TInt				FindProcessL();
       
    77 private:
       
    78 	CProfilerSettings* 	iSettings;
       
    79 	
       
    80 	RProcess* 			iProfilerProcess;
       
    81 
       
    82 	TBool 				iProfilerLaunched;
       
    83 	
       
    84 	TBool 				iLeaveProfilerBG;
       
    85 
       
    86 	};
       
    87 
       
    88 #endif