diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2018-04-26 15:03:18 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2018-04-26 15:03:18 -0400 |
commit | 349615724e6c0313426b715c04f88d3aebc29b2b (patch) | |
tree | 22954fec5b908747a30aa3507f983d692f7fd943 | |
parent | 06129fdadae3397c436ba940cab21c3091670664 (diff) | |
download | sdl_ios-349615724e6c0313426b715c04f88d3aebc29b2b.tar.gz |
Remove old command code
-rw-r--r-- | SmartDeviceLink_Example/Classes/ProxyManager.m | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m index 08542ba60..08714ecac 100644 --- a/SmartDeviceLink_Example/Classes/ProxyManager.m +++ b/SmartDeviceLink_Example/Classes/ProxyManager.m @@ -221,94 +221,6 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - RPC builders -+ (SDLAddCommand *)sdlex_speakNameCommandWithManager:(SDLManager *)manager { - NSString *commandName = @"Speak App Name"; - - SDLMenuParams *commandMenuParams = [[SDLMenuParams alloc] init]; - commandMenuParams.menuName = commandName; - - SDLAddCommand *speakNameCommand = [[SDLAddCommand alloc] init]; - speakNameCommand.vrCommands = @[commandName]; - speakNameCommand.menuParams = commandMenuParams; - speakNameCommand.cmdID = @0; - - speakNameCommand.handler = ^void(SDLOnCommand *notification) { - [manager sendRequest:[self.class sdlex_appNameSpeak]]; - }; - - return speakNameCommand; -} - -+ (SDLAddCommand *)sdlex_interactionSetCommandWithManager:(SDLManager *)manager { - NSString *commandName = @"Perform Interaction"; - - SDLMenuParams *commandMenuParams = [[SDLMenuParams alloc] init]; - commandMenuParams.menuName = commandName; - - SDLAddCommand *performInteractionCommand = [[SDLAddCommand alloc] init]; - performInteractionCommand.vrCommands = @[commandName]; - performInteractionCommand.menuParams = commandMenuParams; - performInteractionCommand.cmdID = @1; - - // NOTE: You may want to preload your interaction sets, because they can take a while for the remote system to process. We're going to ignore our own advice here. - __weak typeof(self) weakSelf = self; - performInteractionCommand.handler = ^void(SDLOnCommand *notification) { - [weakSelf sdlex_sendPerformOnlyChoiceInteractionWithManager:manager]; - }; - - return performInteractionCommand; -} - -+ (SDLAddCommand *)sdlex_vehicleDataCommandWithManager:(SDLManager *)manager { - SDLMenuParams *commandMenuParams = [[SDLMenuParams alloc] init]; - commandMenuParams.menuName = @"Get Vehicle Data"; - - SDLAddCommand *getVehicleDataCommand = [[SDLAddCommand alloc] init]; - getVehicleDataCommand.vrCommands = [NSMutableArray arrayWithObject:@"Get Vehicle Data"]; - getVehicleDataCommand.menuParams = commandMenuParams; - getVehicleDataCommand.cmdID = @2; - - getVehicleDataCommand.handler = ^void(SDLOnCommand *notification) { - [ProxyManager sdlex_sendGetVehicleDataWithManager:manager]; - }; - - return getVehicleDataCommand; -} - -+ (SDLAddCommand *)sdlex_dialNumberCommandWithManager:(SDLManager *)manager { - NSString *menuName = @"Dial Number"; - SDLMenuParams *commandMenuParams = [[SDLMenuParams alloc] initWithMenuName:menuName]; - - SDLAddCommand *dialNumberCommand = [[SDLAddCommand alloc] init]; - dialNumberCommand.vrCommands = [NSMutableArray arrayWithObject:menuName]; - dialNumberCommand.menuParams = commandMenuParams; - dialNumberCommand.cmdID = @3; - dialNumberCommand.handler = ^(SDLOnCommand * _Nonnull command) { - SDLLogD(@"Checking if app has permission to dial a number"); - if (![manager.permissionManager isRPCAllowed:@"DialNumber"]) { - SDLAlert* alert = [[SDLAlert alloc] init]; - alert.alertText1 = @"This app does not have the required permissions to dial a number"; - [manager sendRequest:alert]; - return; - } - - SDLLogD(@"Checking phone call capability"); - [manager.systemCapabilityManager updateCapabilityType:SDLSystemCapabilityTypePhoneCall completionHandler:^(NSError * _Nullable error, SDLSystemCapabilityManager *systemCapabilityManager) { - SDLPhoneCapability *phoneCapability = systemCapabilityManager.phoneCapability; - if (phoneCapability.dialNumberEnabled) { - SDLLogD(@"Dialing number"); - [self.class sdlex_sendDialNumberWithManager:manager]; - } else { - SDLAlert* alert = [[SDLAlert alloc] init]; - alert.alertText1 = @"The dial number feature is unavailable for this head unit"; - [manager sendRequest:alert]; - } - }]; - }; - - return dialNumberCommand; -} - + (SDLSpeak *)sdlex_appNameSpeak { SDLSpeak *speak = [[SDLSpeak alloc] init]; speak.ttsChunks = [SDLTTSChunk textChunksFromString:@"S D L Example App"]; |