GPKGProgress

Objective-C

@protocol GPKGProgress <NSObject>

Swift

protocol GPKGProgress

GeoPackage Progress protocol for receiving progress information callbacks and handling cancellations

  • Set the max progress value

    Declaration

    Objective-C

    - (void)setMax:(int)max;

    Swift

    func setMax(_ max: Int32)

    Parameters

    max

    max value

  • Add to the total progress

    Declaration

    Objective-C

    - (void)addProgress:(int)progress;

    Swift

    func add(_ progress: Int32)

    Parameters

    progress

    progress made

  • Is the process still active?

    Declaration

    Objective-C

    - (BOOL)isActive;

    Swift

    func isActive() -> Any!

    Return Value

    true if active, false if canceled

  • Should the progress so far be deleted when canceled (isActive becomes false)

    Declaration

    Objective-C

    - (BOOL)cleanupOnCancel;

    Swift

    func cleanupOnCancel() -> Any!

    Return Value

    true to cleanup progress made, false to preserve progress

  • Called when progress is completed

    Declaration

    Objective-C

    - (void)completed;

    Swift

    func completed()
  • Called when the process stops due to an error

    Declaration

    Objective-C

    - (void)failureWithError:(NSString *)error;

    Swift

    func failureWithError(_ error: Any!)

    Parameters

    error

    error