Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-export: Emit a warning on bad 'afb_require_api' call
[src/app-framework-binder.git]
/
src
/
afb-api-so-vdyn.c
diff --git
a/src/afb-api-so-vdyn.c
b/src/afb-api-so-vdyn.c
index
300aa13
..
bb37f0f
100644
(file)
--- a/
src/afb-api-so-vdyn.c
+++ b/
src/afb-api-so-vdyn.c
@@
-15,11
+15,17
@@
* limitations under the License.
*/
* limitations under the License.
*/
+#if defined(WITH_LEGACY_BINDING_VDYN)
+
#define _GNU_SOURCE
#include <stdlib.h>
#include <dlfcn.h>
#define _GNU_SOURCE
#include <stdlib.h>
#include <dlfcn.h>
+#define AFB_BINDING_VERSION 0
+#include <afb/afb-binding.h>
+
+#include "afb-api-so-v3.h"
#include "afb-api-so-vdyn.h"
#include "afb-export.h"
#include "verbose.h"
#include "afb-api-so-vdyn.h"
#include "afb-export.h"
#include "verbose.h"
@@
-29,19
+35,15
@@
*/
static const char afb_api_so_vdyn_entry[] = "afbBindingVdyn";
*/
static const char afb_api_so_vdyn_entry[] = "afbBindingVdyn";
-/*
- * Description of a binding
- */
-static int vdyn_preinit(void *closure, struct afb_dynapi *dynapi)
+static int preinit(void *closure, struct afb_api_x3 *api)
{
{
- int (*entry)(struct afb_
dynapi
*) = closure;
- return entry(
dyn
api);
+ int (*entry)(struct afb_
api_x3
*) = closure;
+ return entry(api);
}
}
-int afb_api_so_vdyn_add(const char *path, void *handle, struct afb_apiset *
api
set)
+int afb_api_so_vdyn_add(const char *path, void *handle, struct afb_apiset *
declare_set, struct afb_apiset * call_
set)
{
{
- int rc;
- int (*entry)(void*, struct afb_dynapi*);
+ int (*entry)(struct afb_api_x3*);
struct afb_export *export;
entry = dlsym(handle, afb_api_so_vdyn_entry);
struct afb_export *export;
entry = dlsym(handle, afb_api_so_vdyn_entry);
@@
-50,15
+52,14
@@
int afb_api_so_vdyn_add(const char *path, void *handle, struct afb_apiset *apise
INFO("binding [%s] looks like an AFB binding Vdyn", path);
INFO("binding [%s] looks like an AFB binding Vdyn", path);
- export = afb_export_create_
vdyn(apiset, path, NULL
);
+ export = afb_export_create_
none_for_path(declare_set, call_set, path, preinit, entry
);
if (!export) {
if (!export) {
-
ERROR("can't create export for %s
", path);
+
INFO("binding [%s] creation failed
", path);
return -1;
}
return -1;
}
- INFO("binding [%s] calling dynamic initialisation %s", path, afb_api_so_vdyn_entry);
- rc = afb_export_preinit_vdyn(export, vdyn_preinit, entry);
- afb_export_destroy(export);
- return rc < 0 ? rc : 1;
+ return 1;
}
}
+#endif
+