Blame view

HDFwear/3rd/RTKOTASDK/RTKLEFoundation.framework/Headers/RTKError.h 1.51 KB
75d24c15   yangbin   123
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
  //
  //  RTKError.h
  //  RTKLEFoundation
  //
  //  Created by jerome_gu on 2019/1/21.
  //  Copyright © 2019 Realtek. All rights reserved.
  //
  
  #ifndef RTKError_h
  #define RTKError_h
  
  #import <Foundation/Foundation.h>
  
  extern NSErrorDomain const RTKBTErrorDomain;
  
  /* RTKBTErrorDomain Error code */
  typedef enum : NSUInteger {
      RTKErrorNotAvailable = 100,
      RTKErrorConnectionTimeout,                      // Connect to a LE peripheral time out.
      RTKErrorTimeout,        /* generic timeout, operation is not specified. */
      RTKErrorCharacteristicNotifyEnableFail,
      RTKErrorPeripheralDisconnection,
      RTKErrorPeripheralNotConnected,
      RTKErrorUnavailable,
      RTKErrorInvalidParameter,
      
      RTKErrorATTDiscoveryFail,
      RTKErrorATTNotExist,
      RTKErrorATTDiscoveryBusy,                       // Attemp to discovery service while there is already a pending discovery
      RTKErrorATTDiscoveryTimeout,
      RTKErrorATTInsufficient,
      
      RTKErrorPeripheralNotOpen,
      
      RTKErrorPeripheralTransmissionUnresponsive,
      RTKErrorPeripheralInProgressAlready,
      
      RTKErrorAccessorySessionNotOpen = 130,
      
      
      RTKErrorNotConform  = 150,
      
  } RTKErrorCode;
  
  
  
  @interface NSError (RTKBT)
  
  @property (readonly) BOOL isLinkloss;
  
  
  /* Warn: iPhone 蓝牙开关关闭时,错误也是 Error Domain=CBErrorDomain Code=7 "The specified device has disconnected from us." UserInfo={NSLocalizedDescription=The specified device has disconnected from us. */
  @property (readonly) BOOL isDisconnectByPeer;
  
  @end
  
  
  #endif /* RTKError_h */