liblo  0.32
lo_types.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Steve Harris et al. (see AUTHORS)
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 2.1
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * $Id$
15  */
16 
17 #ifndef LO_TYPES_H
18 #define LO_TYPES_H
19 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #if defined(_WIN32)
29 #include <winsock2.h>
30 #include <ws2tcpip.h>
31 #else
32 #include <netdb.h>
33 #endif
34 
35 #include "lo/lo_osc_types.h"
36 
37 #define LO_DISABLE 0
38 #define LO_ENABLE 1
39 
45 typedef struct lo_address_ *lo_address;
46 
52 typedef struct lo_blob_ *lo_blob;
53 
60 typedef struct lo_message_ *lo_message;
61 
69 typedef struct lo_bundle_ *lo_bundle;
70 
77 typedef struct lo_method_ *lo_method;
78 
85 typedef struct lo_server_ *lo_server;
86 
92 typedef struct lo_server_thread_ *lo_server_thread;
93 
105 typedef void (*lo_err_handler)(int num, const char *msg, const char *where);
106 
134 typedef int (*lo_method_handler)(const char *path, const char *types,
135  lo_arg **argv, int argc, lo_message msg,
136  void *user_data);
137 
155 typedef int (*lo_bundle_start_handler)(lo_timetag time, void *user_data);
156 
166 typedef int (*lo_bundle_end_handler)(void *user_data);
167 
180  void *user_data);
181 
193  void *user_data);
194 
195 #ifdef __cplusplus
196 }
197 #endif
198 
199 #endif
struct lo_server_ * lo_server
An object representing an instance of an OSC server.
Definition: lo_types.h:85
int(* lo_bundle_start_handler)(lo_timetag time, void *user_data)
A callback function to receive notification of a bundle being dispatched by the server or server thre...
Definition: lo_types.h:155
void(* lo_server_thread_cleanup_callback)(lo_server_thread s, void *user_data)
A callback function to perform cleanup when the server thread is started.
Definition: lo_types.h:192
struct lo_address_ * lo_address
A reference to an OSC service.
Definition: lo_types.h:45
struct lo_message_ * lo_message
A low-level object used to represent messages passed over OSC.
Definition: lo_types.h:60
int(* lo_method_handler)(const char *path, const char *types, lo_arg **argv, int argc, lo_message msg, void *user_data)
A callback function to receive notification of matching message arriving in the server or server thre...
Definition: lo_types.h:134
struct lo_blob_ * lo_blob
A object to store an opaque binary data object.
Definition: lo_types.h:52
void(* lo_err_handler)(int num, const char *msg, const char *where)
A callback function to receive notification of an error in a server or server thread.
Definition: lo_types.h:105
int(* lo_bundle_end_handler)(void *user_data)
A callback function to receive notification of a bundle dispatch being completed by the server or ser...
Definition: lo_types.h:166
struct lo_server_thread_ * lo_server_thread
An object representing a thread containing an OSC server.
Definition: lo_types.h:92
struct lo_bundle_ * lo_bundle
A low-level object used to represent bundles of messages passed over OSC.
Definition: lo_types.h:69
int(* lo_server_thread_init_callback)(lo_server_thread s, void *user_data)
A callback function to perform initialization when the server thread is started.
Definition: lo_types.h:179
struct lo_method_ * lo_method
An object representing an method on a server.
Definition: lo_types.h:77
A structure to store OSC TimeTag values.
Definition: lo_osc_types.h:35
Union used to read values from incoming messages.
Definition: lo_osc_types.h:104