-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlop_types_internal.h
69 lines (56 loc) · 1.4 KB
/
lop_types_internal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef LOP_TYPES_H
#define LOP_TYPES_H
#include <sys/types.h>
#include "lop/lop_osc_types.h"
typedef void (*lop_err_handler)(int num, const char *msg, const char *where);
typedef void (*lop_send_handler)(const char *msg, size_t len, void *arg);
struct _lop_method;
typedef struct _lop_blob {
uint32_t size;
char *data;
} *lop_blob;
typedef struct _lop_message {
char *types;
size_t typelen;
size_t typesize;
void *data;
size_t datalen;
size_t datasize;
lop_arg **argv;
/* timestamp from bundle (LOP_TT_IMMEDIATE for unbundled messages) */
lop_timetag ts;
} *lop_message;
typedef int (*lop_method_handler)(const char *path, const char *types,
lop_arg **argv, int argc, struct _lop_message
*msg, void *user_data);
typedef struct _lop_method {
const char *path;
const char *typespec;
lop_method_handler handler;
char *user_data;
struct _lop_method *next;
} *lop_method;
typedef struct _lop_server {
lop_method first;
lop_err_handler err_h;
void *queued;
lop_send_handler send_h;
void *send_h_arg;
} *lop_server;
typedef struct _lop_strlist {
char *str;
struct _lop_strlist *next;
} lop_strlist;
typedef union {
int32_t i;
float f;
char c;
uint32_t nl;
} lop_pcast32;
typedef union {
int64_t i;
double f;
uint64_t nl;
lop_timetag tt;
} lop_pcast64;
#endif