From d1e62483e4fb11109b2465c5411d48211e3fb18b Mon Sep 17 00:00:00 2001 From: siqi Date: Tue, 4 Jun 2013 14:15:05 +0200 Subject: minor fix for strong/weak --- ios/iosremote/iosremote.xcodeproj/project.pbxproj | 20 +++++++++++--------- ios/iosremote/iosremote/Communication/Client.m | 6 ++++-- ios/iosremote/iosremote/Communication/Server.m | 3 +++ .../en.lproj/MainStoryboard_iPad.storyboard | 2 +- 4 files changed, 19 insertions(+), 12 deletions(-) (limited to 'ios') diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj b/ios/iosremote/iosremote.xcodeproj/project.pbxproj index bcb64f49d677..9e02f0fcc305 100644 --- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj +++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj @@ -43,14 +43,14 @@ 57C6E40E175E06E800E8BC5F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = ""; }; 57C6E410175E06E800E8BC5F /* libreoffice_sdremoteViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = libreoffice_sdremoteViewController.h; sourceTree = ""; }; 57C6E411175E06E800E8BC5F /* libreoffice_sdremoteViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = libreoffice_sdremoteViewController.m; sourceTree = ""; }; - 57C6E426175E076900E8BC5F /* Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Client.h; path = ../iosremote/Communication/Client.h; sourceTree = ""; }; - 57C6E427175E076900E8BC5F /* Client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Client.m; path = ../iosremote/Communication/Client.m; sourceTree = ""; }; - 57C6E428175E076900E8BC5F /* CommunicationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommunicationManager.h; path = ../iosremote/Communication/CommunicationManager.h; sourceTree = ""; }; - 57C6E429175E076900E8BC5F /* CommunicationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommunicationManager.m; path = ../iosremote/Communication/CommunicationManager.m; sourceTree = ""; }; - 57C6E42A175E076900E8BC5F /* Receiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Receiver.h; path = ../iosremote/Communication/Receiver.h; sourceTree = ""; }; - 57C6E42B175E076900E8BC5F /* Receiver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Receiver.m; path = ../iosremote/Communication/Receiver.m; sourceTree = ""; }; - 57C6E42C175E076900E8BC5F /* Server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Server.h; path = ../iosremote/Communication/Server.h; sourceTree = ""; }; - 57C6E42D175E076900E8BC5F /* Server.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Server.m; path = ../iosremote/Communication/Server.m; sourceTree = ""; }; + 57C6E426175E076900E8BC5F /* Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Client.h; sourceTree = ""; }; + 57C6E427175E076900E8BC5F /* Client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Client.m; sourceTree = ""; }; + 57C6E428175E076900E8BC5F /* CommunicationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommunicationManager.h; sourceTree = ""; }; + 57C6E429175E076900E8BC5F /* CommunicationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommunicationManager.m; sourceTree = ""; }; + 57C6E42A175E076900E8BC5F /* Receiver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Receiver.h; sourceTree = ""; }; + 57C6E42B175E076900E8BC5F /* Receiver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Receiver.m; sourceTree = ""; }; + 57C6E42C175E076900E8BC5F /* Server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Server.h; sourceTree = ""; }; + 57C6E42D175E076900E8BC5F /* Server.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Server.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -135,7 +135,8 @@ 57C6E42C175E076900E8BC5F /* Server.h */, 57C6E42D175E076900E8BC5F /* Server.m */, ); - path = Communication; + name = Communication; + path = iosremote/Communication; sourceTree = ""; }; /* End PBXGroup section */ @@ -347,6 +348,7 @@ 57C6E417175E06E800E8BC5F /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m index b90c9d983a47..5e18e6c52aaf 100644 --- a/ios/iosremote/iosremote/Communication/Client.m +++ b/ios/iosremote/iosremote/Communication/Client.m @@ -20,7 +20,7 @@ @property (nonatomic, strong) NSString* mName; @property uint mPort; -@property (nonatomic, weak) Server* mServer; +@property (nonatomic, strong) Server* mServer; @property (nonatomic, weak) Receiver* mReceiver; @property (nonatomic, weak) CommunicationManager* mComManager; @@ -51,6 +51,7 @@ NSString * const CHARSET = @"UTF-8"; { self.mPin = @""; self.mName = server.serverName; + self.mServer = server; self.mComManager = manager; self.mReceiver = receiver; // hardcoded here to test the communication TODO @@ -82,8 +83,8 @@ NSString * const CHARSET = @"UTF-8"; [self.mOutputStream setDelegate:self]; [self.mOutputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; [self.mOutputStream open]; + NSLog(@"Connected"); } - NSLog(@"Connected"); } - (void) sendCommand:(NSString *)aCommand @@ -99,6 +100,7 @@ NSString * const CHARSET = @"UTF-8"; switch(eventCode) { case NSStreamEventHasBytesAvailable: { + NSLog(@"NSStreamEventHasBytesAvailable"); if(!self.mData) { self.mData = [NSMutableData data]; } diff --git a/ios/iosremote/iosremote/Communication/Server.m b/ios/iosremote/iosremote/Communication/Server.m index d7bf1adcf00c..8cc722215664 100644 --- a/ios/iosremote/iosremote/Communication/Server.m +++ b/ios/iosremote/iosremote/Communication/Server.m @@ -12,12 +12,15 @@ @end + + @implementation Server @synthesize protocol = _protocol; @synthesize serverName = _serverName; @synthesize serverAddress = _serverAddress; + - (id)initWithProtocol:(Protocol_t)protocal atAddress:(NSString*) address ofName:(NSString*) name diff --git a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPad.storyboard b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPad.storyboard index 7796088d1d4e..6206f1655c78 100644 --- a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPad.storyboard +++ b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPad.storyboard @@ -12,7 +12,7 @@ - + -- cgit