diff options
author | Siqi LIU <me@siqi.fr> | 2014-01-04 00:41:42 +0100 |
---|---|---|
committer | Siqi LIU <me@siqi.fr> | 2014-01-04 00:41:42 +0100 |
commit | 28aaa622c72bbb4897c9d886aa98707229d510ff (patch) | |
tree | 55bbfc869e34894858ed118a2025512f29904477 /ios | |
parent | d6fdb0b4666fa92c937593a704ef40348803ff62 (diff) |
make marker default to 1 to avoid dead loop
Change-Id: I3a6d3ae1797e76b8aed14ca46d35c2ea7bd99960
Diffstat (limited to 'ios')
12 files changed, 21 insertions, 25 deletions
diff --git a/ios/iosremote/en.lproj/iPad_autosize.storyboard b/ios/iosremote/en.lproj/iPad_autosize.storyboard index 0c9ad1bc675d..56124271b606 100644 --- a/ios/iosremote/en.lproj/iPad_autosize.storyboard +++ b/ios/iosremote/en.lproj/iPad_autosize.storyboard @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> <dependencies> <deployment defaultVersion="1280" identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> </dependencies> <scenes> <!--About View Controller--> @@ -341,7 +341,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> <subviews> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" directionalLockEnabled="YES" bounces="NO" alwaysBounceHorizontal="YES" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" id="DUv-gH-oAo"> - <rect key="frame" x="0.0" y="-1.0000000000000062" width="698" height="102"/> + <rect key="frame" x="0.0" y="-1" width="698" height="102"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" id="JaD-yW-hWg" userLabel="View - StopWatch"> diff --git a/ios/iosremote/en.lproj/iPad_autosize_old.storyboard b/ios/iosremote/en.lproj/iPad_autosize_old.storyboard index 0c9ad1bc675d..56124271b606 100644 --- a/ios/iosremote/en.lproj/iPad_autosize_old.storyboard +++ b/ios/iosremote/en.lproj/iPad_autosize_old.storyboard @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> <dependencies> <deployment defaultVersion="1280" identifier="iOS"/> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> </dependencies> <scenes> <!--About View Controller--> @@ -341,7 +341,7 @@ <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/> <subviews> <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" directionalLockEnabled="YES" bounces="NO" alwaysBounceHorizontal="YES" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" id="DUv-gH-oAo"> - <rect key="frame" x="0.0" y="-1.0000000000000062" width="698" height="102"/> + <rect key="frame" x="0.0" y="-1" width="698" height="102"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/> <subviews> <view contentMode="scaleToFill" id="JaD-yW-hWg" userLabel="View - StopWatch"> diff --git a/ios/iosremote/fr.lproj/iPad_autosize.storyboard b/ios/iosremote/fr.lproj/iPad_autosize.storyboard index 4f4a57e55859..7c540a02595f 100644 --- a/ios/iosremote/fr.lproj/iPad_autosize.storyboard +++ b/ios/iosremote/fr.lproj/iPad_autosize.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> <dependencies> <deployment defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> diff --git a/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard b/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard index 4f4a57e55859..7c540a02595f 100644 --- a/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard +++ b/ios/iosremote/fr.lproj/iPad_autosize_old.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> <dependencies> <deployment defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m index d85cf5764a15..f675349d1668 100644 --- a/ios/iosremote/iosremote/Communication/Client.m +++ b/ios/iosremote/iosremote/Communication/Client.m @@ -207,7 +207,7 @@ int count = 0; backgroundQueue = dispatch_queue_create("com.libreoffice.iosremote", DISPATCH_QUEUE_CONCURRENT); dispatch_async(backgroundQueue, ^(void) { NSArray *commands = [str componentsSeparatedByString:@"\n"]; -// NSLog(@"Commands: %@", commands); + NSLog(@"Commands: %@", commands); [self.receiver parse:commands]; }); data = nil; diff --git a/ios/iosremote/iosremote/Communication/CommandInterpreter.m b/ios/iosremote/iosremote/Communication/CommandInterpreter.m index af9902fd6494..a272e1b83450 100644 --- a/ios/iosremote/iosremote/Communication/CommandInterpreter.m +++ b/ios/iosremote/iosremote/Communication/CommandInterpreter.m @@ -38,7 +38,7 @@ dispatch_queue_t backgroundQueue; // Received a set of instructions from server. // Marker equals to the end of the one command - (void) parse:(NSArray*)command{ - uint marker = 0; + uint marker = 1; if ([command count] == 0) { return; } @@ -49,18 +49,13 @@ dispatch_queue_t backgroundQueue; object:nil]; marker = 2; } + else if ([instruction isEqualToString:STATUS_SERVER_VERSION]){ + [[[[CommunicationManager sharedComManager] client] server] setServerVersion:[command objectAtIndex:1]]; + marker = 3; + } else if ([instruction isEqualToString:STATUS_PAIRING_PAIRED]){ [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PAIRED object:nil]; - // if LibO sends its remote server version, than this command should contain more than 3 items, we retrieve the version code and save it as a property of the server - if ([command count] > 3 && ![[command objectAtIndex:3] isEqualToString:@""]){ - [[[[CommunicationManager sharedComManager] client] server] setServerVersion:[command objectAtIndex:3]]; - marker = 4; - } else { - // Otherwise, we mark 3 as the end of this command (i.e. there is no version code sent to the client. - [[[[CommunicationManager sharedComManager] client] server] setServerVersion:@"Unspecified"]; - marker = 3; - } // print out server info with server version / or unspecified if didn't receive it from the server NSLog(@"Connected to %@", [[[CommunicationManager sharedComManager] client] server].description); } @@ -128,6 +123,7 @@ dispatch_queue_t backgroundQueue; NSRange range; range.location = marker; range.length = [command count] - marker; +// NSLog([command subarrayWithRange:range]); [self parse:[command subarrayWithRange:range]]; } } diff --git a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard index c5a1d4efbde5..8e3e3e1a5263 100644 --- a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> <dependencies> <deployment version="1552" defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> diff --git a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard index c5a1d4efbde5..8e3e3e1a5263 100644 --- a/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/fr.lproj/iPhone_autoSize_old.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> <dependencies> <deployment version="1552" defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> diff --git a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard index f64b637fde06..1b9cad5507b7 100644 --- a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> <dependencies> <deployment version="1552" defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> diff --git a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard index f64b637fde06..1b9cad5507b7 100644 --- a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard +++ b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize_old.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> <dependencies> <deployment version="1552" defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> diff --git a/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard b/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard index de38b0d32ef5..40e7b988def4 100644 --- a/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard +++ b/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> <dependencies> <deployment defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> diff --git a/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard b/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard index de38b0d32ef5..40e7b988def4 100644 --- a/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard +++ b/ios/iosremote/zh-Hans.lproj/iPad_autosize_old.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" initialViewController="XiK-Ye-iB8"> <dependencies> <deployment defaultVersion="1280" identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/> |