|
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 * Trace Viewer interface |
|
17 * |
|
18 */ |
|
19 package com.nokia.traceviewer.engine; |
|
20 |
|
21 import java.util.List; |
|
22 |
|
23 /** |
|
24 * Trace Viewer interface |
|
25 */ |
|
26 public interface TraceViewerInterface { |
|
27 |
|
28 /** |
|
29 * Registers the trace view to Trace Viewer |
|
30 * |
|
31 * @param view |
|
32 * the view |
|
33 */ |
|
34 public void setTraceView(TraceViewerTraceViewInterface view); |
|
35 |
|
36 /** |
|
37 * Registers the property view to Trace Viewer |
|
38 * |
|
39 * @param view |
|
40 * the view |
|
41 */ |
|
42 public void setPropertyView(TraceViewerPropertyViewInterface view); |
|
43 |
|
44 /** |
|
45 * Registers dialog implementer |
|
46 * |
|
47 * @param dialogs |
|
48 * dialog implementer |
|
49 */ |
|
50 public void setDialogs(TraceViewerDialogInterface dialogs); |
|
51 |
|
52 /** |
|
53 * Gets the dataprocessor access |
|
54 * |
|
55 * @return dataprocessor access |
|
56 */ |
|
57 public DataProcessorAccess getDataProcessorAccess(); |
|
58 |
|
59 /** |
|
60 * Gets the datareader access |
|
61 * |
|
62 * @return datareader access |
|
63 */ |
|
64 public DataReaderAccess getDataReaderAccess(); |
|
65 |
|
66 /** |
|
67 * Gets the connection |
|
68 * |
|
69 * @return the connection |
|
70 */ |
|
71 public Connection getConnection(); |
|
72 |
|
73 /** |
|
74 * Sets the file handler |
|
75 * |
|
76 * @param fileHandler |
|
77 * the new file handler |
|
78 */ |
|
79 public void setFileHandler(TraceFileHandler fileHandler); |
|
80 |
|
81 /** |
|
82 * Gets the file handler |
|
83 * |
|
84 * @return the connection |
|
85 */ |
|
86 public TraceFileHandler getFileHandler(); |
|
87 |
|
88 /** |
|
89 * Gets the trace view |
|
90 * |
|
91 * @return the view |
|
92 */ |
|
93 public TraceViewerTraceViewInterface getView(); |
|
94 |
|
95 /** |
|
96 * Gets the property view |
|
97 * |
|
98 * @return the property view |
|
99 */ |
|
100 public TraceViewerPropertyViewInterface getPropertyView(); |
|
101 |
|
102 /** |
|
103 * Gets the dialogs |
|
104 * |
|
105 * @return the dialogs |
|
106 */ |
|
107 public TraceViewerDialogInterface getDialogs(); |
|
108 |
|
109 /** |
|
110 * Gets StateHolder |
|
111 * |
|
112 * @return the state holder |
|
113 */ |
|
114 public StateHolder getStateHolder(); |
|
115 |
|
116 /** |
|
117 * Connects to trace source using connection properties |
|
118 * |
|
119 * @return TVAPI error code |
|
120 */ |
|
121 public boolean connect(); |
|
122 |
|
123 /** |
|
124 * Disconnects from trace source |
|
125 * |
|
126 * @return true if disconnection succeeded, false otherwise |
|
127 */ |
|
128 public boolean disconnect(); |
|
129 |
|
130 /** |
|
131 * Controlled shutdown |
|
132 */ |
|
133 public void shutdown(); |
|
134 |
|
135 /** |
|
136 * Clears all data |
|
137 */ |
|
138 public void clearAllData(); |
|
139 |
|
140 /** |
|
141 * Reads the trace data file from the beginning. First clears the views and |
|
142 * then sets the data file position to the beginning of the file. |
|
143 */ |
|
144 public void readDataFileFromBeginning(); |
|
145 |
|
146 /** |
|
147 * Empties both views |
|
148 */ |
|
149 public void emptyViews(); |
|
150 |
|
151 /** |
|
152 * Get traces from the file between start and end indices. Start and end |
|
153 * traces are also included. Maximum number of traces to get with this |
|
154 * method is 5 times blocksize. |
|
155 * |
|
156 * @param start |
|
157 * the first trace to get |
|
158 * @param end |
|
159 * the last trace to get |
|
160 * @return list of traces |
|
161 */ |
|
162 public List<TraceProperties> getTraces(int start, int end); |
|
163 } |