convert from svn repository: remove tags directory
[lttv.git] / trunk / lttv / lttv / modules / gui / lttvwindow / lttvwindow / lttvwindowtraces.c
index caa84cee813fe146f03e45f6433118f794f46ddf..787c5a70e12b32ee28c55f53a68f21ceb900e125 100644 (file)
@@ -28,6 +28,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
+#include <inttypes.h>
 
 #include <ltt/time.h>
 #include <ltt/trace.h>
@@ -79,7 +80,7 @@ __EXPORT LttvTrace *lttvwindowtraces_get_trace_by_name(gchar *path)
   for(i=0;i<lttvwindowtraces_get_number();i++) {
     LttvTrace *trace_v = lttvwindowtraces_get_trace(i);
     LttTrace *trace;
-    gchar *name;
+    const gchar *name;
     g_assert(trace_v != NULL);
 
     trace = lttv_trace(trace_v);
@@ -153,7 +154,8 @@ void lttvwindowtraces_add_trace(LttvTrace *trace)
         g_quark_to_string(ltt_trace_name(lttv_trace(trace))));
     return;
   }
-  result = snprintf(attribute_path, PATH_MAX, "%llu:%llu", buf.st_dev, buf.st_ino);
+  result = snprintf(attribute_path, PATH_MAX, "%" PRIu64 ":%" PRIu64,
+                   buf.st_dev, buf.st_ino);
   g_assert(result >= 0);
   
   attribute = 
@@ -759,7 +761,7 @@ void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name,
   LttvHooks *before_chunk_trace=NULL;
   LttvHooks *before_chunk_tracefile=NULL;
   LttvHooks *event_hook=NULL;
-  LttvHooksById *event_hook_by_id=NULL;
+  LttvHooksByIdChannelArray *event_hook_by_id_channel=NULL;
 
  
   module_attribute =
@@ -802,10 +804,10 @@ void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name,
   }
 
   type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(module_attribute),
-                                     LTTV_EVENT_HOOK_BY_ID,
+                                     LTTV_EVENT_HOOK_BY_ID_CHANNEL,
                                      &value);
   if(type == LTTV_POINTER) {
-    event_hook_by_id = (LttvHooksById*)*(value.v_pointer);
+    event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
   }
 
   lttv_process_traceset_begin(tsc,
@@ -813,7 +815,7 @@ void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name,
                               before_chunk_trace,
                               before_chunk_tracefile,
                               event_hook,
-                              event_hook_by_id);
+                              event_hook_by_id_channel);
 }
 
 
@@ -829,7 +831,7 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
   LttvHooks *after_chunk_trace=NULL;
   LttvHooks *after_chunk_tracefile=NULL;
   LttvHooks *event_hook=NULL;
-  LttvHooksById *event_hook_by_id=NULL;
+  LttvHooksByIdChannelArray *event_hook_by_id_channel=NULL;
  
   module_attribute =
       LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(LTTV_IATTRIBUTE(g_attribute),
@@ -871,10 +873,10 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
   }
 
   type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(module_attribute),
-                                     LTTV_EVENT_HOOK_BY_ID,
+                                     LTTV_EVENT_HOOK_BY_ID_CHANNEL,
                                      &value);
   if(type == LTTV_POINTER) {
-    event_hook_by_id = (LttvHooksById*)*(value.v_pointer);
+    event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
   }
   
   lttv_process_traceset_end(tsc,
@@ -882,7 +884,7 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name,
                             after_chunk_trace,
                             after_chunk_tracefile,
                             event_hook,
-                            event_hook_by_id);
+                            event_hook_by_id_channel);
 
 }
 
@@ -1500,18 +1502,18 @@ gboolean lttvwindowtraces_process_pending_requests(LttvTrace *trace)
  *                    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,
-                                          LttvHooks *hook_adder,
-                                          LttvHooks *hook_remover)
+                                        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_channel,
+                                        LttvHooks *hook_adder,
+                                        LttvHooks *hook_remover)
 {
   LttvAttribute *g_attribute = lttv_global_attributes();
   LttvAttribute *attribute;
@@ -1593,11 +1595,11 @@ void lttvwindowtraces_register_computation_hooks(LttvAttributeName module_name,
   *(value.v_pointer) = event_hook;
 
   result = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
-                                LTTV_EVENT_HOOK_BY_ID,
+                                LTTV_EVENT_HOOK_BY_ID_CHANNEL,
                                 LTTV_POINTER,
                                 &value);
   g_assert(result);
-  *(value.v_pointer) = event_hook_by_id;
+  *(value.v_pointer) = event_hook_by_id_channel;
 
   result = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
                                 LTTV_HOOK_ADDER,
@@ -1827,14 +1829,14 @@ void lttvwindowtraces_unregister_computation_hooks
     lttv_hooks_destroy(event_hook);
  
   result = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
-                                LTTV_EVENT_HOOK_BY_ID,
+                                LTTV_EVENT_HOOK_BY_ID_CHANNEL,
                                 LTTV_POINTER,
                                 &value);
   g_assert(result);
 
-  LttvHooksById *event_hook_by_id = (LttvHooksById*)*(value.v_pointer);
-  if(event_hook_by_id != NULL)
-    lttv_hooks_by_id_destroy(event_hook_by_id);
+  LttvHooksByIdChannelArray *event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer);
+  if(event_hook_by_id_channel != NULL)
+    lttv_hooks_by_id_channel_destroy(event_hook_by_id_channel);
  
   result = lttv_iattribute_find(LTTV_IATTRIBUTE(attribute),
                                 LTTV_HOOK_ADDER,
@@ -1858,7 +1860,7 @@ void lttvwindowtraces_unregister_computation_hooks
  
 
   lttv_iattribute_remove_by_name(LTTV_IATTRIBUTE(attribute),
-                                     LTTV_EVENT_HOOK_BY_ID);
+                                     LTTV_EVENT_HOOK_BY_ID_CHANNEL);
   lttv_iattribute_remove_by_name(LTTV_IATTRIBUTE(attribute),
                                      LTTV_EVENT_HOOK);
 
This page took 0.0247 seconds and 4 git commands to generate.