Add member timestamp and cpuid to LttvTracesetPosition to improve the comparaison...
[lttv.git] / lttv / modules / gui / lttvwindow / lttvwindow / lttvwindow.c
index acb968bed7b3e3969f5701b8d23e282daa9d3857..9d42fc88e807afcf87b8d5c88e6b4b94bd862e8b 100644 (file)
 #include <ltt/ltt.h>
 #include <lttv/lttv.h>
 #include <lttv/state.h>
+#include <lttv/traceset.h>
+#ifdef BABEL_CLEANUP
 #include <lttv/stats.h>
-#include <lttv/tracecontext.h>
+#endif /* BABEL_CLEANUP */
 #include <lttvwindow/mainwindow.h>   
-#include <lttvwindow/mainwindow-private.h>   
+#include <lttvwindow/mainwindow-private.h>
 #include <lttvwindow/lttvwindow.h>
 #include <lttvwindow/toolbar.h>
 #include <lttvwindow/menu.h>
@@ -115,13 +117,13 @@ void set_current_time(Tab *tab, const LttTime *current_time)
  * This is called whenever the current time value changes.
  */
 
-void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos)
+void set_current_position(Tab *tab, const LttvTracesetPosition *pos)
 {
   LttvAttributeValue value;
   LttvHooks * tmp;
   gboolean retval;
 
-  tab->current_time = lttv_traceset_context_position_get_time(pos);
+  tab->current_time = lttv_traceset_position_get_time(pos);
 
   retval= lttv_iattribute_find_by_path(tab->attributes,
     "hooks/updatecurrentposition", LTTV_POINTER, &value);
@@ -474,7 +476,7 @@ __EXPORT void lttvwindow_unregister_time_window_notify(Tab *tab,
  * @param hook hook function of the viewer.
  * @param hook_data hook data associated with the hook function.
  */
-__EXPORT void lttvwindow_register_time_span_notify(Tab *tab,
+__EXPORT void lttvwindow_register_timespan_notify(Tab *tab,
     LttvHook hook, gpointer hook_data)
 {
   LttvAttributeValue value;
@@ -499,7 +501,7 @@ __EXPORT void lttvwindow_register_time_span_notify(Tab *tab,
  * @param hook_data hook data associated with the hook function.
  */
 
-__EXPORT void lttvwindow_unregister_time_span_notify(Tab *tab,
+__EXPORT void lttvwindow_unregister_timespan_notify(Tab *tab,
     LttvHook hook, gpointer hook_data)
 {
   LttvAttributeValue value;
@@ -1008,7 +1010,7 @@ __EXPORT void lttvwindow_report_current_time(Tab *tab,
  */
 
 __EXPORT void lttvwindow_report_current_position(Tab *tab,
-                                        LttvTracesetContextPosition *pos)
+                                        LttvTracesetPosition *pos)
 {
   current_position_change_manager(tab, pos);
 }
@@ -1140,8 +1142,12 @@ __EXPORT gboolean lttvwindow_events_request_pending(Tab            *tab)
 {
   GSList *element = tab->events_requests;
 
-  if(element == NULL) return FALSE;
-  else return TRUE;
+  if(element == NULL){
+          return FALSE;
+  }
+  else {
+          return TRUE;
+  }
 }
 
 
@@ -1214,7 +1220,7 @@ void lttvwindow_report_filter(Tab *tab, LttvFilter *filter)
   lttv_hooks_call(tmp, filter);
 }
 
-
+#ifdef BABEL_CLEANUP
 
 /**
  * Function to get the stats of the traceset 
@@ -1225,26 +1231,32 @@ __EXPORT LttvTracesetStats* lttvwindow_get_traceset_stats(Tab *tab)
 {
   return tab->traceset_info->traceset_context;
 }
+#endif /*BABEL_CLEANUP*/
 
-__EXPORT LttvTracesetContext* lttvwindow_get_traceset_context(Tab *tab)
+__EXPORT LttvTraceset *lttvwindow_get_traceset(Tab *tab)
 {
-  return (LttvTracesetContext*)tab->traceset_info->traceset_context;
+        return tab->traceset_info->traceset;
 }
 
-
 void events_request_free(EventsRequest *events_request)
 {
   if(events_request == NULL) return;
 
   if(events_request->start_position != NULL)
-       lttv_traceset_context_position_destroy(events_request->start_position);
+       lttv_traceset_destroy_position(events_request->start_position);
   if(events_request->end_position != NULL)
-       lttv_traceset_context_position_destroy(events_request->end_position);
-  if(events_request->hooks != NULL) {
+       lttv_traceset_destroy_position(events_request->end_position);
+#ifdef BABEL_CLEANUP
+       if(events_request->hooks != NULL) {
     GArray *hooks = events_request->hooks;
+   
     lttv_trace_hook_remove_all(&hooks);
     g_array_free(events_request->hooks, TRUE);
+     
   }
+
   if(events_request->before_chunk_traceset != NULL)
        lttv_hooks_destroy(events_request->before_chunk_traceset);
   if(events_request->before_chunk_trace != NULL)
@@ -1253,8 +1265,6 @@ void events_request_free(EventsRequest *events_request)
        lttv_hooks_destroy(events_request->before_chunk_tracefile);
   if(events_request->event != NULL)
        lttv_hooks_destroy(events_request->event);
-  if(events_request->event_by_id_channel != NULL)
-       lttv_hooks_by_id_channel_destroy(events_request->event_by_id_channel);
   if(events_request->after_chunk_tracefile != NULL)
        lttv_hooks_destroy(events_request->after_chunk_tracefile);
   if(events_request->after_chunk_trace != NULL)
@@ -1265,10 +1275,11 @@ void events_request_free(EventsRequest *events_request)
        lttv_hooks_destroy(events_request->before_request);
   if(events_request->after_request != NULL)
        lttv_hooks_destroy(events_request->after_request);
-
+#endif /*BABEL_CLEANUP*/
   g_free(events_request);
-}
 
+}
 
 
 __EXPORT GtkWidget *main_window_get_widget(Tab *tab)
This page took 0.024726 seconds and 4 git commands to generate.