Top | ![]() |
![]() |
![]() |
![]() |
OsinfoFilter provides a way to filter OsinfoEntity instances based on their parameter values.
OsinfoFilter *
osinfo_filter_new (void
);
Construct a new filter that matches all entities
void osinfo_filter_add_constraint (OsinfoFilter *filter
,const gchar *propName
,const gchar *propVal
);
Adds a constraint that requires the entity to have
a property key propName
with a value of propVal
.
If multiple constraints are added for the same
propName
, with different values, the entity have
all property values.
void osinfo_filter_clear_constraint (OsinfoFilter *filter
,const gchar *propName
);
Remove all filter constraints for the matching property name.
void
osinfo_filter_clear_constraints (OsinfoFilter *filter
);
Remove all filter property constraints
GList *
osinfo_filter_get_constraint_keys (OsinfoFilter *filter
);
Get a list of all constraint property keys
GList * osinfo_filter_get_constraint_values (OsinfoFilter *filter
,const gchar *propName
);
Get a list values for filter constriants with the named key
gboolean osinfo_filter_matches (OsinfoFilter *filter
,OsinfoEntity *entity
);
Determine of an entity matches a filter