Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions XBMC Remote/ConvenienceMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
/*
* Service constants
*/
#define serviceTypeHTTP @"_xbmc-jsonrpc-h._tcp"
#define serviceTypeTCP @"_xbmc-jsonrpc._tcp"
#define domainName @"local"
#define SERVICE_TYPE_HTTP @"_xbmc-jsonrpc-h._tcp"
#define SERVICE_TYPE_TCP @"_xbmc-jsonrpc._tcp"
#define DOMAIN_NAME @"local"

#endif /* ConvenienceMacros_h */
10 changes: 5 additions & 5 deletions XBMC Remote/HostViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ - (void)netServiceBrowser:(NSNetServiceBrowser*)browser
NSString *type = aNetService.type;
NSString *name = aNetService.name;
NSLog(@"Found '%@', '%@'", name, type);
if ([type containsString:serviceTypeHTTP]) {
if ([type containsString:SERVICE_TYPE_HTTP]) {
[services addObject:aNetService];
if (!moreComing) {
[self stopDiscovery];
Expand All @@ -235,7 +235,7 @@ - (void)netServiceBrowser:(NSNetServiceBrowser*)browser
didRemoveService:(NSNetService*)aNetService
moreComing:(BOOL)moreComing {
NSString *type = aNetService.type;
if ([type containsString:serviceTypeHTTP]) {
if ([type containsString:SERVICE_TYPE_HTTP]) {
[services removeObject:aNetService];
}
if (!moreComing) {
Expand Down Expand Up @@ -370,7 +370,7 @@ - (void)resolveIPAddress:(NSNetService*)service {

- (void)netServiceDidResolveAddress:(NSNetService*)service {
NSString *type = service.type;
if ([type containsString:serviceTypeHTTP]) {
if ([type containsString:SERVICE_TYPE_HTTP]) {
serverAddresses = [NSMutableDictionary new];
serverAddresses[@"serverName"] = service.name;
for (NSData *data in [service addresses]) {
Expand Down Expand Up @@ -418,7 +418,7 @@ - (void)netServiceDidResolveAddress:(NSNetService*)service {
[Utilities AnimView:discoveredInstancesView AnimDuration:0.3 Alpha:1.0 XPos:self.view.frame.size.width];

// Trigger search for TCP service
[netServiceBrowser searchForServicesOfType:serviceTypeTCP inDomain:domainName];
[netServiceBrowser searchForServicesOfType:SERVICE_TYPE_TCP inDomain:DOMAIN_NAME];
timer = [NSTimer scheduledTimerWithTimeInterval:DISCOVER_TIMEOUT target:self selector:@selector(stopDiscovery) userInfo:nil repeats:NO];
}
}
Expand Down Expand Up @@ -460,7 +460,7 @@ - (IBAction)startDiscover:(id)sender {

searching = NO;
netServiceBrowser.delegate = self;
[netServiceBrowser searchForServicesOfType:serviceTypeHTTP inDomain:domainName];
[netServiceBrowser searchForServicesOfType:SERVICE_TYPE_HTTP inDomain:DOMAIN_NAME];
timer = [NSTimer scheduledTimerWithTimeInterval:DISCOVER_TIMEOUT target:self selector:@selector(stopDiscovery) userInfo:nil repeats:NO];
}

Expand Down
17 changes: 2 additions & 15 deletions XBMC Remote/Kodi Remote-Prefix.pch
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
//
// Prefix header for all source files of the 'XBMC Remote' target in the 'XBMC Remote' project
//

#import <Availability.h>

#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "ConvenienceMacros.h"

#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
2 changes: 1 addition & 1 deletion XBMC Remote/LocalNetwork/LocalNetworkAccess.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ @implementation LocalNetworkAccess

- (instancetype)init {
if (self = [super init]) {
self.service = [[NSNetService alloc] initWithDomain:@"local." type:serviceTypeTCP name:@"LocalNetworkPrivacy" port:1100];
self.service = [[NSNetService alloc] initWithDomain:@"local." type:SERVICE_TYPE_TCP name:@"LocalNetworkPrivacy" port:1100];
}
return self;
}
Expand Down