AFBClient: make all call through call()
[staging/windowmanager.git] / AFBClient.h
index d776057..a31479c 100644 (file)
@@ -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;