summaryrefslogtreecommitdiff
path: root/request.h
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2014-01-10 21:07:58 +0100
committerOlivier Gayot <olivier.gayot@intersec.com>2014-01-18 13:46:58 +0100
commitff98ee6f9e66ba850274463ca7f125c01a02d73e (patch)
tree56b4075f92cd90d855ae05c4a92d193d03297c7e /request.h
parentc5b339e3964009d7eb917ff52e60ba69ff170c3c (diff)
mplayer_server: change the type of callback_tHEADmaster
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
Diffstat (limited to 'request.h')
-rw-r--r--request.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/request.h b/request.h
index 6c5925a..cbf7ecb 100644
--- a/request.h
+++ b/request.h
@@ -1,14 +1,8 @@
#ifndef REQUEST_H
#define REQUEST_H
-#include <stdint.h>
+#include "pub_callbacks.h"
-typedef uint8_t byte;
-
-typedef struct {
- byte opcode;
-
- byte data[512];
-} request_t;
+typedef int (*callback_t)(const byte *, int);
#endif /* REQUEST_H */