X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Futils_search.h;h=62ab6cee9534fa6620992e42b267c14155361e31;hp=a1fa643983337bc7e28f5d9d43659a56a8c35975;hb=e3fb09073a64cc051c11c4a1bdcec493f937b764;hpb=7004fc9c03aa95adc214eb15ca2400487d122d58 diff --git a/src/utils_search.h b/src/utils_search.h index a1fa643..62ab6ce 100644 --- a/src/utils_search.h +++ b/src/utils_search.h @@ -24,12 +24,28 @@ #ifndef UTILS_SEARCH_H #define UTILS_SEARCH_H 1 +#include "graph_types.h" + struct search_info_s; typedef struct search_info_s search_info_t; search_info_t *search_parse (const char *search); void search_destroy (search_info_t *si); +/* Returns true if at least one of the ident fields is defined (not a + * wildcard), false otherwise. If no field has been specified, searching is a + * lot easier. */ +_Bool search_has_selector (search_info_t *si); + +graph_ident_t *search_to_ident (search_info_t *si); +search_info_t *search_from_ident (const graph_ident_t *ident); + +_Bool search_graph_title_matches (search_info_t *si, const char *title); + +_Bool search_graph_inst_matches (search_info_t *si, + graph_config_t *cfg, graph_instance_t *inst, + const char *title); + #endif /* UTILS_SEARCH_H */ /* vim: set sw=2 sts=2 et fdm=marker : */