vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
OSCAddressSpace.h
1 
2 #if IPHONE
3 #import <UIKit/UIKit.h>
4 #else
5 #import <Cocoa/Cocoa.h>
6 #endif
7 #import "OSCNode.h"
8 
9 
10 
11 
12 // OSCAddressSpace delegate protocol
13 @protocol OSCAddressSpaceDelegateProtocol
14 - (void) nodeRenamed:(OSCNode *)n;
15 // this method is called by other nodes in the address space replying to queries. the passed message is the reply or error in response to a query- this response needs to be transmitted (sent via an output). this response can probably be transmitted via OSCManager's "transmitReplyOrError:" method, but the OSC address space and the OSC manager aren't necessarily related so we have this as a separate delegate method.
16 - (void) queryResponseNeedsToBeSent:(OSCMessage *)m;
17 @end
18 
19 
20 
21 
22 // this is the main instance of OSCAddressSpace. it is auto-created when this class is initialized
23 extern id _mainVVOSCAddressSpace;
24 
25 
26 
27 
29 
41 @interface OSCAddressSpace : OSCNode {
42  id delegate;
43 }
44 
46 + (id) mainAddressSpace;
47 + (void) refreshMenu;
48 #if !IPHONE
49 + (NSMenu *) makeMenuForNode:(OSCNode *)n withTarget:(id)t action:(SEL)a;
50 + (NSMenu *) makeMenuForNode:(OSCNode *)n ofType:(NSIndexSet *)ts withTarget:(id)t action:(SEL)a;
51 #endif
52 
54 - (void) renameAddress:(NSString *)before to:(NSString *)after;
55 - (void) renameAddressArray:(NSArray *)before toArray:(NSArray *)after;
56 
58 - (void) setNode:(OSCNode *)n forAddress:(NSString *)a;
59 - (void) setNode:(OSCNode *)n forAddress:(NSString *)a createIfMissing:(BOOL)c;
60 - (void) setNode:(OSCNode *)n forAddressArray:(NSArray *)a;
61 - (void) setNode:(OSCNode *)n forAddressArray:(NSArray *)a createIfMissing:(BOOL)c;
62 
64 - (OSCNode *) findNodeForAddress:(NSString *)p createIfMissing:(BOOL)c;
66 - (NSMutableArray *) findNodesMatchingAddress:(NSString *)a;
67 
68 // this method is called whenever a node is added to another node
69 - (void) nodeRenamed:(OSCNode *)n;
70 
72 - (void) dispatchMessage:(OSCMessage *)m;
73 // Don't call this method externally- this gets called by an OSCNode inside me (or by me), and you probably won't need to ever call this method. The passed message is a reply or error that needs to be sent back in response to a query. The passed OSCMessage contains the IP address and port of the destination. This method just passes the data on to the addres space's delegate- it does NOT actually send anything out, this is something you'll have to implement in the delegate.
74 - (void) _dispatchReplyOrError:(OSCMessage *)m;
75 
76 - (void) addDelegate:(id)d forPath:(NSString *)p;
77 - (void) removeDelegate:(id)d forPath:(NSString *)p;
78 /*
79 - (void) addQueryDelegate:(id)d forPath:(NSString *)p;
80 - (void) removeQueryDelegate:(id)d forPath:(NSString *)p;
81 */
82 @property (assign, readwrite) id delegate;
83 
84 
85 @end
86 
87 
88 
89 
90 
Corresponds to an OSC message: contains zero or more values, and the address path the values have to ...
Definition: OSCMessage.h:18
OSCAddressSpace is the primary means of interacting with the OSC address space described in the OSC s...
Definition: OSCAddressSpace.h:41
OSCNode describes a single destination for OSC addresses. The OSC address space is made up of many di...
Definition: OSCNode.h:57