Functions

The following functions are available globally.

  • This enumeration list states Hype can be in. The state the framework is in indicates what activities it’s performing and what events are to be expected. The state can be queried with the + state method.

    Declaration

    Objective-C

    int NS_ENUM(NSUInteger, HYPState)

    Swift

    func NS_ENUM(_ NSUInteger: Int32, _ HYPState: Int32) -> Int32
  • This bitwise enumeration lists types of transport made available by the framework. These values can be combined using bitwise operators to indicate multi transport configurations.

    Declaration

    Objective-C

    int NS_OPTIONS(NSUInteger, HYPTransportType)

    Swift

    func NS_OPTIONS(_ NSUInteger: Int32, _ HYPTransportType: Int32) -> Int32
  • This method will return a string describing the type of transport given as argument. These strings should be suitable for presenting to the end user, as they are descriptive of the underlying type of transport. This method always returns the transport type’s full name if it’s a single type of transport, and None if there’s no transport type at all, as well as Mixed if several types of transport are represented by the enumeration.

    Declaration

    Objective-C

    NSString * HYPTransportTypeDescription(HYPTransportType transportType)

    Swift

    func HYPTransportTypeDescription(_ transportType: Int32) -> UnsafeMutablePointer<Int32>!
  • Short descriptions are not suitable for displaying to the end user, but they are useful for development, as they are short and unique for each kind of transport. All short descriptions are three characters long. BLE stands for Bluetooth Low Energy, BLC stands for Bluetooth Classic, WFD stands for Wi-Fi Direct, WFI stands for Infrastructural Wi-Fi, and WEB stands for an Internet transport. Combined transports yield a MIX tag and the absence of transports yields NON.

    Declaration

    Objective-C

    NSString * HYPTransportTypeShortDescription(HYPTransportType transportType)

    Swift

    func HYPTransportTypeShortDescription(_ transportType: Int32) -> UnsafeMutablePointer<Int32>!
  • The version number corresponds to the major version times 100, plus the minor. For instance, version 1.5 would yield a value of 105. Beta versions, for which the major is zero, are indicated by the minor version alone, so 0.5 gives 5. @returns Hype’s version in numeric form.

    Declaration

    Objective-C

    NSUInteger HYPVersion(void)

    Swift

    func HYPVersion() -> Int32
  • The version is given in a major.minor.patch format. These values could be individually queried using the respective HYPVersionMajor, HYPVersionMinor, or HYPVersionPatch, in numeric format. @returns Hype’s full version number in string form.

    Declaration

    Objective-C

    NSString * HYPVersionString(void)

    Swift

    func HYPVersionString() -> UnsafeMutablePointer<Int32>!
  • Major versions indicate profound changes to the framework, such as new major features, stability, and so on. @returns Hype’s major version.

    Declaration

    Objective-C

    NSUInteger HYPVersionMajor(void)

    Swift

    func HYPVersionMajor() -> Int32
  • The minor version indicates minor changes to the framework, including new minor features. @returns Hype’s minor version.

    Declaration

    Objective-C

    NSUInteger HYPVersionMinor(void)

    Swift

    func HYPVersionMinor() -> Int32
  • The patch version corresponds to an approximation of the build count for the current release, so it jumps a lot. Higher patch values should indicate more bug fixes, although not necessarily more features. @returns Hype’s patch version.

    Declaration

    Objective-C

    NSUInteger HYPVersionPatch(void)

    Swift

    func HYPVersionPatch() -> Int32