lo.h   lo.h 
skipping to change at line 14 skipping to change at line 14
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* $Id: lo.h,v 1.9 2004/03/24 23:33:50 swh Exp $ * $Id: lo.h,v 1.10 2004/07/12 14:54:20 swh Exp $
*/ */
#ifndef LO_H #ifndef LO_H
#define LO_H #define LO_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/** /**
skipping to change at line 103 skipping to change at line 103
const char *lo_address_errstr(lo_address a); const char *lo_address_errstr(lo_address a);
/** /**
* \brief Create a new server thread to handle incoming OSC * \brief Create a new server thread to handle incoming OSC
* messages. * messages.
* *
* Server threads take care of the message reception and dispatch by * Server threads take care of the message reception and dispatch by
* transparently creating a systme thread to handle incoming messages. * transparently creating a systme thread to handle incoming messages.
* Use this if you do not want to handle the threading yourself. * Use this if you do not want to handle the threading yourself.
* *
* \param port If NULL is passed then an unused port will be chosen by the * \param port If NULL is passed then an unused UDP port will be chosen by
* sytem, its number may be retreived with lo_server_thread_get_port() the
* so it can be passed to clients. Otherwise a decimal port number or servi * system, its number may be retreived with lo_server_thread_get_port()
ce * so it can be passed to clients. Otherwise a decimal port number, service
* name may be passed. * name or UNIX domain socket path may be passed.
* \param err_h A function that will be called in the event of an error bei ng * \param err_h A function that will be called in the event of an error bei ng
* raised. The function prototype is defined in lo_types.h * raised. The function prototype is defined in lo_types.h
*/ */
lo_server_thread lo_server_thread_new(const char *port, lo_err_handler err_ h); lo_server_thread lo_server_thread_new(const char *port, lo_err_handler err_ h);
/** /**
* \brief Add an OSC method to the specifed server thread. * \brief Add an OSC method to the specifed server thread.
* *
* \param st The server thread the method is to be added to. * \param st The server thread the method is to be added to.
* \param path The OSC path to register the method to. If NULL is passed th e * \param path The OSC path to register the method to. If NULL is passed th e
skipping to change at line 138 skipping to change at line 138
void *user_data); void *user_data);
/** /**
* \brief Start the server thread * \brief Start the server thread
* *
* \param st the server thread to start. * \param st the server thread to start.
*/ */
void lo_server_thread_start(lo_server_thread st); void lo_server_thread_start(lo_server_thread st);
/** /**
* \brief Stop the server thread
*
* \param st the server thread to start.
*/
void lo_server_thread_stop(lo_server_thread st);
/**
* \brief Return the port number that the server thread has bound to. * \brief Return the port number that the server thread has bound to.
*/ */
int lo_server_thread_get_port(lo_server_thread st); int lo_server_thread_get_port(lo_server_thread st);
/** /**
* \brief Return a URL describing the address of the server thread. * \brief Return a URL describing the address of the server thread.
* *
* Return value must be free()'d to reclaim memory. * Return value must be free()'d to reclaim memory.
*/ */
char *lo_server_thread_get_url(lo_server_thread st); char *lo_server_thread_get_url(lo_server_thread st);
 End of changes. 3 change blocks. 
6 lines changed or deleted 13 lines changed or added


 lo_endian.h   lo_endian.h 
