// Path: blelibrary/src/main/java/com/github/captain_miao/android/ble/constant/BleScanState.java
// public enum BleScanState {
// 
//     SCAN_TIMEOUT(-2, "SCAN_SUCCESS_TIME_OUT"),
//     BLUETOOTH_OFF(-1, "BLUETOOTH_OFF"),
//     SCAN_SUCCESS(0, "SCAN_SUCCESS"),
//     SCAN_FAILED_ALREADY_STARTED(1, "SCAN_FAILED_ALREADY_STARTED"),
//     SCAN_FAILED_APPLICATION_REGISTRATION_FAILED(2, "SCAN_FAILED_APPLICATION_REGISTRATION_FAILED"),
//     SCAN_FAILED_INTERNAL_ERROR(3, "SCAN_FAILED_INTERNAL_ERROR"),
//     SCAN_FAILED_FEATURE_UNSUPPORTED(4, "SCAN_FAILED_FEATURE_UNSUPPORTED"),
//     SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES(5, "SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES");
// 
// 
//     BleScanState(int code, String message) {
//         this.code = code;
//         this.message = message;
//     }
// 
//     private int code;
//     private String message;
// 
//     public int getCode() {
//         return code;
//     }
// 
// 
//     public String getMessage() {
//         return message;
//     }
// 
//     public static BleScanState newInstance(int code) {
//         switch (code) {
//             case -2:
//                 return BleScanState.SCAN_TIMEOUT;
//             case -1:
//                 return BleScanState.BLUETOOTH_OFF;
// 
//             case 1:
//                 return BleScanState.SCAN_FAILED_ALREADY_STARTED;
//             case 2:
//                 return BleScanState.SCAN_FAILED_APPLICATION_REGISTRATION_FAILED;
//             case 3:
//                 return BleScanState.SCAN_FAILED_INTERNAL_ERROR;
//             case 4:
//                 return BleScanState.SCAN_FAILED_FEATURE_UNSUPPORTED;
//             case 5:
//                 return BleScanState.SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES;
//             default:
//                 return BleScanState.SCAN_SUCCESS;
//         }
//     }
// }


import android.bluetooth.BluetoothDevice;
import com.github.captain_miao.android.ble.constant.BleScanState;
package com.github.captain_miao.android.ble;



/**
 * @author YanLu
 * @since 15/9/14
 */
public interface SimpleScanCallback {

    /**
     * Callback reporting an LE device found during a device scan initiated
     * by the BluetoothAdapter#startLeScan function.
     *
     * @param device Identifies the remote device
     * @param rssi The RSSI value for the remote device as reported by the
     *             Bluetooth hardware. 0 if no RSSI value is available.
     * @param scanRecord The content of the advertisement record offered by
     *                   the remote device.
     */
    void onBleScan(BluetoothDevice device, int rssi, byte[] scanRecord);

    /**
     * Callback when scan could not be started.
     *
     * @param scanState Error code (one of SCAN_FAILED_*) for scan failure.
     */
// Path: blelibrary/src/main/java/com/github/captain_miao/android/ble/constant/BleScanState.java
// public enum BleScanState {
// 
//     SCAN_TIMEOUT(-2, "SCAN_SUCCESS_TIME_OUT"),
//     BLUETOOTH_OFF(-1, "BLUETOOTH_OFF"),
//     SCAN_SUCCESS(0, "SCAN_SUCCESS"),
//     SCAN_FAILED_ALREADY_STARTED(1, "SCAN_FAILED_ALREADY_STARTED"),
//     SCAN_FAILED_APPLICATION_REGISTRATION_FAILED(2, "SCAN_FAILED_APPLICATION_REGISTRATION_FAILED"),
//     SCAN_FAILED_INTERNAL_ERROR(3, "SCAN_FAILED_INTERNAL_ERROR"),
//     SCAN_FAILED_FEATURE_UNSUPPORTED(4, "SCAN_FAILED_FEATURE_UNSUPPORTED"),
//     SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES(5, "SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES");
// 
// 
//     BleScanState(int code, String message) {
//         this.code = code;
//         this.message = message;
//     }
// 
//     private int code;
//     private String message;
// 
//     public int getCode() {
//         return code;
//     }
// 
// 
//     public String getMessage() {
//         return message;
//     }
// 
//     public static BleScanState newInstance(int code) {
//         switch (code) {
//             case -2:
//                 return BleScanState.SCAN_TIMEOUT;
//             case -1:
//                 return BleScanState.BLUETOOTH_OFF;
// 
//             case 1:
//                 return BleScanState.SCAN_FAILED_ALREADY_STARTED;
//             case 2:
//                 return BleScanState.SCAN_FAILED_APPLICATION_REGISTRATION_FAILED;
//             case 3:
//                 return BleScanState.SCAN_FAILED_INTERNAL_ERROR;
//             case 4:
//                 return BleScanState.SCAN_FAILED_FEATURE_UNSUPPORTED;
//             case 5:
//                 return BleScanState.SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES;
//             default:
//                 return BleScanState.SCAN_SUCCESS;
//         }
//     }
// }


// Path: blelibrary/src/main/java/com/github/captain_miao/android/ble/SimpleScanCallback.java
import android.bluetooth.BluetoothDevice;
import com.github.captain_miao.android.ble.constant.BleScanState;

package com.github.captain_miao.android.ble;



/**
 * @author YanLu
 * @since 15/9/14
 */
public interface SimpleScanCallback {

    /**
     * Callback reporting an LE device found during a device scan initiated
     * by the BluetoothAdapter#startLeScan function.
     *
     * @param device Identifies the remote device
     * @param rssi The RSSI value for the remote device as reported by the
     *             Bluetooth hardware. 0 if no RSSI value is available.
     * @param scanRecord The content of the advertisement record offered by
     *                   the remote device.
     */
    void onBleScan(BluetoothDevice device, int rssi, byte[] scanRecord);

    /**
     * Callback when scan could not be started.
     *
     * @param scanState Error code (one of SCAN_FAILED_*) for scan failure.
     */
    void onBleScanFailed(BleScanState scanState);