liblo  0.31
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 
58 lo_address lo_address_new(const char *host, const char *port);
59 
75 lo_address lo_address_new_with_proto(int proto, const char *host, const char *port);
76 
82 lo_address lo_address_new_from_url(const char *url);
83 
88 
99 void lo_address_set_ttl(lo_address t, int ttl);
100 
108 
126 int lo_send(lo_address targ, const char *path, const char *type, ...);
127 
151 int lo_send_from(lo_address targ, lo_server from, lo_timetag ts,
152  const char *path, const char *type, ...);
153 
175 int lo_send_timestamped(lo_address targ, lo_timetag ts, const char *path,
176  const char *type, ...);
177 
183 
188 const char *lo_address_errstr(lo_address a);
189 
197 lo_blob lo_blob_new(int32_t size, const void *data);
198 
202 void lo_blob_free(lo_blob b);
203 
209 uint32_t lo_blob_datasize(lo_blob b);
210 
215 void *lo_blob_dataptr(lo_blob b);
216 
244 void lo_version(char *verstr, int verstr_size,
245  int *major, int *minor, char *extra, int extra_size,
246  int *lt_major, int *lt_minor, int *lt_bug);
247 
250 #include "lo/lo_macros.h"
251 
252 #ifdef __cplusplus
253 }
254 #endif
255 
256 #endif
lo_blob_new
lo_blob lo_blob_new(int32_t size, const void *data)
Create a new OSC blob type.
lo_blob_datasize
uint32_t lo_blob_datasize(lo_blob b)
Return the amount of valid data in a lo_blob object.
lo_address_new_from_url
lo_address lo_address_new_from_url(const char *url)
Create a lo_address object from an OSC URL.
lo_address_free
void lo_address_free(lo_address t)
Free the memory used by the lo_address object.
lo_timetag
A structure to store OSC TimeTag values.
Definition: lo_osc_types.h:35
lo_server
void * lo_server
An object representing an instance of an OSC server.
Definition: lo_types.h:85
lo_send_from
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.
lo_osc_types.h
lo_types.h
lo_blob
void * lo_blob
A object to store an opaque binary data object.
Definition: lo_types.h:52
lo_blob_dataptr
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_errno
int lo_address_errno(lo_address a)
Return the error number from the last failed lo_send() or lo_address_new() call.
lo_send_timestamped
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...
lo_version
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_errstr
const char * lo_address_errstr(lo_address a)
Return the error string from the last failed lo_send() or lo_address_new() call.
lo_send
int lo_send(lo_address targ, const char *path, const char *type,...)
Send a OSC formatted message to the address specified.
lo_address_new_with_proto
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.
lo_address
void * lo_address
A reference to an OSC service.
Definition: lo_types.h:45
lo_address_get_ttl
int lo_address_get_ttl(lo_address t)
Get the Time-to-Live value for a given target address.
lo_blob_free
void lo_blob_free(lo_blob b)
Free the memory taken by a blob.
lo_address_new
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(),...
lo_serverthread.h
lo_address_set_ttl
void lo_address_set_ttl(lo_address t, int ttl)
Set the Time-to-Live value for a given target address.
lo_lowlevel.h