summaryrefslogtreecommitdiffstats
path: root/AFBClient.h
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-01 12:06:09 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-14 14:04:51 +0200
commitb8ec6408f237065d6f87a23bcfe6c20ac56528bf (patch)
tree94849a32a0fd4927af5a030a81506a93067081cb /AFBClient.h
parentf9ab62922d45a9524d9f6af269aefd1af3c2e850 (diff)
AFBClient: make all call through call()
* Make all calls through call(). * dispatch() aggressively to ensure we actually dispatch our call reply too. * Extend scope tracing, guarded by NDEBUG. * Remove onReply, always use the locally supplied callable. * Simplify method implementations making API calls. * Propagate API call result through call() method return value. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'AFBClient.h')
-rw-r--r--AFBClient.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/AFBClient.h b/AFBClient.h
index d776057..a31479c 100644
--- a/AFBClient.h
+++ b/AFBClient.h
@@ -42,10 +42,13 @@ public:
int deactivateSurface(const char *label);
int endDraw(const char *label);
- void set_event_handler(enum EventType et, std::function<void(char const *label)> f);
+ void set_event_handler(enum EventType et,
+ std::function<void(char const *label)> f);
private:
- void call(const char *api, const char *verb, const char *object);
+ /// object will be json_object_put
+ int call(const char *verb, json_object *object,
+ std::function<void(bool ok, json_object*)> onReply);
struct afb_wsj1 *wsj1;
struct afb_wsj1_itf itf;