summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer/imageviewer.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/imageviewer/imageviewer.h')
-rw-r--r--apps/plugins/imageviewer/imageviewer.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/plugins/imageviewer/imageviewer.h b/apps/plugins/imageviewer/imageviewer.h
index 19b5db15bb..ac15df5960 100644
--- a/apps/plugins/imageviewer/imageviewer.h
+++ b/apps/plugins/imageviewer/imageviewer.h
@@ -136,14 +136,17 @@ struct image_decoder {
136 int x, int y, int width, int height); 136 int x, int y, int width, int height);
137}; 137};
138 138
139#define IMGDEC_API_VERSION (PLUGIN_API_VERSION << 4 | 0) 139#define IMGDEC_API_VERSION 1
140 140
141/* image decoder header */ 141/* image decoder header */
142struct imgdec_header { 142struct imgdec_header {
143 struct lc_header lc_hdr; /* must be the first */ 143 struct lc_header lc_hdr; /* must be the first */
144 const struct image_decoder *decoder; 144 const struct image_decoder *decoder;
145 const struct plugin_api **api; 145 const struct plugin_api **api;
146 unsigned short plugin_api_version;
147 size_t plugin_api_size;
146 const struct imgdec_api **img_api; 148 const struct imgdec_api **img_api;
149 size_t img_api_size;
147}; 150};
148 151
149#ifdef IMGDEC 152#ifdef IMGDEC
@@ -157,15 +160,18 @@ extern const struct image_decoder image_decoder;
157 const struct imgdec_header __header \ 160 const struct imgdec_header __header \
158 __attribute__ ((section (".header")))= { \ 161 __attribute__ ((section (".header")))= { \
159 { PLUGIN_MAGIC, TARGET_ID, IMGDEC_API_VERSION, \ 162 { PLUGIN_MAGIC, TARGET_ID, IMGDEC_API_VERSION, \
160 plugin_start_addr, plugin_end_addr }, &image_decoder, &rb, &iv }; 163 plugin_start_addr, plugin_end_addr, }, &image_decoder, \
164 &rb, PLUGIN_API_VERSION, sizeof(struct plugin_api), \
165 &iv, sizeof(struct imgdec_api) };
161#else /* PLATFORM_HOSTED */ 166#else /* PLATFORM_HOSTED */
162#define IMGDEC_HEADER \ 167#define IMGDEC_HEADER \
163 const struct plugin_api *rb DATA_ATTR; \ 168 const struct plugin_api *rb DATA_ATTR; \
164 const struct imgdec_api *iv DATA_ATTR; \ 169 const struct imgdec_api *iv DATA_ATTR; \
165 const struct imgdec_header __header \ 170 const struct imgdec_header __header \
166 __attribute__((visibility("default"))) = { \ 171 __attribute__((visibility("default"))) = { \
167 { PLUGIN_MAGIC, TARGET_ID, IMGDEC_API_VERSION, \ 172 { PLUGIN_MAGIC, TARGET_ID, IMGDEC_API_VERSION, NULL, NULL }, \
168 NULL, NULL }, &image_decoder, &rb, &iv }; 173 &image_decoder, &rb, PLUGIN_API_VERSION, sizeof(struct plugin_api), \
174 &iv, sizeof(struct imgdec_api), };
169#endif /* CONFIG_PLATFORM */ 175#endif /* CONFIG_PLATFORM */
170#endif 176#endif
171 177