HYPState

enum HYPState : NSUInteger {}

@abstract Enumeration of Hype states.

@discussion This enumeration provides a list of possible 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 Hype’s singleton instance property -state.

  • @abstract The framework is idle.

    @discussion The framework is not publishing the device on the network nor browsing for other devices being published. The device is not participating on the network, nor is it expected to be so until the framework is requested to start, so no activity is expected until then. This state is not expected to change until further activity is requested. The exception is when the framework has previously been started, instances have been found, and it was explicitly requested to stop. In that case I/O operations can still occur with previously found instances. The fact that the device is not advertising itself nor browsing for other devices still holds.

    Declaration

    Objective-C

    HYPStateIdle = 0
  • @abstract The framework is starting.

    @discussion The framework has been requested to start but the request is still being processed. This state changes as soon as Hype is either actively publishing the device on the network or actively browsing for other devices. Instances cannot be found on the network yet. A state update is expected soon.

    Declaration

    Objective-C

    HYPStateStarting = 1
  • @abstract The framework is running.

    @discussion The framework is actively participating on the network, meaning that it could be advertising itself, browsing for other devices on the network, or both. The framework is considered to be running if at least one of its transport types is as well. If activity is not requested on the framework (such as stopping) this state will change only if external factors trigger a change in the adapter’s state, such as the user turning the adapter off, which will cause the framework to halt and become idle with an error.

    Declaration

    Objective-C

    HYPStateRunning = 2
  • @abstract The framework is stopping.

    @discussion The framework is actively participating on the network, and the process to stop doing so has already begun but has yet not been completed. This means that at least one of the transports is still stopping, although others might have already done so. This state changes as soon as all of the framework’s transports have stopped. A state update is expected soon.

    Declaration

    Objective-C

    HYPStateStopping = 3