quick fix of errors in filter.c/filter.h
[lttv.git] / ltt / branches / poly / lttv / lttv / filter.h
index 9224a9a51e6cbef7898387af740d297b231d9c2c..ab5b695856b216fc7176e6ad392810ae28b5c865 100644 (file)
 
 */
 
+extern GQuark
+  LTTV_FILTER_TRACE,
+  LTTV_FILTER_TRACESET,
+  LTTV_FILTER_TRACEFILE,
+  LTTV_FILTER_STATE,
+  LTTV_FILTER_EVENT;
+
 /**
  *     @enum lttv_expression_op
  */
@@ -78,27 +85,36 @@ typedef struct _lttv_simple_expression
   char *value;
 } lttv_simple_expression;
 
-
-//typedef union _tmp {
-//  struct lttv_expression *e;
-//  lttv_field_relation *se;
-//} tmp;
+typedef enum _lttv_logical_op {
+    OR = 1,
+    AND = 1<<1,
+    NOT = 1<<2,
+    XOR = 1<<3
+} lttv_logical_op;
+    
 /*
+ * Ah .. that's my tree
+ */
 typedef struct _lttv_expression 
 { 
-  gboolean or;
-  gboolean not;
-  gboolean and;
-  gboolean xor;
-  gboolean simple_expression;
-//  tmp e;
+//  gboolean or;
+//  gboolean not;
+//  gboolean and;
+//  gboolean xor;
+//  gboolean simple_expression;
+  lttv_logical_op op;
+  lttv_expression_type type;
+  union {
+    struct lttv_expression *e;
+ //   lttv_field_relation *se;  /* --> simple expression */
+  } e;
 } lttv_expression;
-*/
 
-typedef union _lttv_expression {
-  lttv_simple_expression se;
-  
-} lttv_expression;
+
+//typedef union _lttv_expression {
+//  lttv_simple_expression se;
+//  
+//} lttv_expression;
 
 typedef struct _lttv_filter_tree {
        lttv_expression* node;
@@ -114,17 +130,20 @@ typedef struct _lttv_filter {
        lttv_filter_tree* tree; 
 } lttv_filter;
 
+gboolean parse_field_path(GList* fp);
+
 gboolean parse_simple_expression(GString* expression);
 
 /* Compile the filter expression into an efficient data structure */
-
 lttv_filter *lttv_filter_new(char *expression, LttvTraceState *tfs);
 
 
 /* Check if the tracefile or event satisfies the filter. The arguments are
    declared as void * to allow these functions to be used as hooks. */
 
-gboolean lttv_filter_tracefile(lttv_filter *filter, LttvTrace *tracefile);
+gboolean lttv_filter_tracefile(lttv_filter *filter, LttTracefile *tracefile);
+
+gboolean lttv_filter_tracestate(lttv_filter *filter, LttvTraceState *tracestate);
 
 gboolean lttv_filter_event(lttv_filter *filter, LttEvent *event);
 
This page took 0.023201 seconds and 4 git commands to generate.