summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-02-22 19:26:23 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-02-22 19:26:23 +0100
commitfedbab7ebe040ee82293b8c7bf6e95d5a7ff48f0 (patch)
tree3434b9bc96480bda9ac509a8a8507ce4c7e5b54b /src
parentae8db2457e484f0d63aaf6dc04382555f47d21e7 (diff)
Header include spring cleaning
Change-Id: I28b5c9197daa30c7da4ef1835f0eb989613a7901 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/low-can-binding.cpp51
1 files changed, 15 insertions, 36 deletions
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp
index 1545c6d..2767653 100644
--- a/src/low-can-binding.cpp
+++ b/src/low-can-binding.cpp
@@ -16,32 +16,11 @@
* limitations under the License.
*/
-#include <map>
-#include <queue>
-#include <vector>
-#include <string>
-#include <memory>
-#include <thread>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <net/if.h>
-#include <functional>
-#include <sys/ioctl.h>
-#include <linux/can.h>
-#include <openxc.pb.h>
-#include <sys/timeb.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#include <json-c/json.h>
-#include <linux/can/raw.h>
#include <systemd/sd-event.h>
-#include "timer.hpp"
-#include "openxc.pb.h"
#include "can-utils.hpp"
#include "can-signals.hpp"
-#include "can-decoder.hpp"
#include "openxc-utils.hpp"
#include "low-can-binding.hpp"
@@ -195,21 +174,6 @@ static void subscribe_unsubscribe(struct afb_req request, bool subscribe)
afb_req_fail(request, "error", NULL);
}
-static const struct afb_verb_desc_v1 verbs[]=
-{
- { .name= "subscribe", .session= AFB_SESSION_NONE, .callback= subscribe, .info= "subscribe to notification of CAN bus messages." },
- { .name= "unsubscribe", .session= AFB_SESSION_NONE, .callback= unsubscribe, .info= "unsubscribe a previous subscription." }
-};
-
-static const struct afb_binding binding_desc {
- AFB_BINDING_VERSION_1,
- {
- "CAN bus service",
- "can",
- verbs
- }
-};
-
extern "C"
{
static void subscribe(struct afb_req request)
@@ -222,6 +186,21 @@ extern "C"
subscribe_unsubscribe(request, false);
}
+ static const struct afb_verb_desc_v1 verbs[]=
+ {
+ { .name= "subscribe", .session= AFB_SESSION_NONE, .callback= subscribe, .info= "subscribe to notification of CAN bus messages." },
+ { .name= "unsubscribe", .session= AFB_SESSION_NONE, .callback= unsubscribe, .info= "unsubscribe a previous subscription." }
+ };
+
+ static const struct afb_binding binding_desc {
+ AFB_BINDING_VERSION_1,
+ {
+ "CAN bus service",
+ "can",
+ verbs
+ }
+ };
+
const struct afb_binding *afbBindingV1Register (const struct afb_binding_interface *itf)
{
binder_interface = itf;