+/**
+ * @enum LttvFieldType
+ * @brief Structures and their fields
+ *
+ * the LttvFieldType enum consists on
+ * all the hardcoded structures and
+ * their appropriate fields on which
+ * filters can be applied.
+ */
+enum _LttvFieldType {
+ LTTV_FILTER_TRACE,
+ LTTV_FILTER_TRACESET,
+ LTTV_FILTER_TRACEFILE,
+ LTTV_FILTER_STATE,
+ LTTV_FILTER_EVENT,
+ LTTV_FILTER_NAME,
+ LTTV_FILTER_CATEGORY,
+ LTTV_FILTER_TIME,
+ LTTV_FILTER_TSC,
+ LTTV_FILTER_PID,
+ LTTV_FILTER_PPID,
+ LTTV_FILTER_C_TIME,
+ LTTV_FILTER_I_TIME,
+ LTTV_FILTER_P_NAME,
+ LTTV_FILTER_EX_MODE,
+ LTTV_FILTER_EX_SUBMODE,
+ LTTV_FILTER_P_STATUS,
+ LTTV_FILTER_CPU
+} LttvFieldType;
+
+/**
+ * @enum LttvExpressionOp
+ */
+typedef enum _LttvExpressionOp
+{
+ LTTV_FIELD_EQ, /** equal */
+ LTTV_FIELD_NE, /** not equal */
+ LTTV_FIELD_LT, /** lower than */
+ LTTV_FIELD_LE, /** lower or equal */
+ LTTV_FIELD_GT, /** greater than */
+ LTTV_FIELD_GE /** greater or equal */
+} LttvExpressionOp;
+
+/**
+ * @enum LttvTreeElement
+ * @brief element types for the tree nodes
+ *
+ * LttvTreeElement defines the possible
+ * types of nodes which build the LttvFilterTree.
+ */
+typedef enum _LttvTreeElement {
+ LTTV_TREE_IDLE, /** this node does nothing */
+ LTTV_TREE_NODE, /** this node contains a logical operator */
+ LTTV_TREE_LEAF /** this node is a leaf and contains a simple expression */
+} LttvTreeElement;
+
+/**
+ * @enum LttvSimpleExpression
+ * @brief simple expression structure
+ *
+ * An LttvSimpleExpression is the base
+ * of all filtering operations. It also
+ * populates the leaves of the
+ * LttvFilterTree. Each expression
+ * consists basically in a structure
+ * field, an operator and a specific
+ * value.
+ */
+typedef struct _LttvSimpleExpression
+{
+ char *field_name;
+// LttvExpressionOp op;
+ gboolean (*op)();
+ char *value;
+} LttvSimpleExpression;
+
+/**
+ * @enum LttvLogicalOp
+ * @brief logical operators
+ *
+ * Contains the possible values taken
+ * by logical operator used to link
+ * simple expression. Values are
+ * AND, OR, XOR or NOT
+ */
+typedef enum _LttvLogicalOp {
+ LTTV_LOGICAL_OR = 1, /* 1 */
+ LTTV_LOGICAL_AND = 1<<1, /* 2 */
+ LTTV_LOGICAL_NOT = 1<<2, /* 4 */
+ LTTV_LOGICAL_XOR = 1<<3 /* 8 */
+} LttvLogicalOp;
+
+/**
+ * @struct LttvFilterTree
+ * The filtering tree is used to represent the
+ * expression string in its entire hierarchy
+ * composed of simple expressions and logical
+ * operators
+ */
+typedef struct _LttvFilterTree {
+ int node; /** value of LttvLogicalOp */
+ LttvTreeElement left;
+ LttvTreeElement right;
+ union {
+ struct LttvFilter* t;
+ LttvSimpleExpression* leaf;
+ } l_child;
+ union {
+ struct LttvFilter* t;
+ LttvSimpleExpression* leaf;
+ } r_child;
+} LttvFilterTree;
+