code formatting improvement
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 31 May 2017 10:15:33 +0000 (12:15 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Wed, 31 May 2017 10:15:33 +0000 (12:15 +0200)
Change-Id: I07e0201c4dc9996e47ca70819123b351c7fb2ad7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
include/afb/afb-binding-v1.h
include/afb/afb-daemon-common.h
include/afb/afb-daemon-v1.h
include/afb/afb-daemon-v2.h
include/afb/afb-event-itf.h
include/afb/afb-req-itf.h

index ef03a6b..1abd7bf 100644 (file)
@@ -126,7 +126,8 @@ struct afb_binding_v1
 /*
  * config mode
  */
-enum afb_mode_v1 {
+enum afb_mode_v1
+{
        AFB_MODE_LOCAL = 0,     /* run locally */
        AFB_MODE_REMOTE,        /* run remotely */
        AFB_MODE_GLOBAL         /* run either remotely or locally (DONT USE! reserved for future) */
index e8e1817..e1308d6 100644 (file)
@@ -26,7 +26,8 @@ struct sd_bus;
 /*
  * Definition of the facilities provided by the daemon.
  */
-struct afb_daemon_itf {
+struct afb_daemon_itf
+{
        int (*event_broadcast)(void *closure, const char *name, struct json_object *object); /* broadcasts evant 'name' with 'object' */
        struct sd_event *(*get_event_loop)(void *closure);      /* gets the common systemd's event loop */
        struct sd_bus *(*get_user_bus)(void *closure);          /* gets the common systemd's user d-bus */
@@ -43,7 +44,8 @@ struct afb_daemon_itf {
  * Structure for accessing daemon.
  * See also: afb_daemon_get_event_sender, afb_daemon_get_event_loop, afb_daemon_get_user_bus, afb_daemon_get_system_bus
  */
-struct afb_daemon {
+struct afb_daemon
+{
        const struct afb_daemon_itf *itf;       /* the interfacing functions */
        void *closure;                          /* the closure when calling these functions */
 };
index 6390dd1..65b689e 100644 (file)
@@ -17,8 +17,6 @@
 
 #pragma once
 
-#include <stdarg.h>
-
 /*
  * Retrieves the common systemd's event loop of AFB
  * 'daemon' MUST be the daemon given in interface when activating the binding.
index 6cfc60b..01a620a 100644 (file)
@@ -17,8 +17,6 @@
 
 #pragma once
 
-#include <stdarg.h>
-
 /*
  * Retrieves the common systemd's event loop of AFB
  */
index 7b14de9..3d66a89 100644 (file)
@@ -26,7 +26,8 @@ struct json_object;
  * Don't use this structure directly.
  * Use the helper functions documented below.
  */
-struct afb_event_itf {
+struct afb_event_itf
+{
        /* CAUTION: respect the order, add at the end */
 
        int (*broadcast)(void *closure, struct json_object *obj);
@@ -38,7 +39,8 @@ struct afb_event_itf {
 /*
  * Describes the request of afb-daemon for bindings
  */
-struct afb_event {
+struct afb_event
+{
        const struct afb_event_itf *itf;        /* the interface to use */
        void *closure;                          /* the closure argument for functions of 'itf' */
 };
index 8c18a83..dcbbb8a 100644 (file)
@@ -27,7 +27,8 @@ struct json_object;
 /*
  * Describes an argument (or parameter) of a request
  */
-struct afb_arg {
+struct afb_arg
+{
        const char *name;       /* name of the argument or NULL if invalid */
        const char *value;      /* string representation of the value of the argument */
                                /* original filename of the argument if path != NULL */
@@ -41,7 +42,8 @@ struct afb_arg {
  * Don't use this structure directly.
  * Use the helper functions documented below.
  */
-struct afb_req_itf {
+struct afb_req_itf
+{
        /* CAUTION: respect the order, add at the end */
 
        struct json_object *(*json)(void *closure);
@@ -74,7 +76,8 @@ struct afb_req_itf {
 /*
  * Describes the request by bindings from afb-daemon
  */
-struct afb_req {
+struct afb_req
+{
        const struct afb_req_itf *itf;  /* the interface to use */
        void *closure;                  /* the closure argument for functions of 'itf' */
 };