<commit_before>//
//  PairingTask.swift
//  Clink
//
//  Created by <NAME> on 7/5/17.
//

import Foundation
import CoreBluetooth


internal protocol PairingTaskDelegate: class {
    func didFinishPairing(peripheral: CBPeripheral)
}


public class PairingTask: NSObject {
    fileprivate enum Status: Int {
        case unknown
        case scanning
        case discoveredRemotePeer
        case remotePeerOutOfRange
        case timedOut
        case completionPendingRemotePeer
    }
    
    internal weak var delegate: PairingTaskDelegate? = nil
    
    fileprivate var serviceId = CBUUID(string: "7D912F17-0583-4A1A-A499-205FF6835514")
    fileprivate var remotePeripheral: CBPeripheral? = nil
    fileprivate var isPairing = false
    fileprivate var pairingStatusCharacteristic = CBMutableCharacteristic(
        type: CBUUID(string: "ECC2D7D1-FB7C-4AF2-B068-0525AEFD7F53"),<commit_msg>update pairing task delegate method name<commit_after>//
//  PairingTask.swift
//  Clink
//
//  Created by <NAME> on 7/5/17.
//

import Foundation
import CoreBluetooth


internal protocol PairingTaskDelegate: class {
    func pairingTask(_ task: PairingTask, didFinishPairingWithPeripheral peripheral: CBPeripheral)
}


internal class PairingTask: NSObject {
    fileprivate enum Status: Int {
        case unknown
        case scanning
        case discoveredRemotePeer
        case remotePeerOutOfRange
        case timedOut
        case completionPendingRemotePeer
    }
    
    internal weak var delegate: PairingTaskDelegate? = nil
    
    fileprivate var serviceId = CBUUID(string: "7D912F17-0583-4A1A-A499-205FF6835514")
    fileprivate var remotePeripheral: CBPeripheral? = nil
    fileprivate var isPairing = false
    fileprivate var pairingStatusCharacteristic = CBMutableCharacteristic(
        type: CBUUID(string: "ECC2D7D1-FB7C-4AF2-B068-0525AEFD7F53"),
{'fraction_non_alphanumeric': 0.06759656652360516, 'fraction_numerical': 0.048283261802575105, 'mean_word_length': 3.3372093023255816, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6589089', 'n_tokens_mistral': 630, 'n_tokens_neox': 557, 'n_words': 140}