X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.tmf.core%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Ftmf%2Fcore%2Ftrace%2FITmfTrace.java;h=0054c5feff400c6a774d24fa4e085dcf5c25f30d;hb=0d9a6d765b693ee77f0ccf19a0289de466aa6a63;hp=92fbf713bb925535de449f15ef9f5a6f81a924dc;hpb=0710697b6ef91d5ea52080f346375a64a19ab01a;p=deliverable%2Ftracecompass.git
diff --git a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
index 92fbf713bb..0054c5feff 100644
--- a/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
+++ b/org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
@@ -15,16 +15,17 @@ package org.eclipse.linuxtools.tmf.core.trace;
import java.io.FileNotFoundException;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.linuxtools.tmf.core.component.ITmfComponent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
/**
* ITmfTrace
*
*/
-public interface ITmfTrace extends ITmfComponent {
+public interface ITmfTrace extends ITmfComponent {
// initTrace variants
public void initTrace(String name, String path, Class eventType) throws FileNotFoundException;
@@ -81,15 +82,13 @@ public interface ITmfTrace extends ITmfComponent {
* Returns a context which can later be used to read the event.
*
* @param location
- * @param timestamp
- * @param rank
* @return a context object for subsequent reads
*/
- public TmfContext seekLocation(ITmfLocation> location);
+ public ITmfContext seekLocation(ITmfLocation> location);
- public TmfContext seekEvent(ITmfTimestamp timestamp);
+ public ITmfContext seekEvent(ITmfTimestamp timestamp);
- public TmfContext seekEvent(long rank);
+ public ITmfContext seekEvent(long rank);
/**
* Positions the trace at the event located at the specified ratio.
@@ -100,7 +99,7 @@ public interface ITmfTrace extends ITmfComponent {
* a floating-point number between 0.0 (beginning) and 1.0 (end)
* @return a context object for subsequent reads
*/
- public TmfContext seekLocation(double ratio);
+ public ITmfContext seekLocation(double ratio);
/**
* Returns the ratio corresponding to the specified location.
@@ -117,8 +116,8 @@ public interface ITmfTrace extends ITmfComponent {
* Returns the rank of the first event with the requested timestamp. If none, returns the index of the next event
* (if any).
*
- * @param timestamp
- * @return
+ * @param timestamp the requested event timestamp
+ * @return the corresponding event rank
*/
public long getRank(ITmfTimestamp timestamp);
@@ -128,13 +127,24 @@ public interface ITmfTrace extends ITmfComponent {
*
* @return the next event in the stream
*/
- public TmfEvent getNextEvent(TmfContext context);
+ public ITmfEvent getNextEvent(ITmfContext context);
/**
* Return the event pointed by the supplied context (or null if no event left) and *does not* update the context.
*
* @return the next event in the stream
*/
- public TmfEvent parseEvent(TmfContext context);
+ public ITmfEvent parseEvent(ITmfContext context);
+ /**
+ * Set the resource used for persistent properties on this trace
+ * @param resource the properties resource
+ */
+ public void setResource(IResource resource);
+
+ /**
+ * Get the resource used for persistent properties on this trace
+ * @return the properties resource or null if none is set
+ */
+ public IResource getResource();
}