trace/traceviewer/com.nokia.traceviewer/src/com/nokia/traceviewer/engine/DataReader.java
changeset 11 5b9d4d8641ce
equal deleted inserted replaced
10:ed1c9f64298a 11:5b9d4d8641ce
       
     1 /*
       
     2  * Copyright (c) 2007-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  * DataReader interface
       
    17  *
       
    18  */
       
    19 package com.nokia.traceviewer.engine;
       
    20 
       
    21 /**
       
    22  * DataReader interface
       
    23  */
       
    24 public interface DataReader {
       
    25 
       
    26 	/**
       
    27 	 * Clears file
       
    28 	 */
       
    29 	public void clearFile();
       
    30 
       
    31 	/**
       
    32 	 * Creates scroll reader
       
    33 	 * 
       
    34 	 * @param mediaCallback
       
    35 	 *            callback
       
    36 	 * @param conf
       
    37 	 *            TraceConfiguration to use with this scroll reader
       
    38 	 * @return new scroll reader
       
    39 	 */
       
    40 	public DataScrollReader createScrollReader(MediaCallback mediaCallback,
       
    41 			TraceConfiguration conf);
       
    42 
       
    43 	/**
       
    44 	 * Gets file map
       
    45 	 * 
       
    46 	 * @return file map
       
    47 	 */
       
    48 	public FileMap getFileMap();
       
    49 
       
    50 	/**
       
    51 	 * Gets file path
       
    52 	 * 
       
    53 	 * @return file path
       
    54 	 */
       
    55 	public String getFilePath();
       
    56 
       
    57 	/**
       
    58 	 * Gets file start offset
       
    59 	 * 
       
    60 	 * @return file start offset
       
    61 	 */
       
    62 	public long getFileStartOffset();
       
    63 
       
    64 	/**
       
    65 	 * Gets trace count
       
    66 	 * 
       
    67 	 * @return trace count
       
    68 	 */
       
    69 	public int getTraceCount();
       
    70 
       
    71 	/**
       
    72 	 * Gets current trace position in file
       
    73 	 * 
       
    74 	 * @return current trace position in file
       
    75 	 */
       
    76 	public long getTracePositionInFile();
       
    77 
       
    78 	/**
       
    79 	 * Gets trace configuration
       
    80 	 * 
       
    81 	 * @return trace configuration
       
    82 	 */
       
    83 	public TraceConfiguration getTraceConfiguration();
       
    84 
       
    85 	/**
       
    86 	 * Tells if this reader is paused
       
    87 	 * 
       
    88 	 * @return pause status
       
    89 	 */
       
    90 	public boolean isPaused();
       
    91 
       
    92 	/**
       
    93 	 * Pauses the reader
       
    94 	 * 
       
    95 	 * @param pause
       
    96 	 *            pause status
       
    97 	 */
       
    98 	public void pause(boolean pause);
       
    99 
       
   100 	/**
       
   101 	 * Sets file path
       
   102 	 * 
       
   103 	 * @param filePath
       
   104 	 *            file path
       
   105 	 */
       
   106 	public void setFilePath(String filePath);
       
   107 
       
   108 	/**
       
   109 	 * Sets file position
       
   110 	 * 
       
   111 	 * @param filePos
       
   112 	 *            the new file position
       
   113 	 */
       
   114 	public void setFilePosition(long filePos);
       
   115 
       
   116 	/**
       
   117 	 * Sets file start offset
       
   118 	 * 
       
   119 	 * @param fileStartOffset
       
   120 	 *            file start offset
       
   121 	 */
       
   122 	public void setFileStartOffset(long fileStartOffset);
       
   123 
       
   124 	/**
       
   125 	 * Shuts down this DataReader
       
   126 	 */
       
   127 	public void shutdown();
       
   128 
       
   129 	/**
       
   130 	 * Read data from file
       
   131 	 */
       
   132 	public void start();
       
   133 }