skipping to change at line 14 skipping to change at line 14
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* $Id: lo_endian.h $ * $Id: lo_endian.h,v 1.3 2004/07/12 14:54:20 swh Exp $
*/ */
#ifndef LO_ENDIAN_H #ifndef LO_ENDIAN_H
#define LO_ENDIAN_H #define LO_ENDIAN_H
#include <netinet/in.h> #include <netinet/in.h>
#include <stdint.h>
#include <endian.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define lo_swap16(x) htons(x) #define lo_swap16(x) htons(x)
#define lo_swap32(x) htonl(x) #define lo_swap32(x) htonl(x)
/* These macros come from the Linux kernel */ /* These macros come from the Linux kernel */
skipping to change at line 97 skipping to change at line 95
in.all = x; in.all = x;
out.part.a = lo_swap32(in.part.b); out.part.a = lo_swap32(in.part.b);
out.part.b = lo_swap32(in.part.a); out.part.b = lo_swap32(in.part.a);
return out.all; return out.all;
} }
#endif #endif
/* Host to OSC and OSC to Host conversion macros */ /* Host to OSC and OSC to Host conversion macros */
#ifdef WORDS_BIGENDIAN #if 0
#define lo_htoo16(x) (x) #define lo_htoo16(x) (x)
#define lo_htoo32(x) (x) #define lo_htoo32(x) (x)
#define lo_htoo64(x) (x) #define lo_htoo64(x) (x)
#define lo_otoh16(x) (x) #define lo_otoh16(x) (x)
#define lo_otoh32(x) (x) #define lo_otoh32(x) (x)
#define lo_otoh64(x) (x) #define lo_otoh64(x) (x)
#else #else
#define lo_htoo16 lo_swap16 #define lo_htoo16 lo_swap16
#define lo_htoo32 lo_swap32 #define lo_htoo32 lo_swap32
#define lo_htoo64 lo_swap64 #define lo_htoo64 lo_swap64
 End of changes. 3 change blocks. 
4 lines changed or deleted 2 lines changed or added


 lo_lowlevel.h   lo_lowlevel.h 
skipping to change at line 14 skipping to change at line 14
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* $Id: lo_lowlevel.h,v 1.8 2004/03/26 16:12:42 swh Exp $ * $Id: lo_lowlevel.h,v 1.12 2004/07/12 14:54:20 swh Exp $
*/ */
#ifndef LO_LOWLEVEL_H #ifndef LO_LOWLEVEL_H
#define LO_LOWLEVEL_H #define LO_LOWLEVEL_H
#include "lo/lo_osc_types.h" #include "lo/lo_osc_types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
skipping to change at line 209 skipping to change at line 209
* *
* \param type The OSC type of the data item (eg. LO_FLOAT). * \param type The OSC type of the data item (eg. LO_FLOAT).
* \param data A pointer to the data item to be converted. It is change * \param data A pointer to the data item to be converted. It is change
* in-place. * in-place.
*/ */
void lo_arg_host_endian(lo_type type, void *data); void lo_arg_host_endian(lo_type type, void *data);
/** /**
* \brief Create a new server instance. * \brief Create a new server instance.
* *
* lo_server's block until they receive OSC messages. if you want non-block ing * lo_servers block until they receive OSC messages. if you want non-blocki ng
* behaviour see the lo_server_thread_* functions. * behaviour see the lo_server_thread_* functions.
* *
* \param port An decimal string for the port number the server is to liste * \param port If NULL is passed then an unused UDP port will be chosen by
n on the
* or the name of the service port you wish the server to use. Pass NULL if * system, its number may be retreived with lo_server_thread_get_port()
you * so it can be passed to clients. Otherwise a decimal port number, service
* wish the OS to choose an unused port number for you. * name or UNIX domain socket path may be passed.
* \param err_h An error callback function that will be called if there is an * \param err_h An error callback function that will be called if there is an
* error in messge reception or server creation. Pass NULL if you do not wa nt * error in messge reception or server creation. Pass NULL if you do not wa nt
* error handling. * error handling.
*/ */
lo_server lo_server_new(const char *port, lo_err_handler err_h); lo_server lo_server_new(const char *port, lo_err_handler err_h);
/** /**
* \brief Create a new server instance, specifying protocol.
*
* lo_servers block until they receive OSC messages. if you want non-blocki
ng
* behaviour see the lo_server_thread_* functions.
*
* \param port If using UDP then NULL may be passed to find an unused port.
* Otherwise a decimal port number orservice name or may be passed.
* If using UNIX domain sockets then a socket path should be passed here.
* \param proto The protocol to use, should be one of LO_UDP, or LO_UNIX.
* \param err_h An error callback function that will be called if there is
an
* error in messge reception or server creation. Pass NULL if you do not wa
nt
* error handling.
*/
lo_server lo_server_new_with_proto(const char *port, int proto,
lo_err_handler err_h);
/**
* \brief Free up memory used by the lo_server object * \brief Free up memory used by the lo_server object
*/ */
void lo_server_free(lo_server s); void lo_server_free(lo_server s);
/** /**
* \brief Look for an OSC message waiting to be received
*
* \param s The server to wait for connections on.
* \param timeout A timeout in milliseconds to wait for the incoming packet
.
* a value of 0 will return immediatly.
*
* The return value is the number of bytes in the received message or 0 is
* there is no message. The message will be dispatched to a matching method
* if one is found.
*/
int lo_server_recv_noblock(lo_server s, int timeout);
/**
* \brief Block, waiting for an OSC message to be received * \brief Block, waiting for an OSC message to be received
* *
* The return value is the number of bytes in the received message. The mes sage * The return value is the number of bytes in the received message. The mes sage
* will be dispatched to a matching method if one is found. * will be dispatched to a matching method if one is found.
*/ */
int lo_server_recv(lo_server s); int lo_server_recv(lo_server s);
/** /**
* \brief Add an OSC method to the specifed server. * \brief Add an OSC method to the specifed server.
* *
 End of changes. 5 change blocks. 
7 lines changed or deleted 41 lines changed or added


 lo_macros.h   lo_macros.h 
skipping to change at line 14 skipping to change at line 14
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* $Id: @FILENAME@ $ * $Id: lo_macros.h,v 1.2 2004/07/12 14:54:20 swh Exp $
*/ */
#ifndef LO_MACROS_H #ifndef LO_MACROS_H
#define LO_MACROS_H #define LO_MACROS_H
/* macros that have to be defined after function signatures */ /* macros that have to be defined after function signatures */
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Maximum length of UDP messages in bytes */ /* Maximum length of UDP messages in bytes */
#define LO_MAX_MSG_SIZE 32768 #define LO_MAX_MSG_SIZE 32768
/* Different possible protocol bitmasks */
#define LO_UDP 0x1
#define LO_UNIX 0x2
/* an internal value, ignored in transmission but check against LO_MARKER i n the /* an internal value, ignored in transmission but check against LO_MARKER i n the
* argument list. Used to do bounds checking */ * argument list. Used to do primitive bounds checking */
#define LO_MARKER_A 0xdeadbeef #define LO_MARKER_A 0xdeadbeef
#define LO_MARKER_B 0xf00baa23 #define LO_MARKER_B 0xf00baa23
#define lo_send(targ, path, types...) \ #define lo_send(targ, path, types...) \
lo_send_internal(targ, __FILE__, __LINE__, path, types, \ lo_send_internal(targ, __FILE__, __LINE__, path, types, \
LO_MARKER_A, LO_MARKER_B) LO_MARKER_A, LO_MARKER_B)
#if 0 #if 0
This function is deliberatly not avialable, see send.c for details. This function is deliberatly not avialable, see send.c for details.
 End of changes. 3 change blocks. 
