Skip to content

Commit 3367634

Browse files
committed
lots of minor changes
changed to the more-recently-updated dev branch of websocket++ :: updated rapidjson and asio libs :: updated version info for various apps numerous times in response to various changes/testing :: figured out a way to get restarted websocket++ servers to use the same port again
1 parent 4074a9d commit 3367634

36 files changed

+800
-211
lines changed

LiveOSCQueryHelper/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<key>CFBundlePackageType</key>
4545
<string>APPL</string>
4646
<key>CFBundleShortVersionString</key>
47-
<string>0.3</string>
47+
<string>0.3.0.3</string>
4848
<key>CFBundleVersion</key>
4949
<string>1</string>
5050
<key>LSMinimumSystemVersion</key>

LiveOSCQueryHelper/LiveOSCQueryHelperAppDelegate.m

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ @interface LiveOSCQueryHelperAppDelegate () {
1010
NSTimer *fileChangeCoalesceTimer;
1111
}
1212
@property (weak) IBOutlet NSWindow *window;
13+
@property (strong) id activity;
1314
- (void) _loadLastFile;
1415
- (void) _loadFile:(NSString *)fullPath;
1516
- (void) _loadAbletonProjectFile:(NSString *)fullPath;
@@ -43,6 +44,9 @@ + (void) initialize {
4344
- (id) init {
4445
self = [super init];
4546
if (self != nil) {
47+
// disable app nap
48+
self.activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated reason:@"Live OSCQuery Helper"];
49+
4650
// register the OSC address space
4751
OSCAddressSpace *as = [OSCAddressSpace mainAddressSpace];
4852
// by default, the address space registers for app terminate notifications so it can tear itself down. we want to prevent this so we don't send "node deleted" messages to clients on app quit.
@@ -327,6 +331,7 @@ - (void) _loadAbletonProjectFile:(NSString *)fullPath {
327331
NSArray *objRange = [baseObj objectForKey:kVVOSCQ_OptAttr_Range]; // one for each type from the type tag string
328332
NSArray *objUnits = [baseObj objectForKey:kVVOSCQ_OptAttr_Unit]; // one for each type from the type tag string
329333
NSNumber *objCritical = [baseObj objectForKey:kVVOSCQ_OptAttr_Critical];
334+
NSArray *objOverloads = [baseObj objectForKey:kVVOSCQ_OptAttr_Overloads];
330335

331336
if (setUpAsMIDINode) {
332337
OSCNode *newNode = [[OSCAddressSpace mainAddressSpace] findNodeForAddress:objFullPath createIfMissing:YES];
@@ -352,6 +357,8 @@ - (void) _loadAbletonProjectFile:(NSString *)fullPath {
352357
[newNode setUnits:objUnits];
353358
if (objCritical != nil && [objCritical isKindOfClass:[NSNumber class]])
354359
[newNode setCritical:[objCritical boolValue]];
360+
if (objOverloads != nil && [objOverloads isKindOfClass:[NSArray class]])
361+
[newNode setOverloads:objOverloads];
355362

356363
// make a delegate for the node, add it to the array
357364
QueryServerNodeDelegate *tmpDelegate = [[QueryServerNodeDelegate alloc] initWithMIDIManager:midim forAddress:[newNode fullName]];
@@ -484,18 +491,26 @@ - (VVOSCQueryReply *) hostInfoQueryFromServer:(VVOSCQueryServer *)s {
484491
if ([hostInfo objectForKey:kVVOSCQ_ReqAttr_HostInfo_OSCTransport] == nil)
485492
[hostInfo setObject:kVVOSCQueryOSCTransportUDP forKey:kVVOSCQ_ReqAttr_HostInfo_OSCTransport];
486493
// supply an extensions array if there isn't already one
487-
NSDictionary *myExtDict = @{
494+
NSDictionary *extDict = @{
488495
kVVOSCQ_OptAttr_Tags : @YES,
489496
//kVVOSCQ_ReqAttr_Type : @YES,
490497
kVVOSCQ_OptAttr_Access : @YES,
491498
kVVOSCQ_OptAttr_Value : @YES,
492499
kVVOSCQ_OptAttr_Range : @YES,
493500
kVVOSCQ_OptAttr_Clipmode : @NO,
494-
kVVOSCQ_OptAttr_Unit : @YES,
495-
kVVOSCQ_OptAttr_Critical : @YES,
501+
kVVOSCQ_OptAttr_Unit : @NO,
502+
kVVOSCQ_OptAttr_Critical : @NO,
503+
kVVOSCQ_OptAttr_Overloads : @NO,
504+
kVVOSCQ_OptAttr_HTML : @YES,
505+
kVVOSCQ_WSAttr_Cmd_Listen : @NO,
506+
kVVOSCQ_WSAttr_Cmd_Ignore : @NO,
507+
kVVOSCQ_WSAttr_Cmd_PathChanged : @YES,
508+
kVVOSCQ_WSAttr_Cmd_PathRenamed : @NO,
509+
kVVOSCQ_WSAttr_Cmd_PathRemoved : @NO,
510+
kVVOSCQ_WSAttr_Cmd_PathAdded : @NO,
496511
};
497512
if ([hostInfo objectForKey:kVVOSCQ_ReqAttr_HostInfo_Exts] == nil)
498-
[hostInfo setObject:myExtDict forKey:kVVOSCQ_ReqAttr_HostInfo_Exts];
513+
[hostInfo setObject:extDict forKey:kVVOSCQ_ReqAttr_HostInfo_Exts];
499514

500515
// get the host info details from the osc manager
501516
NSDictionary *connectionHostInfo = [oscm oscQueryHostInfo];

MIDIOSCQueryHelper/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<key>CFBundlePackageType</key>
3535
<string>APPL</string>
3636
<key>CFBundleShortVersionString</key>
37-
<string>0.3</string>
37+
<string>0.3.0.3</string>
3838
<key>CFBundleVersion</key>
3939
<string>1</string>
4040
<key>LSMinimumSystemVersion</key>

MIDIOSCQueryHelper/MIDIOSCQueryHelperAppDelegate.m

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ @interface MIDIOSCQueryHelperAppDelegate () {
99
NSTimer *fileChangeCoalesceTimer; // this timer is used to coalesce rapid file change notifications into single notifications to prevent churn
1010
}
1111
@property (weak) IBOutlet NSWindow *window;
12+
@property (strong) id activity;
1213
- (void) _loadLastFile;
1314
- (void) _loadFile:(NSString *)fullPath;
1415
- (void) _loadJSONFile:(NSString *)fullPath;
@@ -42,6 +43,9 @@ + (void) initialize {
4243
- (id) init {
4344
self = [super init];
4445
if (self != nil) {
46+
// disable app nap
47+
self.activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated reason:@"MDI OSCQuery Helper"];
48+
4549
// register the OSC address space
4650
OSCAddressSpace *as = [OSCAddressSpace mainAddressSpace];
4751
// by default, the address space registers for app terminate notifications so it can tear itself down. we want to prevent this so we don't send "node deleted" messages to clients on app quit.
@@ -350,6 +354,7 @@ - (void) _loadJSONFile:(NSString *)fullPath {
350354
NSArray *objRange = [baseObj objectForKey:kVVOSCQ_OptAttr_Range]; // one for each type from the type tag string
351355
NSArray *objUnits = [baseObj objectForKey:kVVOSCQ_OptAttr_Unit]; // one for each type from the type tag string
352356
NSNumber *objCritical = [baseObj objectForKey:kVVOSCQ_OptAttr_Critical];
357+
NSArray *objOverloads = [baseObj objectForKey:kVVOSCQ_OptAttr_Overloads];
353358

354359
if (setUpAsMIDINode) {
355360
OSCNode *newNode = [[OSCAddressSpace mainAddressSpace] findNodeForAddress:baseObjPath createIfMissing:YES];
@@ -375,6 +380,8 @@ - (void) _loadJSONFile:(NSString *)fullPath {
375380
[newNode setUnits:objUnits];
376381
if (objCritical != nil && [objCritical isKindOfClass:[NSNumber class]])
377382
[newNode setCritical:[objCritical boolValue]];
383+
if (objOverloads != nil && [objOverloads isKindOfClass:[NSArray class]])
384+
[newNode setOverloads:objOverloads];
378385

379386
// make a delegate for the node, add it to the array
380387
QueryServerNodeDelegate *tmpDelegate = [[QueryServerNodeDelegate alloc] initWithMIDIManager:midim forAddress:[newNode fullName]];
@@ -507,18 +514,26 @@ - (VVOSCQueryReply *) hostInfoQueryFromServer:(VVOSCQueryServer *)s {
507514
if ([hostInfo objectForKey:kVVOSCQ_ReqAttr_HostInfo_OSCTransport] == nil)
508515
[hostInfo setObject:kVVOSCQueryOSCTransportUDP forKey:kVVOSCQ_ReqAttr_HostInfo_OSCTransport];
509516
// supply an extensions array if there isn't already one
510-
NSDictionary *myExtDict = @{
517+
NSDictionary *extDict = @{
511518
kVVOSCQ_OptAttr_Tags : @YES,
512519
//kVVOSCQ_ReqAttr_Type : @YES,
513520
kVVOSCQ_OptAttr_Access : @YES,
514521
kVVOSCQ_OptAttr_Value : @YES,
515522
kVVOSCQ_OptAttr_Range : @YES,
516523
kVVOSCQ_OptAttr_Clipmode : @NO,
517-
kVVOSCQ_OptAttr_Unit : @YES,
518-
kVVOSCQ_OptAttr_Critical : @YES,
524+
kVVOSCQ_OptAttr_Unit : @NO,
525+
kVVOSCQ_OptAttr_Critical : @NO,
526+
kVVOSCQ_OptAttr_Overloads : @NO,
527+
kVVOSCQ_OptAttr_HTML : @YES,
528+
kVVOSCQ_WSAttr_Cmd_Listen : @NO,
529+
kVVOSCQ_WSAttr_Cmd_Ignore : @NO,
530+
kVVOSCQ_WSAttr_Cmd_PathChanged : @YES,
531+
kVVOSCQ_WSAttr_Cmd_PathRenamed : @NO,
532+
kVVOSCQ_WSAttr_Cmd_PathRemoved : @NO,
533+
kVVOSCQ_WSAttr_Cmd_PathAdded : @NO,
519534
};
520535
if ([hostInfo objectForKey:kVVOSCQ_ReqAttr_HostInfo_Exts] == nil)
521-
[hostInfo setObject:myExtDict forKey:kVVOSCQ_ReqAttr_HostInfo_Exts];
536+
[hostInfo setObject:extDict forKey:kVVOSCQ_ReqAttr_HostInfo_Exts];
522537

523538
// get the host info details from the osc manager
524539
NSDictionary *connectionHostInfo = [oscm oscQueryHostInfo];

OSCQueryHelper/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<key>CFBundlePackageType</key>
3737
<string>APPL</string>
3838
<key>CFBundleShortVersionString</key>
39-
<string>0.3</string>
39+
<string>0.3.0.3</string>
4040
<key>CFBundleVersion</key>
4141
<string>1</string>
4242
<key>LSMinimumSystemVersion</key>

OSCQueryHelper/OSCQueryHelperAppDelegate.m

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ @interface OSCQueryHelperAppDelegate () {
99
NSTimer *fileChangeCoalesceTimer;
1010
}
1111
@property (weak) IBOutlet NSWindow *window;
12+
@property (strong) id activity;
1213
- (void) _loadLastFile;
1314
- (void) _loadFile:(NSString *)fullPath;
1415
- (void) _updateUIItems;
@@ -40,6 +41,9 @@ + (void) initialize {
4041
- (id) init {
4142
self = [super init];
4243
if (self != nil) {
44+
// disable app nap
45+
self.activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated reason:@"OSCQuery Helper"];
46+
4347
// register the OSC address space
4448
OSCAddressSpace *as = [OSCAddressSpace mainAddressSpace];
4549
// by default, the address space register for app terminate notifications so it can tear itself down. we want to prevent this so we don't send "node deleted" messages to clients on app quit.
@@ -57,6 +61,7 @@ - (id) init {
5761
[server setName:@"OSCQuery Helper"];
5862
[server setBonjourName:@"OSCQuery Helper"];
5963
[server setDelegate:self];
64+
[server setHTMLDirectory:[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent]];
6065

6166
// this notification is posted by our OSC manager subclass when the host info changes as a result of user interaction
6267
[[NSNotificationCenter defaultCenter]
@@ -330,6 +335,7 @@ - (void) _loadJSONFile:(NSString *)fullPath {
330335
NSArray *objRange = [baseObj objectForKey:kVVOSCQ_OptAttr_Range]; // one for each type from the type tag string
331336
NSArray *objUnits = [baseObj objectForKey:kVVOSCQ_OptAttr_Unit]; // one for each type from the type tag string
332337
NSNumber *objCritical = [baseObj objectForKey:kVVOSCQ_OptAttr_Critical];
338+
NSArray *objOverloads = [baseObj objectForKey:kVVOSCQ_OptAttr_Overloads];
333339

334340
OSCNode *newNode = [[OSCAddressSpace mainAddressSpace] findNodeForAddress:baseObjPath createIfMissing:YES];
335341
if (objTypeTagString != nil) {
@@ -354,6 +360,8 @@ - (void) _loadJSONFile:(NSString *)fullPath {
354360
[newNode setUnits:objUnits];
355361
if (objCritical != nil && [objCritical isKindOfClass:[NSNumber class]])
356362
[newNode setCritical:[objCritical boolValue]];
363+
if (objOverloads != nil && [objOverloads isKindOfClass:[NSArray class]])
364+
[newNode setOverloads:objOverloads];
357365

358366
// make a delegate for the node, add it to the array
359367
QueryServerNodeDelegate *tmpDelegate = [[QueryServerNodeDelegate alloc] initWithQueryServer:server forAddress:[newNode fullName]];
@@ -460,8 +468,8 @@ - (void) fileChangeCoalesceTimerCallback:(NSTimer *)t {
460468

461469
- (void) nodeRenamed:(OSCNode *)n from:(NSString *)oldName {
462470
NSLog(@"%s ... %@, %@",__func__,n,oldName);
463-
if (oldName != nil)
464-
[server sendPathRenamedToClients:oldName to:[n fullName]];
471+
//if (oldName != nil)
472+
// [server sendPathRenamedToClients:oldName to:[n fullName]];
465473
}
466474
/*
467475
- (void) receivedOSCMessage:(OSCMessage *)m {
@@ -484,18 +492,25 @@ - (VVOSCQueryReply *) hostInfoQueryFromServer:(VVOSCQueryServer *)s {
484492
if ([hostInfo objectForKey:kVVOSCQ_ReqAttr_HostInfo_OSCTransport] == nil)
485493
[hostInfo setObject:kVVOSCQueryOSCTransportUDP forKey:kVVOSCQ_ReqAttr_HostInfo_OSCTransport];
486494
// supply an extensions array if there isn't already one
487-
NSDictionary *myExtDict = @{
495+
NSDictionary *extDict = @{
488496
kVVOSCQ_OptAttr_Tags : @YES,
489-
//kVVOSCQ_ReqAttr_Type : @YES,
490497
kVVOSCQ_OptAttr_Access : @YES,
491498
kVVOSCQ_OptAttr_Value : @YES,
492499
kVVOSCQ_OptAttr_Range : @YES,
493-
kVVOSCQ_OptAttr_Clipmode : @NO,
494-
kVVOSCQ_OptAttr_Unit : @YES,
495-
kVVOSCQ_OptAttr_Critical : @YES,
500+
//kVVOSCQ_OptAttr_Clipmode : @NO,
501+
//kVVOSCQ_OptAttr_Unit : @NO,
502+
//kVVOSCQ_OptAttr_Critical : @NO,
503+
//kVVOSCQ_OptAttr_Overloads : @NO,
504+
kVVOSCQ_OptAttr_HTML : @YES,
505+
//kVVOSCQ_WSAttr_Cmd_Listen : @NO,
506+
//kVVOSCQ_WSAttr_Cmd_Ignore : @NO,
507+
kVVOSCQ_WSAttr_Cmd_PathChanged : @YES,
508+
//kVVOSCQ_WSAttr_Cmd_PathRenamed : @NO,
509+
//kVVOSCQ_WSAttr_Cmd_PathRemoved : @NO,
510+
//kVVOSCQ_WSAttr_Cmd_PathAdded : @NO,
496511
};
497512
if ([hostInfo objectForKey:kVVOSCQ_ReqAttr_HostInfo_Exts] == nil)
498-
[hostInfo setObject:myExtDict forKey:kVVOSCQ_ReqAttr_HostInfo_Exts];
513+
[hostInfo setObject:extDict forKey:kVVOSCQ_ReqAttr_HostInfo_Exts];
499514

500515
// get the host info details from the osc manager
501516
NSDictionary *connectionHostInfo = [oscm oscQueryHostInfo];

VVOSCQueryBrowser/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>0.3</string>
20+
<string>0.3.0.3</string>
2121
<key>CFBundleVersion</key>
2222
<string>1</string>
2323
<key>LSMinimumSystemVersion</key>

VVOSCQueryBrowser/RemoteNode.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,9 @@ - (id) initWithParent:(RemoteNode *)p dict:(NSDictionary *)d {
407407
[newRemoteNodeControl setMax:newOSCMax];
408408
if (newOSCVals != nil)
409409
[newRemoteNodeControl setVals:newOSCVals];
410-
if (controls == nil)
411-
controls = [[NSMutableArray alloc] init];
412-
[controls addObject:newRemoteNodeControl];
410+
if (self->controls == nil)
411+
self->controls = [[NSMutableArray alloc] init];
412+
[self->controls addObject:newRemoteNodeControl];
413413
}
414414

415415
// increment arrayIndex!
@@ -445,9 +445,9 @@ - (id) initWithParent:(RemoteNode *)p dict:(NSDictionary *)d {
445445
[contentsDict enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSDictionary *val, BOOL *stop) {
446446
if ([val isKindOfClass:[NSDictionary class]]) {
447447
RemoteNode *newNode = [[RemoteNode alloc] initWithParent:self dict:val];
448-
if (contents == nil)
449-
contents = [[NSMutableArray alloc] init];
450-
[contents addObject:newNode];
448+
if (self->contents == nil)
449+
self->contents = [[NSMutableArray alloc] init];
450+
[self->contents addObject:newNode];
451451
}
452452
}];
453453
[contents sortUsingComparator:(NSComparator)^(id obj1, id obj2) {

VVOSCQueryBrowser/VVOSCQueryBrowserAppDelegate.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#import "VVOSCQueryBrowserAppDelegate.h"
22

33
@interface VVOSCQueryBrowserAppDelegate ()
4-
4+
@property (strong) id activity;
55
@property (weak) IBOutlet NSWindow *window;
66
@end
77

@@ -10,7 +10,8 @@ @implementation VVOSCQueryBrowserAppDelegate
1010
- (id) init {
1111
self = [super init];
1212
if (self != nil) {
13-
13+
// disable app nap
14+
self.activity = [[NSProcessInfo processInfo] beginActivityWithOptions:NSActivityUserInitiated reason:@"OSCQuery Browser"];
1415
}
1516
return self;
1617
}

0 commit comments

Comments
 (0)