sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi/src/com/nokia/carbide/cpp/pi/export/ITraceProvider.java
changeset 12 ae255c9aa552
equal deleted inserted replaced
11:5b9d4d8641ce 12:ae255c9aa552
       
     1 /*
       
     2  * Copyright (c) 2010 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 package com.nokia.carbide.cpp.pi.export;
       
    18 
       
    19 import java.util.List;
       
    20 
       
    21 import org.eclipse.core.runtime.CoreException;
       
    22 import org.eclipse.core.runtime.IPath;
       
    23 import org.eclipse.core.runtime.IProgressMonitor;
       
    24 import com.nokia.carbide.cpp.internal.pi.plugin.model.ITrace;
       
    25 
       
    26 /**
       
    27  * Interface for binding external trace data providers for Performance
       
    28  * Investigator. Only a single trace data provider instance at a time is
       
    29  * supported. In case more that a single trace data providers are available the
       
    30  * selection among them is undeterministic.
       
    31  */
       
    32 public interface ITraceProvider {
       
    33 
       
    34 	public final static String DAT_FILE = "dat"; //$NON-NLS-1$
       
    35 	public final static String BASE_FILE = "base64"; //$NON-NLS-1$
       
    36 	public final static String BASE_CORRUPTED_FILE = "corrupted_base64"; //$NON-NLS-1$
       
    37 
       
    38 
       
    39 	/**
       
    40 	 * Get available list of the plug-ins from the device
       
    41 	 * 
       
    42 	 * @param traceClient instance of the ITraceClientNotificationsIf
       
    43 	 * @param monitor
       
    44 	 *            instance of the {@link IProgressMonitor}
       
    45 	 * @return list of the available plug-ins
       
    46 	 * @throws CoreException
       
    47 	 */
       
    48 	public List<ITrace> getAvailableSamplers(ITraceClientNotificationsIf traceClient, IProgressMonitor monitor)
       
    49 			throws CoreException;
       
    50 
       
    51 
       
    52 	/**
       
    53 	 * Gets preference page ID for the user trace source.
       
    54 	 * 
       
    55 	 * @return preference page ID for the user trace source
       
    56 	 */
       
    57 	public String getTraceSourcePreferencePageId();
       
    58 
       
    59 	/**
       
    60 	 * Gets current connections display name.
       
    61 	 * 
       
    62 	 * @return current connections display name
       
    63 	 */
       
    64 	public String getDisplayNameForCurrentConnection(IProgressMonitor monitor)
       
    65 			throws CoreException;
       
    66 	
       
    67 	/**
       
    68 	 * Start to trace data from device
       
    69 	 * 
       
    70 	 * @param filePrefix profiler data file's prefix
       
    71 	 * @param traceIds plug-in IDs to trace
       
    72 	 * @param traceClient instance of the ITraceClientNotificationsIf
       
    73 	 * @param monitor instance of the {@link IProgressMonitor}
       
    74 	 * @throws CoreException
       
    75 	 */
       
    76 	public void startTrace(String filePrefix, int[] traceIds,
       
    77 			ITraceClientNotificationsIf traceClient, IProgressMonitor monitor)
       
    78 			throws CoreException;
       
    79 
       
    80 	/**
       
    81 	 * Stop the trace
       
    82 	 * 
       
    83 	 * @param forceStop do force stop
       
    84 	 * @return location where the trace data file is located
       
    85 	 * @throws CoreException
       
    86 	 */
       
    87 	public IPath stopTrace(boolean forceStop) throws CoreException;
       
    88 
       
    89 
       
    90 	/**
       
    91 	 * Check is listener activated
       
    92 	 * 
       
    93 	 * @return the listener activation status
       
    94 	 */
       
    95 	public boolean isListening();
       
    96 }