summaryrefslogtreecommitdiffstats
path: root/AFBClient.cpp
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-14 14:04:43 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-09-14 14:04:43 +0200
commit9989bd4ba4cf16237335ad3ed44ad2bc971109c0 (patch)
treed8864b91a02e1e37c1a110ecfb59e486c6f66a7f /AFBClient.cpp
parent4a2c73eca3713fa049c86d021aae27ac66c4e481 (diff)
Removing some test calls
There were some test calls left that don't make any sense to be kept in the main(). Removed the extern C definitions of the functions used by the application from the AFB. Added some more debugging information original author is Aurelian. Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'AFBClient.cpp')
-rw-r--r--AFBClient.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/AFBClient.cpp b/AFBClient.cpp
index 283e22c..ece6501 100644
--- a/AFBClient.cpp
+++ b/AFBClient.cpp
@@ -33,7 +33,7 @@ AFBClient::~AFBClient()
bool AFBClient::init()
{
- printf("init() -->\n");
+ printf("AFBClient::init() -->\n");
/* get the default event loop */
int rc = sd_event_default(&loop);
if (rc < 0) {
@@ -48,13 +48,13 @@ bool AFBClient::init()
return false;
}
- printf("init() <--\n");
+ printf("AFBClient::init() <--\n");
return true;
}
int AFBClient::requestSurface(const char *label)
{
- printf("requestSurface(%s) -->\n", label);
+ printf("AFBClient::requestSurface(%s) -->\n", label);
constexpr char const *verb = "request_surface";
int ret = -1;
@@ -105,14 +105,14 @@ int AFBClient::requestSurface(const char *label)
}
}
- printf("requestSurface(%s) = %d <--\n", label, ret);
+ printf("AFBClient::requestSurface(%s) = %d <--\n", label, ret);
return ret;
}
void AFBClient::activateSurface(const char *label)
{
- printf("activateSurface(%s) -->\n", label);
+ printf("AFBClient::activateSurface(%s) -->\n", label);
fflush(stdout);
const char begin[] = "{\"drawing_name\":\"";
@@ -129,7 +129,7 @@ void AFBClient::activateSurface(const char *label)
// Sync this one too
dispatch(-1);
- printf("activateSurface(%s) <--\n", label);
+ printf("AFBClient::activateSurface(%s) <--\n", label);
fflush(stdout);
}
@@ -139,20 +139,28 @@ int AFBClient::dispatch(uint64_t timeout) {
void AFBClient::deactivateSurface(const char *label)
{
+ printf("AFBClient::deactivateSurface(%s) -->\n", label);
+ fflush(stdout);
json_object *j = json_object_new_object();
json_object_object_add(j, "drawing_name", json_object_new_string(label));
call(AFBClient::wmAPI, "deactivate_surface", json_object_to_json_string(j));
json_object_put(j);
dispatch(-1);
+ printf("AFBClient::deactivateSurface(%s) <--\n", label);
+ fflush(stdout);
}
void AFBClient::endDraw(const char *label)
{
+ printf("AFBClient::endDraw(%s) -->\n", label);
+ fflush(stdout);
json_object *j = json_object_new_object();
json_object_object_add(j, "drawing_name", json_object_new_string(label));
call(AFBClient::wmAPI, "enddraw", json_object_to_json_string(j));
json_object_put(j);
dispatch(-1);
+ printf("AFBClient::endDraw(%s) <--\n", label);
+ fflush(stdout);
}
/* called when wsj1 receives a method invocation */