background computation for control flow viewer
[lttv.git] / ltt / branches / poly / lttv / modules / gui / lttvwindow / lttvwindow / lttvwindowtraces.h
index 2a1c335b577b2a6a7dc8fa983f229eb93695a9d2..f490995ec1d5566a99443f6f57fdf230ef4041c9 100644 (file)
@@ -31,7 +31,23 @@ extern LttvTraceInfo LTTV_TRACES,
               LTTV_REQUESTS_QUEUE,
               LTTV_REQUESTS_CURRENT,
               LTTV_NOTIFY_QUEUE,
-              LTTV_NOTIFY_CURRENT;
+              LTTV_NOTIFY_CURRENT,
+              LTTV_COMPUTATION_TRACESET,
+              LTTV_COMPUTATION_TRACESET_CONTEXT,
+              LTTV_BEFORE_CHUNK_TRACESET,
+              LTTV_BEFORE_CHUNK_TRACE,
+              LTTV_BEFORE_CHUNK_TRACEFILE,
+              LTTV_AFTER_CHUNK_TRACESET,
+              LTTV_AFTER_CHUNK_TRACE,
+              LTTV_AFTER_CHUNK_TRACEFILE,
+              LTTV_BEFORE_REQUEST,
+              LTTV_AFTER_REQUEST,
+              LTTV_EVENT_HOOK,
+              LTTV_EVENT_HOOK_BY_ID,
+              LTTV_IN_PROGRESS,
+              LTTV_READY;
+              
+
 
 /* Get a trace by its path name. 
  *
@@ -137,4 +153,78 @@ void lttvwindowtraces_background_notify_current
 void lttvwindowtraces_background_notify_remove(gpointer owner);
 
 
+/**
+ * Tells if the information computed by a module for a trace is ready.
+ *
+ * Must be checked before a background processing request.
+ *
+ * @param module_name A GQuark : the name of the module which computes the
+ *                    information.
+ * @param trace The trace for which the information is verified.
+ */
+
+gboolean lttvwindowtraces_get_ready(LttvAttributeName module_name,
+                                    LttvTrace *trace);
+
+/**
+ * Tells if the information computed by a module for a trace is being processed.
+ * 
+ * Must be checked before a background processing request.
+ *
+ * If it is effectively processed, the typical thing to do is to call
+ * lttvwindowtraces_background_notify_current to be notified when the current
+ * processing will be over.
+ *
+ * @param module_name A GQuark : the name of the module which computes the
+ *                    information.
+ * @param trace The trace for which the information is verified.
+ */
+
+gboolean lttvwindowtraces_get_in_progress(LttvAttributeName module_name,
+                                    LttvTrace *trace);
+
+/**
+ * Register the background computation hooks for a specific module. It adds the
+ * computation hooks to the global attrubutes, under "computation/module name"
+ *
+ * @param module_name A GQuark : the name of the module which computes the
+ *                    information.
+ */
+void lttvwindowtraces_register_computation_hooks(LttvAttributeName module_name,
+                                          LttvHooks *before_chunk_traceset,
+                                          LttvHooks *before_chunk_trace,
+                                          LttvHooks *before_chunk_tracefile,
+                                          LttvHooks *after_chunk_traceset,
+                                          LttvHooks *after_chunk_trace,
+                                          LttvHooks *after_chunk_tracefile,
+                                          LttvHooks *before_request,
+                                          LttvHooks *after_request,
+                                          LttvHooks *event_hook,
+                                          LttvHooksById *event_hook_by_id);
+/**
+ * Unregister the background computation hooks for a specific module.
+ *
+ * It also removes all the requests than can be currently processed by the
+ * background computation algorithm for all the traces (list_in and list_out).
+ *
+ * @param module_name A GQuark : the name of the module which computes the
+ *                    information.
+ */
+
+void lttvwindowtraces_unregister_computation_hooks
+                                     (LttvAttributeName module_name);
+
+
+/**
+ * It removes all the requests than can be currently processed by the
+ * background computation algorithm for all the traces (list_in and list_out).
+ *
+ * Leaves the flag to in_progress or none.. depending if current or queue
+ *
+ * @param module_name A GQuark : the name of the module which computes the
+ *                    information.
+ */
+void lttvwindowtraces_unregister_requests(LttvAttributeName module_name);
+
+
 #endif //LTTVWINDOWTRACES_H
This page took 0.027376 seconds and 4 git commands to generate.