diff options
author | Pierre Gabin FODOP GUMETE <gabinfodop@gmail.com> | 2019-01-31 17:04:32 +0100 |
---|---|---|
committer | Pierre Gabin FODOP GUMETE <gabinfodop@gmail.com> | 2019-01-31 17:04:32 +0100 |
commit | 60e362130fd89321f7bf1d168fb6d3b22fef799d (patch) | |
tree | 5042d76458d6a8529610afe8973f147c6cb33bf0 | |
parent | 9ed1400b1df1d645603f075529ff8e8c8154d145 (diff) |
Partial Test
Change-Id: I85141091579780845f6ed173c71be9e6aebf0083
-rwxr-xr-x | src/a.out | bin | 0 -> 40272 bytes | |||
-rw-r--r-- | src/afb-wsj1-test.cpp | 10 | ||||
-rw-r--r-- | src/afb-wsj1.compile | 0 | ||||
-rw-r--r-- | src/afb-wsj1.hpp | 19 |
4 files changed, 18 insertions, 11 deletions
diff --git a/src/a.out b/src/a.out Binary files differnew file mode 100755 index 00000000..d2e6a5f8 --- /dev/null +++ b/src/a.out diff --git a/src/afb-wsj1-test.cpp b/src/afb-wsj1-test.cpp index 059c845b..c17b1ed0 100644 --- a/src/afb-wsj1-test.cpp +++ b/src/afb-wsj1-test.cpp @@ -5,12 +5,14 @@ void onreply(const char *value){ system("PAUSE"); } -int main(){ - std::string uri,api,verb, req; - char * request = (char*)req.c_str(); +int main(int ac, char **av){ + char*uri=av[0]; + char*api =av[1]; + char*verb =av[2]; + char*req =av[3]; afb::wsj1 sj1; sj1.connect(uri); - sj1.call(api.c_str(),verb.c_str(),request,onreply); + sj1.call(api,verb,req,onreply); return EXIT_SUCCESS; }
\ No newline at end of file diff --git a/src/afb-wsj1.compile b/src/afb-wsj1.compile new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/src/afb-wsj1.compile diff --git a/src/afb-wsj1.hpp b/src/afb-wsj1.hpp index fc990928..fa236fae 100644 --- a/src/afb-wsj1.hpp +++ b/src/afb-wsj1.hpp @@ -29,9 +29,9 @@ #include <pthread.h> extern "C" { -#include <json-c/json.h> -#include <afb-wsj1.h> -#include <afb-ws-client.h> +#include "json-c/json.h" +#include "afb-wsj1.h" +#include "afb-ws-client.h" } #include <iostream> @@ -77,12 +77,12 @@ private: afb_wsj1 *wsj1_ = nullptr; private: static struct afb_wsj1_itf wsj1_itf; - static void itf_hangup_(void *closure, struct afb_wsj1 *wsj1); - static void itf_on_call_(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg); + static void itf_hangup_(void *closure, struct afb_wsj1 *wsj1){}; + static void itf_on_call_(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg){}; static void itf_on_event_(void *closure, const char *event, struct afb_wsj1_msg *msg); private: - void on_hangup_(struct afb_wsj1 *wsj1) {} - void on_call_(const char *api, const char *verb, struct afb_wsj1_msg *msg) {} + void on_hangup_(struct afb_wsj1 *wsj1); + void on_call_(const char *api, const char *verb, struct afb_wsj1_msg *msg); void on_event_(const char *event, struct afb_wsj1_msg *msg); private: static sd_event *eloop_(); @@ -144,7 +144,12 @@ sd_event *wsj1::eloop_() { } } } +void wsj1::on_hangup_(struct afb_wsj1 *wsj1) { +}; +void wsj1::on_call_(const char *api, const char *verb, struct afb_wsj1_msg *msg) { + +}; } |