X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwgt-info.h;h=c87b7242b384764cdfbbdb041d12facea9937d03;hb=a123bb31906ef03ff813559aee426282416d729d;hp=57f8d82b509f61adb442d145826f55b349391d18;hpb=f3d64b7c741677cd28e2a11deed67196cd02b46a;p=src%2Fapp-framework-main.git diff --git a/src/wgt-info.h b/src/wgt-info.h index 57f8d82..c87b724 100644 --- a/src/wgt-info.h +++ b/src/wgt-info.h @@ -1,5 +1,7 @@ /* - Copyright 2015 IoT.bzh + Copyright (C) 2015-2020 IoT.bzh + + author: José Bollo Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -15,37 +17,39 @@ */ -struct wgt_info_icon { - struct wgt_info_icon *next; +struct wgt_desc_icon { + struct wgt_desc_icon *next; char *src; int width; int height; }; -struct wgt_info_param { - struct wgt_info_param *next; +struct wgt_desc_param { + struct wgt_desc_param *next; char *name; char *value; }; -struct wgt_info_feature { - struct wgt_info_feature *next; +struct wgt_desc_feature { + struct wgt_desc_feature *next; char *name; int required; - struct wgt_info_param *params; + struct wgt_desc_param *params; }; -struct wgt_info_preference { - struct wgt_info_preference *next; +struct wgt_desc_preference { + struct wgt_desc_preference *next; char *name; char *value; int readonly; }; -struct wgt_info { +struct wgt_desc { int refcount; char *id; char *version; + char *ver; + char *idaver; int width; int height; char *viewmodes; @@ -61,14 +65,20 @@ struct wgt_info { char *content_src; char *content_type; char *content_encoding; - struct wgt_info_icon *icons; - struct wgt_info_feature *features; - struct wgt_info_preference *preferences; + struct wgt_desc_icon *icons; + struct wgt_desc_feature *features; + struct wgt_desc_preference *preferences; }; struct wgt; -extern struct wgt_info *wgt_info_get(struct wgt *wgt, int icons, int features, int preferences); -extern void wgt_info_addref(struct wgt_info *info); -extern void wgt_info_unref(struct wgt_info *info); -extern void wgt_info_dump(struct wgt_info *info, int fd, const char *prefix); +struct wgt_info; +extern struct wgt_info *wgt_info_create(struct wgt *wgt, int icons, int features, int preferences); +extern struct wgt_info *wgt_info_createat(int dirfd, const char *pathname, int icons, int features, int preferences); +extern const struct wgt_desc *wgt_info_desc(struct wgt_info *ifo); +extern struct wgt *wgt_info_wgt(struct wgt_info *ifo); +extern void wgt_info_addref(struct wgt_info *ifo); +extern void wgt_info_unref(struct wgt_info *ifo); +extern void wgt_info_dump(struct wgt_info *ifo, int fd, const char *prefix); +extern const struct wgt_desc_feature *wgt_info_feature(struct wgt_info *ifo, const char *name); +extern const char *wgt_info_param(const struct wgt_desc_feature *feature, const char *name);