annotate osx/include/lo/lo_macros.h @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents 241db1b1eff2
children
rev   line source
matthiasmauch@114 1 /*
matthiasmauch@114 2 * Copyright (C) 2004 Steve Harris
matthiasmauch@114 3 *
matthiasmauch@114 4 * This program is free software; you can redistribute it and/or
matthiasmauch@114 5 * modify it under the terms of the GNU Lesser General Public License
matthiasmauch@114 6 * as published by the Free Software Foundation; either version 2.1
matthiasmauch@114 7 * of the License, or (at your option) any later version.
matthiasmauch@114 8 *
matthiasmauch@114 9 * This program is distributed in the hope that it will be useful,
matthiasmauch@114 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
matthiasmauch@114 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
matthiasmauch@114 12 * GNU Lesser General Public License for more details.
matthiasmauch@114 13 *
matthiasmauch@114 14 * $Id$
matthiasmauch@114 15 */
matthiasmauch@114 16
matthiasmauch@114 17 #ifndef LO_MACROS_H
matthiasmauch@114 18 #define LO_MACROS_H
matthiasmauch@114 19
matthiasmauch@114 20 /* macros that have to be defined after function signatures */
matthiasmauch@114 21
matthiasmauch@114 22 #ifdef __cplusplus
matthiasmauch@114 23 extern "C" {
matthiasmauch@114 24 #endif
matthiasmauch@114 25
matthiasmauch@114 26 /* \brief Maximum length of UDP messages in bytes
matthiasmauch@114 27 */
matthiasmauch@114 28 #define LO_MAX_MSG_SIZE 32768
matthiasmauch@114 29
matthiasmauch@114 30 /* \brief A set of macros to represent different communications transports
matthiasmauch@114 31 */
matthiasmauch@114 32 #define LO_DEFAULT 0x0
matthiasmauch@114 33 #define LO_UDP 0x1
matthiasmauch@114 34 #define LO_UNIX 0x2
matthiasmauch@114 35 #define LO_TCP 0x4
matthiasmauch@114 36
matthiasmauch@114 37 /* an internal value, ignored in transmission but check against LO_MARKER in the
matthiasmauch@114 38 * argument list. Used to do primitive bounds checking */
matthiasmauch@114 39 #define LO_MARKER_A 0xdeadbeef
matthiasmauch@114 40 #define LO_MARKER_B 0xf00baa23
matthiasmauch@114 41 #define LO_ARGS_END LO_MARKER_A, LO_MARKER_B
matthiasmauch@114 42
matthiasmauch@114 43 #define lo_message_add_varargs(msg, types, list) \
matthiasmauch@114 44 lo_message_add_varargs_internal(msg, types, list, __FILE__, __LINE__)
matthiasmauch@114 45
matthiasmauch@114 46 #ifdef __GNUC__
matthiasmauch@114 47
matthiasmauch@114 48 #define lo_message_add(msg, types...) \
matthiasmauch@114 49 lo_message_add_internal(msg, __FILE__, __LINE__, types, \
matthiasmauch@114 50 LO_MARKER_A, LO_MARKER_B)
matthiasmauch@114 51
matthiasmauch@114 52 #define lo_send(targ, path, types...) \
matthiasmauch@114 53 lo_send_internal(targ, __FILE__, __LINE__, path, types, \
matthiasmauch@114 54 LO_MARKER_A, LO_MARKER_B)
matthiasmauch@114 55
matthiasmauch@114 56 #define lo_send_timestamped(targ, ts, path, types...) \
matthiasmauch@114 57 lo_send_timestamped_internal(targ, __FILE__, __LINE__, ts, path, \
matthiasmauch@114 58 types, LO_MARKER_A, LO_MARKER_B)
matthiasmauch@114 59
matthiasmauch@114 60 #define lo_send_from(targ, from, ts, path, types...) \
matthiasmauch@114 61 lo_send_from_internal(targ, from, __FILE__, __LINE__, ts, path, \
matthiasmauch@114 62 types, LO_MARKER_A, LO_MARKER_B)
matthiasmauch@114 63
matthiasmauch@114 64 #else
matthiasmauch@114 65
matthiasmauch@114 66 /* In non-GCC compilers, there is no support for variable-argument
matthiasmauch@114 67 * macros, so provide "internal" vararg functions directly instead. */
matthiasmauch@114 68
matthiasmauch@114 69 int lo_message_add(lo_message msg, const char *types, ...);
matthiasmauch@114 70 int lo_send(lo_address targ, const char *path, const char *types, ...);
matthiasmauch@114 71 int lo_send_timestamped(lo_address targ, lo_timetag ts, const char *path, const char *types, ...);
matthiasmauch@114 72 int lo_send_from(lo_address targ, lo_server from, lo_timetag ts, const char *path, const char *types, ...);
matthiasmauch@114 73
matthiasmauch@114 74 #endif
matthiasmauch@114 75
matthiasmauch@114 76 #ifdef __cplusplus
matthiasmauch@114 77 }
matthiasmauch@114 78 #endif
matthiasmauch@114 79
matthiasmauch@114 80 #endif