Skip to content

Commit

Permalink
Renamed ServiceController ⇢ BonjourController
Browse files Browse the repository at this point in the history
  • Loading branch information
radiantcapsule committed Nov 3, 2011
1 parent ce4f9f9 commit 0852e10
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 20 deletions.
4 changes: 2 additions & 2 deletions ServiceController.h → BonjourController.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// ServiceController.h
// BonjourController.h
// DNSReg
//
// Created by Alex Vollmer on 11/3/11.
Expand All @@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import <dns_sd.h>

@interface ServiceController : NSObject
@interface BonjourController : NSObject
{
DNSServiceRef fServiceRef;
CFSocketRef fSocketRef;
Expand Down
8 changes: 4 additions & 4 deletions ServiceController.m → BonjourController.m
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//
// ServiceController.m
// BonjourController.m
// DNSReg
//
// Created by Alex Vollmer on 11/3/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import "ServiceController.h"
#import "BonjourController.h"

static void ProcessSocketResult(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info)
{
Expand All @@ -19,7 +19,7 @@ static void ProcessSocketResult(CFSocketRef s, CFSocketCallBackType type, CFData
}
}

@implementation ServiceController
@implementation BonjourController

- (id)initWithServiceRef:(DNSServiceRef)ref
{
Expand Down Expand Up @@ -80,4 +80,4 @@ - (void)dealloc
}


@end // implementation ServiceController
@end // implementation BonjourController
6 changes: 3 additions & 3 deletions DNRResolveViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#import "DNRResolveViewController.h"
#import "DNSRecord.h"
#import "ServiceController.h"
#import "BonjourController.h"

static void ResolveCallback(
DNSServiceRef sdRef,
Expand All @@ -27,7 +27,7 @@ static void ResolveCallback(

@interface DNRResolveViewController ()

@property (nonatomic, retain) ServiceController *resolveController;
@property (nonatomic, retain) BonjourController *resolveController;

- (void)updatePeerWithHost:(NSString *)host port:(uint16_t)port;
- (void)updateErrorMessage:(NSString *)message;
Expand Down Expand Up @@ -133,7 +133,7 @@ - (void)viewDidAppear:(BOOL)animated
self);

if (kDNSServiceErr_NoError == error) {
self.resolveController = [[[ServiceController alloc] initWithServiceRef:serviceRef] autorelease];
self.resolveController = [[[BonjourController alloc] initWithServiceRef:serviceRef] autorelease];
[self.resolveController addToCurrentRunLoop];
}
else {
Expand Down
12 changes: 6 additions & 6 deletions DNSReg.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
FA8D61061461BE25005A9D01 /* DNRViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA8D61041461BE25005A9D01 /* DNRViewController.xib */; };
FA8D61141461F55B005A9D01 /* DNRResolveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8D61121461F55B005A9D01 /* DNRResolveViewController.m */; };
FA8D61151461F55B005A9D01 /* DNRResolveViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FA8D61131461F55B005A9D01 /* DNRResolveViewController.xib */; };
FA8D612414630290005A9D01 /* ServiceController.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8D612314630290005A9D01 /* ServiceController.m */; };
FA8D612414630290005A9D01 /* BonjourController.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8D612314630290005A9D01 /* BonjourController.m */; };
FA8D612714630310005A9D01 /* DNSRecord.m in Sources */ = {isa = PBXBuildFile; fileRef = FA8D612614630310005A9D01 /* DNSRecord.m */; };
/* End PBXBuildFile section */

Expand All @@ -38,8 +38,8 @@
FA8D61111461F55B005A9D01 /* DNRResolveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNRResolveViewController.h; sourceTree = "<group>"; };
FA8D61121461F55B005A9D01 /* DNRResolveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DNRResolveViewController.m; sourceTree = "<group>"; };
FA8D61131461F55B005A9D01 /* DNRResolveViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DNRResolveViewController.xib; sourceTree = "<group>"; };
FA8D612214630290005A9D01 /* ServiceController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceController.h; sourceTree = "<group>"; };
FA8D612314630290005A9D01 /* ServiceController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ServiceController.m; sourceTree = "<group>"; };
FA8D612214630290005A9D01 /* BonjourController.h */ = {isa = PBXFileReference; fileEncoding = 4; path = BonjourController.h; sourceTree = "<group>"; };
FA8D612314630290005A9D01 /* BonjourController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BonjourController.m; sourceTree = "<group>"; };
FA8D612514630310005A9D01 /* DNSRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNSRecord.h; sourceTree = "<group>"; };
FA8D612614630310005A9D01 /* DNSRecord.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DNSRecord.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -61,10 +61,10 @@
FA8D60E01461BE25005A9D01 = {
isa = PBXGroup;
children = (
FA8D612214630290005A9D01 /* ServiceController.h */,
FA8D612214630290005A9D01 /* BonjourController.h */,
FA8D612514630310005A9D01 /* DNSRecord.h */,
FA8D612614630310005A9D01 /* DNSRecord.m */,
FA8D612314630290005A9D01 /* ServiceController.m */,
FA8D612314630290005A9D01 /* BonjourController.m */,
FA8D61111461F55B005A9D01 /* DNRResolveViewController.h */,
FA8D61121461F55B005A9D01 /* DNRResolveViewController.m */,
FA8D61131461F55B005A9D01 /* DNRResolveViewController.xib */,
Expand Down Expand Up @@ -183,7 +183,7 @@
FA8D61001461BE25005A9D01 /* DNRAppDelegate.m in Sources */,
FA8D61031461BE25005A9D01 /* DNRViewController.m in Sources */,
FA8D61141461F55B005A9D01 /* DNRResolveViewController.m in Sources */,
FA8D612414630290005A9D01 /* ServiceController.m in Sources */,
FA8D612414630290005A9D01 /* BonjourController.m in Sources */,
FA8D612714630310005A9D01 /* DNSRecord.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEWorkspaceUserSettings_HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
<true/>
<key>IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges</key>
<false/>
</dict>
</plist>
10 changes: 5 additions & 5 deletions DNSReg/DNRViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "DNRViewController.h"
#import "DNRResolveViewController.h"
#import "DNSRecord.h"
#import "ServiceController.h"
#import "BonjourController.h"

#pragma mark - Function prototypes

Expand Down Expand Up @@ -42,8 +42,8 @@ @interface DNRViewController ()

@property (nonatomic, retain) NSMutableArray *peerServices;
@property (nonatomic, retain) NSString *peerID;
@property (nonatomic, retain) ServiceController *registrationController;
@property (nonatomic, retain) ServiceController *browseController;
@property (nonatomic, retain) BonjourController *registrationController;
@property (nonatomic, retain) BonjourController *browseController;

- (void)start;
- (void)stop;
Expand Down Expand Up @@ -252,7 +252,7 @@ - (void)start
return;
}

self.registrationController = [[[ServiceController alloc] initWithServiceRef:serviceRef] autorelease];
self.registrationController = [[[BonjourController alloc] initWithServiceRef:serviceRef] autorelease];
[self.registrationController addToCurrentRunLoop];

// 2. Now start browsing
Expand All @@ -272,7 +272,7 @@ - (void)start
return;
}

self.browseController = [[[ServiceController alloc] initWithServiceRef:serviceRef] autorelease];
self.browseController = [[[BonjourController alloc] initWithServiceRef:serviceRef] autorelease];
[self.browseController addToCurrentRunLoop];
}

Expand Down

0 comments on commit 0852e10

Please sign in to comment.