Type Definitions

The following type definitions are available globally.

  • Typedef for a block that takes zero parameters and returns void.

    Declaration

    Objective-C

    typedef void (^KSTVoidBlock)(void)
  • Typedef for a block that takes a single value as its only parameter and returns void.

    Declaration

    Objective-C

    typedef void (^KSTValueBlock)(id _Nullable)

    Parameters

    value

    The block value

  • Typedef for a block that takes a value and an error as its parameters and returns void.

    Declaration

    Objective-C

    typedef void (^KSTValueErrorBlock)(id _Nullable, NSError *_Nullable)

    Parameters

    value

    The block value

    error

    The block error

  • Block that is invoked whenever a watcher event is generated.

    Declaration

    Objective-C

    typedef void (^KSTFileWatcherBlock)(KSTFileWatcher *_Nonnull, NSURL *_Nonnull,
                                        KSTFileWatcherFlags)

    Parameters

    fileWatcher

    The file watcher

    URL

    The URL of the item that generated the event

    flags

    The flags describing the type of event

  • Typedefs that kstOnExit relies on.

    Declaration

    Objective-C

    typedef void (^kst_cleanupBlock_t)(void)
  • Block that is invoked when a KSTTimer instance fires. The timer itself is passed as the only argument.

    Declaration

    Objective-C

    typedef void (^KSTTimerBlock)(KSTTimer *_Nonnull)

    Parameters

    timer

    The timer that fired

  • Typedef for additional keys to be used when constructing the userInfo dictionary of an NSError.

    Declaration

    Objective-C

    typedef NSString *KSTErrorAlertKey
  • Typedef for string constants for supported HTTP methods. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html for more information.

    Declaration

    Objective-C

    typedef NSString *KSTHTTPMethod
  • Typedef for string constants for supported HTTP header fields. See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html for more information.

    Declaration

    Objective-C

    typedef NSString *KSTHTTPHeaderField