summaryrefslogtreecommitdiff
path: root/SmartDeviceLink
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-08-18 15:29:15 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-08-18 15:29:15 -0400
commitf026b1e68abd59b91126a8892ffd26fa4e895166 (patch)
tree4a597382943493cd97551e09f53fcea1742cc55a /SmartDeviceLink
parent054b4789a82a74a7d47c31ee60dee16e535354d9 (diff)
downloadsdl_ios-f026b1e68abd59b91126a8892ffd26fa4e895166.tar.gz
Update to v4.3.0-beta.24.3.0-beta.2
Diffstat (limited to 'SmartDeviceLink')
-rw-r--r--SmartDeviceLink/Info.plist2
-rw-r--r--SmartDeviceLink/SDLError.m8
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.h2
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m10
-rw-r--r--SmartDeviceLink/SDLManager.h2
-rw-r--r--SmartDeviceLink/SDLProxy.m4
-rw-r--r--SmartDeviceLink/SDLUploadFileOperation.m77
7 files changed, 53 insertions, 52 deletions
diff --git a/SmartDeviceLink/Info.plist b/SmartDeviceLink/Info.plist
index 00f317a30..33f70aa6c 100644
--- a/SmartDeviceLink/Info.plist
+++ b/SmartDeviceLink/Info.plist
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>4.3.0-beta.1</string>
+ <string>4.3.0-beta.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
diff --git a/SmartDeviceLink/SDLError.m b/SmartDeviceLink/SDLError.m
index 886aa27a1..9d4a43010 100644
--- a/SmartDeviceLink/SDLError.m
+++ b/SmartDeviceLink/SDLError.m
@@ -76,8 +76,8 @@ SDLErrorDomain *const SDLErrorDomainFileManager = @"com.sdl.filemanager.error";
+ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult *)result {
NSDictionary *userInfo = @{
- NSLocalizedDescriptionKey : NSLocalizedString(result.value, nil)
- };
+ NSLocalizedDescriptionKey : NSLocalizedString(result.value, nil)
+ };
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
code:SDLManagerErrorRegistrationFailed
userInfo:userInfo];
@@ -85,8 +85,8 @@ SDLErrorDomain *const SDLErrorDomainFileManager = @"com.sdl.filemanager.error";
+ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult *)result {
NSDictionary *userInfo = @{
- NSLocalizedDescriptionKey : NSLocalizedString(result.value, nil)
- };
+ NSLocalizedDescriptionKey : NSLocalizedString(result.value, nil)
+ };
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
code:SDLManagerErrorRegistrationFailed
userInfo:userInfo];
diff --git a/SmartDeviceLink/SDLLifecycleManager.h b/SmartDeviceLink/SDLLifecycleManager.h
index 4945f4dcf..f3ae4a44e 100644
--- a/SmartDeviceLink/SDLLifecycleManager.h
+++ b/SmartDeviceLink/SDLLifecycleManager.h
@@ -34,7 +34,7 @@
NS_ASSUME_NONNULL_BEGIN
-typedef void(^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
+typedef void (^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
@interface SDLLifecycleManager : NSObject
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 328c15b80..279b195ff 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -118,7 +118,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
- (void)startWithHandler:(SDLManagerReadyBlock)readyBlock {
self.readyBlock = [readyBlock copy];
-
+
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[SDLProxy enableSiphonDebug];
@@ -270,12 +270,12 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
- (void)didEnterStateReady {
[self.notificationDispatcher postNotificationName:SDLDidBecomeReady infoObject:nil];
-
+
SDLResult *registerResult = self.registerAppInterfaceResponse.resultCode;
-
+
BOOL success = NO;
NSError *startError = nil;
-
+
if (![registerResult isEqualToEnum:[SDLResult SUCCESS]]) {
// We did not succeed in registering
startError = [NSError sdl_lifecycle_failedWithBadResult:registerResult];
@@ -283,7 +283,7 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
// We succeeded in registering
success = YES;
}
-
+
// Notify the block and delegate if it exists
self.readyBlock(success, startError);
if (self.delegate != nil && [self.delegate respondsToSelector:@selector(managerDidBecomeReady)]) {
diff --git a/SmartDeviceLink/SDLManager.h b/SmartDeviceLink/SDLManager.h
index 9009fed13..0adbdb2a1 100644
--- a/SmartDeviceLink/SDLManager.h
+++ b/SmartDeviceLink/SDLManager.h
@@ -21,7 +21,7 @@
NS_ASSUME_NONNULL_BEGIN
-typedef void(^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
+typedef void (^SDLManagerReadyBlock)(BOOL success, NSError *_Nullable error);
@interface SDLManager : NSObject
diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m
index d6f7af003..3ab6b090d 100644
--- a/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink/SDLProxy.m
@@ -50,7 +50,7 @@ typedef NSString SDLVehicleMake;
typedef void (^URLSessionTaskCompletionHandler)(NSData *data, NSURLResponse *response, NSError *error);
typedef void (^URLSessionDownloadTaskCompletionHandler)(NSURL *location, NSURLResponse *response, NSError *error);
-NSString *const SDLProxyVersion = @"4.3.0-beta.1";
+NSString *const SDLProxyVersion = @"4.3.0-beta.2";
const float startSessionTime = 10.0;
const float notifyProxyClosedDelay = 0.1;
const int POLICIES_CORRELATION_ID = 65535;
@@ -189,7 +189,7 @@ const int POLICIES_CORRELATION_ID = 65535;
[self.protocol.protocolDelegateTable addObject:_streamingMediaManager];
[self.mutableProxyListeners addObject:_streamingMediaManager.touchManager];
}
-
+
return _streamingMediaManager;
}
diff --git a/SmartDeviceLink/SDLUploadFileOperation.m b/SmartDeviceLink/SDLUploadFileOperation.m
index f20616903..ec25ae877 100644
--- a/SmartDeviceLink/SDLUploadFileOperation.m
+++ b/SmartDeviceLink/SDLUploadFileOperation.m
@@ -89,45 +89,46 @@ NS_ASSUME_NONNULL_BEGIN
for (SDLPutFile *putFile in putFiles) {
dispatch_group_enter(putFileGroup);
__weak typeof(self) weakself = self;
- [self.connectionManager sendManagerRequest:putFile withCompletionHandler:^(__kindof SDLRPCRequest *_Nullable request, __kindof SDLRPCResponse *_Nullable response, NSError *_Nullable error) {
- typeof(weakself) strongself = weakself;
- // If we've already encountered an error, then just abort
- // TODO: Is this the right way to handle this case? Should we just abort everything in the future? Should we be deleting what we sent? Should we have an automatic retry strategy based on what the error was?
- if (strongself.isCancelled) {
- stop = YES;
- }
-
- if (stop) {
- dispatch_group_leave(putFileGroup);
- BLOCK_RETURN;
- }
-
- // If we encounted an error, abort in the future and call the completion handler
- if (error != nil || response == nil || ![response.success boolValue]) {
- stop = YES;
- streamError = error;
-
- if (completion != nil) {
- completion(NO, 0, error);
- }
-
- dispatch_group_leave(putFileGroup);
- BLOCK_RETURN;
- }
-
- // If we haven't encounted an error
- SDLPutFileResponse *putFileResponse = (SDLPutFileResponse *)response;
-
- // We need to do this to make sure our bytesAvailable is accurate
- if ([request.correlationID integerValue] > highestCorrelationIDReceived) {
- highestCorrelationIDReceived = [request.correlationID integerValue];
- bytesAvailable = [putFileResponse.spaceAvailable unsignedIntegerValue];
- }
-
- dispatch_group_leave(putFileGroup);
- }];
+ [self.connectionManager sendManagerRequest:putFile
+ withCompletionHandler:^(__kindof SDLRPCRequest *_Nullable request, __kindof SDLRPCResponse *_Nullable response, NSError *_Nullable error) {
+ typeof(weakself) strongself = weakself;
+ // If we've already encountered an error, then just abort
+ // TODO: Is this the right way to handle this case? Should we just abort everything in the future? Should we be deleting what we sent? Should we have an automatic retry strategy based on what the error was?
+ if (strongself.isCancelled) {
+ stop = YES;
+ }
+
+ if (stop) {
+ dispatch_group_leave(putFileGroup);
+ BLOCK_RETURN;
+ }
+
+ // If we encounted an error, abort in the future and call the completion handler
+ if (error != nil || response == nil || ![response.success boolValue]) {
+ stop = YES;
+ streamError = error;
+
+ if (completion != nil) {
+ completion(NO, 0, error);
+ }
+
+ dispatch_group_leave(putFileGroup);
+ BLOCK_RETURN;
+ }
+
+ // If we haven't encounted an error
+ SDLPutFileResponse *putFileResponse = (SDLPutFileResponse *)response;
+
+ // We need to do this to make sure our bytesAvailable is accurate
+ if ([request.correlationID integerValue] > highestCorrelationIDReceived) {
+ highestCorrelationIDReceived = [request.correlationID integerValue];
+ bytesAvailable = [putFileResponse.spaceAvailable unsignedIntegerValue];
+ }
+
+ dispatch_group_leave(putFileGroup);
+ }];
}
-
+
dispatch_group_leave(putFileGroup);
}