2 lines changed or deleted 6 lines changed or added


 lo_types.h   lo_types.h 
skipping to change at line 14 skipping to change at line 14
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* $Id: lo_types.h,v 1.6 2004/03/24 23:33:50 swh Exp $ * $Id: lo_types.h,v 1.7 2004/07/12 14:54:20 swh Exp $
*/ */
#ifndef LO_TYPES_H #ifndef LO_TYPES_H
#define LO_TYPES_H #define LO_TYPES_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <netdb.h> #include <netdb.h>
#include <pthread.h> #include <pthread.h>
#include "lo/lo_osc_types.h" #include "lo/lo_osc_types.h"
/** /**
* \brief A set of macros to represent different communications transports
*/
#define LO_UDP 0x1
#define LO_UNIX 0x2
/**
* \brief A reference to an OSC service. * \brief A reference to an OSC service.
* *
* Created by calls to lo_address_new() or lo_address_new_from_url(). * Created by calls to lo_address_new() or lo_address_new_from_url().
*/ */
typedef void *lo_address; typedef void *lo_address;
/** /**
* \brief A object to store an opaque binary data object. * \brief A object to store an opaque binary data object.
* *
* Can be passed over OSC using the 'b' type. Created by calls to lo_blob_n ew(). * Can be passed over OSC using the 'b' type. Created by calls to lo_blob_n ew().
 End of changes. 2 change blocks. 
1 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/