<UgiConfigurationDelegate > Protocol Reference

Overview


A UgiConfigurationDelegate object is set in the Ugi singleton object to handle configuration events including firmware update and region setting.

By default, a UgiDefaultConfigurationUi object is used for this. To customize configuration functionality, an application will generally subclass UgiDefaultConfigurationUi.

Instance Methods

(void) - requestMicrophonePermission
 
The application does not have permission to use the microphone. More...
 
(void) - promptForFirmwareUpdate:withUpdateCompletion:withCancelCompletion:withPostponeCompletion:
 
A firmware update is available. More...
 
(void) - notifyFirmwareUpdateErrorLoadingUpdateWithCompletion:
 
Notify the user that there was an error loading the firmware update. More...
 
(void) - displayFirmwareUpdateProgressWithCancelCompletion:
 
Display progress notification about the firmware update More...
 
(void) - updateFirmwareUpdateProgress:withAmountTotal:canCancel:
 
Update the progress notification about the firmware update More...
 
(void) - notifyFirmwareUpdateSuccess:withCompletion:
 
Notify the user the firmware update completed successfully More...
 
(void) - notifyFirmwareUpdateFailure:withError:withRetryCompletion:withCancelCompletion:
 
Notify the user that the firmware update failed More...
 
(void) - abortFirmwareUpdateInteraction
 
Abort firmware update (Grokker has been disconnected)
 
(void) - afterFirmwareUpdate:
 
Firmware update sequence has finished More...
 
(void) - startBackgroundAction:
 
Notification that a background action is starting. More...
 
(void) - finishBackgroundAction
 
Notification that a background action finished
 

Properties

BOOL sendGrokkerSerialNumber
 
YES to allow Grokker serial numbers to be sent to the U Grok It server (default = YES)
 
BOOL doAutomaticFirmwareUpdate
 
YES to run the automatic firmware update checks (default = YES)
 

Types

enum  UgiConfigurationDelegateWaitingCauses { UgiConfigurationDelegateWaitingCause_Generic, UgiConfigurationDelegateWaitingCause_LoadingFirmwareUpdate, UgiConfigurationDelegateWaitingCause_LoadingRegions, UgiConfigurationDelegateWaitingCause_SettingRegion }
 
Type passed to startBackgroundAction: More...
 

Instance Method Documentation

◆ requestMicrophonePermission()

- (void UgiConfigurationDelegate) requestMicrophonePermission


The application does not have permission to use the microphone.

Tell this user that this permission is required.

◆ promptForFirmwareUpdate:withUpdateCompletion:withCancelCompletion:withPostponeCompletion:()

- (void UgiConfigurationDelegate) promptForFirmwareUpdate: (UgiFirmwareUpdateInfo *_Nonnull)  info
withUpdateCompletion: (nonnull void(^)(void))  updateCompletion
withCancelCompletion: (nonnull void(^)(void))  cancelCompletion
withPostponeCompletion: (nonnull void(^)(void))  postponeCompletion 


A firmware update is available.

Prompt the user for whether to update. If the app does not want to update now, return NO call the Ugi method repromptForAutomaticFirmwareUpdateIfAvailable at some point.

Parameters
infoInformation about the firmware update that is available
updateCompletionBlock to execute to do the update
cancelCompletionBlock to execute if the user cancels
postponeCompletionBlock to to postpone until later

◆ notifyFirmwareUpdateErrorLoadingUpdateWithCompletion:()

- (void UgiConfigurationDelegate) notifyFirmwareUpdateErrorLoadingUpdateWithCompletion: (nonnull void(^)(void))  completion


Notify the user that there was an error loading the firmware update.

Parameters
completionBlock to execute after notification

◆ displayFirmwareUpdateProgressWithCancelCompletion:()

- (void UgiConfigurationDelegate) displayFirmwareUpdateProgressWithCancelCompletion: (nonnull void(^)(void))  cancelCompletion


Display progress notification about the firmware update

Parameters
cancelCompletionBlock to execute if the user cancels

◆ updateFirmwareUpdateProgress:withAmountTotal:canCancel:()

- (void UgiConfigurationDelegate) updateFirmwareUpdateProgress: (int)  amountDone
withAmountTotal: (int)  amountTotal
canCancel: (BOOL)  canCancel 


Update the progress notification about the firmware update

Parameters
amountDoneAmmount of the firmware update that is done
amountTotalAmmount of the firmware update total
canCancelYES if the user can cancel at this point

◆ notifyFirmwareUpdateSuccess:withCompletion:()

- (void UgiConfigurationDelegate) notifyFirmwareUpdateSuccess: (int)  seconds
withCompletion: (nonnull void(^)(void))  completion 


Notify the user the firmware update completed successfully

Parameters
secondsNumber of seconds that the update took
completionBlock to execute after notification

◆ notifyFirmwareUpdateFailure:withError:withRetryCompletion:withCancelCompletion:()

- (void UgiConfigurationDelegate) notifyFirmwareUpdateFailure: (BOOL)  mustRetry
withError: (NSUInteger)  error
withRetryCompletion: (nonnull void(^)(void))  retryCompletion
withCancelCompletion: (nonnull void(^)(void))  cancelCompletion 


Notify the user that the firmware update failed

Parameters
mustRetryYES of the user must retry (do not present a Cancel option)
errorError value (UgiFirmwareUpdateReturnValues)
retryCompletionBlock to execute to retry the update (nil if the update cannot be retried)
cancelCompletionBlock to execute if the user cancels

◆ afterFirmwareUpdate:()

- (void UgiConfigurationDelegate) afterFirmwareUpdate: (BOOL)  updated


Firmware update sequence has finished

Parameters
updatedYES if update succeeded

◆ startBackgroundAction:()

- (void UgiConfigurationDelegate) startBackgroundAction: (UgiConfigurationDelegateWaitingCauses cause


Notification that a background action is starting.

Display a "waiting" alert

Parameters
causeAction that is about to start

Enumeration Documentation

◆ UgiConfigurationDelegateWaitingCauses

- (enum UgiConfigurationDelegate) UgiConfigurationDelegateWaitingCauses


Type passed to startBackgroundAction:

Enumerator
UgiConfigurationDelegateWaitingCause_Generic 

Generic.

UgiConfigurationDelegateWaitingCause_LoadingFirmwareUpdate 

loading a firmware update

UgiConfigurationDelegateWaitingCause_LoadingRegions 

loading regions

UgiConfigurationDelegateWaitingCause_SettingRegion 

setting the region