diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2021-07-08 11:18:08 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2021-07-28 13:19:02 +0300 |
commit | a2a3f6912e60c7932bad87a6d2249f0e83e637e1 (patch) | |
tree | 26a0ca7ac799c06ece9d657b634b3fea00ea6c6e /lib/receiver.h | |
parent | 6804d3b2a2a93fa5113c962878867b373c0358f7 (diff) |
style: convert code to systemd coding style
https://systemd.io/CODING_STYLE/
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'lib/receiver.h')
-rw-r--r-- | lib/receiver.h | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/lib/receiver.h b/lib/receiver.h index cf13e1b..b14da35 100644 --- a/lib/receiver.h +++ b/lib/receiver.h @@ -22,54 +22,51 @@ extern "C" { struct icipc_receiver; enum icipc_receiver_sender_state { - ICIPC_RECEIVER_SENDER_STATE_CONNECTED = 0, - ICIPC_RECEIVER_SENDER_STATE_DISCONNECTED + ICIPC_RECEIVER_SENDER_STATE_CONNECTED = 0, + ICIPC_RECEIVER_SENDER_STATE_DISCONNECTED }; struct icipc_receiver_events { - /* emitted when a sender state changes */ - void (*sender_state) (struct icipc_receiver *self, + /* emitted when a sender state changes */ + void (*sender_state)( + struct icipc_receiver *self, int sender_fd, enum icipc_receiver_sender_state state, void *data); - /* emitted when message is received and needs to be handled */ - bool (*handle_message) (struct icipc_receiver *self, - int sender_fd, - const uint8_t *buffer, - size_t size, - void *data); + /* emitted when message is received and needs to be handled */ + bool (*handle_message)( + struct icipc_receiver *self, + int sender_fd, + const uint8_t *buffer, + size_t size, + void *data); }; ICIPC_API -struct icipc_receiver * -icipc_receiver_new (const char *path, - size_t buffer_size, - const struct icipc_receiver_events *events, - void *events_data, - size_t user_size); +struct icipc_receiver *icipc_receiver_new( + const char *path, + size_t buffer_size, + const struct icipc_receiver_events *events, + void *events_data, + size_t user_size); ICIPC_API -void -icipc_receiver_free (struct icipc_receiver *self); +void icipc_receiver_free(struct icipc_receiver *self); ICIPC_API -bool -icipc_receiver_start (struct icipc_receiver *self); +bool icipc_receiver_start(struct icipc_receiver *self); ICIPC_API -void -icipc_receiver_stop (struct icipc_receiver *self); +void icipc_receiver_stop(struct icipc_receiver *self); ICIPC_API -bool -icipc_receiver_is_running (struct icipc_receiver *self); +bool icipc_receiver_is_running(struct icipc_receiver *self); /* for subclasses only */ ICIPC_API -void * -icipc_receiver_get_user_data (struct icipc_receiver *self); +void *icipc_receiver_get_user_data(struct icipc_receiver *self); #ifdef __cplusplus } |