X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgt-info.c;h=61779e0c2b3db4a964d387cc4ef472431d0ec3d9;hb=7e1027342a3cff95635ba2107f283321cf0efa08;hp=d5f664bc18bae29e523bd08a2ee6f04417e58b81;hpb=9ab266df6642c6e930e03b3024d7c3d53ef88bbc;p=src%2Fapp-framework-main.git diff --git a/src/wgt-info.c b/src/wgt-info.c index d5f664b..61779e0 100644 --- a/src/wgt-info.c +++ b/src/wgt-info.c @@ -423,3 +423,21 @@ void wgt_info_dump(struct wgt_info *ifo, int fd, const char *prefix) } } +const struct wgt_desc_feature *wgt_info_feature(struct wgt_info *ifo, const char *name) +{ + const struct wgt_desc_feature *result = ifo->desc.features; + while(result && strcmp(result->name, name)) + result = result->next; + return result; +} + +const char *wgt_info_param(const struct wgt_desc_feature *feature, const char *name) +{ + const struct wgt_desc_param *param = feature->params; + while(param) { + if (0 == strcmp(name, param->name)) + return param->value; + } + return NULL; +} +