LiVES  2.4.1-svn
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
osc.h
Go to the documentation of this file.
1 // osc.h
2 // LiVES (lives-exe)
3 // (c) G. Finch 2003 - 2012
4 // Released under the GPL 3 or later
5 // see file ../COPYING for licensing details
6 
7 
8 /* some portions of this file based on libOSC
9 Written by Adrian Freed, The Center for New Music and Audio Technologies,
10 University of California, Berkeley. Copyright (c) 1992,93,94,95,96,97,98,99,2000,01,02,03,04
11 The Regents of the University of California (Regents).
12 
13 Permission to use, copy, modify, distribute, and distribute modified versions
14 of this software and its documentation without fee and without a signed
15 licensing agreement, is hereby granted, provided that the above copyright
16 notice, this paragraph and the following two paragraphs appear in all copies,
17 modifications, and distributions.
18 
19 IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
20 SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING
21 OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS
22 BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 
24 REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
25 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
27 HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
28 MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
29 
30 
31 The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
32 */
33 
34 #ifdef ENABLE_OSC
35 #ifndef HAS_LIVES_OSC_H
36 #define HAS_LIVES_OSC_H
37 
38 #ifndef Boolean
39 #define Boolean boolean
40 #endif
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 #include <libOSC/libosc.h>
47 #include <libOSC/OSC-client.h>
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 typedef struct osc_arg_t {
54  int a;
55  int b;
56  int c;
57 } osc_arg;
58 
59 typedef struct lives_osc_t {
60  struct OSCAddressSpaceMemoryTuner t;
61  struct OSCReceiveMemoryTuner rt;
62  struct OSCContainerQueryResponseInfoStruct cqinfo;
63  struct OSCMethodQueryResponseInfoStruct ris;
64  struct sockaddr_in cl_addr;
65  int sockfd;
66  int clilen;
67  fd_set readfds;
68  OSCcontainer container;
69  OSCcontainer *leaves;
70  OSCPacketBuffer packet;
71  osc_arg *osc_args;
72 } lives_osc;
73 
74 void lives_osc_free(lives_osc *o);
75 void lives_osc_dump();
76 
77 
78 boolean lives_osc_act(OSCbuf *msg);
79 
80 
81 #endif //HAS_LIVES_OSC_H
82 #endif //ENABLE_OSC