3 int main (int argc
, char ** argv
)
5 MMFilter
*filter
, *unserialized
;
9 MMAttributeManager
*am
;
15 am
= mm_attribute_base_manager_get ();
16 filter
= mm_filter_new ();
18 attr
= mm_attribute_manager_lookup_attribute (am
, "base::uri");
19 val
= mm_create_gvalue_for_attribute (attr
);
20 g_value_set_string (val
, "file:///foo");
21 fp
= mm_filter_param_new (attr
, val
, MM_COMP_EQUAL
);
22 mm_filter_add_filtering_param (filter
, fp
);
26 attr
= mm_attribute_manager_lookup_attribute (am
, "base::name");
27 val
= mm_create_gvalue_for_attribute (attr
);
28 g_value_set_string (val
, "Pippo");
29 fp
= mm_filter_param_new (attr
, val
, MM_COMP_GREATER
);
30 mm_filter_add_filtering_param (filter
, fp
);
34 serialized
= mm_filter_serialize (filter
, &error
);
35 g_print ("serialized filter \n%s\n", serialized
);
37 unserialized
= mm_filter_unserialize (serialized
, &error
);
40 g_object_unref (filter
);