From ff98ee6f9e66ba850274463ca7f125c01a02d73e Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 10 Jan 2014 21:07:58 +0100 Subject: mplayer_server: change the type of callback_t we need to access the opcode of the callbacks from outside of the server (i.e. in the future clients). the type callback_t is now a pointer to function and can be accessed using callbacks_g[opcode] where the opcodes are enumerated in request.h a new file named pub_callbacks.h has been added. it will be used later by the client and must not be server dependant closes #1 --- pub_callbacks.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pub_callbacks.h (limited to 'pub_callbacks.h') diff --git a/pub_callbacks.h b/pub_callbacks.h new file mode 100644 index 0000000..a8f6d34 --- /dev/null +++ b/pub_callbacks.h @@ -0,0 +1,26 @@ +#ifndef PUB_CALLBACKS_H +#define PUB_CALLBACKS_H + +#include + +typedef uint8_t byte; + +typedef struct { + byte opcode; + + byte data[512]; +} request_t; + +enum { + CALLBACK_LOAD_URL, + CALLBACK_PAUSE, + CALLBACK_QUIT, + CALLBACK_SND_UP, + CALLBACK_SND_DOWN, + CALLBACK_FULLSCREEN, + CALLBACK_MUTE, + + CALLBACK_COUNT +}; + +#endif /* PUB_CALLBACKS_H */ -- cgit v1.2.3