Rename "event" to "message"

After the recent refactorings, a "control event" is not necessarily an
"event" (it may be a "command"). Similarly, the unique "device event"
used to send the device clipboard content is more a "reponse" to the
request from the client than an "event".

Rename both to "message", and rename the message types to better
describe their intent.
This commit is contained in:
Romain Vimont
2019-05-31 14:55:11 +02:00
parent f710d76c9e
commit 28980bbc90
28 changed files with 777 additions and 778 deletions

View File

@@ -1,24 +1,24 @@
#ifndef CONTROL_H
#define CONTROL_H
#ifndef CONTROLLER_H
#define CONTROLLER_H
#include <stdbool.h>
#include <SDL2/SDL_mutex.h>
#include <SDL2/SDL_thread.h>
#include "cbuf.h"
#include "control_event.h"
#include "control_msg.h"
#include "net.h"
#include "receiver.h"
struct control_event_queue CBUF(struct control_event, 64);
struct control_msg_queue CBUF(struct control_msg, 64);
struct controller {
socket_t control_socket;
SDL_Thread *thread;
SDL_mutex *mutex;
SDL_cond *event_cond;
SDL_cond *msg_cond;
bool stopped;
struct control_event_queue queue;
struct control_msg_queue queue;
struct receiver receiver;
};
@@ -38,7 +38,7 @@ void
controller_join(struct controller *controller);
bool
controller_push_event(struct controller *controller,
const struct control_event *event);
controller_push_msg(struct controller *controller,
const struct control_msg *msg);
#endif