Module: HAP::Pairing
- Included in:
- Client
- Defined in:
- lib/hap_client/pairing.rb
Constant Summary collapse
- ERROR_NAMES =
{ 1 => 'kTLVError_Unknown', 2 => 'kTLVError_Authentication', 3 => 'kTLVError_Backoff', 4 => 'kTLVError_MaxPeers', 5 => 'kTLVError_MaxTries', 6 => 'kTLVError_Unavailable', 7 => 'kTLVError_Busy', }.freeze
- ERROR_TYPES =
ERROR_NAMES.invert.freeze
Instance Method Summary collapse
Instance Method Details
#pair_setup(password, &block) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/hap_client/pairing.rb', line 27 def pair_setup(password, &block) info("Pair Setup Step 1/3") @mode = :pair_setup @password = password srp_start_request() if block_given? @pair_setup_callback = block end end |
#pair_verify(&block) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/hap_client/pairing.rb', line 38 def pair_verify(&block) info("Pair Verify 1/2") @mode = :pair_verify verify_start_request() if block_given? @pair_verify_callback = block end end |