liblo  0.32
lo.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_H
18 #define LO_H
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
28 #include "lo/lo_endian.h"
29 #include "lo/lo_types.h"
30 #include "lo/lo_osc_types.h"
31 #include "lo/lo_errors.h"
32 #include "lo/lo_lowlevel.h"
33 #include "lo/lo_serverthread.h"
34 
62 lo_address lo_address_new(const char *host, const char *port);
63 
79 lo_address lo_address_new_with_proto(int proto, const char *host, const char *port);
80 
87 
92 
104 
112 
130 int lo_send(lo_address targ, const char *path, const char *type, ...);
131 
166  const char *path, const char *type, ...);
167 
189 int lo_send_timestamped(lo_address targ, lo_timetag ts, const char *path,
190  const char *type, ...);
191 
197 
203 
211 lo_blob lo_blob_new(int32_t size, const void *data);
212 
217 
224 
232 
260 void lo_version(char *verstr, int verstr_size,
261  int *major, int *minor, char *extra, int extra_size,
262  int *lt_major, int *lt_minor, int *lt_bug);
263 
266 #include "lo/lo_macros.h"
267 
268 #ifdef __cplusplus
269 }
270 #endif
271 
272 #endif
void * lo_blob_dataptr(lo_blob b)
Return a pointer to the start of the blob data to allow contents to be changed.
lo_address lo_address_new_from_url(const char *url)
Create a lo_address object from an OSC URL.
int lo_address_get_ttl(lo_address t)
Get the Time-to-Live value for a given target address.
int lo_address_errno(lo_address a)
Return the error number from the last failed lo_send() or lo_address_new() call.
int lo_send_timestamped(lo_address targ, lo_timetag ts, const char *path, const char *type,...)
Send a OSC formatted message to the address specified, scheduled to be dispatch at some time in the f...
void lo_address_free(lo_address t)
Free the memory used by the lo_address object.
void lo_blob_free(lo_blob b)
Free the memory taken by a blob.
int lo_send_from(lo_address targ, lo_server from, lo_timetag ts, const char *path, const char *type,...)
Send a OSC formatted message to the address specified, from the same socket as the specified server.
uint32_t lo_blob_datasize(lo_blob b)
Return the amount of valid data in a lo_blob object.
void lo_address_set_ttl(lo_address t, int ttl)
Set the Time-to-Live value for a given target address.
const char * lo_address_errstr(lo_address a)
Return the error string from the last failed lo_send() or lo_address_new() call.
lo_address lo_address_new_with_proto(int proto, const char *host, const char *port)
Declare an OSC destination, given IP address and port number, specifying protocol.
void lo_version(char *verstr, int verstr_size, int *major, int *minor, char *extra, int extra_size, int *lt_major, int *lt_minor, int *lt_bug)
Get information on the version of liblo current in use.
lo_address lo_address_new(const char *host, const char *port)
Declare an OSC destination, given IP address and port number. Same as lo_address_new_with_proto(),...
int lo_send(lo_address targ, const char *path, const char *type,...)
Send a OSC formatted message to the address specified.
lo_blob lo_blob_new(int32_t size, const void *data)
Create a new OSC blob type.
struct lo_server_ * lo_server
An object representing an instance of an OSC server.
Definition: lo_types.h:85
struct lo_address_ * lo_address
A reference to an OSC service.
Definition: lo_types.h:45
struct lo_blob_ * lo_blob
A object to store an opaque binary data object.
Definition: lo_types.h:52
A structure to store OSC TimeTag values.
Definition: lo_osc_types.h:35