#include <unistd.h>
#include <sys/types.h>
-#include <json.h>
+#include <json-c/json.h>
#include "utils-json.h"
#include "wgt-info.h"
* path: STRING, the path of the root directory for the application
* content: STRING, the relative path to the entryu point of the application
* type: STRING, the mime type describing the type 'content'
- * plugins: ARRAY, array of plugins
+ * bindings: ARRAY, array of bindings
* [
- * STRING, path to the plugin
+ * STRING, path to the binding
* ]
* public: OBJECT, public content describing the application widget
* {
if (!pub)
goto error;
- plugs = j_add_new_array(priv, "plugins");
+ plugs = j_add_new_array(priv, "bindings");
if (!plugs)
goto error;
|| !j_add_string(pub, "author", desc->author))
goto error;
- /* extract plugins from features */
+ /* extract bindings from features */
feat = desc->features;
while (feat) {
- static const char prefix[] = FWK_PREFIX_PLUGIN;
+ static const char prefix[] = FWK_PREFIX_BINDING;
if (!memcmp(feat->name, prefix, sizeof prefix - 1)) {
str = json_object_new_string (
feat->name + sizeof prefix - 1);
errno = ENAMETOOLONG;
return -1;
}
- data->length = stpcpy(beg, entry.d_name) - data->path;
+ data->length = (int)(stpcpy(beg, entry.d_name)
+ - data->path);
/* call the function */
rc = callto(data);
if (rc)
/* for each directory of afdb */
for (dir = afdb->dirhead ; dir != NULL ; dir = dir->next) {
if (dir->type == type_root) {
- edata.length = stpcpy(edata.path, dir->path)
- - edata.path;
- assert(edata.length < sizeof edata.path);
+ edata.length = (int)(stpcpy(edata.path, dir->path)
+ - edata.path);
+ assert(edata.length < (int)sizeof edata.path);
/* enumerate the applications */
rc = enumentries(&edata, enumvers);
if (rc)