├── HAPAccessoryKit Headers ├── CBPeripheralManagerDelegate-Protocol.h ├── CDStructures.h ├── HAKAccessory.h ├── HAKAccessoryDelegate-Protocol.h ├── HAKAccessoryInformationService.h ├── HAKAccessoryKeychainObject.h ├── HAKAccessoryKit.h ├── HAKAddPairingSession.h ├── HAKAddPairingSessionDelegate-Protocol.h ├── HAKBTLEConnection.h ├── HAKBTLESecuritySession.h ├── HAKBTLETransport.h ├── HAKChaCha20.h ├── HAKChaCha20Poly1305.h ├── HAKChaChaPolyData.h ├── HAKCharacteristic.h ├── HAKCharacteristicMetadata.h ├── HAKCharacteristicReadRequest.h ├── HAKCharacteristicReadResponse.h ├── HAKCharacteristicRequest.h ├── HAKCharacteristicResponse.h ├── HAKCharacteristicWriteRequest.h ├── HAKCharacteristicWriteResponse.h ├── HAKConnection.h ├── HAKConnectionDelegate-Protocol.h ├── HAKConstraintsFactory.h ├── HAKControllerKeychainObject.h ├── HAKCurve25519.h ├── HAKEnumerationConstraints.h ├── HAKHKDF.h ├── HAKHTTPMessage.h ├── HAKHTTPRequestMessage.h ├── HAKHTTPResponseMessage.h ├── HAKIPCharacteristicReadRequest.h ├── HAKIPConnection.h ├── HAKIPConnectionDelegate-Protocol.h ├── HAKIPSecuritySession.h ├── HAKIPTransport.h ├── HAKIdentifier.h ├── HAKIdentifyCharacteristic.h ├── HAKInstanceIDPool.h ├── HAKKeychainKey.h ├── HAKKeychainService.h ├── HAKListPairingsSession.h ├── HAKListPairingsSessionDataSource-Protocol.h ├── HAKListPairingsSessionDelegate-Protocol.h ├── HAKLogger.h ├── HAKMetadata.h ├── HAKMetadataService.h ├── HAKNetService.h ├── HAKNumberConstraints.h ├── HAKPairSetupCharacteristic.h ├── HAKPairSetupSession.h ├── HAKPairSetupSessionDelegate-Protocol.h ├── HAKPairVerifyCharacteristic.h ├── HAKPairVerifySession.h ├── HAKPairVerifySessionDelegate-Protocol.h ├── HAKPairing.h ├── HAKPairingCharacteristic.h ├── HAKPairingService.h ├── HAKPairingSession.h ├── HAKPairingSessionDelegate-Protocol.h ├── HAKPairingsCharacteristic.h ├── HAKPoly1305.h ├── HAKRemovePairingSession.h ├── HAKRemovePairingSessionDelegate-Protocol.h ├── HAKSecuritySession.h ├── HAKSecuritySessionPacket.h ├── HAKService.h ├── HAKServiceDelegate-Protocol.h ├── HAKServiceMetadata.h ├── HAKSocket.h ├── HAKSocketDelegate-Protocol.h ├── HAKStringConstraints.h ├── HAKTLV8Container.h ├── HAKTLV8Packet.h ├── HAKTransport.h ├── HAKUUID.h ├── HAKValueConstraints.h ├── NSCoding-Protocol.h ├── NSCopying-Protocol.h ├── NSData-Enumeration.h ├── NSData-HAKChaChaPoly.h ├── NSDictionary-HAK.h ├── NSDictionary-Safe.h ├── NSError-HAKError.h ├── NSFileManager-HAK.h ├── NSMapTable-HAK.h ├── NSNetServiceDelegate-Protocol.h ├── NSNumber-HAK.h ├── NSObject-Protocol.h ├── NSStreamDelegate-Protocol.h ├── NSString-NSData.h ├── NSURL-Query.h └── NSUserDefaults-HAK.h ├── HomeKitBridge.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── HomeKitBridge.xccheckout │ └── xcuserdata │ │ └── freerunnering.xcuserdatad │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── freerunnering.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── HomeKitBridge.xcscheme │ └── xcschememanagement.plist ├── HomeKitBridge ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── MainMenu.xib ├── HKBAccessory.h ├── HKBAccessory.m ├── HKBDiscoveryService.h ├── HKBDiscoveryService.m ├── HKBLightAccessory+Subclass.h ├── HKBLightAccessory.h ├── HKBLightAccessory.m ├── HKBTransportCache.h ├── HKBTransportCache.m ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── LIFX │ ├── HKBLIFXDiscoveryService.h │ ├── HKBLIFXDiscoveryService.m │ ├── HKBLightAccessoryLIFX.h │ ├── HKBLightAccessoryLIFX.m │ └── LIFXKit.framework │ │ ├── Headers │ │ ├── LIFXKit │ │ ├── Resources │ │ └── Versions │ │ ├── A │ │ ├── Headers │ │ │ ├── LFXAllLightsCollection.h │ │ │ ├── LFXClient.h │ │ │ ├── LFXDevice.h │ │ │ ├── LFXHSBKColor.h │ │ │ ├── LFXLight.h │ │ │ ├── LFXLightCollection.h │ │ │ ├── LFXNetworkContext.h │ │ │ ├── LFXTaggedLightCollection.h │ │ │ ├── LFXTypes.h │ │ │ └── LIFXKit.h │ │ ├── LIFXKit │ │ └── Resources │ │ │ ├── Info.plist │ │ │ └── en.lproj │ │ │ └── InfoPlist.strings │ │ └── Current ├── LaunchAtLoginController.h ├── LaunchAtLoginController.m ├── NSArray+Map.h ├── NSArray+Map.m └── main.m └── README.md /HAPAccessoryKit Headers/CBPeripheralManagerDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/CDStructures.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #pragma mark Named Structures 8 | 9 | struct cstr_st; 10 | 11 | struct poly1305_context { 12 | unsigned long long _field1; 13 | unsigned char _field2[136]; 14 | }; 15 | 16 | struct srp_meth_st; 17 | 18 | struct srp_server_lu_st; 19 | 20 | struct srp_st { 21 | int _field1; 22 | int _field2; 23 | struct cstr_st *_field3; 24 | void *_field4; 25 | void *_field5; 26 | struct cstr_st *_field6; 27 | void *_field7; 28 | void *_field8; 29 | void *_field9; 30 | void *_field10; 31 | void *_field11; 32 | void *_field12; 33 | struct cstr_st *_field13; 34 | struct srp_meth_st *_field14; 35 | void *_field15; 36 | void *_field16; 37 | void *_field17; 38 | void *_field18; 39 | struct srp_server_lu_st *_field19; 40 | struct *_field20; 41 | }; 42 | 43 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKAccessory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | #import "HAKAccessoryDelegate-Protocol.h" 10 | #import "HAKServiceDelegate-Protocol.h" 11 | 12 | @class HAKInstanceIDPool, HAKService, NSArray, NSHashTable, NSMutableArray, NSNumber, NSString; 13 | 14 | @interface HAKAccessory : NSObject 15 | { 16 | NSMutableArray *_services; 17 | id _delegate; 18 | NSNumber *_instanceID; 19 | HAKInstanceIDPool *_instanceIDPool; 20 | NSHashTable *_transportRefs; 21 | dispatch_queue_t _workQueue; 22 | } 23 | 24 | + (id)pairingUUID; 25 | + (id)accessoryInformationUUID; 26 | + (id)servicesToFilter; 27 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 28 | @property(retain, nonatomic) NSHashTable *transportRefs; // @synthesize transportRefs=_transportRefs; 29 | @property(retain, nonatomic) HAKInstanceIDPool *instanceIDPool; // @synthesize instanceIDPool=_instanceIDPool; 30 | @property(retain, nonatomic) NSNumber *instanceID; // @synthesize instanceID=_instanceID; 31 | @property(nonatomic) __weak id delegate; // @synthesize delegate=_delegate; 32 | @property(retain, nonatomic) NSArray *services; // @synthesize services=_services; 33 | 34 | @property(copy, nonatomic) NSString *serialNumber; 35 | @property(copy, nonatomic) NSString *manufacturer; 36 | @property(copy, nonatomic) NSString *model; 37 | @property(copy, nonatomic) NSString *name; 38 | @property(readonly, nonatomic) __weak HAKService *accessoryInformationService; 39 | - (id)serviceWithType:(id)arg1; 40 | - (id)serviceWithInstanceId:(unsigned long long)arg1; 41 | - (BOOL)_removeService:(id)arg1; 42 | - (void)removeService:(id)arg1; 43 | - (BOOL)_addService:(id)arg1 error:(id *)arg2; 44 | - (void)addService:(id)arg1; 45 | - (void)removeTransport:(id)arg1; 46 | - (void)addTransport:(id)arg1; 47 | @property(readonly, nonatomic) NSArray *transports; 48 | - (void)_handleUpdatedService:(id)arg1; 49 | - (void)service:(id)arg1 didRemoveCharacteristic:(id)arg2; 50 | - (void)service:(id)arg1 didAddCharacteristic:(id)arg2; 51 | 52 | 53 | 54 | - (id)initWithAccessoryInformationService:(id)arg1 pairingService:(id)arg2; 55 | 56 | - (id)characteristicWithInstanceId:(unsigned long long)arg1; 57 | - (id)JSONObject; 58 | 59 | 60 | 61 | @end 62 | 63 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKAccessoryDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "NSObject-Protocol.h" 8 | 9 | @protocol HAKAccessoryDelegate 10 | 11 | @optional 12 | - (void)accessory:(id)arg1 didUpdateService:(id)arg2; 13 | - (void)accessory:(id)arg1 didRemoveService:(id)arg2; 14 | - (void)accessory:(id)arg1 didFailToAddService:(id)arg2 error:(id)arg3; 15 | - (void)accessory:(id)arg1 didAddService:(id)arg2; 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKAccessoryInformationService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKService.h" 8 | 9 | @class HAKCharacteristic; 10 | 11 | @interface HAKAccessoryInformationService : HAKService 12 | { 13 | } 14 | 15 | + (id)accessoryInformationService; 16 | @property(readonly, nonatomic) HAKCharacteristic *serialNumberCharacteristic; 17 | @property(readonly, nonatomic) HAKCharacteristic *modelCharacteristic; 18 | @property(readonly, nonatomic) HAKCharacteristic *manufacturerCharacteristic; 19 | @property(readonly, nonatomic) HAKCharacteristic *nameCharacteristic; 20 | @property(readonly, nonatomic) HAKCharacteristic *identifyCharacteristic; 21 | - (void)addIncludedService:(id)arg1; 22 | - (void)removeCharacteristic:(id)arg1; 23 | - (id)_restrictedCharacteristicSet; 24 | - (id)initWithType:(id)arg1 isPrimary:(BOOL)arg2 characteristics:(id)arg3 includedServices:(id)arg4; 25 | 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKAccessoryKeychainObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKKeychainKey, NSArray, NSString; 10 | 11 | @interface HAKAccessoryKeychainObject : NSObject 12 | { 13 | NSString *_identifier; 14 | HAKKeychainKey *_key; 15 | } 16 | 17 | @property(retain, nonatomic) HAKKeychainKey *key; // @synthesize key=_key; 18 | @property(copy, nonatomic) NSString *identifier; // @synthesize identifier=_identifier; 19 | 20 | - (BOOL)removeController:(id)arg1 error:(id *)arg2; 21 | - (BOOL)addController:(id)arg1 error:(id *)arg2; 22 | - (id)controllerWithIdentifier:(id)arg1; 23 | @property(readonly, nonatomic) NSArray *controllers; 24 | - (id)initWithIdentifier:(id)arg1; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKAccessoryKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated by class-dump 3.5 (64 bit). 3 | // 4 | // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. 5 | // 6 | 7 | 8 | // Other 9 | #import "HAKAccessory.h" 10 | #import "HAKTransport.h" 11 | #import "HAKIPTransport.h" 12 | #import "HAKUUID.h" 13 | 14 | 15 | // Services 16 | #import "HAKAccessoryInformationService.h" 17 | 18 | 19 | // Characteristics 20 | #import "HAKCharacteristic.h" 21 | #import "HAKIdentifyCharacteristic.h" 22 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKAddPairingSession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSession.h" 8 | 9 | @class HAKTLV8Container; 10 | 11 | @interface HAKAddPairingSession : HAKPairingSession 12 | { 13 | unsigned char _state; 14 | id _delegate; 15 | HAKTLV8Container *_stateData; 16 | } 17 | 18 | @property(retain, nonatomic) HAKTLV8Container *stateData; // @synthesize stateData=_stateData; 19 | @property(nonatomic) unsigned char state; // @synthesize state=_state; 20 | @property __weak id delegate; // @synthesize delegate=_delegate; 21 | 22 | - (id)handlePairingSessionReadRequest; 23 | - (long long)handlePairingSessionWriteRequest:(id)arg1; 24 | - (void)_lockSession; 25 | - (id)_tlv8ResponseWithError:(unsigned char)arg1; 26 | 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKAddPairingSessionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSessionDelegate-Protocol.h" 8 | 9 | @protocol HAKAddPairingSessionDelegate 10 | - (void)addPairingSession:(id)arg1 didAddPairing:(id)arg2; 11 | - (BOOL)controllerIsAdminForAddPairingSession:(id)arg1; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKBTLEConnection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKConnection.h" 8 | 9 | @class CBCentral; 10 | 11 | @interface HAKBTLEConnection : HAKConnection 12 | { 13 | CBCentral *_central; 14 | } 15 | 16 | @property(readonly, nonatomic) CBCentral *central; // @synthesize central=_central; 17 | 18 | - (void)handleWriteRequests:(id)arg1; 19 | - (void)handleReadRequest:(id)arg1; 20 | - (BOOL)encryptWithIdentifier:(id)arg1 sharedSecret:(id)arg2; 21 | 22 | - (BOOL)isEqual:(id)arg1; 23 | - (unsigned long long)hash; 24 | - (id)initWithTransport:(id)arg1 central:(id)arg2; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKBTLESecuritySession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKSecuritySession.h" 8 | 9 | @interface HAKBTLESecuritySession : HAKSecuritySession 10 | { 11 | } 12 | 13 | - (id)decryptData:(id)arg1; 14 | - (id)encryptData:(id)arg1; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKBTLETransport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKTransport.h" 8 | 9 | #import "CBPeripheralManagerDelegate-Protocol.h" 10 | 11 | @class CBPeripheralManager, HAKPairingService, NSMapTable, NSString; 12 | 13 | @interface HAKBTLETransport : HAKTransport 14 | { 15 | CBPeripheralManager *_peripheralManager; 16 | HAKPairingService *_pairingService; 17 | NSMapTable *_cbServices; 18 | NSMapTable *_pendingReadRequests; 19 | } 20 | 21 | + (unsigned long long)maxSupportedAccessories; 22 | @property(retain, nonatomic) NSMapTable *pendingReadRequests; // @synthesize pendingReadRequests=_pendingReadRequests; 23 | @property(retain, nonatomic, setter=setCBServices:) NSMapTable *cbServices; // @synthesize cbServices=_cbServices; 24 | @property(retain, nonatomic) HAKPairingService *pairingService; // @synthesize pairingService=_pairingService; 25 | @property(retain, nonatomic) CBPeripheralManager *peripheralManager; // @synthesize peripheralManager=_peripheralManager; 26 | 27 | - (id)_connectionForCentral:(id)arg1; 28 | - (id)_characteristicForCBCharacteristic:(id)arg1; 29 | - (void)_addCBServices; 30 | - (void)_removeService:(id)arg1; 31 | - (void)_addService:(id)arg1; 32 | - (void)_startAdvertising; 33 | - (id)_advertisementData; 34 | - (void)setPaired:(BOOL)arg1; 35 | - (unsigned long long)type; 36 | - (BOOL)updateValue:(id)arg1 forCharacteristic:(id)arg2 onSubscribedConnections:(id)arg3; 37 | - (void)stop; 38 | - (void)start; 39 | - (void)accessory:(id)arg1 didUpdateService:(id)arg2; 40 | - (void)accessory:(id)arg1 didRemoveService:(id)arg2; 41 | - (void)accessory:(id)arg1 didAddService:(id)arg2; 42 | - (void)peripheralManager:(id)arg1 didReceiveWriteRequests:(id)arg2; 43 | - (void)peripheralManager:(id)arg1 didReceiveReadRequest:(id)arg2; 44 | - (void)peripheralManager:(id)arg1 central:(id)arg2 didUnsubscribeFromCharacteristic:(id)arg3; 45 | - (void)peripheralManager:(id)arg1 central:(id)arg2 didSubscribeToCharacteristic:(id)arg3; 46 | - (void)peripheralManagerDidStartAdvertising:(id)arg1 error:(id)arg2; 47 | - (void)peripheralManagerDidUpdateState:(id)arg1; 48 | 49 | 50 | 51 | 52 | @end 53 | 54 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKChaCha20.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface HAKChaCha20 : NSObject 10 | { 11 | struct { 12 | unsigned int _field1[16]; 13 | } *_wContext; 14 | } 15 | 16 | + (BOOL)isNonceValid:(id)arg1; 17 | + (BOOL)isKeyValid:(id)arg1; 18 | - (id)decryptData:(id)arg1; 19 | - (id)encryptData:(id)arg1; 20 | - (id)initWithKey:(id)arg1 nonce:(id)arg2; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKChaCha20Poly1305.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKChaCha20, HAKPoly1305; 10 | 11 | @interface HAKChaCha20Poly1305 : NSObject 12 | { 13 | HAKChaCha20 *_chaCha20; 14 | HAKPoly1305 *_poly1305; 15 | } 16 | 17 | @property(retain, nonatomic) HAKPoly1305 *poly1305; // @synthesize poly1305=_poly1305; 18 | @property(retain, nonatomic) HAKChaCha20 *chaCha20; // @synthesize chaCha20=_chaCha20; 19 | 20 | - (id)decryptFromData:(id)arg1 additionalAuthenticatedData:(id)arg2 error:(id *)arg3; 21 | - (id)encryptWithData:(id)arg1 additionalAuthenticatedData:(id)arg2 error:(id *)arg3; 22 | - (void)_updateWithPadding:(id)arg1; 23 | - (id)authTagFromEncryptedData:(id)arg1 additionalAuthenticatedData:(id)arg2; 24 | - (id)initWithKey:(id)arg1 nonce:(id)arg2; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKChaChaPolyData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData; 10 | 11 | @interface HAKChaChaPolyData : NSObject 12 | { 13 | NSData *_data; 14 | } 15 | 16 | @property(copy, nonatomic) NSData *data; // @synthesize data=_data; 17 | 18 | @property(readonly, nonatomic) NSData *authTag; 19 | @property(readonly, nonatomic) NSData *encryptedData; 20 | 21 | - (id)initWithData:(id)arg1; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import 8 | #import "HAKValueConstraints.h" 9 | 10 | @class HAKService, HAKUUID, HAKValueConstraints, NSArray, NSHashTable, NSNumber, NSString; 11 | 12 | typedef NS_ENUM(NSUInteger, HAKCharacteristicFormat) { 13 | HAKCharacteristicFormatNone, 14 | HAKCharacteristicFormatBool, 15 | HAKCharacteristicFormatInt, 16 | HAKCharacteristicFormatUInt8, 17 | HAKCharacteristicFormatUInt16, 18 | HAKCharacteristicFormatUInt32, 19 | HAKCharacteristicFormatUInt64, 20 | HAKCharacteristicFormatFloat, 21 | HAKCharacteristicFormatString, 22 | HAKCharacteristicFormatDate, 23 | HAKCharacteristicFormatTLV8, 24 | HAKCharacteristicFormatData, 25 | HAKCharacteristicFormatArray, 26 | HAKCharacteristicFormatDictionary 27 | }; 28 | 29 | typedef NS_ENUM(NSUInteger, HAKCharacteristicUnit) { 30 | HAKCharacteristicUnitNone, 31 | HAKCharacteristicUnitCelcius, 32 | HAKCharacteristicUnitPercentage, 33 | HAKCharacteristicUnitArcDegrees 34 | }; 35 | 36 | typedef NS_OPTIONS(NSUInteger, HAKCharacteristicPermission) { 37 | HAKCharacteristicPermissionReadable = 1 << 0, 38 | HAKCharacteristicPermissionWritable = 1 << 1, 39 | HAKCharacteristicPermissionUpdatable = 1 << 2, 40 | }; 41 | 42 | 43 | 44 | @interface HAKCharacteristic : NSObject 45 | { 46 | id _value; 47 | // id _delegate; 48 | HAKService *_service; 49 | HAKUUID *_type; 50 | NSNumber *_instanceID; 51 | NSString *_manufacturerDescription; 52 | unsigned long long _properties; 53 | unsigned long long _permissions; 54 | unsigned long long _format; 55 | unsigned long long _unit; 56 | HAKValueConstraints *_constraints; 57 | dispatch_queue_t _workQueue; 58 | NSHashTable *_subscribedConnectionsTable; 59 | } 60 | 61 | + (id)stringForUnit:(unsigned long long)arg1; 62 | + (id)stringForFormat:(unsigned long long)arg1; 63 | @property(retain, nonatomic) NSHashTable *subscribedConnectionsTable; // @synthesize subscribedConnectionsTable=_subscribedConnectionsTable; 64 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 65 | @property(copy, nonatomic) HAKValueConstraints *constraints; // @synthesize constraints=_constraints; 66 | @property(nonatomic) HAKCharacteristicUnit unit; // @synthesize unit=_unit; 67 | @property(readonly, nonatomic) HAKCharacteristicFormat format; // @synthesize format=_format; 68 | @property(nonatomic) HAKCharacteristicPermission permissions; // @synthesize permissions=_permissions; 69 | @property(readonly, nonatomic) unsigned long long properties; // @synthesize properties=_properties; 70 | @property(copy, nonatomic) NSString *manufacturerDescription; // @synthesize manufacturerDescription=_manufacturerDescription; 71 | @property(copy, nonatomic) NSNumber *instanceID; // @synthesize instanceID=_instanceID; 72 | @property(retain, nonatomic) HAKUUID *type; // @synthesize type=_type; 73 | @property(nonatomic) __weak HAKService *service; // @synthesize service=_service; 74 | //@property(nonatomic) __weak id delegate; // @synthesize delegate=_delegate; 75 | 76 | @property(copy, nonatomic) id value; // @synthesize value=_value; 77 | - (BOOL)_handleValueValidation:(id)arg1; 78 | - (BOOL)validateValue:(id)arg1; 79 | 80 | - (void)_handleNotifyingSubscribedConnectionsValueUpdate:(id)arg1 exceptConnection:(id)arg2; 81 | - (void)_handleValueWrite:(id)arg1; 82 | - (id)handleWriteRequest:(id)arg1; 83 | - (id)handleReadRequest:(id)arg1; 84 | 85 | - (BOOL)unsubscribeConnection:(id)arg1; 86 | - (BOOL)subscribeConnection:(id)arg1; 87 | - (id)_subscribedConnections; 88 | @property(readonly, nonatomic) NSArray *subscribedConnections; 89 | @property(readonly, nonatomic, getter=isNotifying) BOOL notifying; 90 | 91 | - (id)initWithType:(id)arg1 properties:(unsigned long long)arg2 format:(unsigned long long)arg3; 92 | - (id)initWithType:(id)arg1; 93 | 94 | - (id)responseJSONObjectWithReadRequest:(id)arg1 status:(long long *)arg2; 95 | - (id)responseJSONObjectWithMetadata:(BOOL)arg1 properties:(BOOL)arg2 type:(BOOL)arg3 events:(BOOL)arg4 cachedValue:(BOOL)arg5; 96 | - (id)propertiesJSONObject; 97 | - (id)JSONObject; 98 | 99 | - (id)transformJSONValue:(id)arg1; 100 | - (id)JSONTransformValue:(id)arg1; 101 | - (id)JSONValue; 102 | 103 | - (id)cbDecodeValue:(id)arg1; 104 | - (id)cbEncodeValue:(id)arg1; 105 | - (id)cbMutableCharacteristic; 106 | - (id)cbUserDescriptor; 107 | 108 | @end 109 | 110 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristicMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKUUID, HAKValueConstraints, NSString; 10 | 11 | @interface HAKCharacteristicMetadata : NSObject 12 | { 13 | HAKUUID *_type; 14 | NSString *_name; 15 | unsigned long long _properties; 16 | unsigned long long _permissions; 17 | unsigned long long _format; 18 | unsigned long long _unit; 19 | HAKValueConstraints *_constraints; 20 | } 21 | 22 | @property(readonly, nonatomic) HAKValueConstraints *constraints; // @synthesize constraints=_constraints; 23 | @property(readonly, nonatomic) unsigned long long unit; // @synthesize unit=_unit; 24 | @property(readonly, nonatomic) unsigned long long format; // @synthesize format=_format; 25 | @property(readonly, nonatomic) unsigned long long permissions; // @synthesize permissions=_permissions; 26 | @property(readonly, nonatomic) unsigned long long properties; // @synthesize properties=_properties; 27 | @property(readonly, nonatomic) NSString *name; // @synthesize name=_name; 28 | @property(readonly, nonatomic) HAKUUID *type; // @synthesize type=_type; 29 | 30 | 31 | - (BOOL)_setUnitWithString:(id)arg1; 32 | - (BOOL)_setFormatWithString:(id)arg1; 33 | - (id)initWithAttributes:(id)arg1 error:(id *)arg2; 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristicReadRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKCharacteristicRequest.h" 8 | 9 | @interface HAKCharacteristicReadRequest : HAKCharacteristicRequest 10 | { 11 | } 12 | 13 | @end 14 | 15 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristicReadResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKCharacteristicResponse.h" 8 | 9 | @interface HAKCharacteristicReadResponse : HAKCharacteristicResponse 10 | { 11 | long long _status; 12 | id _value; 13 | } 14 | 15 | + (id)responseWithRequest:(id)arg1 status:(long long)arg2 value:(id)arg3; 16 | @property(readonly, copy, nonatomic) id value; // @synthesize value=_value; 17 | @property(readonly, nonatomic) long long status; // @synthesize status=_status; 18 | 19 | - (BOOL)isEqual:(id)arg1; 20 | - (unsigned long long)hash; 21 | - (id)initWithRequest:(id)arg1 status:(long long)arg2 value:(id)arg3; 22 | - (id)initWithRequest:(id)arg1; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristicRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKCharacteristic, HAKConnection; 10 | 11 | @interface HAKCharacteristicRequest : NSObject 12 | { 13 | HAKConnection *_connection; 14 | HAKCharacteristic *_characteristic; 15 | } 16 | 17 | @property(readonly, nonatomic) HAKCharacteristic *characteristic; // @synthesize characteristic=_characteristic; 18 | @property(readonly, nonatomic) HAKConnection *connection; // @synthesize connection=_connection; 19 | 20 | - (BOOL)isEqual:(id)arg1; 21 | - (unsigned long long)hash; 22 | - (id)initWithConnection:(id)arg1 characteristic:(id)arg2; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristicResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKCharacteristicRequest; 10 | 11 | @interface HAKCharacteristicResponse : NSObject 12 | { 13 | BOOL _success; 14 | HAKCharacteristicRequest *_request; 15 | } 16 | 17 | @property(nonatomic) BOOL success; // @synthesize success=_success; 18 | @property(readonly, nonatomic) HAKCharacteristicRequest *request; // @synthesize request=_request; 19 | 20 | - (BOOL)isEqual:(id)arg1; 21 | - (unsigned long long)hash; 22 | - (id)initWithRequest:(id)arg1; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristicWriteRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKCharacteristicRequest.h" 8 | 9 | @class NSData; 10 | 11 | @interface HAKCharacteristicWriteRequest : HAKCharacteristicRequest 12 | { 13 | BOOL _remote; 14 | NSData *_authorizationData; 15 | id _value; 16 | } 17 | 18 | @property(readonly, copy, nonatomic) id value; // @synthesize value=_value; 19 | @property(readonly, nonatomic, getter=isRemote) BOOL remote; // @synthesize remote=_remote; 20 | @property(readonly, nonatomic) NSData *authorizationData; // @synthesize authorizationData=_authorizationData; 21 | 22 | - (BOOL)isEqual:(id)arg1; 23 | - (unsigned long long)hash; 24 | - (id)initWithConnection:(id)arg1 characteristic:(id)arg2 authorizationData:(id)arg3 remote:(BOOL)arg4 value:(id)arg5; 25 | - (id)initWithConnection:(id)arg1 characteristic:(id)arg2; 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCharacteristicWriteResponse.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKCharacteristicResponse.h" 8 | 9 | @interface HAKCharacteristicWriteResponse : HAKCharacteristicResponse 10 | { 11 | long long _status; 12 | } 13 | 14 | + (id)responseWithRequest:(id)arg1 status:(long long)arg2; 15 | @property(readonly, nonatomic) long long status; // @synthesize status=_status; 16 | - (BOOL)isEqual:(id)arg1; 17 | - (unsigned long long)hash; 18 | - (id)initWithRequest:(id)arg1 status:(long long)arg2; 19 | - (id)initWithRequest:(id)arg1; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKConnection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKPairing, HAKSecuritySession, HAKTransport, NSString; 10 | 11 | @interface HAKConnection : NSObject 12 | { 13 | BOOL _open; 14 | id _delegate; 15 | HAKTransport *_transport; 16 | HAKPairing *_pairing; 17 | HAKSecuritySession *_securitySession; 18 | } 19 | 20 | @property(retain, nonatomic) HAKSecuritySession *securitySession; // @synthesize securitySession=_securitySession; 21 | @property(nonatomic, getter=isOpen) BOOL open; // @synthesize open=_open; 22 | @property(nonatomic) __weak HAKPairing *pairing; // @synthesize pairing=_pairing; 23 | @property(readonly, nonatomic) __weak HAKTransport *transport; // @synthesize transport=_transport; 24 | @property __weak id delegate; // @synthesize delegate=_delegate; 25 | 26 | - (BOOL)encryptWithIdentifier:(id)arg1 sharedSecret:(id)arg2; 27 | - (BOOL)close; 28 | @property(readonly, nonatomic, getter=isEncrypted) BOOL encrypted; 29 | @property(readonly, nonatomic) NSString *identifier; 30 | 31 | - (id)initWithTransport:(id)arg1; 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKConnectionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "NSObject-Protocol.h" 8 | 9 | @protocol HAKConnectionDelegate 10 | 11 | @optional 12 | - (void)connectionDidEncrypt:(id)arg1; 13 | - (void)connectionDidClose:(id)arg1; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKConstraintsFactory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface HAKConstraintsFactory : NSObject 10 | { 11 | } 12 | 13 | + (id)constraintsForAttributes:(id)arg1; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKControllerKeychainObject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKAccessoryKeychainObject, HAKKeychainKey, NSString; 10 | 11 | @interface HAKControllerKeychainObject : NSObject 12 | { 13 | BOOL _admin; 14 | NSString *_identifier; 15 | HAKKeychainKey *_key; 16 | HAKAccessoryKeychainObject *_accessoryKeychainObject; 17 | } 18 | 19 | @property(nonatomic) __weak HAKAccessoryKeychainObject *accessoryKeychainObject; // @synthesize accessoryKeychainObject=_accessoryKeychainObject; 20 | @property(retain, nonatomic) HAKKeychainKey *key; // @synthesize key=_key; 21 | @property(readonly, nonatomic, getter=isAdmin) BOOL admin; // @synthesize admin=_admin; 22 | @property(copy, nonatomic) NSString *identifier; // @synthesize identifier=_identifier; 23 | 24 | - (id)initWithIdentifier:(id)arg1 publicKey:(id)arg2 admin:(BOOL)arg3; 25 | - (id)initWithKey:(id)arg1; 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKCurve25519.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface HAKCurve25519 : NSObject 10 | { 11 | } 12 | 13 | + (id)sharedKeyWithSecretKey:(id)arg1 publicKey:(id)arg2; 14 | + (id)publicKeyWithSecretKey:(id)arg1; 15 | + (id)secretKey; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKEnumerationConstraints.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKValueConstraints.h" 8 | 9 | @class NSDictionary; 10 | 11 | @interface HAKEnumerationConstraints : HAKValueConstraints 12 | { 13 | NSDictionary *_validValues; 14 | } 15 | 16 | @property(readonly, copy, nonatomic) NSDictionary *validValues; // @synthesize validValues=_validValues; 17 | 18 | - (BOOL)validateValue:(id)arg1; 19 | - (id)initWithValidValues:(id)arg1; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKHKDF.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData; 10 | 11 | @interface HAKHKDF : NSObject 12 | { 13 | unsigned long long _type; 14 | NSData *_pseudoRandomKey; 15 | } 16 | 17 | + (id)hashWithType:(unsigned long long)arg1 key:(id)arg2 salt:(id)arg3 info:(id)arg4 length:(unsigned long long)arg5; 18 | @property(retain, nonatomic) NSData *pseudoRandomKey; // @synthesize pseudoRandomKey=_pseudoRandomKey; 19 | 20 | - (id)expandWithInfo:(id)arg1 length:(unsigned long long)arg2; 21 | - (void)extractWithSalt:(id)arg1 inputKey:(id)arg2; 22 | - (unsigned int)hmacAlgorithm; 23 | - (unsigned long long)digestLength; 24 | - (id)initWithHKDFType:(unsigned long long)arg1; 25 | 26 | 27 | @end 28 | 29 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKHTTPMessage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData, NSDate, NSDictionary, NSString; 10 | 11 | @interface HAKHTTPMessage : NSObject 12 | { 13 | struct __CFHTTPMessage *_message; 14 | BOOL _encrypted; 15 | } 16 | 17 | + (id)dateFormatter; 18 | @property(nonatomic, getter=isEncrypted) BOOL encrypted; // @synthesize encrypted=_encrypted; 19 | @property(readonly, nonatomic) NSDate *date; 20 | @property(readonly, nonatomic) NSString *contentType; 21 | @property(readonly, nonatomic) unsigned long long contentLength; 22 | - (id)serialize; 23 | @property(readonly, nonatomic) NSString *version; 24 | @property(readonly, nonatomic) NSData *body; 25 | - (id)fieldValueForFieldName:(id)arg1; 26 | @property(readonly, nonatomic) NSDictionary *allHeaderFields; 27 | - (void)appendData:(id)arg1; 28 | @property(readonly, nonatomic) BOOL isHeaderComplete; 29 | 30 | @property(readonly, nonatomic) NSData *tlv8Data; 31 | @property(readonly, nonatomic) id JSONObject; 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKHTTPRequestMessage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKHTTPMessage.h" 8 | 9 | @class HAKIPConnection, NSString, NSURL; 10 | 11 | @interface HAKHTTPRequestMessage : HAKHTTPMessage 12 | { 13 | HAKIPConnection *_connection; 14 | } 15 | 16 | @property(readonly, nonatomic) HAKIPConnection *connection; // @synthesize connection=_connection; 17 | 18 | @property(readonly, nonatomic) BOOL isComplete; 19 | @property(readonly, nonatomic) BOOL isBodyComplete; 20 | @property(readonly, nonatomic) unsigned long long bodyLength; 21 | @property(readonly, nonatomic) NSURL *url; 22 | @property(readonly, nonatomic) NSString *method; 23 | 24 | - (id)initWithConnection:(id)arg1; 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKHTTPResponseMessage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKHTTPMessage.h" 8 | 9 | @class NSData, NSDate, NSString; 10 | 11 | @interface HAKHTTPResponseMessage : HAKHTTPMessage 12 | { 13 | NSString *_statusDescription; 14 | } 15 | 16 | @property(readonly, nonatomic) NSString *statusDescription; // @synthesize statusDescription=_statusDescription; 17 | 18 | - (void)setDateToNow; 19 | @property(retain, nonatomic) NSDate *date; 20 | @property(retain, nonatomic) NSString *contentType; 21 | @property(nonatomic) unsigned long long contentLength; 22 | - (void)setValue:(id)arg1 forHeaderField:(id)arg2; 23 | @property(retain, nonatomic) NSData *body; 24 | @property(readonly, nonatomic) unsigned long long statusCode; 25 | 26 | - (id)initWithRequest:(id)arg1 statusCode:(unsigned long long)arg2 statusDescription:(id)arg3 httpVersion:(id)arg4; 27 | - (id)initWithRequest:(id)arg1 statusCode:(unsigned long long)arg2; 28 | 29 | @property(retain, nonatomic) id JSONObject; 30 | @property(retain, nonatomic) NSData *tlv8Data; 31 | 32 | @end 33 | 34 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKIPCharacteristicReadRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKCharacteristicReadRequest.h" 8 | 9 | @interface HAKIPCharacteristicReadRequest : HAKCharacteristicReadRequest 10 | { 11 | BOOL _metadata; 12 | BOOL _permissions; 13 | BOOL _format; 14 | BOOL _notify; 15 | } 16 | 17 | @property(readonly, nonatomic) BOOL notify; // @synthesize notify=_notify; 18 | @property(readonly, nonatomic) BOOL format; // @synthesize format=_format; 19 | @property(readonly, nonatomic) BOOL permissions; // @synthesize permissions=_permissions; 20 | @property(readonly, nonatomic) BOOL metadata; // @synthesize metadata=_metadata; 21 | - (BOOL)isEqual:(id)arg1; 22 | - (unsigned long long)hash; 23 | - (id)initWithConnection:(id)arg1 characteristic:(id)arg2 metadata:(BOOL)arg3 permissions:(BOOL)arg4 format:(BOOL)arg5 notify:(BOOL)arg6; 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKIPConnection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKConnection.h" 8 | 9 | #import "NSStreamDelegate-Protocol.h" 10 | 11 | @class HAKHTTPRequestMessage, HAKSecuritySessionPacket, NSHost, NSInputStream, NSOutputStream, NSString; 12 | 13 | @interface HAKIPConnection : HAKConnection 14 | { 15 | NSInputStream *_inputStream; 16 | NSOutputStream *_outputStream; 17 | NSHost *_host; 18 | dispatch_queue_t _workQueue; 19 | HAKSecuritySessionPacket *_currentPacket; 20 | HAKHTTPRequestMessage *_currentRequest; 21 | } 22 | 23 | @property(retain, nonatomic) HAKHTTPRequestMessage *currentRequest; // @synthesize currentRequest=_currentRequest; 24 | @property(retain, nonatomic) HAKSecuritySessionPacket *currentPacket; // @synthesize currentPacket=_currentPacket; 25 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 26 | @property(readonly, nonatomic) NSHost *host; // @synthesize host=_host; 27 | 28 | - (void)stream:(id)arg1 handleEvent:(unsigned long long)arg2; 29 | - (void)_handleIncomingData:(id)arg1; 30 | - (void)_handleHTTPRequestData:(id)arg1 encrypted:(BOOL)arg2; 31 | - (void)sendResponseMessage:(id)arg1; 32 | - (void)_sendResponseData:(id)arg1 encrypt:(BOOL)arg2; 33 | - (BOOL)close; 34 | - (BOOL)open; 35 | - (BOOL)encryptWithIdentifier:(id)arg1 sharedSecret:(id)arg2; 36 | - (id)initWithTransport:(id)arg1 host:(id)arg2 inputStream:(id)arg3 outputStream:(id)arg4; 37 | 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKIPConnectionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKConnectionDelegate-Protocol.h" 8 | 9 | @protocol HAKIPConnectionDelegate 10 | - (void)connection:(id)arg1 didReceiveRequest:(id)arg2; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKIPSecuritySession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKSecuritySession.h" 8 | 9 | @interface HAKIPSecuritySession : HAKSecuritySession 10 | { 11 | } 12 | 13 | - (id)decryptPacket:(id)arg1; 14 | - (id)encryptData:(id)arg1; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKIPTransport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKTransport.h" 8 | 9 | #import "HAKIPConnectionDelegate-Protocol.h" 10 | #import "HAKSocketDelegate-Protocol.h" 11 | #import "NSNetServiceDelegate-Protocol.h" 12 | 13 | @class HAKNetService, HAKSocket, NSString, NSThread; 14 | 15 | @interface HAKIPTransport : HAKTransport 16 | { 17 | BOOL _dirty; 18 | BOOL _serverThreadShouldRun; 19 | HAKSocket *_socket; 20 | HAKNetService *_netService; 21 | NSThread *_serverThread; 22 | } 23 | 24 | + (unsigned long long)httpResponseCodeWithReadResponseStatus:(long long)arg1; 25 | + (unsigned long long)httpResponseCodeWithWriteResponseStatus:(long long)arg1; 26 | + (long long)ipErrorCodeWithReadResponseStatus:(long long)arg1; 27 | + (long long)ipErrorCodeWithWriteResponseStatus:(long long)arg1; 28 | + (unsigned long long)maxSupportedAccessories; 29 | @property BOOL serverThreadShouldRun; // @synthesize serverThreadShouldRun=_serverThreadShouldRun; 30 | @property(getter=isDirty) BOOL dirty; // @synthesize dirty=_dirty; 31 | @property(retain, nonatomic) NSThread *serverThread; // @synthesize serverThread=_serverThread; 32 | @property(retain, nonatomic) HAKNetService *netService; // @synthesize netService=_netService; 33 | @property(retain, nonatomic) HAKSocket *socket; // @synthesize socket=_socket; 34 | 35 | - (void)serverThreadMain; 36 | - (void)removeSources; 37 | - (id)_characteristicWriteWithConnection:(id)arg1 request:(id)arg2 characteristicWriteRequests:(id)arg3 attributes:(id)arg4 error:(char *)arg5; 38 | - (void)_handleCharacteristicWriteWithConnection:(id)arg1 request:(id)arg2; 39 | - (void)_handleCharacteristicReadRequest:(id)arg1; 40 | - (void)_handleAllAccessoriesRequestWithConnection:(id)arg1 request:(id)arg2; 41 | - (void)_postRequestWithConnection:(id)arg1 request:(id)arg2; 42 | - (void)_putRequestWithConnection:(id)arg1 request:(id)arg2; 43 | - (void)_getRequestWithConnection:(id)arg1 request:(id)arg2; 44 | - (void)identifyWithConnection:(id)arg1 request:(id)arg2; 45 | @property(readonly, nonatomic) unsigned long long port; 46 | - (BOOL)updateValue:(id)arg1 forCharacteristic:(id)arg2 onSubscribedConnections:(id)arg3; 47 | - (void)stop; 48 | - (void)start; 49 | - (void)setPaired:(BOOL)arg1; 50 | - (void)setStateNumber:(id)arg1; 51 | - (void)setConfigurationNumber:(id)arg1; 52 | - (void)setIdentifier:(id)arg1; 53 | - (unsigned long long)type; 54 | - (void)netServiceDidStop:(id)arg1; 55 | - (void)netService:(id)arg1 didNotPublish:(id)arg2; 56 | - (void)netServiceDidPublish:(id)arg1; 57 | - (void)newConnectionWithHost:(id)arg1 inputStream:(id)arg2 outputStream:(id)arg3; 58 | - (void)connection:(id)arg1 didReceiveRequest:(id)arg2; 59 | 60 | @end 61 | 62 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKIdentifier.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData; 10 | 11 | @interface HAKIdentifier : NSObject 12 | { 13 | NSData *_data; 14 | } 15 | 16 | + (id)identifier; 17 | @property(retain, nonatomic) NSData *data; // @synthesize data=_data; 18 | 19 | - (id)identifierString; 20 | - (BOOL)isEqual:(id)arg1; 21 | - (unsigned long long)hash; 22 | 23 | 24 | 25 | 26 | - (id)initWithBytes:(unsigned char [6])arg1; 27 | - (id)initWithIdentifierString:(id)arg1; 28 | 29 | 30 | @end 31 | 32 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKIdentifyCharacteristic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKCharacteristic.h" 8 | 9 | @interface HAKIdentifyCharacteristic : HAKCharacteristic 10 | { 11 | double _routineDuration; 12 | NSObject *_routineDurationTimer; 13 | } 14 | 15 | @property(retain, nonatomic) NSObject *routineDurationTimer; // @synthesize routineDurationTimer=_routineDurationTimer; 16 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 17 | @property(nonatomic) double routineDuration; // @synthesize routineDuration=_routineDuration; 18 | 19 | - (id)handleWriteRequest:(id)arg1; 20 | - (id)initWithType:(id)arg1 properties:(unsigned long long)arg2 format:(unsigned long long)arg3; 21 | 22 | @end 23 | 24 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKInstanceIDPool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | #import "NSCopying-Protocol.h" 10 | 11 | @interface HAKInstanceIDPool : NSObject 12 | { 13 | unsigned long long _currentInstanceID; 14 | } 15 | 16 | + (id)instanceIDPoolWithInstanceID:(unsigned long long)arg1; 17 | + (id)instanceIDPool; 18 | @property(readonly, nonatomic) unsigned long long currentInstanceID; // @synthesize currentInstanceID=_currentInstanceID; 19 | 20 | - (id)instanceID; 21 | - (id)initWithInstanceID:(unsigned long long)arg1; 22 | 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKKeychainKey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData, NSString; 10 | 11 | @interface HAKKeychainKey : NSObject 12 | { 13 | void *_secItemRef; 14 | NSString *_label; 15 | NSString *_userDescription; 16 | unsigned long long _keyClass; 17 | NSString *_service; 18 | NSString *_account; 19 | NSData *_privateKey; 20 | NSData *_publicKey; 21 | id _userInfo; 22 | } 23 | 24 | + (id)typeFromKeyClass:(unsigned long long)arg1; 25 | + (unsigned long long)keyClassFromType:(id)arg1; 26 | @property(copy, nonatomic) id userInfo; // @synthesize userInfo=_userInfo; 27 | @property(readonly, copy, nonatomic) NSData *publicKey; // @synthesize publicKey=_publicKey; 28 | @property(readonly, copy, nonatomic) NSData *privateKey; // @synthesize privateKey=_privateKey; 29 | @property(copy, nonatomic) NSString *account; // @synthesize account=_account; 30 | @property(copy, nonatomic) NSString *service; // @synthesize service=_service; 31 | @property(readonly, nonatomic) unsigned long long keyClass; // @synthesize keyClass=_keyClass; 32 | @property(copy, nonatomic) NSString *userDescription; // @synthesize userDescription=_userDescription; 33 | @property(copy, nonatomic) NSString *label; // @synthesize label=_label; 34 | @property(nonatomic) void *secItemRef; // @synthesize secItemRef=_secItemRef; 35 | 36 | - (id)attributes; 37 | - (BOOL)isEqual:(id)arg1; 38 | - (unsigned long long)hash; 39 | - (id)initWithPublicKey:(id)arg1 privateKey:(id)arg2; 40 | - (id)initWithPrivateKey:(id)arg1; 41 | - (id)initWithPublicKey:(id)arg1; 42 | - (id)initWithQuery:(id)arg1; 43 | 44 | @end 45 | 46 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKKeychainService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSString; 10 | 11 | @interface HAKKeychainService : NSObject 12 | { 13 | struct OpaqueSecKeychainRef *_keychain; 14 | BOOL _authenticationDisabled; 15 | dispatch_queue_t _workQueue; 16 | } 17 | 18 | + (id)keychainURL; 19 | + (id)defaultKeychainService; 20 | @property(nonatomic, getter=isAuthenticationDisabled) BOOL authenticationDisabled; // @synthesize authenticationDisabled=_authenticationDisabled; 21 | @property(retain) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 22 | 23 | - (void)_executePrivledgedKeychainBlock:(id)arg1; 24 | - (void)_executeKeychainBlock:(id)arg1; 25 | - (int)_unlockWithPassword:(id)arg1; 26 | - (BOOL)unlock; 27 | - (int)_isUnlocked:(char *)arg1; 28 | - (BOOL)isUnlocked; 29 | - (BOOL)_createKeychain; 30 | @property(readonly) struct OpaqueSecKeychainRef *keychain; 31 | - (BOOL)_keychainExists; 32 | @property(retain, nonatomic) NSString *password; 33 | - (int)_getPassword:(id *)arg1; 34 | - (int)_key:(id *)arg1 keyClass:(unsigned long long)arg2 account:(id)arg3 service:(id)arg4; 35 | - (id)keyWithKeyClass:(unsigned long long)arg1 account:(id)arg2 service:(id)arg3; 36 | - (int)_key:(id *)arg1 withKeyRef:(void *)arg2; 37 | - (int)_keys:(id *)arg1 keyClass:(unsigned long long)arg2 account:(id)arg3 service:(id)arg4; 38 | - (id)keysWithKeyClass:(unsigned long long)arg1 account:(id)arg2 service:(id)arg3; 39 | - (int)_removeKey:(id)arg1; 40 | - (BOOL)removeKey:(id)arg1 error:(id *)arg2; 41 | - (int)_addKey:(id)arg1; 42 | - (BOOL)addKey:(id)arg1 error:(id *)arg2; 43 | 44 | 45 | @end 46 | 47 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKListPairingsSession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSession.h" 8 | 9 | @class HAKTLV8Container; 10 | 11 | @interface HAKListPairingsSession : HAKPairingSession 12 | { 13 | unsigned char _state; 14 | id _delegate; 15 | id _dataSource; 16 | HAKTLV8Container *_stateData; 17 | } 18 | 19 | @property(retain, nonatomic) HAKTLV8Container *stateData; // @synthesize stateData=_stateData; 20 | @property(nonatomic) unsigned char state; // @synthesize state=_state; 21 | @property __weak id dataSource; // @synthesize dataSource=_dataSource; 22 | @property __weak id delegate; // @synthesize delegate=_delegate; 23 | 24 | - (id)handlePairingSessionReadRequest; 25 | - (long long)handlePairingSessionWriteRequest:(id)arg1; 26 | - (void)_lockSession; 27 | - (id)_tlv8ResponseWithError:(unsigned char)arg1; 28 | 29 | 30 | @end 31 | 32 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKListPairingsSessionDataSource-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "NSObject-Protocol.h" 8 | 9 | @protocol HAKListPairingsSessionDataSource 10 | - (id)pairingsForListPairingsSession:(id)arg1; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKListPairingsSessionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSessionDelegate-Protocol.h" 8 | 9 | @protocol HAKListPairingsSessionDelegate 10 | - (BOOL)controllerIsAdminForListPairingsSession:(id)arg1; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSMutableSet, NSObject; 10 | 11 | @interface HAKLogger : NSObject 12 | { 13 | BOOL _loggingDisabled; 14 | BOOL _allowInternalLogging; 15 | unsigned long long _logLevel; 16 | dispatch_queue_t_loggerQueue; 17 | struct __asl_object_s *_aslClient; 18 | NSMutableSet *_loggerFileHandles; 19 | } 20 | 21 | + (void)_pruneOldLogs; 22 | + (id)logDirectory; 23 | + (id)defaultLogger; 24 | + (void)initialize; 25 | @property(retain, nonatomic) NSMutableSet *loggerFileHandles; // @synthesize loggerFileHandles=_loggerFileHandles; 26 | @property(setter=setASLClient:) struct __asl_object_s *aslClient; // @synthesize aslClient=_aslClient; 27 | @property(retain) dispatch_queue_tloggerQueue; // @synthesize loggerQueue=_loggerQueue; 28 | @property(nonatomic) BOOL allowInternalLogging; // @synthesize allowInternalLogging=_allowInternalLogging; 29 | @property(nonatomic, getter=isLoggingDisabled) BOOL loggingDisabled; // @synthesize loggingDisabled=_loggingDisabled; 30 | @property(nonatomic) unsigned long long logLevel; // @synthesize logLevel=_logLevel; 31 | 32 | - (void)logMessage:(id)arg1 level:(unsigned long long)arg2; 33 | - (void)logWithLevel:(unsigned long long)arg1 message:(id)arg2; 34 | - (BOOL)addLogFile:(id)arg1 error:(id *)arg2; 35 | - (void)addDefaultFileLogger; 36 | 37 | 38 | @end 39 | 40 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSArray; 10 | 11 | @interface HAKMetadata : NSObject 12 | { 13 | NSArray *_characteristics; 14 | NSArray *_services; 15 | } 16 | 17 | + (BOOL)isValidMetadataWithURL:(id)arg1 error:(id *)arg2; 18 | + (id)defaultMetadata; 19 | @property(readonly, nonatomic) NSArray *services; // @synthesize services=_services; 20 | @property(readonly, nonatomic) NSArray *characteristics; // @synthesize characteristics=_characteristics; 21 | 22 | - (id)serviceMetadataWithType:(id)arg1; 23 | - (id)characteristicMetadataWithType:(id)arg1; 24 | - (BOOL)_parseServicesWithServiceMetadata:(id)arg1 error:(id *)arg2; 25 | - (BOOL)_parseCharacteristicsWithCharacteristicMetdata:(id)arg1 error:(id *)arg2; 26 | - (BOOL)_parseMetadata:(id)arg1 error:(id *)arg2; 27 | - (id)initWithURL:(id)arg1 error:(id *)arg2; 28 | 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKMetadataService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKMetadata, NSObject; 10 | 11 | @interface HAKMetadataService : NSObject 12 | { 13 | HAKMetadata *_metadata; 14 | dispatch_queue_t _workQueue; 15 | } 16 | 17 | + (id)defaultMetadataService; 18 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 19 | 20 | @property(retain, nonatomic) HAKMetadata *metadata; 21 | 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKNetService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "NSNetService.h" 8 | 9 | @class NSString; 10 | 11 | @interface HAKNetService : NSNetService 12 | { 13 | dispatch_queue_t_txtRecordQueue; 14 | } 15 | 16 | + (id)defaultTXTRecord; 17 | + (id)generateUniqueMACAddress; 18 | @property(retain, nonatomic) dispatch_queue_ttxtRecordQueue; // @synthesize txtRecordQueue=_txtRecordQueue; 19 | 20 | @property(nonatomic) unsigned char statusOptions; 21 | - (void)incrementStateNumber; 22 | @property(nonatomic) unsigned short stateNumber; 23 | @property(nonatomic) unsigned long long protocolVersion; 24 | @property(copy, nonatomic) NSString *modelName; 25 | @property(copy, nonatomic) NSString *identifier; 26 | @property(nonatomic) unsigned char featureOptions; 27 | - (void)incrementConfigurationNumber; 28 | @property(nonatomic) unsigned short configurationNumber; 29 | - (id)txtRecordValueForKey:(id)arg1; 30 | - (void)setTXTRecordValue:(id)arg1 forKey:(id)arg2; 31 | - (BOOL)_setTXTRecord:(id)arg1; 32 | - (void)setTXTRecord:(id)arg1; 33 | - (id)txtRecord; 34 | - (void)publishWithOptions:(unsigned long long)arg1; 35 | - (id)initWithName:(id)arg1 port:(unsigned long long)arg2; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKNumberConstraints.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKValueConstraints.h" 8 | 9 | @class NSNumber; 10 | 11 | @interface HAKNumberConstraints : HAKValueConstraints 12 | { 13 | NSNumber *_minimumValue; 14 | NSNumber *_maximumValue; 15 | NSNumber *_stepValue; 16 | } 17 | 18 | @property(copy, nonatomic) NSNumber *stepValue; // @synthesize stepValue=_stepValue; 19 | @property(readonly, copy, nonatomic) NSNumber *maximumValue; // @synthesize maximumValue=_maximumValue; 20 | @property(readonly, copy, nonatomic) NSNumber *minimumValue; // @synthesize minimumValue=_minimumValue; 21 | 22 | - (BOOL)validateValue:(id)arg1; 23 | 24 | - (id)initWithMinimumValue:(id)arg1 maximumValue:(id)arg2; 25 | 26 | - (id)attributes; 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairSetupCharacteristic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingCharacteristic.h" 8 | 9 | #import "HAKPairSetupSessionDelegate-Protocol.h" 10 | 11 | @class HAKConnection, HAKPairSetupSession, NSString; 12 | 13 | @interface HAKPairSetupCharacteristic : HAKPairingCharacteristic 14 | { 15 | HAKConnection *_currentConnection; 16 | HAKPairSetupSession *_pairSetupSession; 17 | dispatch_queue_t_pairSetupQueue; 18 | } 19 | 20 | + (id)pairSetupCharacteristic; 21 | @property(retain, nonatomic) dispatch_queue_tpairSetupQueue; // @synthesize pairSetupQueue=_pairSetupQueue; 22 | @property(retain, nonatomic) HAKPairSetupSession *pairSetupSession; // @synthesize pairSetupSession=_pairSetupSession; 23 | @property(nonatomic) __weak HAKConnection *currentConnection; // @synthesize currentConnection=_currentConnection; 24 | 25 | - (void)pairSetupSession:(id)arg1 didAddPairing:(id)arg2; 26 | - (id)handleReadRequest:(id)arg1; 27 | - (id)handleWriteRequest:(id)arg1; 28 | - (id)passwordForPairSetupSession:(id)arg1; 29 | - (id)identifierForPairingSession:(id)arg1; 30 | - (id)initWithType:(id)arg1 properties:(unsigned long long)arg2 format:(unsigned long long)arg3; 31 | 32 | 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairSetupSession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSession.h" 8 | 9 | @class HAKTLV8Container, NSData, NSString; 10 | 11 | @interface HAKPairSetupSession : HAKPairingSession 12 | { 13 | struct srp_st *_session; 14 | NSData *_salt; 15 | NSData *_publicKey; 16 | NSData *_secretKey; 17 | unsigned char _state; 18 | NSData *_sessionKey; 19 | HAKTLV8Container *_stateData; 20 | NSString *_username; 21 | NSString *_password; 22 | unsigned long long _failedAttempts; 23 | id _delegate; 24 | } 25 | 26 | @property __weak id delegate; // @synthesize delegate=_delegate; 27 | @property(readonly, nonatomic) unsigned long long failedAttempts; // @synthesize failedAttempts=_failedAttempts; 28 | @property(readonly, nonatomic) HAKTLV8Container *stateData; // @synthesize stateData=_stateData; 29 | @property(readonly, nonatomic) NSData *sessionKey; // @synthesize sessionKey=_sessionKey; 30 | @property(retain, nonatomic) NSString *password; // @synthesize password=_password; 31 | @property(retain, nonatomic) NSString *username; // @synthesize username=_username; 32 | @property(readonly, nonatomic) struct srp_st *session; // @synthesize session=_session; 33 | @property(readonly, nonatomic) unsigned char state; // @synthesize state=_state; 34 | @property(readonly, nonatomic) NSData *secretKey; // @synthesize secretKey=_secretKey; 35 | 36 | - (id)handlePairingSessionReadRequest; 37 | - (long long)handlePairingSessionWriteRequest:(id)arg1; 38 | - (id)_tlv8ResponseWithError:(unsigned char)arg1; 39 | - (void)_lock; 40 | - (void)_resetState; 41 | - (void)reset; 42 | - (BOOL)isComplete; 43 | - (BOOL)isLocked; 44 | - (id)proofResponseWithClientProof:(id)arg1; 45 | - (id)generateSecretKeyWithPublicKey:(id)arg1; 46 | @property(readonly, nonatomic) NSData *publicKey; // @synthesize publicKey=_publicKey; 47 | @property(readonly, nonatomic) NSData *salt; // @synthesize salt=_salt; 48 | 49 | 50 | @end 51 | 52 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairSetupSessionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSessionDelegate-Protocol.h" 8 | 9 | @protocol HAKPairSetupSessionDelegate 10 | 11 | @optional 12 | - (void)pairSetupSession:(id)arg1 didAddPairing:(id)arg2; 13 | - (id)passwordForPairSetupSession:(id)arg1; 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairVerifyCharacteristic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingCharacteristic.h" 8 | 9 | #import "HAKPairVerifySessionDelegate-Protocol.h" 10 | 11 | @class NSString; 12 | 13 | @interface HAKPairVerifyCharacteristic : HAKPairingCharacteristic 14 | { 15 | } 16 | 17 | + (id)pairVerifyCharacteristic; 18 | - (id)handleReadRequest:(id)arg1; 19 | - (id)handleWriteRequest:(id)arg1; 20 | - (void)pairVerifySession:(id)arg1 verifiedPairingWithIdentifier:(id)arg2 sharedSecret:(id)arg3; 21 | - (id)initWithType:(id)arg1 properties:(unsigned long long)arg2 format:(unsigned long long)arg3; 22 | 23 | 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairVerifySession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSession.h" 8 | 9 | @class HAKAccessoryKeychainObject, HAKTLV8Container, NSData; 10 | 11 | @interface HAKPairVerifySession : HAKPairingSession 12 | { 13 | unsigned char _state; 14 | id _delegate; 15 | NSData *_publicKey; 16 | NSData *_sharedSecret; 17 | HAKAccessoryKeychainObject *_accessoryKeychain; 18 | NSData *_controllerPublicKey; 19 | NSData *_sessionKey; 20 | HAKTLV8Container *_stateData; 21 | } 22 | 23 | @property(retain, nonatomic) HAKTLV8Container *stateData; // @synthesize stateData=_stateData; 24 | @property(nonatomic) unsigned char state; // @synthesize state=_state; 25 | @property(retain, nonatomic) NSData *sessionKey; // @synthesize sessionKey=_sessionKey; 26 | @property(retain, nonatomic) NSData *controllerPublicKey; // @synthesize controllerPublicKey=_controllerPublicKey; 27 | @property(retain, nonatomic) HAKAccessoryKeychainObject *accessoryKeychain; // @synthesize accessoryKeychain=_accessoryKeychain; 28 | @property(retain, nonatomic) NSData *sharedSecret; // @synthesize sharedSecret=_sharedSecret; 29 | @property(retain, nonatomic) NSData *publicKey; // @synthesize publicKey=_publicKey; 30 | @property __weak id delegate; // @synthesize delegate=_delegate; 31 | 32 | - (id)handlePairingSessionReadRequest; 33 | - (long long)handlePairingSessionWriteRequest:(id)arg1; 34 | - (void)_resetState; 35 | - (id)_tlv8ResponseWithError:(unsigned char)arg1; 36 | 37 | 38 | @end 39 | 40 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairVerifySessionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSessionDelegate-Protocol.h" 8 | 9 | @protocol HAKPairVerifySessionDelegate 10 | - (void)pairVerifySession:(id)arg1 verifiedPairingWithIdentifier:(id)arg2 sharedSecret:(id)arg3; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairing.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKTransport, NSArray, NSHashTable, NSString; 10 | 11 | @interface HAKPairing : NSObject 12 | { 13 | NSHashTable *_connections; 14 | BOOL _admin; 15 | HAKTransport *_transport; 16 | NSString *_identifier; 17 | dispatch_queue_t _workQueue; 18 | } 19 | 20 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 21 | @property(readonly, nonatomic, getter=isAdmin) BOOL admin; // @synthesize admin=_admin; 22 | @property(copy, nonatomic) NSString *identifier; // @synthesize identifier=_identifier; 23 | @property(nonatomic) __weak HAKTransport *transport; // @synthesize transport=_transport; 24 | 25 | - (id)keychainObject; 26 | - (void)_addConnection:(id)arg1; 27 | - (void)addConnection:(id)arg1; 28 | @property(readonly, nonatomic) NSArray *connections; 29 | 30 | - (BOOL)isEqual:(id)arg1; 31 | - (unsigned long long)hash; 32 | - (id)initWithIdentifier:(id)arg1 admin:(BOOL)arg2; 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairingCharacteristic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKCharacteristic.h" 8 | 9 | #import "HAKPairingSessionDelegate-Protocol.h" 10 | 11 | @class NSMapTable, NSString; 12 | 13 | @interface HAKPairingCharacteristic : HAKCharacteristic 14 | { 15 | NSMapTable *_connections; 16 | dispatch_queue_t_connectionsQ; 17 | } 18 | 19 | + (long long)writeResponseStatusWithPairingSessionStatus:(long long)arg1; 20 | @property(retain, nonatomic) dispatch_queue_tconnectionsQ; // @synthesize connectionsQ=_connectionsQ; 21 | @property(retain, nonatomic) NSMapTable *connections; // @synthesize connections=_connections; 22 | 23 | - (id)handleWriteRequest:(id)arg1; 24 | - (id)handleReadRequest:(id)arg1; 25 | - (void)setValue:(id)arg1 forKey:(id)arg2; 26 | - (id)value; 27 | - (id)identifierForPairingSession:(id)arg1; 28 | - (void)removePairingSessionForConnection:(id)arg1; 29 | - (void)setPairingSession:(id)arg1 forConnection:(id)arg2; 30 | - (id)pairingSessionForConnection:(id)arg1; 31 | - (id)connectionForPairingSession:(id)arg1; 32 | - (id)initWithType:(id)arg1 properties:(unsigned long long)arg2 format:(unsigned long long)arg3; 33 | 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairingService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKService.h" 8 | 9 | @class HAKCharacteristic, HAKPairSetupCharacteristic, HAKPairVerifyCharacteristic; 10 | 11 | @interface HAKPairingService : HAKService 12 | { 13 | } 14 | 15 | + (id)pairingService; 16 | - (void)addIncludedService:(id)arg1; 17 | - (void)removeCharacteristic:(id)arg1; 18 | - (id)_restrictedCharacteristicSet; 19 | @property(readonly, nonatomic) HAKCharacteristic *pairingsCharacteristic; 20 | @property(readonly, nonatomic) HAKCharacteristic *pairingFeaturesCharacteristic; 21 | @property(readonly, nonatomic) HAKPairVerifyCharacteristic *pairVerifyCharacteristic; 22 | @property(readonly, nonatomic) HAKPairSetupCharacteristic *pairSetupCharacteristic; 23 | - (id)initWithType:(id)arg1 isPrimary:(BOOL)arg2 characteristics:(id)arg3 includedServices:(id)arg4; 24 | 25 | 26 | @end 27 | 28 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairingSession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface HAKPairingSession : NSObject 10 | { 11 | } 12 | 13 | - (id)handlePairingSessionReadRequest; 14 | - (long long)handlePairingSessionWriteRequest:(id)arg1; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairingSessionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "NSObject-Protocol.h" 8 | 9 | @protocol HAKPairingSessionDelegate 10 | - (id)identifierForPairingSession:(id)arg1; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPairingsCharacteristic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingCharacteristic.h" 8 | 9 | #import "HAKAddPairingSessionDelegate-Protocol.h" 10 | #import "HAKListPairingsSessionDataSource-Protocol.h" 11 | #import "HAKListPairingsSessionDelegate-Protocol.h" 12 | #import "HAKRemovePairingSessionDelegate-Protocol.h" 13 | 14 | @class NSString; 15 | 16 | @interface HAKPairingsCharacteristic : HAKPairingCharacteristic 17 | { 18 | } 19 | 20 | + (id)pairingsCharacteristic; 21 | - (id)pairingsForListPairingsSession:(id)arg1; 22 | - (BOOL)controllerIsAdminForListPairingsSession:(id)arg1; 23 | - (BOOL)removePairingSession:(id)arg1 removePairingForIdentifier:(id)arg2; 24 | - (BOOL)controllerIsAdminForRemovePairingSession:(id)arg1; 25 | - (void)addPairingSession:(id)arg1 didAddPairing:(id)arg2; 26 | - (BOOL)controllerIsAdminForAddPairingSession:(id)arg1; 27 | - (id)handleReadRequest:(id)arg1; 28 | - (id)handleWriteRequest:(id)arg1; 29 | - (id)initWithType:(id)arg1 properties:(unsigned long long)arg2 format:(unsigned long long)arg3; 30 | 31 | 32 | 33 | @end 34 | 35 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKPoly1305.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface HAKPoly1305 : NSObject 10 | { 11 | struct poly1305_context *_pContext; 12 | } 13 | 14 | + (BOOL)isKeyValid:(id)arg1; 15 | - (id)tag; 16 | - (void)updateWithData:(id)arg1; 17 | - (id)initWithKey:(id)arg1; 18 | 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKRemovePairingSession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSession.h" 8 | 9 | @class HAKTLV8Container; 10 | 11 | @interface HAKRemovePairingSession : HAKPairingSession 12 | { 13 | unsigned char _state; 14 | id _delegate; 15 | HAKTLV8Container *_stateData; 16 | } 17 | 18 | @property(retain, nonatomic) HAKTLV8Container *stateData; // @synthesize stateData=_stateData; 19 | @property(nonatomic) unsigned char state; // @synthesize state=_state; 20 | @property __weak id delegate; // @synthesize delegate=_delegate; 21 | 22 | - (id)handlePairingSessionReadRequest; 23 | - (long long)handlePairingSessionWriteRequest:(id)arg1; 24 | - (void)_lockSession; 25 | - (id)_tlv8ResponseWithError:(unsigned char)arg1; 26 | 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKRemovePairingSessionDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKPairingSessionDelegate-Protocol.h" 8 | 9 | @protocol HAKRemovePairingSessionDelegate 10 | - (BOOL)removePairingSession:(id)arg1 removePairingForIdentifier:(id)arg2; 11 | - (BOOL)controllerIsAdminForRemovePairingSession:(id)arg1; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKSecuritySession.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData; 10 | 11 | @interface HAKSecuritySession : NSObject 12 | { 13 | NSData *_accessoryToControllerKey; 14 | unsigned long long _accessoryToControllerCount; 15 | NSData *_controllerToAccessoryKey; 16 | unsigned long long _controllerToAccessoryCount; 17 | } 18 | 19 | 20 | - (id)encryptData:(id)arg1; 21 | - (id)initWithSharedSecret:(id)arg1; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKSecuritySessionPacket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData, NSMutableData; 10 | 11 | @interface HAKSecuritySessionPacket : NSObject 12 | { 13 | NSMutableData *_encryptedData; 14 | NSMutableData *_authTag; 15 | BOOL _complete; 16 | unsigned long long _length; 17 | } 18 | 19 | @property(nonatomic) unsigned long long length; // @synthesize length=_length; 20 | @property(nonatomic, getter=isComplete) BOOL complete; // @synthesize complete=_complete; 21 | @property(readonly, nonatomic) NSData *authTag; // @synthesize authTag=_authTag; 22 | @property(readonly, nonatomic) NSData *encryptedData; // @synthesize encryptedData=_encryptedData; 23 | 24 | - (id)chaChaPolyData; 25 | - (long long)appendData:(id)arg1; 26 | 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKService.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | 10 | @class HAKAccessory, HAKUUID, NSArray, NSHashTable, NSMutableArray, NSNumber, NSString; 11 | 12 | @interface HAKService : NSObject 13 | { 14 | NSMutableArray *_characteristics; 15 | NSHashTable *_includedServices; 16 | BOOL _primary; 17 | id _delegate; 18 | HAKAccessory *_accessory; 19 | HAKUUID *_type; 20 | NSNumber *_instanceID; 21 | dispatch_queue_t _workQueue; 22 | } 23 | 24 | + (id)_nameUUID; 25 | + (id)characteristicsToFilter; 26 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 27 | @property(readonly, nonatomic, getter=isPrimary) BOOL primary; // @synthesize primary=_primary; 28 | @property(copy, nonatomic) NSNumber *instanceID; // @synthesize instanceID=_instanceID; 29 | @property(retain, nonatomic) HAKUUID *type; // @synthesize type=_type; 30 | @property(nonatomic) __weak HAKAccessory *accessory; // @synthesize accessory=_accessory; 31 | @property(nonatomic) __weak id delegate; // @synthesize delegate=_delegate; 32 | @property(retain, nonatomic) NSArray *characteristics; // @synthesize characteristics=_characteristics; 33 | 34 | - (BOOL)_removeIncludedService:(id)arg1; 35 | - (void)removeIncludedService:(id)arg1; 36 | - (BOOL)_addIncludedService:(id)arg1; 37 | - (void)addIncludedService:(id)arg1; 38 | @property(readonly, nonatomic) NSArray *includedServices; 39 | - (id)characteristicWithType:(id)arg1; 40 | - (id)characteristicWithInstanceId:(unsigned long long)arg1; 41 | - (void)removeAllCharacteristicsWithType:(id)arg1; 42 | - (BOOL)_removeCharacteristic:(id)arg1; 43 | - (void)removeCharacteristic:(id)arg1; 44 | - (BOOL)_addCharacteristic:(id)arg1 error:(id *)arg2; 45 | - (void)addCharacteristic:(id)arg1; 46 | @property(readonly, copy, nonatomic) NSString *name; 47 | 48 | 49 | 50 | 51 | - (id)initWithType:(id)arg1 isPrimary:(BOOL)arg2 name:(id)arg3 characteristics:(id)arg4 includedServices:(id)arg5; 52 | - (id)initWithType:(id)arg1 name:(id)arg2; 53 | 54 | - (id)JSONObject; 55 | - (id)cbMutableService; 56 | - (id)cbCharactersitics; 57 | 58 | @end 59 | 60 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKServiceDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "NSObject-Protocol.h" 8 | 9 | @protocol HAKServiceDelegate 10 | 11 | @optional 12 | - (void)service:(id)arg1 didRemoveCharacteristic:(id)arg2; 13 | - (void)service:(id)arg1 didFailToAddCharacteristic:(id)arg2 error:(id)arg3; 14 | - (void)service:(id)arg1 didAddCharacteristic:(id)arg2; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKServiceMetadata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class HAKUUID, NSArray, NSString; 10 | 11 | @interface HAKServiceMetadata : NSObject 12 | { 13 | BOOL _primary; 14 | HAKUUID *_type; 15 | HAKUUID *_ipUUID; 16 | HAKUUID *_btleUUID; 17 | NSString *_name; 18 | NSArray *_requiredCharacteristics; 19 | NSArray *_optionalCharacteristics; 20 | NSArray *_includedServices; 21 | } 22 | 23 | @property(readonly, nonatomic) NSArray *includedServices; // @synthesize includedServices=_includedServices; 24 | @property(readonly, nonatomic) NSArray *optionalCharacteristics; // @synthesize optionalCharacteristics=_optionalCharacteristics; 25 | @property(readonly, nonatomic) NSArray *requiredCharacteristics; // @synthesize requiredCharacteristics=_requiredCharacteristics; 26 | @property(readonly, nonatomic, getter=isPrimary) BOOL primary; // @synthesize primary=_primary; 27 | @property(readonly, nonatomic) NSString *name; // @synthesize name=_name; 28 | @property(readonly, nonatomic) HAKUUID *btleUUID; // @synthesize btleUUID=_btleUUID; 29 | @property(readonly, nonatomic) HAKUUID *ipUUID; // @synthesize ipUUID=_ipUUID; 30 | @property(readonly, nonatomic) HAKUUID *type; // @synthesize type=_type; 31 | 32 | 33 | - (id)initWithAttributes:(id)arg1 characteristics:(id)arg2 error:(id *)arg3; 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKSocket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface HAKSocket : NSObject 10 | { 11 | unsigned long long _port; 12 | struct __CFSocket *_ipv4Socket; 13 | struct __CFSocket *_ipv6Socket; 14 | id _delegate; 15 | } 16 | 17 | + (unsigned long long)_portFromSocket:(struct __CFSocket *)arg1; 18 | @property(nonatomic) struct __CFSocket *ipv6Socket; // @synthesize ipv6Socket=_ipv6Socket; 19 | @property(nonatomic) struct __CFSocket *ipv4Socket; // @synthesize ipv4Socket=_ipv4Socket; 20 | @property __weak id delegate; // @synthesize delegate=_delegate; 21 | @property(nonatomic) unsigned long long port; // @synthesize port=_port; 22 | 23 | - (void)removeFromRunLoop:(id)arg1 forMode:(id)arg2; 24 | - (void)scheduleInRunLoop:(id)arg1 forMode:(id)arg2; 25 | - (BOOL)_bindIPV6Socket; 26 | - (BOOL)_bindIPV4Socket; 27 | 28 | 29 | - (id)initWithPort:(unsigned long long)arg1; 30 | 31 | @end 32 | 33 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKSocketDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "NSObject-Protocol.h" 8 | 9 | @protocol HAKSocketDelegate 10 | - (void)newConnectionWithHost:(id)arg1 inputStream:(id)arg2 outputStream:(id)arg3; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKStringConstraints.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import "HAKValueConstraints.h" 8 | 9 | @class NSNumber; 10 | 11 | @interface HAKStringConstraints : HAKValueConstraints 12 | { 13 | NSNumber *_maximumLength; 14 | } 15 | 16 | @property(copy, nonatomic) NSNumber *maximumLength; // @synthesize maximumLength=_maximumLength; 17 | 18 | - (id)initWithMaximumLength:(id)arg1; 19 | 20 | - (BOOL)validateValue:(id)arg1; 21 | - (id)attributes; 22 | 23 | @end 24 | 25 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKTLV8Container.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSMutableArray; 10 | 11 | @interface HAKTLV8Container : NSObject 12 | { 13 | NSMutableArray *_packets; 14 | } 15 | 16 | 17 | 18 | 19 | 20 | - (id)numberForType:(unsigned char)arg1; 21 | - (void)setUnsignedLongLong:(unsigned long long)arg1 forType:(unsigned char)arg2; 22 | - (void)setUnsignedInt:(unsigned int)arg1 forType:(unsigned char)arg2; 23 | - (void)setUnsignedShort:(unsigned short)arg1 forType:(unsigned char)arg2; 24 | - (void)setUnsignedChar:(unsigned char)arg1 forType:(unsigned char)arg2; 25 | - (unsigned long long)sizeOfNumber:(id)arg1; 26 | - (id)stringForType:(unsigned char)arg1; 27 | - (void)setString:(id)arg1 forType:(unsigned char)arg2; 28 | - (id)dataForType:(unsigned char)arg1; 29 | - (void)setData:(id)arg1 forType:(unsigned char)arg2; 30 | - (BOOL)voidForType:(unsigned char)arg1; 31 | - (void)setVoidType:(unsigned char)arg1; 32 | - (id)serialize; 33 | - (void)removePacketsWithType:(unsigned char)arg1; 34 | 35 | - (id)initWithData:(id)arg1; 36 | 37 | 38 | @end 39 | 40 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKTLV8Packet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSData; 10 | 11 | @interface HAKTLV8Packet : NSObject 12 | { 13 | unsigned char _type; 14 | NSData *_value; 15 | } 16 | 17 | @property(readonly, nonatomic) unsigned char type; // @synthesize type=_type; 18 | @property(readonly, nonatomic) NSData *value; // @synthesize value=_value; 19 | 20 | @property(readonly, nonatomic) unsigned char length; 21 | 22 | - (id)initWithType:(unsigned char)arg1 value:(id)arg2; 23 | - (id)initWithData:(id)arg1; 24 | 25 | @end 26 | 27 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKTransport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | #import 8 | 9 | #import "HAKAccessoryDelegate-Protocol.h" 10 | #import "HAKConnectionDelegate-Protocol.h" 11 | 12 | @class HAKAccessory, HAKAccessoryKeychainObject, HAKIdentifier, HAKInstanceIDPool, NSArray, NSMutableArray, NSNumber, NSString; 13 | 14 | @interface HAKTransport : NSObject 15 | { 16 | NSMutableArray *_pairings; 17 | NSMutableArray *_accessories; 18 | NSMutableArray *_connections; 19 | BOOL _started; 20 | BOOL _paired; 21 | BOOL _allowUnencryptedConnections; 22 | NSString *_password; 23 | HAKIdentifier *_identifier; 24 | // id _delegate; 25 | NSNumber *_configurationNumber; 26 | NSNumber *_stateNumber; 27 | dispatch_queue_t _workQueue; 28 | HAKInstanceIDPool *_instanceIDPool; 29 | HAKAccessoryKeychainObject *_accessoryKey; 30 | } 31 | 32 | + (id)restrictedPasswordSet; 33 | + (unsigned long long)maxSupportedAccessories; 34 | + (id)transportWithType:(unsigned long long)arg1; 35 | @property(retain, nonatomic) HAKAccessoryKeychainObject *accessoryKey; // @synthesize accessoryKey=_accessoryKey; 36 | @property(retain, nonatomic) HAKInstanceIDPool *instanceIDPool; // @synthesize instanceIDPool=_instanceIDPool; 37 | @property(readonly, nonatomic) BOOL allowUnencryptedConnections; // @synthesize allowUnencryptedConnections=_allowUnencryptedConnections; 38 | @property(retain, nonatomic) dispatch_queue_t workQueue; // @synthesize workQueue=_workQueue; 39 | @property(nonatomic, getter=isPaired) BOOL paired; // @synthesize paired=_paired; 40 | @property(retain, nonatomic) NSNumber *stateNumber; // @synthesize stateNumber=_stateNumber; 41 | @property(retain, nonatomic) NSNumber *configurationNumber; // @synthesize configurationNumber=_configurationNumber; 42 | //@property(nonatomic) __weak id delegate; // @synthesize delegate=_delegate; 43 | @property(retain, nonatomic) NSArray *connections; // @synthesize connections=_connections; 44 | @property(retain, nonatomic) NSArray *pairings; // @synthesize pairings=_pairings; 45 | @property(retain, nonatomic) NSArray *accessories; // @synthesize accessories=_accessories; 46 | 47 | - (id)_accessoryWithInstanceID:(unsigned long long)arg1; 48 | - (id)accessoryWithInstanceID:(unsigned long long)arg1; 49 | - (void)removeAccessory:(id)arg1; 50 | - (BOOL)_addAccessory:(id)arg1 error:(id *)arg2; 51 | - (void)addAccessory:(id)arg1; 52 | @property(readonly, nonatomic) HAKAccessory *primaryAccessory; 53 | - (void)removeAllConnections; 54 | - (void)removeConnection:(id)arg1; 55 | - (void)addConnection:(id)arg1; 56 | - (id)_pairingWithIdentifier:(id)arg1; 57 | - (id)pairingWithIdentifier:(id)arg1; 58 | - (void)removeAllPairings; 59 | - (BOOL)_removePairing:(id)arg1 error:(id *)arg2; 60 | - (BOOL)removePairing:(id)arg1 error:(id *)arg2; 61 | - (BOOL)_addPairing:(id)arg1; 62 | - (void)addPairing:(id)arg1; 63 | - (void)_incrementStateNumber; 64 | - (void)incrementStateNumber; 65 | - (void)_incrementConfigurationNumber; 66 | - (void)incrementConfigurationNumber; 67 | @property(nonatomic, getter=isStarted) BOOL started; // @synthesize started=_started; 68 | - (void)_setIdentifier:(id)arg1; 69 | @property(copy, nonatomic) HAKIdentifier *identifier; // @synthesize identifier=_identifier; 70 | @property(readonly, nonatomic) NSString *name; 71 | @property(readonly, nonatomic) unsigned long long type; 72 | - (BOOL)updateValue:(id)arg1 forCharacteristic:(id)arg2 onSubscribedConnections:(id)arg3; 73 | - (void)stop; 74 | - (void)start; 75 | - (void)_setPassword:(id)arg1; 76 | @property(copy, nonatomic) NSString *password; // @synthesize password=_password; 77 | - (void)connectionDidEncrypt:(id)arg1; 78 | - (void)connectionDidClose:(id)arg1; 79 | - (void)accessory:(id)arg1 didUpdateValue:(id)arg2 forCharacteristic:(id)arg3; 80 | - (void)accessory:(id)arg1 didUpdateService:(id)arg2; 81 | - (void)accessory:(id)arg1 didRemoveService:(id)arg2; 82 | - (void)accessory:(id)arg1 didAddService:(id)arg2; 83 | 84 | - (id)initWithTransportType:(unsigned long long)arg1; 85 | 86 | @end 87 | 88 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKUUID.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @class NSUUID; 10 | 11 | @interface HAKUUID : NSObject 12 | { 13 | unsigned long long _type; 14 | NSUUID *_uuid; 15 | } 16 | 17 | + (BOOL)isValidUUIDString:(id)arg1; 18 | + (id)cbUUIDMapping; 19 | + (id)UUIDWithUUID:(id)arg1; 20 | + (id)UUIDWithUUIDString:(id)arg1; 21 | + (id)nameMapping; 22 | @property(retain, nonatomic, setter=setUUID:) NSUUID *uuid; // @synthesize uuid=_uuid; 23 | @property(nonatomic) unsigned long long type; // @synthesize type=_type; 24 | 25 | - (id)cbUUID; 26 | - (id)name; 27 | - (id)shortenedUUIDString; 28 | - (id)UUIDString; 29 | - (id)debugDescription; 30 | 31 | - (BOOL)isEqual:(id)arg1; 32 | - (unsigned long long)hash; 33 | - (id)initWithCBUUID:(id)arg1; 34 | - (id)initWithUUID:(id)arg1; 35 | - (id)initWithUUIDString:(id)arg1; 36 | 37 | - (id)truncatedUUIDString; 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/HAKValueConstraints.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface HAKValueConstraints : NSObject 10 | { 11 | } 12 | 13 | - (BOOL)validateValue:(id)arg1; 14 | - (id)attributes; 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSCoding-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSCopying-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSData-Enumeration.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSData (Enumeration) 10 | - (void)enumerateBytesUsingBlock:(id)arg1; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSData-HAKChaChaPoly.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSData (HAKChaChaPoly) 10 | + (id)dataWithUint64:(unsigned long long)arg1; 11 | + (id)dataWithUint32:(unsigned int)arg1; 12 | + (id)dataWithUint16:(unsigned short)arg1; 13 | - (unsigned long long)uint64Value; 14 | - (unsigned int)uint32Value; 15 | - (unsigned short)uint16Value; 16 | - (id)initWithUint64:(unsigned long long)arg1; 17 | - (id)initWithUint32:(unsigned int)arg1; 18 | - (id)initWithUint16:(unsigned short)arg1; 19 | @end 20 | 21 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSDictionary-HAK.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSDictionary (HAK) 10 | - (BOOL)containsKey:(id)arg1; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSDictionary-Safe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSDictionary (Safe) 10 | - (id)_objectForKey:(id)arg1 class:(Class)arg2; 11 | - (id)stringForKey:(id)arg1; 12 | - (id)numberForKey:(id)arg1; 13 | - (id)dictionaryForKey:(id)arg1; 14 | - (id)arrayForKey:(id)arg1; 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSError-HAKError.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSError (HAKError) 10 | + (id)errorWithCode:(long long)arg1 description:(id)arg2 suggestion:(id)arg3; 11 | + (id)errorWithCode:(long long)arg1 description:(id)arg2; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSFileManager-HAK.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSFileManager (HAK) 10 | - (id)fileModificationDateForURL:(id)arg1 error:(id *)arg2; 11 | - (id)fileSizeForURL:(id)arg1 options:(unsigned long long)arg2 error:(id *)arg3; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSMapTable-HAK.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSMapTable (HAK) 10 | - (BOOL)containsObject:(id)arg1; 11 | - (void)enumerateKeysAndObjectsUsingBlock:(id)arg1; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSNetServiceDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSNumber-HAK.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSNumber (HAK) 10 | - (id)numberByDecrementing; 11 | - (id)numberByIncrementing; 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSObject-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSStreamDelegate-Protocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSString-NSData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSString (NSData) 10 | - (id)hexStringToData; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSURL-Query.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSURL (Query) 10 | - (id)queryDictionary; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HAPAccessoryKit Headers/NSUserDefaults-HAK.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by class-dump 3.3.4 (64 bit). 3 | * 4 | * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. 5 | */ 6 | 7 | @import Foundation; 8 | 9 | @interface NSUserDefaults (HAK) 10 | + (id)defaultFrameworkDomain; 11 | @end 12 | 13 | -------------------------------------------------------------------------------- /HomeKitBridge.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C734C6A819EA104B00D3D2E3 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C734C6A619EA104B00D3D2E3 /* Cocoa.framework */; }; 11 | C734C6A919EA104B00D3D2E3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C734C6A719EA104B00D3D2E3 /* Foundation.framework */; }; 12 | C7397D7419E978C100FF9EA3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C7397D7319E978C100FF9EA3 /* main.m */; }; 13 | C7397D7719E978C100FF9EA3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C7397D7619E978C100FF9EA3 /* AppDelegate.m */; }; 14 | C7397D7919E978C100FF9EA3 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C7397D7819E978C100FF9EA3 /* Images.xcassets */; }; 15 | C7397D7C19E978C100FF9EA3 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C7397D7A19E978C100FF9EA3 /* MainMenu.xib */; }; 16 | C7397E7C19E9849E00FF9EA3 /* HKBAccessory.m in Sources */ = {isa = PBXBuildFile; fileRef = C7397E7B19E9849E00FF9EA3 /* HKBAccessory.m */; }; 17 | C7397E8019E9859F00FF9EA3 /* HKBLightAccessory.m in Sources */ = {isa = PBXBuildFile; fileRef = C7397E7F19E9859F00FF9EA3 /* HKBLightAccessory.m */; }; 18 | C78010821B1DF1C6005E9E96 /* HKBDiscoveryService.m in Sources */ = {isa = PBXBuildFile; fileRef = C78010811B1DF1C6005E9E96 /* HKBDiscoveryService.m */; }; 19 | C78010891B1DFFBC005E9E96 /* NSArray+Map.m in Sources */ = {isa = PBXBuildFile; fileRef = C78010881B1DFFBC005E9E96 /* NSArray+Map.m */; }; 20 | C780108D1B1E833D005E9E96 /* HKBLIFXDiscoveryService.m in Sources */ = {isa = PBXBuildFile; fileRef = C780108C1B1E833D005E9E96 /* HKBLIFXDiscoveryService.m */; }; 21 | C78010921B1E855F005E9E96 /* LaunchAtLoginController.m in Sources */ = {isa = PBXBuildFile; fileRef = C78010911B1E855F005E9E96 /* LaunchAtLoginController.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 22 | C78010941B1E87AC005E9E96 /* LIFXKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C780108E1B1E836D005E9E96 /* LIFXKit.framework */; }; 23 | C78010951B1E87AC005E9E96 /* LIFXKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C780108E1B1E836D005E9E96 /* LIFXKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 24 | C78010991B1E88A8005E9E96 /* HAPAccessoryKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C734C6AA19EA10AC00D3D2E3 /* HAPAccessoryKit.framework */; }; 25 | C780109A1B1E88A8005E9E96 /* HAPAccessoryKit.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C734C6AA19EA10AC00D3D2E3 /* HAPAccessoryKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 26 | C786FF211B1BB93900A6A354 /* HKBTransportCache.m in Sources */ = {isa = PBXBuildFile; fileRef = C786FF201B1BB93900A6A354 /* HKBTransportCache.m */; }; 27 | C78BEFE619EB68660005278C /* HKBLightAccessoryLIFX.m in Sources */ = {isa = PBXBuildFile; fileRef = C78BEFE519EB68660005278C /* HKBLightAccessoryLIFX.m */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXCopyFilesBuildPhase section */ 31 | C7397E8419E9FC6700FF9EA3 /* CopyFiles */ = { 32 | isa = PBXCopyFilesBuildPhase; 33 | buildActionMask = 2147483647; 34 | dstPath = ""; 35 | dstSubfolderSpec = 10; 36 | files = ( 37 | C780109A1B1E88A8005E9E96 /* HAPAccessoryKit.framework in CopyFiles */, 38 | C78010951B1E87AC005E9E96 /* LIFXKit.framework in CopyFiles */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | C734C6A619EA104B00D3D2E3 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 46 | C734C6A719EA104B00D3D2E3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 47 | C734C6AA19EA10AC00D3D2E3 /* HAPAccessoryKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = HAPAccessoryKit.framework; path = "../../../../../../../Applications/HomeKit Accessory Simulator.app/Contents/Frameworks/HAPAccessoryKit.framework"; sourceTree = ""; }; 48 | C7397D6E19E978C100FF9EA3 /* HomeKitBridge.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HomeKitBridge.app; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | C7397D7219E978C100FF9EA3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | C7397D7319E978C100FF9EA3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | C7397D7519E978C100FF9EA3 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 52 | C7397D7619E978C100FF9EA3 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 53 | C7397D7819E978C100FF9EA3 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 54 | C7397D7B19E978C100FF9EA3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 55 | C7397E7A19E9849E00FF9EA3 /* HKBAccessory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HKBAccessory.h; sourceTree = ""; }; 56 | C7397E7B19E9849E00FF9EA3 /* HKBAccessory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HKBAccessory.m; sourceTree = ""; }; 57 | C7397E7E19E9859F00FF9EA3 /* HKBLightAccessory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HKBLightAccessory.h; sourceTree = ""; }; 58 | C7397E7F19E9859F00FF9EA3 /* HKBLightAccessory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HKBLightAccessory.m; sourceTree = ""; }; 59 | C78010801B1DF1C6005E9E96 /* HKBDiscoveryService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HKBDiscoveryService.h; sourceTree = ""; }; 60 | C78010811B1DF1C6005E9E96 /* HKBDiscoveryService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HKBDiscoveryService.m; sourceTree = ""; }; 61 | C78010871B1DFFBC005E9E96 /* NSArray+Map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSArray+Map.h"; sourceTree = ""; }; 62 | C78010881B1DFFBC005E9E96 /* NSArray+Map.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+Map.m"; sourceTree = ""; }; 63 | C780108B1B1E833D005E9E96 /* HKBLIFXDiscoveryService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HKBLIFXDiscoveryService.h; path = LIFX/HKBLIFXDiscoveryService.h; sourceTree = ""; }; 64 | C780108C1B1E833D005E9E96 /* HKBLIFXDiscoveryService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HKBLIFXDiscoveryService.m; path = LIFX/HKBLIFXDiscoveryService.m; sourceTree = ""; }; 65 | C780108E1B1E836D005E9E96 /* LIFXKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LIFXKit.framework; path = LIFX/LIFXKit.framework; sourceTree = ""; }; 66 | C78010901B1E855F005E9E96 /* LaunchAtLoginController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchAtLoginController.h; sourceTree = ""; }; 67 | C78010911B1E855F005E9E96 /* LaunchAtLoginController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LaunchAtLoginController.m; sourceTree = ""; }; 68 | C786FE631B1BAE2900A6A354 /* HAKAccessoryKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKAccessoryKit.h; sourceTree = ""; }; 69 | C786FEBE1B1BAE5900A6A354 /* CBPeripheralManagerDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CBPeripheralManagerDelegate-Protocol.h"; sourceTree = ""; }; 70 | C786FEBF1B1BAE5900A6A354 /* CDStructures.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDStructures.h; sourceTree = ""; }; 71 | C786FEC01B1BAE5900A6A354 /* HAKAccessory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKAccessory.h; sourceTree = ""; }; 72 | C786FEC11B1BAE5900A6A354 /* HAKAccessoryDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKAccessoryDelegate-Protocol.h"; sourceTree = ""; }; 73 | C786FEC21B1BAE5900A6A354 /* HAKAccessoryInformationService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKAccessoryInformationService.h; sourceTree = ""; }; 74 | C786FEC31B1BAE5900A6A354 /* HAKAccessoryKeychainObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKAccessoryKeychainObject.h; sourceTree = ""; }; 75 | C786FEC51B1BAE5900A6A354 /* HAKAddPairingSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKAddPairingSession.h; sourceTree = ""; }; 76 | C786FEC61B1BAE5900A6A354 /* HAKAddPairingSessionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKAddPairingSessionDelegate-Protocol.h"; sourceTree = ""; }; 77 | C786FEC71B1BAE5900A6A354 /* HAKBTLEConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKBTLEConnection.h; sourceTree = ""; }; 78 | C786FEC81B1BAE5900A6A354 /* HAKBTLESecuritySession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKBTLESecuritySession.h; sourceTree = ""; }; 79 | C786FEC91B1BAE5900A6A354 /* HAKBTLETransport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKBTLETransport.h; sourceTree = ""; }; 80 | C786FECA1B1BAE5900A6A354 /* HAKChaCha20.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKChaCha20.h; sourceTree = ""; }; 81 | C786FECB1B1BAE5900A6A354 /* HAKChaCha20Poly1305.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKChaCha20Poly1305.h; sourceTree = ""; }; 82 | C786FECC1B1BAE5900A6A354 /* HAKChaChaPolyData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKChaChaPolyData.h; sourceTree = ""; }; 83 | C786FECD1B1BAE5900A6A354 /* HAKCharacteristic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristic.h; sourceTree = ""; }; 84 | C786FECE1B1BAE5900A6A354 /* HAKCharacteristicMetadata.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristicMetadata.h; sourceTree = ""; }; 85 | C786FECF1B1BAE5900A6A354 /* HAKCharacteristicReadRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristicReadRequest.h; sourceTree = ""; }; 86 | C786FED01B1BAE5900A6A354 /* HAKCharacteristicReadResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristicReadResponse.h; sourceTree = ""; }; 87 | C786FED11B1BAE5900A6A354 /* HAKCharacteristicRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristicRequest.h; sourceTree = ""; }; 88 | C786FED21B1BAE5900A6A354 /* HAKCharacteristicResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristicResponse.h; sourceTree = ""; }; 89 | C786FED31B1BAE5900A6A354 /* HAKCharacteristicWriteRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristicWriteRequest.h; sourceTree = ""; }; 90 | C786FED41B1BAE5900A6A354 /* HAKCharacteristicWriteResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCharacteristicWriteResponse.h; sourceTree = ""; }; 91 | C786FED51B1BAE5900A6A354 /* HAKConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKConnection.h; sourceTree = ""; }; 92 | C786FED61B1BAE5900A6A354 /* HAKConnectionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKConnectionDelegate-Protocol.h"; sourceTree = ""; }; 93 | C786FED71B1BAE5900A6A354 /* HAKConstraintsFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKConstraintsFactory.h; sourceTree = ""; }; 94 | C786FED81B1BAE5900A6A354 /* HAKControllerKeychainObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKControllerKeychainObject.h; sourceTree = ""; }; 95 | C786FED91B1BAE5900A6A354 /* HAKCurve25519.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKCurve25519.h; sourceTree = ""; }; 96 | C786FEDA1B1BAE5900A6A354 /* HAKEnumerationConstraints.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKEnumerationConstraints.h; sourceTree = ""; }; 97 | C786FEDB1B1BAE5900A6A354 /* HAKHKDF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKHKDF.h; sourceTree = ""; }; 98 | C786FEDC1B1BAE5900A6A354 /* HAKHTTPMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKHTTPMessage.h; sourceTree = ""; }; 99 | C786FEDD1B1BAE5900A6A354 /* HAKHTTPRequestMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKHTTPRequestMessage.h; sourceTree = ""; }; 100 | C786FEDE1B1BAE5900A6A354 /* HAKHTTPResponseMessage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKHTTPResponseMessage.h; sourceTree = ""; }; 101 | C786FEDF1B1BAE5900A6A354 /* HAKIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKIdentifier.h; sourceTree = ""; }; 102 | C786FEE01B1BAE5900A6A354 /* HAKIdentifyCharacteristic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKIdentifyCharacteristic.h; sourceTree = ""; }; 103 | C786FEE11B1BAE5900A6A354 /* HAKInstanceIDPool.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKInstanceIDPool.h; sourceTree = ""; }; 104 | C786FEE21B1BAE5900A6A354 /* HAKIPCharacteristicReadRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKIPCharacteristicReadRequest.h; sourceTree = ""; }; 105 | C786FEE31B1BAE5900A6A354 /* HAKIPConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKIPConnection.h; sourceTree = ""; }; 106 | C786FEE41B1BAE5900A6A354 /* HAKIPConnectionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKIPConnectionDelegate-Protocol.h"; sourceTree = ""; }; 107 | C786FEE51B1BAE5900A6A354 /* HAKIPSecuritySession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKIPSecuritySession.h; sourceTree = ""; }; 108 | C786FEE61B1BAE5900A6A354 /* HAKIPTransport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKIPTransport.h; sourceTree = ""; }; 109 | C786FEE71B1BAE5900A6A354 /* HAKKeychainKey.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKKeychainKey.h; sourceTree = ""; }; 110 | C786FEE81B1BAE5900A6A354 /* HAKKeychainService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKKeychainService.h; sourceTree = ""; }; 111 | C786FEE91B1BAE5900A6A354 /* HAKListPairingsSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKListPairingsSession.h; sourceTree = ""; }; 112 | C786FEEA1B1BAE5900A6A354 /* HAKListPairingsSessionDataSource-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKListPairingsSessionDataSource-Protocol.h"; sourceTree = ""; }; 113 | C786FEEB1B1BAE5900A6A354 /* HAKListPairingsSessionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKListPairingsSessionDelegate-Protocol.h"; sourceTree = ""; }; 114 | C786FEEC1B1BAE5900A6A354 /* HAKLogger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKLogger.h; sourceTree = ""; }; 115 | C786FEED1B1BAE5900A6A354 /* HAKMetadata.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKMetadata.h; sourceTree = ""; }; 116 | C786FEEE1B1BAE5900A6A354 /* HAKMetadataService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKMetadataService.h; sourceTree = ""; }; 117 | C786FEEF1B1BAE5900A6A354 /* HAKNetService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKNetService.h; sourceTree = ""; }; 118 | C786FEF01B1BAE5900A6A354 /* HAKNumberConstraints.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKNumberConstraints.h; sourceTree = ""; }; 119 | C786FEF11B1BAE5900A6A354 /* HAKPairing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairing.h; sourceTree = ""; }; 120 | C786FEF21B1BAE5900A6A354 /* HAKPairingCharacteristic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairingCharacteristic.h; sourceTree = ""; }; 121 | C786FEF31B1BAE5900A6A354 /* HAKPairingsCharacteristic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairingsCharacteristic.h; sourceTree = ""; }; 122 | C786FEF41B1BAE5900A6A354 /* HAKPairingService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairingService.h; sourceTree = ""; }; 123 | C786FEF51B1BAE5900A6A354 /* HAKPairingSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairingSession.h; sourceTree = ""; }; 124 | C786FEF61B1BAE5900A6A354 /* HAKPairingSessionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKPairingSessionDelegate-Protocol.h"; sourceTree = ""; }; 125 | C786FEF71B1BAE5900A6A354 /* HAKPairSetupCharacteristic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairSetupCharacteristic.h; sourceTree = ""; }; 126 | C786FEF81B1BAE5900A6A354 /* HAKPairSetupSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairSetupSession.h; sourceTree = ""; }; 127 | C786FEF91B1BAE5900A6A354 /* HAKPairSetupSessionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKPairSetupSessionDelegate-Protocol.h"; sourceTree = ""; }; 128 | C786FEFA1B1BAE5900A6A354 /* HAKPairVerifyCharacteristic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairVerifyCharacteristic.h; sourceTree = ""; }; 129 | C786FEFB1B1BAE5900A6A354 /* HAKPairVerifySession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPairVerifySession.h; sourceTree = ""; }; 130 | C786FEFC1B1BAE5900A6A354 /* HAKPairVerifySessionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKPairVerifySessionDelegate-Protocol.h"; sourceTree = ""; }; 131 | C786FEFD1B1BAE5900A6A354 /* HAKPoly1305.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKPoly1305.h; sourceTree = ""; }; 132 | C786FEFE1B1BAE5900A6A354 /* HAKRemovePairingSession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKRemovePairingSession.h; sourceTree = ""; }; 133 | C786FEFF1B1BAE5900A6A354 /* HAKRemovePairingSessionDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKRemovePairingSessionDelegate-Protocol.h"; sourceTree = ""; }; 134 | C786FF001B1BAE5900A6A354 /* HAKSecuritySession.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKSecuritySession.h; sourceTree = ""; }; 135 | C786FF011B1BAE5900A6A354 /* HAKSecuritySessionPacket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKSecuritySessionPacket.h; sourceTree = ""; }; 136 | C786FF021B1BAE5900A6A354 /* HAKService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKService.h; sourceTree = ""; }; 137 | C786FF031B1BAE5900A6A354 /* HAKServiceDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKServiceDelegate-Protocol.h"; sourceTree = ""; }; 138 | C786FF041B1BAE5900A6A354 /* HAKServiceMetadata.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKServiceMetadata.h; sourceTree = ""; }; 139 | C786FF051B1BAE5900A6A354 /* HAKSocket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKSocket.h; sourceTree = ""; }; 140 | C786FF061B1BAE5900A6A354 /* HAKSocketDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HAKSocketDelegate-Protocol.h"; sourceTree = ""; }; 141 | C786FF071B1BAE5900A6A354 /* HAKStringConstraints.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKStringConstraints.h; sourceTree = ""; }; 142 | C786FF081B1BAE5900A6A354 /* HAKTLV8Container.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKTLV8Container.h; sourceTree = ""; }; 143 | C786FF091B1BAE5900A6A354 /* HAKTLV8Packet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKTLV8Packet.h; sourceTree = ""; }; 144 | C786FF0A1B1BAE5900A6A354 /* HAKTransport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKTransport.h; sourceTree = ""; }; 145 | C786FF0B1B1BAE5900A6A354 /* HAKUUID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKUUID.h; sourceTree = ""; }; 146 | C786FF0C1B1BAE5900A6A354 /* HAKValueConstraints.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HAKValueConstraints.h; sourceTree = ""; }; 147 | C786FF0F1B1BAE5900A6A354 /* NSCoding-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSCoding-Protocol.h"; sourceTree = ""; }; 148 | C786FF101B1BAE5900A6A354 /* NSCopying-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSCopying-Protocol.h"; sourceTree = ""; }; 149 | C786FF111B1BAE5900A6A354 /* NSData-Enumeration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData-Enumeration.h"; sourceTree = ""; }; 150 | C786FF121B1BAE5900A6A354 /* NSData-HAKChaChaPoly.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData-HAKChaChaPoly.h"; sourceTree = ""; }; 151 | C786FF131B1BAE5900A6A354 /* NSDictionary-HAK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDictionary-HAK.h"; sourceTree = ""; }; 152 | C786FF141B1BAE5900A6A354 /* NSDictionary-Safe.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDictionary-Safe.h"; sourceTree = ""; }; 153 | C786FF151B1BAE5900A6A354 /* NSError-HAKError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError-HAKError.h"; sourceTree = ""; }; 154 | C786FF161B1BAE5900A6A354 /* NSFileManager-HAK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSFileManager-HAK.h"; sourceTree = ""; }; 155 | C786FF171B1BAE5900A6A354 /* NSMapTable-HAK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSMapTable-HAK.h"; sourceTree = ""; }; 156 | C786FF181B1BAE5900A6A354 /* NSNetServiceDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSNetServiceDelegate-Protocol.h"; sourceTree = ""; }; 157 | C786FF191B1BAE5900A6A354 /* NSNumber-HAK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSNumber-HAK.h"; sourceTree = ""; }; 158 | C786FF1A1B1BAE5900A6A354 /* NSObject-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSObject-Protocol.h"; sourceTree = ""; }; 159 | C786FF1B1B1BAE5900A6A354 /* NSStreamDelegate-Protocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSStreamDelegate-Protocol.h"; sourceTree = ""; }; 160 | C786FF1C1B1BAE5900A6A354 /* NSString-NSData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString-NSData.h"; sourceTree = ""; }; 161 | C786FF1D1B1BAE5900A6A354 /* NSURL-Query.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSURL-Query.h"; sourceTree = ""; }; 162 | C786FF1E1B1BAE5900A6A354 /* NSUserDefaults-HAK.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSUserDefaults-HAK.h"; sourceTree = ""; }; 163 | C786FF1F1B1BB93900A6A354 /* HKBTransportCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HKBTransportCache.h; sourceTree = ""; }; 164 | C786FF201B1BB93900A6A354 /* HKBTransportCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HKBTransportCache.m; sourceTree = ""; }; 165 | C78BEFE419EB68660005278C /* HKBLightAccessoryLIFX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HKBLightAccessoryLIFX.h; path = LIFX/HKBLightAccessoryLIFX.h; sourceTree = ""; }; 166 | C78BEFE519EB68660005278C /* HKBLightAccessoryLIFX.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HKBLightAccessoryLIFX.m; path = LIFX/HKBLightAccessoryLIFX.m; sourceTree = ""; }; 167 | C78BEFE719EB6B1C0005278C /* HKBLightAccessory+Subclass.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HKBLightAccessory+Subclass.h"; sourceTree = ""; }; 168 | /* End PBXFileReference section */ 169 | 170 | /* Begin PBXFrameworksBuildPhase section */ 171 | C7397D6B19E978C100FF9EA3 /* Frameworks */ = { 172 | isa = PBXFrameworksBuildPhase; 173 | buildActionMask = 2147483647; 174 | files = ( 175 | C734C6A819EA104B00D3D2E3 /* Cocoa.framework in Frameworks */, 176 | C734C6A919EA104B00D3D2E3 /* Foundation.framework in Frameworks */, 177 | C78010991B1E88A8005E9E96 /* HAPAccessoryKit.framework in Frameworks */, 178 | C78010941B1E87AC005E9E96 /* LIFXKit.framework in Frameworks */, 179 | ); 180 | runOnlyForDeploymentPostprocessing = 0; 181 | }; 182 | /* End PBXFrameworksBuildPhase section */ 183 | 184 | /* Begin PBXGroup section */ 185 | C7397D6519E978C100FF9EA3 = { 186 | isa = PBXGroup; 187 | children = ( 188 | C7397D7019E978C100FF9EA3 /* HomeKitBridge */, 189 | C7397D6F19E978C100FF9EA3 /* Products */, 190 | ); 191 | sourceTree = ""; 192 | }; 193 | C7397D6F19E978C100FF9EA3 /* Products */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | C7397D6E19E978C100FF9EA3 /* HomeKitBridge.app */, 197 | ); 198 | name = Products; 199 | sourceTree = ""; 200 | }; 201 | C7397D7019E978C100FF9EA3 /* HomeKitBridge */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | C7397D7519E978C100FF9EA3 /* AppDelegate.h */, 205 | C7397D7619E978C100FF9EA3 /* AppDelegate.m */, 206 | C7397E7919E9834800FF9EA3 /* HomeKit */, 207 | C78010931B1E8563005E9E96 /* Auto launch */, 208 | C78010861B1DFF98005E9E96 /* Categories */, 209 | C7397D7819E978C100FF9EA3 /* Images.xcassets */, 210 | C7397D7A19E978C100FF9EA3 /* MainMenu.xib */, 211 | C7397D7119E978C100FF9EA3 /* Supporting Files */, 212 | ); 213 | path = HomeKitBridge; 214 | sourceTree = ""; 215 | }; 216 | C7397D7119E978C100FF9EA3 /* Supporting Files */ = { 217 | isa = PBXGroup; 218 | children = ( 219 | C7397D9119E97CE100FF9EA3 /* Frameworks */, 220 | C7397D7219E978C100FF9EA3 /* Info.plist */, 221 | C7397D7319E978C100FF9EA3 /* main.m */, 222 | ); 223 | name = "Supporting Files"; 224 | sourceTree = ""; 225 | }; 226 | C7397D9119E97CE100FF9EA3 /* Frameworks */ = { 227 | isa = PBXGroup; 228 | children = ( 229 | C7397E0519E97F6500FF9EA3 /* HAPAccessoryKit Headers */, 230 | C734C6AA19EA10AC00D3D2E3 /* HAPAccessoryKit.framework */, 231 | C734C6A619EA104B00D3D2E3 /* Cocoa.framework */, 232 | C734C6A719EA104B00D3D2E3 /* Foundation.framework */, 233 | ); 234 | name = Frameworks; 235 | sourceTree = ""; 236 | }; 237 | C7397E0519E97F6500FF9EA3 /* HAPAccessoryKit Headers */ = { 238 | isa = PBXGroup; 239 | children = ( 240 | C786FE631B1BAE2900A6A354 /* HAKAccessoryKit.h */, 241 | C786FEBE1B1BAE5900A6A354 /* CBPeripheralManagerDelegate-Protocol.h */, 242 | C786FEBF1B1BAE5900A6A354 /* CDStructures.h */, 243 | C786FEC01B1BAE5900A6A354 /* HAKAccessory.h */, 244 | C786FEC11B1BAE5900A6A354 /* HAKAccessoryDelegate-Protocol.h */, 245 | C786FEC21B1BAE5900A6A354 /* HAKAccessoryInformationService.h */, 246 | C786FEC31B1BAE5900A6A354 /* HAKAccessoryKeychainObject.h */, 247 | C786FEC51B1BAE5900A6A354 /* HAKAddPairingSession.h */, 248 | C786FEC61B1BAE5900A6A354 /* HAKAddPairingSessionDelegate-Protocol.h */, 249 | C786FEC71B1BAE5900A6A354 /* HAKBTLEConnection.h */, 250 | C786FEC81B1BAE5900A6A354 /* HAKBTLESecuritySession.h */, 251 | C786FEC91B1BAE5900A6A354 /* HAKBTLETransport.h */, 252 | C786FECA1B1BAE5900A6A354 /* HAKChaCha20.h */, 253 | C786FECB1B1BAE5900A6A354 /* HAKChaCha20Poly1305.h */, 254 | C786FECC1B1BAE5900A6A354 /* HAKChaChaPolyData.h */, 255 | C786FECD1B1BAE5900A6A354 /* HAKCharacteristic.h */, 256 | C786FECE1B1BAE5900A6A354 /* HAKCharacteristicMetadata.h */, 257 | C786FECF1B1BAE5900A6A354 /* HAKCharacteristicReadRequest.h */, 258 | C786FED01B1BAE5900A6A354 /* HAKCharacteristicReadResponse.h */, 259 | C786FED11B1BAE5900A6A354 /* HAKCharacteristicRequest.h */, 260 | C786FED21B1BAE5900A6A354 /* HAKCharacteristicResponse.h */, 261 | C786FED31B1BAE5900A6A354 /* HAKCharacteristicWriteRequest.h */, 262 | C786FED41B1BAE5900A6A354 /* HAKCharacteristicWriteResponse.h */, 263 | C786FED51B1BAE5900A6A354 /* HAKConnection.h */, 264 | C786FED61B1BAE5900A6A354 /* HAKConnectionDelegate-Protocol.h */, 265 | C786FED71B1BAE5900A6A354 /* HAKConstraintsFactory.h */, 266 | C786FED81B1BAE5900A6A354 /* HAKControllerKeychainObject.h */, 267 | C786FED91B1BAE5900A6A354 /* HAKCurve25519.h */, 268 | C786FEDA1B1BAE5900A6A354 /* HAKEnumerationConstraints.h */, 269 | C786FEDB1B1BAE5900A6A354 /* HAKHKDF.h */, 270 | C786FEDC1B1BAE5900A6A354 /* HAKHTTPMessage.h */, 271 | C786FEDD1B1BAE5900A6A354 /* HAKHTTPRequestMessage.h */, 272 | C786FEDE1B1BAE5900A6A354 /* HAKHTTPResponseMessage.h */, 273 | C786FEDF1B1BAE5900A6A354 /* HAKIdentifier.h */, 274 | C786FEE01B1BAE5900A6A354 /* HAKIdentifyCharacteristic.h */, 275 | C786FEE11B1BAE5900A6A354 /* HAKInstanceIDPool.h */, 276 | C786FEE21B1BAE5900A6A354 /* HAKIPCharacteristicReadRequest.h */, 277 | C786FEE31B1BAE5900A6A354 /* HAKIPConnection.h */, 278 | C786FEE41B1BAE5900A6A354 /* HAKIPConnectionDelegate-Protocol.h */, 279 | C786FEE51B1BAE5900A6A354 /* HAKIPSecuritySession.h */, 280 | C786FEE61B1BAE5900A6A354 /* HAKIPTransport.h */, 281 | C786FEE71B1BAE5900A6A354 /* HAKKeychainKey.h */, 282 | C786FEE81B1BAE5900A6A354 /* HAKKeychainService.h */, 283 | C786FEE91B1BAE5900A6A354 /* HAKListPairingsSession.h */, 284 | C786FEEA1B1BAE5900A6A354 /* HAKListPairingsSessionDataSource-Protocol.h */, 285 | C786FEEB1B1BAE5900A6A354 /* HAKListPairingsSessionDelegate-Protocol.h */, 286 | C786FEEC1B1BAE5900A6A354 /* HAKLogger.h */, 287 | C786FEED1B1BAE5900A6A354 /* HAKMetadata.h */, 288 | C786FEEE1B1BAE5900A6A354 /* HAKMetadataService.h */, 289 | C786FEEF1B1BAE5900A6A354 /* HAKNetService.h */, 290 | C786FEF01B1BAE5900A6A354 /* HAKNumberConstraints.h */, 291 | C786FEF11B1BAE5900A6A354 /* HAKPairing.h */, 292 | C786FEF21B1BAE5900A6A354 /* HAKPairingCharacteristic.h */, 293 | C786FEF31B1BAE5900A6A354 /* HAKPairingsCharacteristic.h */, 294 | C786FEF41B1BAE5900A6A354 /* HAKPairingService.h */, 295 | C786FEF51B1BAE5900A6A354 /* HAKPairingSession.h */, 296 | C786FEF61B1BAE5900A6A354 /* HAKPairingSessionDelegate-Protocol.h */, 297 | C786FEF71B1BAE5900A6A354 /* HAKPairSetupCharacteristic.h */, 298 | C786FEF81B1BAE5900A6A354 /* HAKPairSetupSession.h */, 299 | C786FEF91B1BAE5900A6A354 /* HAKPairSetupSessionDelegate-Protocol.h */, 300 | C786FEFA1B1BAE5900A6A354 /* HAKPairVerifyCharacteristic.h */, 301 | C786FEFB1B1BAE5900A6A354 /* HAKPairVerifySession.h */, 302 | C786FEFC1B1BAE5900A6A354 /* HAKPairVerifySessionDelegate-Protocol.h */, 303 | C786FEFD1B1BAE5900A6A354 /* HAKPoly1305.h */, 304 | C786FEFE1B1BAE5900A6A354 /* HAKRemovePairingSession.h */, 305 | C786FEFF1B1BAE5900A6A354 /* HAKRemovePairingSessionDelegate-Protocol.h */, 306 | C786FF001B1BAE5900A6A354 /* HAKSecuritySession.h */, 307 | C786FF011B1BAE5900A6A354 /* HAKSecuritySessionPacket.h */, 308 | C786FF021B1BAE5900A6A354 /* HAKService.h */, 309 | C786FF031B1BAE5900A6A354 /* HAKServiceDelegate-Protocol.h */, 310 | C786FF041B1BAE5900A6A354 /* HAKServiceMetadata.h */, 311 | C786FF051B1BAE5900A6A354 /* HAKSocket.h */, 312 | C786FF061B1BAE5900A6A354 /* HAKSocketDelegate-Protocol.h */, 313 | C786FF071B1BAE5900A6A354 /* HAKStringConstraints.h */, 314 | C786FF081B1BAE5900A6A354 /* HAKTLV8Container.h */, 315 | C786FF091B1BAE5900A6A354 /* HAKTLV8Packet.h */, 316 | C786FF0A1B1BAE5900A6A354 /* HAKTransport.h */, 317 | C786FF0B1B1BAE5900A6A354 /* HAKUUID.h */, 318 | C786FF0C1B1BAE5900A6A354 /* HAKValueConstraints.h */, 319 | C786FF0F1B1BAE5900A6A354 /* NSCoding-Protocol.h */, 320 | C786FF101B1BAE5900A6A354 /* NSCopying-Protocol.h */, 321 | C786FF111B1BAE5900A6A354 /* NSData-Enumeration.h */, 322 | C786FF121B1BAE5900A6A354 /* NSData-HAKChaChaPoly.h */, 323 | C786FF131B1BAE5900A6A354 /* NSDictionary-HAK.h */, 324 | C786FF141B1BAE5900A6A354 /* NSDictionary-Safe.h */, 325 | C786FF151B1BAE5900A6A354 /* NSError-HAKError.h */, 326 | C786FF161B1BAE5900A6A354 /* NSFileManager-HAK.h */, 327 | C786FF171B1BAE5900A6A354 /* NSMapTable-HAK.h */, 328 | C786FF181B1BAE5900A6A354 /* NSNetServiceDelegate-Protocol.h */, 329 | C786FF191B1BAE5900A6A354 /* NSNumber-HAK.h */, 330 | C786FF1A1B1BAE5900A6A354 /* NSObject-Protocol.h */, 331 | C786FF1B1B1BAE5900A6A354 /* NSStreamDelegate-Protocol.h */, 332 | C786FF1C1B1BAE5900A6A354 /* NSString-NSData.h */, 333 | C786FF1D1B1BAE5900A6A354 /* NSURL-Query.h */, 334 | C786FF1E1B1BAE5900A6A354 /* NSUserDefaults-HAK.h */, 335 | ); 336 | path = "HAPAccessoryKit Headers"; 337 | sourceTree = SOURCE_ROOT; 338 | }; 339 | C7397E7919E9834800FF9EA3 /* HomeKit */ = { 340 | isa = PBXGroup; 341 | children = ( 342 | C780107F1B1DE9E1005E9E96 /* Discovery */, 343 | C786FF1F1B1BB93900A6A354 /* HKBTransportCache.h */, 344 | C786FF201B1BB93900A6A354 /* HKBTransportCache.m */, 345 | C7397E7A19E9849E00FF9EA3 /* HKBAccessory.h */, 346 | C7397E7B19E9849E00FF9EA3 /* HKBAccessory.m */, 347 | C780107E1B1DD60A005E9E96 /* Lights */, 348 | ); 349 | name = HomeKit; 350 | sourceTree = ""; 351 | }; 352 | C780107E1B1DD60A005E9E96 /* Lights */ = { 353 | isa = PBXGroup; 354 | children = ( 355 | C78BEFE719EB6B1C0005278C /* HKBLightAccessory+Subclass.h */, 356 | C7397E7E19E9859F00FF9EA3 /* HKBLightAccessory.h */, 357 | C7397E7F19E9859F00FF9EA3 /* HKBLightAccessory.m */, 358 | C78BEFE319EB681E0005278C /* LIFX */, 359 | ); 360 | name = Lights; 361 | sourceTree = ""; 362 | }; 363 | C780107F1B1DE9E1005E9E96 /* Discovery */ = { 364 | isa = PBXGroup; 365 | children = ( 366 | C78010801B1DF1C6005E9E96 /* HKBDiscoveryService.h */, 367 | C78010811B1DF1C6005E9E96 /* HKBDiscoveryService.m */, 368 | ); 369 | name = Discovery; 370 | sourceTree = ""; 371 | }; 372 | C78010861B1DFF98005E9E96 /* Categories */ = { 373 | isa = PBXGroup; 374 | children = ( 375 | C78010871B1DFFBC005E9E96 /* NSArray+Map.h */, 376 | C78010881B1DFFBC005E9E96 /* NSArray+Map.m */, 377 | ); 378 | name = Categories; 379 | sourceTree = ""; 380 | }; 381 | C78010931B1E8563005E9E96 /* Auto launch */ = { 382 | isa = PBXGroup; 383 | children = ( 384 | C78010901B1E855F005E9E96 /* LaunchAtLoginController.h */, 385 | C78010911B1E855F005E9E96 /* LaunchAtLoginController.m */, 386 | ); 387 | name = "Auto launch"; 388 | sourceTree = ""; 389 | }; 390 | C78BEFE319EB681E0005278C /* LIFX */ = { 391 | isa = PBXGroup; 392 | children = ( 393 | C780108E1B1E836D005E9E96 /* LIFXKit.framework */, 394 | C780108B1B1E833D005E9E96 /* HKBLIFXDiscoveryService.h */, 395 | C780108C1B1E833D005E9E96 /* HKBLIFXDiscoveryService.m */, 396 | C78BEFE419EB68660005278C /* HKBLightAccessoryLIFX.h */, 397 | C78BEFE519EB68660005278C /* HKBLightAccessoryLIFX.m */, 398 | ); 399 | name = LIFX; 400 | sourceTree = ""; 401 | }; 402 | /* End PBXGroup section */ 403 | 404 | /* Begin PBXNativeTarget section */ 405 | C7397D6D19E978C100FF9EA3 /* HomeKitBridge */ = { 406 | isa = PBXNativeTarget; 407 | buildConfigurationList = C7397D8B19E978C200FF9EA3 /* Build configuration list for PBXNativeTarget "HomeKitBridge" */; 408 | buildPhases = ( 409 | C7397D6A19E978C100FF9EA3 /* Sources */, 410 | C7397D6B19E978C100FF9EA3 /* Frameworks */, 411 | C7397D6C19E978C100FF9EA3 /* Resources */, 412 | C7397E8419E9FC6700FF9EA3 /* CopyFiles */, 413 | ); 414 | buildRules = ( 415 | ); 416 | dependencies = ( 417 | ); 418 | name = HomeKitBridge; 419 | productName = HomeKitBridge; 420 | productReference = C7397D6E19E978C100FF9EA3 /* HomeKitBridge.app */; 421 | productType = "com.apple.product-type.application"; 422 | }; 423 | /* End PBXNativeTarget section */ 424 | 425 | /* Begin PBXProject section */ 426 | C7397D6619E978C100FF9EA3 /* Project object */ = { 427 | isa = PBXProject; 428 | attributes = { 429 | LastUpgradeCheck = 0600; 430 | ORGANIZATIONNAME = "Kyle Howells"; 431 | TargetAttributes = { 432 | C7397D6D19E978C100FF9EA3 = { 433 | CreatedOnToolsVersion = 6.0; 434 | }; 435 | }; 436 | }; 437 | buildConfigurationList = C7397D6919E978C100FF9EA3 /* Build configuration list for PBXProject "HomeKitBridge" */; 438 | compatibilityVersion = "Xcode 3.2"; 439 | developmentRegion = English; 440 | hasScannedForEncodings = 0; 441 | knownRegions = ( 442 | en, 443 | Base, 444 | ); 445 | mainGroup = C7397D6519E978C100FF9EA3; 446 | productRefGroup = C7397D6F19E978C100FF9EA3 /* Products */; 447 | projectDirPath = ""; 448 | projectRoot = ""; 449 | targets = ( 450 | C7397D6D19E978C100FF9EA3 /* HomeKitBridge */, 451 | ); 452 | }; 453 | /* End PBXProject section */ 454 | 455 | /* Begin PBXResourcesBuildPhase section */ 456 | C7397D6C19E978C100FF9EA3 /* Resources */ = { 457 | isa = PBXResourcesBuildPhase; 458 | buildActionMask = 2147483647; 459 | files = ( 460 | C7397D7919E978C100FF9EA3 /* Images.xcassets in Resources */, 461 | C7397D7C19E978C100FF9EA3 /* MainMenu.xib in Resources */, 462 | ); 463 | runOnlyForDeploymentPostprocessing = 0; 464 | }; 465 | /* End PBXResourcesBuildPhase section */ 466 | 467 | /* Begin PBXSourcesBuildPhase section */ 468 | C7397D6A19E978C100FF9EA3 /* Sources */ = { 469 | isa = PBXSourcesBuildPhase; 470 | buildActionMask = 2147483647; 471 | files = ( 472 | C78010891B1DFFBC005E9E96 /* NSArray+Map.m in Sources */, 473 | C78010921B1E855F005E9E96 /* LaunchAtLoginController.m in Sources */, 474 | C7397D7719E978C100FF9EA3 /* AppDelegate.m in Sources */, 475 | C7397E8019E9859F00FF9EA3 /* HKBLightAccessory.m in Sources */, 476 | C780108D1B1E833D005E9E96 /* HKBLIFXDiscoveryService.m in Sources */, 477 | C78BEFE619EB68660005278C /* HKBLightAccessoryLIFX.m in Sources */, 478 | C7397E7C19E9849E00FF9EA3 /* HKBAccessory.m in Sources */, 479 | C786FF211B1BB93900A6A354 /* HKBTransportCache.m in Sources */, 480 | C7397D7419E978C100FF9EA3 /* main.m in Sources */, 481 | C78010821B1DF1C6005E9E96 /* HKBDiscoveryService.m in Sources */, 482 | ); 483 | runOnlyForDeploymentPostprocessing = 0; 484 | }; 485 | /* End PBXSourcesBuildPhase section */ 486 | 487 | /* Begin PBXVariantGroup section */ 488 | C7397D7A19E978C100FF9EA3 /* MainMenu.xib */ = { 489 | isa = PBXVariantGroup; 490 | children = ( 491 | C7397D7B19E978C100FF9EA3 /* Base */, 492 | ); 493 | name = MainMenu.xib; 494 | sourceTree = ""; 495 | }; 496 | /* End PBXVariantGroup section */ 497 | 498 | /* Begin XCBuildConfiguration section */ 499 | C7397D8919E978C200FF9EA3 /* Debug */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | ALWAYS_SEARCH_USER_PATHS = NO; 503 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 504 | CLANG_CXX_LIBRARY = "libc++"; 505 | CLANG_ENABLE_MODULES = YES; 506 | CLANG_ENABLE_OBJC_ARC = YES; 507 | CLANG_WARN_BOOL_CONVERSION = YES; 508 | CLANG_WARN_CONSTANT_CONVERSION = YES; 509 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 510 | CLANG_WARN_EMPTY_BODY = YES; 511 | CLANG_WARN_ENUM_CONVERSION = YES; 512 | CLANG_WARN_INT_CONVERSION = YES; 513 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 514 | CLANG_WARN_UNREACHABLE_CODE = YES; 515 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 516 | CODE_SIGN_IDENTITY = "-"; 517 | COPY_PHASE_STRIP = NO; 518 | ENABLE_STRICT_OBJC_MSGSEND = YES; 519 | GCC_C_LANGUAGE_STANDARD = gnu99; 520 | GCC_DYNAMIC_NO_PIC = NO; 521 | GCC_OPTIMIZATION_LEVEL = 0; 522 | GCC_PREPROCESSOR_DEFINITIONS = ( 523 | "DEBUG=1", 524 | "$(inherited)", 525 | ); 526 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 527 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 528 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 529 | GCC_WARN_UNDECLARED_SELECTOR = YES; 530 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 531 | GCC_WARN_UNUSED_FUNCTION = YES; 532 | GCC_WARN_UNUSED_VARIABLE = YES; 533 | MACOSX_DEPLOYMENT_TARGET = 10.9; 534 | MTL_ENABLE_DEBUG_INFO = YES; 535 | ONLY_ACTIVE_ARCH = YES; 536 | SDKROOT = macosx; 537 | }; 538 | name = Debug; 539 | }; 540 | C7397D8A19E978C200FF9EA3 /* Release */ = { 541 | isa = XCBuildConfiguration; 542 | buildSettings = { 543 | ALWAYS_SEARCH_USER_PATHS = NO; 544 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 545 | CLANG_CXX_LIBRARY = "libc++"; 546 | CLANG_ENABLE_MODULES = YES; 547 | CLANG_ENABLE_OBJC_ARC = YES; 548 | CLANG_WARN_BOOL_CONVERSION = YES; 549 | CLANG_WARN_CONSTANT_CONVERSION = YES; 550 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 551 | CLANG_WARN_EMPTY_BODY = YES; 552 | CLANG_WARN_ENUM_CONVERSION = YES; 553 | CLANG_WARN_INT_CONVERSION = YES; 554 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 555 | CLANG_WARN_UNREACHABLE_CODE = YES; 556 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 557 | CODE_SIGN_IDENTITY = "-"; 558 | COPY_PHASE_STRIP = YES; 559 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 560 | ENABLE_NS_ASSERTIONS = NO; 561 | ENABLE_STRICT_OBJC_MSGSEND = YES; 562 | GCC_C_LANGUAGE_STANDARD = gnu99; 563 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 564 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 565 | GCC_WARN_UNDECLARED_SELECTOR = YES; 566 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 567 | GCC_WARN_UNUSED_FUNCTION = YES; 568 | GCC_WARN_UNUSED_VARIABLE = YES; 569 | MACOSX_DEPLOYMENT_TARGET = 10.9; 570 | MTL_ENABLE_DEBUG_INFO = NO; 571 | SDKROOT = macosx; 572 | }; 573 | name = Release; 574 | }; 575 | C7397D8C19E978C200FF9EA3 /* Debug */ = { 576 | isa = XCBuildConfiguration; 577 | buildSettings = { 578 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 579 | COMBINE_HIDPI_IMAGES = YES; 580 | FRAMEWORK_SEARCH_PATHS = ( 581 | "$(inherited)", 582 | "$(SYSTEM_APPS_DIR)/HomeKit\\ Accessory\\ Simulator.app/Contents/Frameworks", 583 | "$(PROJECT_DIR)/HomeKitBridge", 584 | "$(PROJECT_DIR)/HomeKitBridge/LIFX", 585 | "$(SYSTEM_APPS_DIR)/HomeKit", 586 | Accessory, 587 | Simulator.app/Contents/Frameworks, 588 | ); 589 | INFOPLIST_FILE = HomeKitBridge/Info.plist; 590 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 591 | PRODUCT_NAME = "$(TARGET_NAME)"; 592 | }; 593 | name = Debug; 594 | }; 595 | C7397D8D19E978C200FF9EA3 /* Release */ = { 596 | isa = XCBuildConfiguration; 597 | buildSettings = { 598 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 599 | COMBINE_HIDPI_IMAGES = YES; 600 | FRAMEWORK_SEARCH_PATHS = ( 601 | "$(inherited)", 602 | "$(SYSTEM_APPS_DIR)/HomeKit\\ Accessory\\ Simulator.app/Contents/Frameworks", 603 | "$(PROJECT_DIR)/HomeKitBridge", 604 | "$(PROJECT_DIR)/HomeKitBridge/LIFX", 605 | "$(SYSTEM_APPS_DIR)/HomeKit", 606 | Accessory, 607 | Simulator.app/Contents/Frameworks, 608 | ); 609 | INFOPLIST_FILE = HomeKitBridge/Info.plist; 610 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 611 | PRODUCT_NAME = "$(TARGET_NAME)"; 612 | }; 613 | name = Release; 614 | }; 615 | /* End XCBuildConfiguration section */ 616 | 617 | /* Begin XCConfigurationList section */ 618 | C7397D6919E978C100FF9EA3 /* Build configuration list for PBXProject "HomeKitBridge" */ = { 619 | isa = XCConfigurationList; 620 | buildConfigurations = ( 621 | C7397D8919E978C200FF9EA3 /* Debug */, 622 | C7397D8A19E978C200FF9EA3 /* Release */, 623 | ); 624 | defaultConfigurationIsVisible = 0; 625 | defaultConfigurationName = Release; 626 | }; 627 | C7397D8B19E978C200FF9EA3 /* Build configuration list for PBXNativeTarget "HomeKitBridge" */ = { 628 | isa = XCConfigurationList; 629 | buildConfigurations = ( 630 | C7397D8C19E978C200FF9EA3 /* Debug */, 631 | C7397D8D19E978C200FF9EA3 /* Release */, 632 | ); 633 | defaultConfigurationIsVisible = 0; 634 | defaultConfigurationName = Release; 635 | }; 636 | /* End XCConfigurationList section */ 637 | }; 638 | rootObject = C7397D6619E978C100FF9EA3 /* Project object */; 639 | } 640 | -------------------------------------------------------------------------------- /HomeKitBridge.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HomeKitBridge.xcodeproj/project.xcworkspace/xcshareddata/HomeKitBridge.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | EC167C07-5947-40D3-8CE6-EAE1FC515136 9 | IDESourceControlProjectName 10 | HomeKitBridge 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 11E1DB4F966C0884FA8B388E9017AF66E2A9052A 14 | https://github.com/freerunnering/HomeKitBridge.git 15 | 16 | IDESourceControlProjectPath 17 | HomeKitBridge.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 11E1DB4F966C0884FA8B388E9017AF66E2A9052A 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/freerunnering/HomeKitBridge.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 11E1DB4F966C0884FA8B388E9017AF66E2A9052A 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 11E1DB4F966C0884FA8B388E9017AF66E2A9052A 36 | IDESourceControlWCCName 37 | HomeKitBridge 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /HomeKitBridge.xcodeproj/project.xcworkspace/xcuserdata/freerunnering.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /HomeKitBridge.xcodeproj/xcuserdata/freerunnering.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /HomeKitBridge.xcodeproj/xcuserdata/freerunnering.xcuserdatad/xcschemes/HomeKitBridge.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /HomeKitBridge.xcodeproj/xcuserdata/freerunnering.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | HomeKitBridge.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C7397D6D19E978C100FF9EA3 16 | 17 | primary 18 | 19 | 20 | C7397D8019E978C200FF9EA3 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /HomeKitBridge/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 11/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : NSObject 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /HomeKitBridge/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 11/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "LaunchAtLoginController.h" 11 | #import "HKBDiscoveryService.h" 12 | #import "NSArray+Map.h" 13 | 14 | 15 | 16 | @interface AppDelegate () 17 | @property (weak) IBOutlet NSWindow *window; // Window left in case I want to add UI at any point 18 | @end 19 | 20 | 21 | 22 | 23 | @implementation AppDelegate{ 24 | // [HKBDiscoveryService] 25 | NSArray *discoveryServices; 26 | 27 | // Menu bar item 28 | NSStatusItem *statusItem; 29 | 30 | // {service.name : NSMenu} 31 | NSMutableDictionary *serviceMenus; 32 | 33 | NSMutableDictionary *accessoryMenuItems; 34 | 35 | LaunchAtLoginController *loginController; 36 | NSMenuItem *autorunItem; 37 | } 38 | 39 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { 40 | // Create variables 41 | serviceMenus = [NSMutableDictionary dictionary]; 42 | accessoryMenuItems = [NSMutableDictionary dictionary]; 43 | 44 | discoveryServices = [[HKBDiscoveryService allServices] mapObjectsUsingBlock:^id(Class class, NSUInteger index){ 45 | return [[class alloc] init]; 46 | }]; 47 | 48 | loginController = [[LaunchAtLoginController alloc] init]; 49 | 50 | 51 | // Create status bar item 52 | statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength]; 53 | [statusItem setTitle:@"HKB"]; // HKB = HomeKit Bridge 54 | [statusItem setHighlightMode:YES]; 55 | statusItem.menu = [[NSMenu alloc] init]; 56 | 57 | 58 | // Start Monitoring 59 | for (HKBDiscoveryService *service in discoveryServices) { 60 | NSMenuItem *serviceMenuItem = [[NSMenuItem alloc] init]; 61 | [serviceMenuItem setTitle:service.displayName]; 62 | 63 | NSMenu *submenu = [[NSMenu alloc] initWithTitle:service.displayName]; 64 | [serviceMenuItem setSubmenu:submenu]; 65 | serviceMenus[service.displayName] = submenu; 66 | 67 | [statusItem.menu addItem:serviceMenuItem]; 68 | 69 | service.delegate = self; 70 | [service startDiscovering]; 71 | } 72 | 73 | [statusItem.menu addItem:[NSMenuItem separatorItem]]; 74 | autorunItem = [[NSMenuItem alloc] initWithTitle:@"Launch at login" action:@selector(autoLaunchPressed) keyEquivalent:@""]; 75 | [statusItem.menu addItem:autorunItem]; 76 | [self updateAutoLaunch]; 77 | 78 | NSMenuItem *quitItem = [[NSMenuItem alloc] initWithTitle:@"Quit" action:@selector(terminate:) keyEquivalent:@"q"]; 79 | [quitItem setTarget:[NSApplication sharedApplication]]; 80 | [statusItem.menu addItem:quitItem]; 81 | } 82 | 83 | 84 | 85 | 86 | #pragma mark - HKBDiscoveryServiceDelegate 87 | 88 | -(void)discoveryService:(HKBDiscoveryService *)service didDiscoverAccessory:(HKBAccessory *)accessory{ 89 | NSMenuItem *menuItem = [service createMenuItemForAccessory:accessory]; 90 | accessoryMenuItems[accessory.serialNumber] = menuItem; 91 | 92 | NSMenu *menu = serviceMenus[service.displayName]; 93 | 94 | if ([menu.itemArray containsObject:menuItem] == NO) { 95 | [menu addItem:menuItem]; 96 | } 97 | } 98 | -(void)discoveryService:(HKBDiscoveryService *)service didLoseAccessory:(HKBAccessory *)accessory{ 99 | NSMenuItem *menuItem = accessoryMenuItems[accessory.serialNumber]; 100 | 101 | if (menuItem) { 102 | NSMenu *menu = serviceMenus[service.displayName]; 103 | [menu removeItem:menuItem]; 104 | 105 | [accessoryMenuItems removeObjectForKey:accessory.serialNumber]; 106 | } 107 | } 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | #pragma mark - Auto launch methods 116 | 117 | -(BOOL)autoLaunch{ 118 | id object = [[NSUserDefaults standardUserDefaults] objectForKey:@"AutoLaunch"]; 119 | return (object ? [object boolValue] : YES); 120 | } 121 | -(void)setAutoLaunch:(BOOL)autoLaunch{ 122 | [[NSUserDefaults standardUserDefaults] setBool:autoLaunch forKey:@"AutoLaunch"]; 123 | [[NSUserDefaults standardUserDefaults] synchronize]; 124 | 125 | [self updateAutoLaunch]; 126 | } 127 | 128 | -(void)updateAutoLaunch{ 129 | if ([self autoLaunch]) { 130 | if (![loginController launchAtLogin]) { 131 | [loginController setLaunchAtLogin:YES]; 132 | } 133 | 134 | [autorunItem setState:NSOnState]; 135 | } 136 | else { 137 | if ([loginController launchAtLogin]) { 138 | [loginController setLaunchAtLogin:NO]; 139 | } 140 | 141 | [autorunItem setState:NSOffState]; 142 | } 143 | } 144 | 145 | -(void)autoLaunchPressed{ 146 | if (autorunItem.state == NSOnState) { 147 | [self setAutoLaunch:NO]; 148 | } 149 | else { 150 | [self setAutoLaunch:YES]; 151 | } 152 | } 153 | 154 | @end 155 | 156 | 157 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBAccessory.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKBAccessory.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 11/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HAKAccessoryKit.h" 11 | 12 | 13 | // Pointless except it prevents typos as then it just won't compile 14 | #define NameKey @"name" 15 | #define ModelKey @"model" 16 | #define SerialNumberKey @"serialNumber" 17 | #define ManufacturerKey @"manufacturer" 18 | 19 | 20 | /** 21 | * Base class for bridged accessories. Includes all the boilerplate setup code, allowing subclasses to focus on specific implementations. 22 | * 23 | * Subclasses should override the methods in the (Subclasses) category definition. 24 | */ 25 | @interface HKBAccessory : NSObject 26 | 27 | -(instancetype)init NS_UNAVAILABLE; 28 | 29 | /** 30 | * Create a new accessory with the supplied device information. If a key is missing the default information for that key will be used. "serialNumber" is a required key and will not be subsituted. 31 | * 32 | * @param information Keys: "name", "serialNumber", "manufacturer", "model" 33 | */ 34 | -(instancetype)initWithInformation:(NSDictionary*)information; 35 | 36 | 37 | /** 38 | * Returns the HomeKit accessory for this Bridged accessory. 39 | */ 40 | @property (nonatomic, readonly) HAKAccessory *accessory; 41 | 42 | 43 | 44 | 45 | // Infomation 46 | 47 | /** 48 | * The accessories name. 49 | */ 50 | @property (nonatomic, readonly) NSString *name; 51 | 52 | /** 53 | * The accessories serialNumber. 54 | */ 55 | @property (nonatomic, readonly) NSString *serialNumber; 56 | 57 | /** 58 | * The passcode to connect to it 59 | */ 60 | @property (nonatomic, readonly) NSString *passcode; 61 | 62 | @end 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | @interface HKBAccessory (Subclasses) 71 | /** 72 | * The default device information to be used if none is supplied. Keys: "name", "manufacturer", "model" 73 | */ 74 | +(NSDictionary*)defaultInformation; // SUBCLASSES: Required to implement or it will fail to connect! 75 | 76 | 77 | /** 78 | * Add services to the accessory here. NOTE: Must call super first! 79 | */ 80 | -(void)setupServices NS_REQUIRES_SUPER; 81 | 82 | /** 83 | * Updates received from HomeKit are sent to this method. 84 | * 85 | * @param characteristic The HAKCharacteristic that changed. 86 | */ 87 | -(void)characteristicDidUpdateValue:(HAKCharacteristic*)characteristic; 88 | @end 89 | 90 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBAccessory.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKBAccessory.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 11/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HKBAccessory.h" 11 | #import "HKBTransportCache.h" 12 | 13 | 14 | 15 | 16 | @implementation HKBAccessory{ 17 | NSDictionary *setupInformation; 18 | 19 | HAKTransport *transport; 20 | } 21 | @synthesize accessory = _accessory; 22 | 23 | +(NSDictionary*)defaultInformation{ 24 | return @{NameKey: @"Accessory", ModelKey: @"Accessory v1.0", ManufacturerKey: @"Kyle Tech"}; 25 | } 26 | 27 | 28 | -(void)dealloc{ 29 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 30 | 31 | [transport stop]; 32 | 33 | NSLog(@"-[HKBAccessory(%p) dealloc];", self); 34 | } 35 | 36 | -(instancetype)initWithInformation:(NSDictionary*)information{ 37 | if (self = [super init]) { 38 | _accessory = [[HAKAccessory alloc] init]; 39 | setupInformation = information; 40 | [self setupServices]; // Subclass customisation point 41 | [self activateAccessory]; 42 | 43 | // TODO: Proper Characteristic notification monitoring 44 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(characteristicDidUpdateValueNotification:) name:@"HAKCharacteristicDidUpdateValueNotification" object:nil]; 45 | } 46 | 47 | return self; 48 | } 49 | 50 | 51 | 52 | 53 | 54 | -(void)characteristicDidUpdateValueNotification:(NSNotification *)notification { 55 | HAKCharacteristic *characteristic = notification.object; 56 | 57 | // If this notification is about us 58 | if ([characteristic.service.accessory isEqual:self.accessory]) { 59 | // Send the message off to the main thread, latency isn't an issue as this command has already made a network call. 60 | dispatch_async(dispatch_get_main_queue(), ^{ 61 | [self characteristicDidUpdateValue:characteristic]; 62 | }); 63 | } 64 | } 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -(void)setupServices{ 75 | NSDictionary *defaultInfomation = [[self class] defaultInformation]; 76 | 77 | NSString *name = setupInformation[NameKey] ?: defaultInfomation[NameKey]; 78 | NSString *manufacturer = setupInformation[ManufacturerKey] ?: defaultInfomation[ManufacturerKey]; 79 | NSString *model = setupInformation[ModelKey] ?: defaultInfomation[ModelKey]; 80 | 81 | NSString *serialNumber = setupInformation[SerialNumberKey]; 82 | 83 | self.accessory.name = name; 84 | self.accessory.serialNumber = serialNumber; 85 | self.accessory.model = model; 86 | self.accessory.manufacturer = manufacturer; 87 | } 88 | 89 | -(void)activateAccessory{ 90 | HAKAccessoryInformationService *informationService = (HAKAccessoryInformationService*)[self.accessory accessoryInformationService]; 91 | NSString *serialNumber = [informationService serialNumberCharacteristic].value; 92 | 93 | transport = [HKBTransportCache transportForSerialNumber:serialNumber]; 94 | [transport addAccessory:self.accessory]; 95 | 96 | NSLog(@"Transport: %@ - Password: %@", transport, transport.password); 97 | 98 | [transport start]; 99 | } 100 | 101 | -(void)characteristicDidUpdateValue:(HAKCharacteristic*)characteristic{ 102 | 103 | } 104 | 105 | 106 | 107 | 108 | 109 | 110 | #pragma mark - Property Getters 111 | 112 | -(NSString *)name{ 113 | return self.accessory.name; 114 | } 115 | 116 | -(NSString*)serialNumber{ 117 | return self.accessory.serialNumber; 118 | } 119 | 120 | -(NSString*)passcode{ 121 | return transport.password; 122 | } 123 | 124 | @end 125 | 126 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBDiscoveryService.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKBDiscoveryService.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 02/06/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "HKBAccessory.h" 12 | 13 | 14 | @class HKBDiscoveryService; 15 | 16 | @protocol HKBDiscoveryServiceDelegate 17 | -(void)discoveryService:(HKBDiscoveryService *)service didDiscoverAccessory:(HKBAccessory *)accessory; 18 | -(void)discoveryService:(HKBDiscoveryService *)service didLoseAccessory:(HKBAccessory *)accessory; 19 | @end 20 | 21 | 22 | 23 | @interface HKBDiscoveryService : NSObject 24 | /** 25 | * Returns all the HKBDiscoveryService subclasses 26 | * 27 | * @return Array of Class objects 28 | */ 29 | +(NSArray*)allServices; 30 | 31 | 32 | 33 | 34 | /// Display name to be shown in the menu bar 35 | -(NSString*)displayName; // Sub to be overriden 36 | 37 | @property (nonatomic, assign) id delegate; 38 | 39 | /// All the HKBAccessory objects it has discovered 40 | -(NSArray*)allAccesories; // Sub to be overriden 41 | 42 | 43 | 44 | /// Is it currently searching for accessories 45 | -(BOOL)isDiscovering NS_REQUIRES_SUPER; 46 | 47 | /// Start discovering accessories 48 | -(void)startDiscovering NS_REQUIRES_SUPER; // Sub to be overriden 49 | 50 | /// Stop discovering accessories 51 | -(void)stopDiscovering NS_REQUIRES_SUPER; // Sub to be overriden 52 | 53 | 54 | -(NSMenuItem*)createMenuItemForAccessory:(HKBAccessory*)accessory; 55 | 56 | @end 57 | 58 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBDiscoveryService.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKBDiscoveryService.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 02/06/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "HKBDiscoveryService.h" 10 | #import 11 | 12 | NSArray *ClassGetSubclasses(Class parentClass); 13 | 14 | 15 | @interface HKBDiscoveryService () 16 | @property (nonatomic, assign, getter=isDiscovering) BOOL discovering; 17 | @end 18 | 19 | @implementation HKBDiscoveryService 20 | 21 | +(NSArray*)allServices{ 22 | static NSArray *allServices = nil; 23 | 24 | if (allServices == nil) { 25 | // Get all HKBDiscoveryService subclasses automatically 26 | // From: http://www.cocoawithlove.com/2010/01/getting-subclasses-of-objective-c-class.html 27 | Class parentClass = [HKBDiscoveryService class]; 28 | int numClasses = objc_getClassList(NULL, 0); 29 | Class *classes = NULL; 30 | 31 | classes = (Class*)malloc(sizeof(Class) * numClasses); 32 | numClasses = objc_getClassList(classes, numClasses); 33 | 34 | NSMutableArray *result = [NSMutableArray array]; 35 | for (NSInteger i = 0; i < numClasses; i++) 36 | { 37 | Class superClass = classes[i]; 38 | do 39 | { 40 | superClass = class_getSuperclass(superClass); 41 | } while(superClass && superClass != parentClass); 42 | 43 | if (superClass == nil) { 44 | continue; 45 | } 46 | 47 | [result addObject:classes[i]]; 48 | } 49 | free(classes); 50 | 51 | allServices = result; 52 | } 53 | 54 | return allServices; 55 | } 56 | 57 | 58 | 59 | 60 | -(NSString *)displayName{ 61 | return @"OVERRIDE"; 62 | } 63 | 64 | -(void)startDiscovering 65 | { 66 | self.discovering = YES; 67 | 68 | // Do nothing, implement in subclass 69 | } 70 | 71 | -(void)stopDiscovering 72 | { 73 | self.discovering = NO; 74 | 75 | // Do nothing, implement in subclass 76 | } 77 | 78 | -(NSArray*)allAccesories{ 79 | // Implement in subclass 80 | 81 | return nil; 82 | } 83 | 84 | 85 | 86 | 87 | 88 | -(NSMenuItem*)createMenuItemForAccessory:(HKBAccessory*)accessory{ 89 | NSString *title = [accessory.name stringByAppendingFormat:@" - PIN: %@", accessory.passcode]; 90 | NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:title action:nil keyEquivalent:accessory.name]; 91 | item.representedObject = accessory; 92 | return item; 93 | } 94 | 95 | @end 96 | 97 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBLightAccessory+Subclass.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKBLightAccessory+Subclass.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 13/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | 10 | @interface HKBLightAccessory () 11 | @property (nonatomic, readonly) HAKService *lightBulbService; 12 | 13 | 14 | // Update HomeKit that these properties have changed externally from its commands. 15 | 16 | /// Update HomeKit to a power change 17 | -(void)updateHomeKitPowerState:(BOOL)newPowerState; 18 | 19 | /// Update HomeKit to a brightness change 20 | -(void)updateHomeKitBrightness:(NSInteger)brightness; 21 | 22 | /// Update HomeKit to a saturation change 23 | -(void)updateHomeKitSaturation:(NSInteger)saturation; 24 | 25 | /// Update HomeKit to a hue change 26 | -(void)updateHomeKitHue:(NSInteger)hue; 27 | 28 | 29 | 30 | // Update the external API that these properties have changed in HomeKit. 31 | 32 | /// Update external API to a new power state 33 | -(void)updateExternalPowerState:(BOOL)powerState; 34 | 35 | /// Update external API to a new brightness 36 | -(void)updateExternalBrightness:(NSInteger)brightness; 37 | 38 | /// Update external API to a new saturation 39 | -(void)updateExternalSaturation:(NSInteger)saturation; 40 | 41 | /// Update external API to a new hue 42 | -(void)updateExternalHue:(NSInteger)hue; 43 | @end 44 | 45 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBLightAccessory.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKBLightAccessory.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 11/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HKBAccessory.h" 11 | 12 | @class HKBLightAccessory; 13 | 14 | 15 | 16 | @protocol HKBLightAccessoryDelegate 17 | @required 18 | -(void)lightAccessory:(HKBLightAccessory*)light didChangePowerState:(BOOL)powerState; 19 | 20 | @optional 21 | -(void)lightAccessory:(HKBLightAccessory*)light didChangeBrightness:(NSInteger)brightness; // 0-100 22 | -(void)lightAccessory:(HKBLightAccessory*)light didChangeSaturation:(NSInteger)saturation; // 0-100 23 | -(void)lightAccessory:(HKBLightAccessory*)light didChangeHue:(NSInteger)hue; // 0-360 24 | @end 25 | 26 | 27 | 28 | /** 29 | * What abilities the light has. (Note: Must have power state) 30 | */ 31 | typedef NS_OPTIONS(NSInteger, HKBLightCapabilities) { 32 | HKBLightCapabilityHue = 1 << 0, 33 | HKBLightCapabilitySaturation = 1 << 1, 34 | HKBLightCapabilityBrightness = 1 << 2 35 | }; 36 | 37 | 38 | 39 | @interface HKBLightAccessory : HKBAccessory 40 | 41 | -(instancetype)initWithInformation:(NSDictionary*)information NS_UNAVAILABLE; 42 | 43 | /** 44 | * Create a new accessory with the supplied device information. If a key is missing the default information for that key will be used. "serialNumber" is a required key and will not be subsituted. 45 | * 46 | * @param information Keys: "name", "serialNumber", "manufacturer", "model" 47 | * @param characteristics The abilities the light has, a combo of: brightness, hue and saturation. 48 | */ 49 | -(instancetype)initWithInformation:(NSDictionary*)information andCharacteristics:(HKBLightCapabilities)capabilities; 50 | 51 | @property (nonatomic, assign) id delegate; 52 | @property (nonatomic, readonly) HKBLightCapabilities capabilities; 53 | 54 | 55 | 56 | #pragma mark Commands 57 | 58 | /** 59 | * Set: Command the accessory to change its power state (effects both externally bridged accessory and HomeKit) 60 | * 61 | * Get: Returns the HomeKit API's current value 62 | */ 63 | @property (nonatomic, assign) BOOL powerState; 64 | 65 | /** 66 | * Set: Command the accessory to change brightness (effects both HomeKit state and external API's state) 67 | * 68 | * Get: Returns the HomeKit API's current value 69 | * 70 | * Range: brightness 0-100 71 | */ 72 | @property (nonatomic, assign) NSInteger brightness; 73 | 74 | /** 75 | * Set: Command the accessory to change saturation (effects both HomeKit state and external API's state) 76 | * 77 | * Get: Returns the HomeKit API's current value 78 | * 79 | * Range: saturation 0-100 80 | */ 81 | @property (nonatomic, assign) NSInteger saturation; 82 | 83 | /** 84 | * Set: Command the accessory to change hue (effects both HomeKit state and external API's state) 85 | * 86 | * Get: Returns the HomeKit API's current value 87 | * 88 | * Range: 0-360 89 | */ 90 | @property (nonatomic, assign) NSInteger hue; 91 | 92 | @end 93 | 94 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBLightAccessory.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKBLightAccessory.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 11/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "HKBLightAccessory.h" 10 | #import "HKBLightAccessory+Subclass.h" 11 | 12 | 13 | @interface HKBLightAccessory () 14 | @property (nonatomic, readonly) HAKCharacteristic *powerCharacteristic; 15 | @property (nonatomic, readonly) HAKCharacteristic *saturationCharacteristic; 16 | @property (nonatomic, readonly) HAKCharacteristic *hueCharacteristic; 17 | @property (nonatomic, readonly) HAKCharacteristic *brightnessCharacteristic; 18 | @end 19 | 20 | 21 | 22 | @implementation HKBLightAccessory 23 | 24 | +(NSDictionary*)defaultInformation{ 25 | return @{NameKey: @"Lightbulb", ModelKey: @"WiFi Lightbulb v1.0", ManufacturerKey: @"Kyle Tech"}; 26 | } 27 | 28 | 29 | #pragma mark - Setup 30 | 31 | -(instancetype)initWithInformation:(NSDictionary*)information andCharacteristics:(HKBLightCapabilities)capabilities{ 32 | _capabilities = capabilities; 33 | self = [super initWithInformation:information]; 34 | return self; 35 | } 36 | 37 | 38 | -(void)setupServices{ 39 | [super setupServices]; //IMPORTANT! 40 | 41 | // Setup the lightbulb 42 | _lightBulbService = [[HAKService alloc] initWithType:[[HAKUUID alloc] initWithUUIDString:@"00000043"] name:@"Lightbulb"]; 43 | _powerCharacteristic = [_lightBulbService characteristicWithType:[[HAKUUID alloc] initWithUUIDString:@"00000025"]]; 44 | 45 | // If supports controlling brightness 46 | if (self.capabilities & HKBLightCapabilityBrightness) 47 | { 48 | _brightnessCharacteristic = [[HAKCharacteristic alloc] initWithType:[[HAKUUID alloc] initWithUUIDString:@"00000008"]]; 49 | [_lightBulbService addCharacteristic:_brightnessCharacteristic]; 50 | } 51 | 52 | // If supports controlling Hue 53 | if (self.capabilities & HKBLightCapabilityHue) 54 | { 55 | _hueCharacteristic = [[HAKCharacteristic alloc] initWithType:[[HAKUUID alloc] initWithUUIDString:@"00000013"]]; 56 | [_lightBulbService addCharacteristic:_hueCharacteristic]; 57 | } 58 | 59 | // If supports controlling Saturation 60 | if (self.capabilities & HKBLightCapabilitySaturation) 61 | { 62 | _saturationCharacteristic = [[HAKCharacteristic alloc] initWithType:[[HAKUUID alloc] initWithUUIDString:@"0000002F"]]; 63 | [_lightBulbService addCharacteristic:_saturationCharacteristic]; 64 | } 65 | 66 | [self.accessory addService:_lightBulbService]; 67 | } 68 | 69 | 70 | 71 | 72 | 73 | 74 | #pragma mark - HomeKit Notification 75 | 76 | -(void)characteristicDidUpdateValue:(HAKCharacteristic*)characteristic{ 77 | if (characteristic == _powerCharacteristic) 78 | { 79 | [self updateExternalPowerState:[characteristic.value boolValue]]; 80 | } 81 | else if (characteristic == _brightnessCharacteristic) 82 | { 83 | NSInteger brightness = [characteristic.value integerValue]; 84 | [self updateExternalBrightness:brightness]; 85 | } 86 | else if (characteristic == _saturationCharacteristic) 87 | { 88 | NSInteger saturation = [characteristic.value integerValue]; 89 | [self updateExternalSaturation:saturation]; 90 | } 91 | else if (characteristic == _hueCharacteristic) 92 | { 93 | NSInteger hue = [characteristic.value integerValue]; 94 | [self updateExternalHue:hue]; 95 | } 96 | } 97 | 98 | 99 | 100 | 101 | #pragma mark - Delegate methods 102 | 103 | -(void)notifyDelegateOfPowerChange{ 104 | [self.delegate lightAccessory:self didChangePowerState:self.powerState]; 105 | } 106 | -(void)notifyDelegateOfBrightnessChange{ 107 | if ([self.delegate respondsToSelector:@selector(lightAccessory:didChangeBrightness:)]) { 108 | [self.delegate lightAccessory:self didChangeBrightness:self.brightness]; 109 | } 110 | } 111 | -(void)notifyDelegateOfSaturationChange{ 112 | if ([self.delegate respondsToSelector:@selector(lightAccessory:didChangeSaturation:)]) { 113 | [self.delegate lightAccessory:self didChangeSaturation:self.saturation]; 114 | } 115 | } 116 | -(void)notifyDelegateOfHueChange{ 117 | if ([self.delegate respondsToSelector:@selector(lightAccessory:didChangeHue:)]) { 118 | [self.delegate lightAccessory:self didChangeHue:self.hue]; 119 | } 120 | } 121 | 122 | 123 | 124 | 125 | #pragma mark - Update external API to HomeKit changes 126 | 127 | -(void)updateExternalPowerState:(BOOL)powerState 128 | { 129 | // Do nothing, implement in subclass 130 | [self notifyDelegateOfPowerChange]; 131 | } 132 | -(void)updateExternalBrightness:(NSInteger)brightness 133 | { 134 | // Do nothing, implement in subclass 135 | [self notifyDelegateOfBrightnessChange]; 136 | } 137 | -(void)updateExternalSaturation:(NSInteger)saturation 138 | { 139 | // Do nothing, implement in subclass 140 | [self notifyDelegateOfSaturationChange]; 141 | } 142 | -(void)updateExternalHue:(NSInteger)hue 143 | { 144 | // Do nothing, implement in subclass 145 | [self notifyDelegateOfHueChange]; 146 | } 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | #pragma mark - Update HomeKit to external changes 157 | 158 | // - Conversion: HomeKit 159 | // hue; // [0, 360] 160 | // saturation; // [0, 100] 161 | // brightness; // [0, 100] 162 | 163 | -(void)updateHomeKitPowerState:(BOOL)newPowerState{ 164 | _powerCharacteristic.value = @(newPowerState); 165 | 166 | [self notifyDelegateOfPowerChange]; 167 | } 168 | 169 | -(void)updateHomeKitBrightness:(NSInteger)brightness{ 170 | HAKCharacteristic *characteristic = _brightnessCharacteristic; 171 | 172 | if ([characteristic.constraints validateValue:@(brightness)]) 173 | { 174 | characteristic.value = @(brightness); 175 | 176 | [self notifyDelegateOfBrightnessChange]; 177 | } 178 | } 179 | 180 | -(void)updateHomeKitSaturation:(NSInteger)saturation{ 181 | HAKCharacteristic *characteristic = _saturationCharacteristic; 182 | 183 | if ([characteristic.constraints validateValue:@(saturation)]) 184 | { 185 | characteristic.value = @(saturation); 186 | 187 | [self notifyDelegateOfSaturationChange]; 188 | } 189 | } 190 | 191 | -(void)updateHomeKitHue:(NSInteger)hue{ 192 | HAKCharacteristic *characteristic = _hueCharacteristic; 193 | 194 | if ([characteristic.constraints validateValue:@(hue)]) 195 | { 196 | characteristic.value = @(hue); 197 | 198 | [self notifyDelegateOfHueChange]; 199 | } 200 | } 201 | 202 | 203 | 204 | 205 | 206 | 207 | #pragma mark - Commands 208 | 209 | -(BOOL)powerState{ 210 | return [self.powerCharacteristic.value boolValue]; 211 | } 212 | -(void)setPowerState:(BOOL)powerState{ 213 | [self updateExternalPowerState:powerState]; 214 | [self updateHomeKitPowerState:powerState]; 215 | // TODO: This calls the delegate twice, need to think of a fix 216 | } 217 | 218 | -(NSInteger)brightness{ 219 | return [self.brightnessCharacteristic.value integerValue]; 220 | } 221 | -(void)setBrightness:(NSInteger)brightness{ 222 | [self updateExternalBrightness:brightness]; 223 | [self updateHomeKitBrightness:brightness]; 224 | } 225 | 226 | -(NSInteger)saturation{ 227 | return [self.saturationCharacteristic.value integerValue]; 228 | } 229 | -(void)setSaturation:(NSInteger)saturation{ 230 | [self updateExternalSaturation:saturation]; 231 | [self updateHomeKitSaturation:saturation]; 232 | } 233 | 234 | -(NSInteger)hue{ 235 | return [self.hueCharacteristic.value integerValue]; 236 | } 237 | -(void)setHue:(NSInteger)hue{ 238 | [self updateExternalHue:hue]; 239 | [self updateHomeKitHue:hue]; 240 | } 241 | 242 | @end 243 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBTransportCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKBTransportCache.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 31/05/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class HAKTransport; 12 | 13 | @interface HKBTransportCache : NSObject 14 | /** 15 | * Creates and persists a HAKTransport for a given device. 16 | * 17 | * @param serialNumber The unique serial number of the device. 18 | * 19 | * @return A HAKTransport object for the device. 20 | */ 21 | +(HAKTransport*)transportForSerialNumber:(NSString*)serialNumber; 22 | @end 23 | -------------------------------------------------------------------------------- /HomeKitBridge/HKBTransportCache.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKBTransportCache.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 31/05/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "HKBTransportCache.h" 10 | #import "HAKAccessoryKit.h" 11 | 12 | 13 | @implementation HKBTransportCache 14 | 15 | +(HAKTransport*)transportForSerialNumber:(NSString*)serialNumber{ 16 | NSString *filename = [serialNumber stringByAppendingString:@".plist"]; 17 | NSURL *cacheFile = [[self cacheFolderURL] URLByAppendingPathComponent:filename]; 18 | 19 | HAKTransport *transport = [NSKeyedUnarchiver unarchiveObjectWithFile:[cacheFile path]]; 20 | if (transport) { 21 | return transport; 22 | } 23 | 24 | transport = [[HAKIPTransport alloc] init]; 25 | [transport password]; // This init's the pass without this it breaks by generating new ones on each app relaunch. 26 | 27 | [NSKeyedArchiver archiveRootObject:transport toFile:[cacheFile path]]; 28 | 29 | return transport; 30 | } 31 | 32 | /// Folder path to store the caches/settings in 33 | +(NSURL*)cacheFolderURL{ 34 | NSFileManager *fileManager = [NSFileManager defaultManager]; 35 | NSURL *appFolder = [[fileManager URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil] URLByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier]]; 36 | 37 | if ([fileManager fileExistsAtPath:[appFolder path]] == NO) { 38 | [fileManager createDirectoryAtPath:[appFolder path] withIntermediateDirectories:NO attributes:nil error:nil]; 39 | } 40 | 41 | return appFolder; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /HomeKitBridge/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /HomeKitBridge/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.iKy1e.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSApplicationCategoryType 26 | public.app-category.utilities 27 | LSMinimumSystemVersion 28 | $(MACOSX_DEPLOYMENT_TARGET) 29 | NSHumanReadableCopyright 30 | Copyright © 2014 Kyle Howells. All rights reserved. 31 | NSMainNibFile 32 | MainMenu 33 | NSPrincipalClass 34 | NSApplication 35 | LSUIElement 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/HKBLIFXDiscoveryService.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKBLIFXDiscoveryService.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 02/06/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "HKBDiscoveryService.h" 10 | #import "HKBLightAccessoryLIFX.h" 11 | 12 | @interface HKBLIFXDiscoveryService : HKBDiscoveryService 13 | -(NSMenuItem*)createMenuItemForAccessory:(HKBLightAccessoryLIFX*)accessory; 14 | @end 15 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/HKBLIFXDiscoveryService.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKBLIFXDiscoveryService.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 02/06/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "HKBLIFXDiscoveryService.h" 10 | 11 | #import 12 | #import "HKBLightAccessoryLIFX.h" 13 | 14 | 15 | @interface HKBLIFXDiscoveryService () 16 | @property (nonatomic, strong) NSMutableDictionary *lightAccessories; 17 | @property (nonatomic, strong) NSMutableDictionary *accessoriesMenuItems; 18 | @end 19 | 20 | 21 | @implementation HKBLIFXDiscoveryService 22 | 23 | -(instancetype)init{ 24 | if (self = [super init]) { 25 | self.lightAccessories = [NSMutableDictionary dictionary]; 26 | self.accessoriesMenuItems = [NSMutableDictionary dictionary]; 27 | } 28 | return self; 29 | } 30 | 31 | 32 | -(NSString*)displayName{ 33 | return @"LIFX"; 34 | } 35 | 36 | -(NSArray*)allAccesories{ 37 | return [[self.lightAccessories objectEnumerator] allObjects]; 38 | } 39 | 40 | 41 | 42 | 43 | 44 | -(void)startDiscovering{ 45 | [super startDiscovering]; 46 | [[[LFXClient sharedClient] localNetworkContext].allLightsCollection addLightCollectionObserver:self]; 47 | } 48 | 49 | -(void)stopDiscovering{ 50 | [[[LFXClient sharedClient] localNetworkContext].allLightsCollection removeLightCollectionObserver:self]; 51 | [super stopDiscovering]; 52 | } 53 | 54 | 55 | 56 | 57 | 58 | #pragma mark - LFXLightCollectionObserver 59 | 60 | -(void)lightCollection:(LFXLightCollection *)lightCollection didAddLight:(LFXLight *)light{ 61 | [light addLightObserver:self]; 62 | [self addLight:light]; 63 | } 64 | -(void)lightCollection:(LFXLightCollection *)lightCollection didRemoveLight:(LFXLight *)light{ 65 | [self removeLight:light]; 66 | [light removeLightObserver:self]; 67 | } 68 | 69 | #pragma mark LFXLightObserver 70 | 71 | -(void)light:(LFXLight *)light didChangeReachability:(LFXDeviceReachability)reachability{ 72 | if (reachability == LFXDeviceReachabilityReachable) { 73 | [self addLight:light]; 74 | } 75 | else { 76 | [self removeLight:light]; 77 | } 78 | } 79 | 80 | 81 | 82 | -(void)addLight:(LFXLight*)lifxLight{ 83 | if (self.lightAccessories[lifxLight.deviceID] != nil || lifxLight.reachability != LFXDeviceReachabilityReachable) { 84 | return; 85 | } 86 | 87 | // Create light 88 | HKBLightAccessoryLIFX *light = [[HKBLightAccessoryLIFX alloc] initWithLightBulb:lifxLight]; 89 | light.delegate = self; 90 | 91 | self.lightAccessories[lifxLight.deviceID] = light; 92 | [self.delegate discoveryService:self didDiscoverAccessory:light]; 93 | } 94 | -(void)removeLight:(LFXLight*)lifxLight{ 95 | if (self.lightAccessories[lifxLight.deviceID] == nil) { return; } 96 | 97 | HKBLightAccessoryLIFX *light = self.lightAccessories[lifxLight.deviceID]; 98 | 99 | // Get rid of it 100 | [self.lightAccessories removeObjectForKey:lifxLight.deviceID]; 101 | [self.delegate discoveryService:self didLoseAccessory:light]; 102 | } 103 | 104 | 105 | 106 | 107 | 108 | #pragma mark - NSMenuItem 109 | 110 | -(NSMenuItem*)createMenuItemForAccessory:(HKBLightAccessoryLIFX*)accessory{ 111 | NSMenuItem *item = [super createMenuItemForAccessory:accessory]; 112 | [item setTarget:self]; 113 | [item setAction:@selector(toggleLightAccessory:)]; 114 | 115 | self.accessoriesMenuItems[accessory.serialNumber] = item; 116 | 117 | [self updateMenuItemState:item]; 118 | return item; 119 | } 120 | 121 | -(void)toggleLightAccessory:(NSMenuItem*)item{ 122 | HKBLightAccessoryLIFX *lightAccessory = item.representedObject; 123 | lightAccessory.powerState = !lightAccessory.powerState; 124 | [self updateMenuItemState:item]; 125 | } 126 | 127 | -(void)updateMenuItemState:(NSMenuItem*)item{ 128 | HKBLightAccessoryLIFX *lightAccessory = item.representedObject; 129 | item.state = lightAccessory.powerState ? NSOnState : NSOffState; 130 | } 131 | 132 | 133 | 134 | #pragma mark - HKBLightAccessoryDelegate 135 | 136 | -(void)lightAccessory:(HKBLightAccessory*)light didChangePowerState:(BOOL)powerState{ 137 | NSMenuItem *item = self.accessoriesMenuItems[light.serialNumber]; 138 | [self updateMenuItemState:item]; 139 | } 140 | 141 | @end 142 | 143 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/HKBLightAccessoryLIFX.h: -------------------------------------------------------------------------------- 1 | // 2 | // HKBLightAccessoryLIFX.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 13/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "HKBLightAccessory.h" 10 | 11 | @class LFXLight; 12 | 13 | 14 | @interface HKBLightAccessoryLIFX : HKBLightAccessory 15 | 16 | // Remove old init method 17 | -(instancetype)initWithInformation:(NSDictionary*)information andCharacteristics:(HKBLightCapabilities)characteristics NS_UNAVAILABLE; 18 | 19 | /** 20 | * Creates an accessory lightbulb object to match a LIFX bulb 21 | * 22 | * @param lightBulb The LIFX bulbs API object for that light. 23 | */ 24 | -(instancetype)initWithLightBulb:(LFXLight*)lightBulb; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/HKBLightAccessoryLIFX.m: -------------------------------------------------------------------------------- 1 | // 2 | // HKBLightAccessoryLIFX.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 13/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "HAKNumberConstraints.h" 10 | #import "HKBLightAccessoryLIFX.h" 11 | 12 | #import 13 | #import "HKBLightAccessory+Subclass.h" 14 | 15 | @interface HKBLightAccessoryLIFX () 16 | @property (nonatomic, strong) LFXLight *lifxBulb; 17 | 18 | @property (nonatomic, strong) HAKCharacteristic *kelvinCharacteristic; 19 | @end 20 | 21 | 22 | #pragma mark - 23 | 24 | @implementation HKBLightAccessoryLIFX 25 | 26 | +(NSDictionary*)defaultInformation{ 27 | return @{NameKey:@"Lightbulb", ModelKey:@"WiFi bulb white v1", ManufacturerKey:@"LIFX"}; 28 | } 29 | 30 | 31 | -(void)dealloc{ 32 | [self.lifxBulb removeLightObserver:self]; 33 | } 34 | 35 | 36 | #pragma mark - Setup 37 | 38 | -(instancetype)initWithLightBulb:(LFXLight*)lightBulb{ 39 | // Settings 40 | HKBLightCapabilities lightAbilities = (HKBLightCapabilityBrightness | HKBLightCapabilityHue | HKBLightCapabilitySaturation); 41 | NSDictionary *information = @{NameKey : lightBulb.label, SerialNumberKey : lightBulb.deviceID}; 42 | 43 | // Create light 44 | if (self = [super initWithInformation:information andCharacteristics:lightAbilities]) { 45 | self.lifxBulb = lightBulb; 46 | [self updateHKColorValues]; 47 | [self updateHKPowerState]; 48 | 49 | [self.lifxBulb addLightObserver:self]; 50 | } 51 | 52 | return self; 53 | } 54 | 55 | 56 | // TODO: work out how to define custom characteristics and add the kelvin value of LIFX bulbs 57 | -(void)setupServices{ 58 | [super setupServices]; 59 | 60 | _kelvinCharacteristic = [[HAKCharacteristic alloc] initWithType:[HAKUUID UUIDWithUUIDString:@"0836D660-26E5-4D17-A714-A15DB6EAC9A5"] properties:11 format:HAKCharacteristicFormatUInt16]; 61 | HAKNumberConstraints *kelvinConstraints = [[HAKNumberConstraints alloc] initWithMinimumValue:@(LFXHSBKColorMinKelvin) maximumValue:@(LFXHSBKColorMaxKelvin)]; 62 | _kelvinCharacteristic.constraints = kelvinConstraints; 63 | 64 | [self.lightBulbService addCharacteristic:_kelvinCharacteristic]; 65 | } 66 | 67 | -(void)characteristicDidUpdateValue:(HAKCharacteristic*)characteristic 68 | { 69 | [super characteristicDidUpdateValue:characteristic]; 70 | 71 | if (characteristic == self.kelvinCharacteristic) { 72 | [self updateExternalKelvin:[characteristic.value unsignedIntValue]]; 73 | } 74 | 75 | //if (characteristic.service == self.lightBulbService) {} 76 | } 77 | 78 | 79 | 80 | 81 | #pragma mark - LFXLightObserver 82 | 83 | // I choose not to bridge label=name as I have my LIFX bulbs and HomeKit bulbs named very differently 84 | //-(void)light:(LFXLight *)light didChangeLabel:(NSString *)label{ 85 | // self.accessory.name = light.label; 86 | //} 87 | -(void)light:(LFXLight *)light didChangeColor:(LFXHSBKColor *)color{ 88 | [self updateHKColorValues]; 89 | } 90 | -(void)light:(LFXLight *)light didChangePowerState:(LFXPowerState)powerState{ 91 | [self updateHKPowerState]; 92 | } 93 | 94 | 95 | 96 | 97 | 98 | 99 | #pragma mark - Update HomeKit to LIFX values 100 | 101 | -(void)updateHKPowerState{ 102 | [self updateHomeKitPowerState:(self.lifxBulb.powerState == LFXPowerStateOn)]; 103 | } 104 | 105 | -(void)updateHKColorValues{ 106 | // - Conversion: LIFX HomeKit 107 | // hue; // [0, 360] - [0, 360] 108 | // saturation; // [0, 1] - [0, 100] 109 | // brightness; // [0, 1] - [0, 100] 110 | 111 | [self updateHomeKitBrightness:(self.lifxBulb.color.brightness * 100)]; 112 | [self updateHomeKitSaturation:(self.lifxBulb.color.saturation * 100)]; 113 | [self updateHomeKitHue:self.lifxBulb.color.hue]; 114 | 115 | [self updateHomeKitKelvin:self.lifxBulb.color.kelvin]; 116 | } 117 | 118 | -(void)updateHomeKitKelvin:(NSUInteger)kelvin{ 119 | HAKCharacteristic *characteristic = self.kelvinCharacteristic; 120 | 121 | if ([characteristic.constraints validateValue:@(kelvin)]) { 122 | characteristic.value = @(kelvin); 123 | } 124 | } 125 | 126 | 127 | 128 | 129 | #pragma mark - Update LIFX API to HomeKit changes 130 | 131 | -(void)updateExternalPowerState:(BOOL)powerState{ 132 | [self.lifxBulb setPowerState:powerState ? LFXPowerStateOn : LFXPowerStateOff]; 133 | } 134 | 135 | -(void)updateExternalBrightness:(NSInteger)brightness{ 136 | CGFloat _brightness = brightness * 0.01; 137 | 138 | LFXLight *lfxLight = self.lifxBulb; 139 | 140 | LFXHSBKColor *currentColor = [lfxLight color]; 141 | LFXHSBKColor *newColor = [LFXHSBKColor colorWithHue:currentColor.hue saturation:currentColor.saturation brightness:_brightness]; 142 | 143 | [lfxLight setColor:newColor]; 144 | } 145 | 146 | -(void)updateExternalSaturation:(NSInteger)saturation{ 147 | CGFloat _saturation = saturation * 0.01; 148 | 149 | LFXLight *lfxLight = self.lifxBulb; 150 | 151 | LFXHSBKColor *currentColor = [lfxLight color]; 152 | LFXHSBKColor *newColor = [LFXHSBKColor colorWithHue:currentColor.hue saturation:_saturation brightness:currentColor.brightness]; 153 | 154 | [lfxLight setColor:newColor]; 155 | } 156 | 157 | -(void)updateExternalHue:(NSInteger)hue{ 158 | LFXLight *lfxLight = [self lifxBulb]; 159 | 160 | LFXHSBKColor *currentColor = [lfxLight color]; 161 | LFXHSBKColor *newColor = [LFXHSBKColor colorWithHue:hue saturation:currentColor.saturation brightness:currentColor.brightness]; 162 | 163 | [lfxLight setColor:newColor]; 164 | } 165 | 166 | -(void)updateExternalKelvin:(uint16_t)kelvin{ 167 | LFXLight *lfxLight = [self lifxBulb]; 168 | 169 | LFXHSBKColor *currentColor = [lfxLight color]; 170 | LFXHSBKColor *newColor = [LFXHSBKColor colorWithHue:currentColor.hue saturation:currentColor.saturation brightness:currentColor.brightness kelvin:kelvin]; 171 | 172 | [lfxLight setColor:newColor]; 173 | } 174 | 175 | 176 | 177 | 178 | 179 | 180 | #pragma mark - Properties 181 | 182 | -(NSString*)deviceID{ 183 | return self.accessory.serialNumber; 184 | } 185 | 186 | @end 187 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/LIFXKit: -------------------------------------------------------------------------------- 1 | Versions/Current/LIFXKit -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXAllLightsCollection.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXAllLightsCollection.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 3/03/2014. 6 | // Copyright (c) 2014 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import "LFXLightCollection.h" 10 | 11 | @interface LFXAllLightsCollection : LFXLightCollection 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXClient.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXClient.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 12/12/2013. 6 | // Copyright (c) 2013 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | @class LFXNetworkContext; 11 | @protocol LFXClientObserver; 12 | 13 | 14 | @interface LFXClient : NSObject 15 | 16 | // Designated Factory Method 17 | 18 | + (LFXClient *)sharedClient; 19 | 20 | @property (nonatomic, readonly) NSArray /* LFXNetworkContext */ *networkContexts; 21 | 22 | @property (nonatomic, readonly) LFXNetworkContext *localNetworkContext; 23 | 24 | 25 | // Observers 26 | - (void)addClientObserver:(id )observer; 27 | - (void)removeClientObserver:(id )observer; 28 | 29 | @end 30 | 31 | 32 | 33 | @protocol LFXClientObserver 34 | 35 | @optional 36 | 37 | - (void)client:(LFXClient *)client didAddNetworkContext:(LFXNetworkContext *)networkContext; 38 | - (void)client:(LFXClient *)client didRemoveNetworkContext:(LFXNetworkContext *)networkContext; 39 | 40 | // Deprecated 41 | - (void)client:(LFXClient *)client networkContextDidConnect:(LFXNetworkContext *)networkContext DEPRECATED_MSG_ATTRIBUTE("use -[LFXNetworkContextObserver networkContext:didChangeConnectionState: instead"); 42 | - (void)client:(LFXClient *)client networkContextDidDisconnect:(LFXNetworkContext *)networkContext DEPRECATED_MSG_ATTRIBUTE("use -[LFXNetworkContextObserver networkContext:didChangeConnectionState: instead"); 43 | 44 | @end -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXDevice.h 3 | // LIFXKit 4 | // 5 | // Created by Nick Forge on 16/05/2014. 6 | // Copyright (c) 2014 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | @class LFXNetworkContext; 11 | #import "LFXTypes.h" 12 | 13 | @interface LFXDevice : NSObject 14 | 15 | @property (nonatomic, readonly, weak) LFXNetworkContext *networkContext; 16 | @property (nonatomic, readonly) NSString *deviceID; 17 | @property (nonatomic, readonly) LFXDeviceReachability reachability; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXHSBKColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXHSBKColor.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 13/09/13. 6 | // Copyright (c) 2013 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | // Ranges of HSBK components 13 | 14 | extern CGFloat const LFXHSBKColorMinHue; // 0.0 15 | extern CGFloat const LFXHSBKColorMaxHue; // 360.0 16 | 17 | extern CGFloat const LFXHSBKColorMinSaturation; // 0.0 18 | extern CGFloat const LFXHSBKColorMaxSaturation; // 1.0 19 | 20 | extern CGFloat const LFXHSBKColorMinBrightness; // 0.0 21 | extern CGFloat const LFXHSBKColorMaxBrightness; // 1.0 22 | 23 | extern uint16_t const LFXHSBKColorMinKelvin; // 2500 24 | extern uint16_t const LFXHSBKColorMaxKelvin; // 9000 25 | 26 | extern uint16_t const LFXHSBKColorDefaultKelvin; // 3500 27 | 28 | 29 | 30 | @interface LFXHSBKColor : NSObject 31 | 32 | + (LFXHSBKColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness kelvin:(uint16_t)kelvin; 33 | 34 | // Convenience factory method with default Kelvin value (3500) 35 | + (LFXHSBKColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness; 36 | 37 | // Convenience factory method for whites (hue and saturation will be set to 0.0) 38 | + (LFXHSBKColor *)whiteColorWithBrightness:(CGFloat)brightness kelvin:(uint16_t)kelvin; 39 | 40 | 41 | // Limits are also available as constants above 42 | @property (nonatomic) CGFloat hue; // [0, 360] 43 | @property (nonatomic) CGFloat saturation; // [0, 1] 44 | @property (nonatomic) CGFloat brightness; // [0, 1] 45 | @property (nonatomic) uint16_t kelvin; // [2500, 9000] 46 | 47 | // Returns YES if saturation = 0.0; 48 | - (BOOL)isWhite; 49 | 50 | // Returns a copy of the color, with the brightness component modified 51 | - (LFXHSBKColor *)colorWithBrightness:(CGFloat)brightnessComponent; 52 | 53 | 54 | - (NSString *)stringValue; // "HSBK: (0.1, 0.4, 0.2, 5000)" 55 | 56 | 57 | // Note: the algorithm used to "average" an array of colors isn't always very perceptually accurate 58 | + (LFXHSBKColor *)averageOfColors:(NSArray *)colors; // is an array of LFXHSBKColors 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXLight.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXLight.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 12/12/2013. 6 | // Copyright (c) 2013 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | @class LFXNetworkContext; 11 | @protocol LFXLightObserver; 12 | #import "LFXDevice.h" 13 | #import "LFXTypes.h" 14 | 15 | 16 | @interface LFXLight : LFXDevice 17 | 18 | // Tags 19 | @property (nonatomic, readonly) NSArray /* NSString */ *tags; 20 | @property (nonatomic, readonly) NSArray /* LFXTaggedLightCollection */ *taggedCollections; 21 | 22 | 23 | // Most of these Light State and Light Control methods are declared in LFXLightTarget, 24 | // so you can use the same methods on both LFXLight and LFXLightCollection objects. 25 | 26 | // Light State 27 | - (NSString *)label; 28 | - (LFXHSBKColor *)color; 29 | - (LFXPowerState)powerState; 30 | - (LFXFuzzyPowerState)fuzzyPowerState; 31 | 32 | 33 | // Light Control 34 | - (void)setLabel:(NSString *)label; 35 | - (void)setColor:(LFXHSBKColor *)color; 36 | - (void)setColor:(LFXHSBKColor *)color overDuration:(NSTimeInterval)duration; 37 | - (void)setPowerState:(LFXPowerState)powerState; 38 | 39 | 40 | // Firmware Versions 41 | - (NSString *)meshFirmwareVersion; 42 | - (NSString *)wifiFirmwareVersion; 43 | - (BOOL)meshFirmwareVersionIsAtLeast:(NSString *)version; 44 | - (BOOL)wifiFirmwareVersionIsAtLeast:(NSString *)version; 45 | 46 | 47 | // Observers 48 | - (void)addLightObserver:(id )observer; 49 | - (void)removeLightObserver:(id )observer; 50 | 51 | @end 52 | 53 | 54 | @protocol LFXLightObserver 55 | 56 | @optional 57 | - (void)light:(LFXLight *)light didChangeLabel:(NSString *)label; 58 | - (void)light:(LFXLight *)light didChangeColor:(LFXHSBKColor *)color; 59 | - (void)light:(LFXLight *)light didChangePowerState:(LFXPowerState)powerState; 60 | - (void)light:(LFXLight *)light didChangeReachability:(LFXDeviceReachability)reachability; 61 | 62 | - (void)light:(LFXLight *)light didChangeMeshFirmwareVersion:(NSString *)meshFirmwareVersion; 63 | - (void)light:(LFXLight *)light didChangeWifiFirmwareVersion:(NSString *)wifiFirmwareVersion; 64 | 65 | @end 66 | 67 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXLightCollection.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXLightCollection.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 3/03/2014. 6 | // Copyright (c) 2014 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LFXTypes.h" 11 | @class LFXNetworkContext, LFXLight, LFXHSBKColor; 12 | @protocol LFXLightCollectionObserver; 13 | 14 | @interface LFXLightCollection : NSObject 15 | 16 | @property (nonatomic, readonly, weak) LFXNetworkContext *networkContext; 17 | 18 | 19 | @property (nonatomic, readonly) NSArray /* LFXLight */ *lights; 20 | 21 | // Query Methods (these will often be faster than performing the same actions on the result of -lights) 22 | - (BOOL)containsLight:(LFXLight *)light; 23 | - (LFXLight *)lightForDeviceID:(NSString *)deviceID; 24 | 25 | // note: There may be more than one light with a particular label 26 | - (LFXLight *)firstLightForLabel:(NSString *)label; 27 | - (NSArray /* LFXLight */ *)lightsForLabel:(NSString *)label; 28 | 29 | 30 | 31 | // Light State 32 | - (NSString *)label; 33 | - (LFXHSBKColor *)color; 34 | - (LFXFuzzyPowerState)fuzzyPowerState; 35 | 36 | // Light Control 37 | - (void)setLabel:(NSString *)label; 38 | - (void)setColor:(LFXHSBKColor *)color; 39 | - (void)setColor:(LFXHSBKColor *)color overDuration:(NSTimeInterval)duration; 40 | - (void)setPowerState:(LFXPowerState)powerState; 41 | 42 | 43 | // Observers 44 | - (void)addLightCollectionObserver:(id )observer; 45 | - (void)removeLightCollectionObserver:(id )observer; 46 | 47 | @end 48 | 49 | 50 | 51 | @protocol LFXLightCollectionObserver 52 | 53 | @optional 54 | 55 | - (void)lightCollection:(LFXLightCollection *)lightCollection didAddLight:(LFXLight *)light; 56 | - (void)lightCollection:(LFXLightCollection *)lightCollection didRemoveLight:(LFXLight *)light; 57 | 58 | - (void)lightCollection:(LFXLightCollection *)lightCollection didChangeLabel:(NSString *)label; 59 | - (void)lightCollection:(LFXLightCollection *)lightCollection didChangeColor:(LFXHSBKColor *)color; 60 | - (void)lightCollection:(LFXLightCollection *)lightCollection didChangeFuzzyPowerState:(LFXFuzzyPowerState)fuzzyPowerState; 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXNetworkContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXNetworkContext.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 3/03/2014. 6 | // Copyright (c) 2014 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LFXTypes.h" 11 | @class LFXClient, LFXLightCollection, LFXTaggedLightCollection, LFXAdHocLightCollection; 12 | @protocol LFXNetworkContextObserver; 13 | 14 | extern NSString * const LFXNetworkContextErrorDomain; 15 | 16 | typedef NS_ENUM(NSInteger, LFXNetworkContextErrorCode) { 17 | LFXNetworkContextTimeoutError = 1, 18 | LFXNetworkContextAuthenticationError = 2, 19 | LFXNetworkContextNetworkDownError = 3, 20 | LFXNetworkContextNoDevicesFoundError = 4, 21 | }; 22 | 23 | extern NSString * const LFXNetworkContextTypeLocal; 24 | 25 | @interface LFXNetworkContext : NSObject 26 | 27 | @property (nonatomic, readonly, weak) LFXClient *client; 28 | 29 | 30 | @property (nonatomic, readonly) NSString *networkContextType; // LFXNetworkContextType* 31 | @property (nonatomic, readonly) NSString *name; 32 | 33 | @property (nonatomic) BOOL isEnabled; 34 | @property (nonatomic, readonly) LFXConnectionState connectionState; 35 | 36 | 37 | // 38 | // Lights 39 | // 40 | 41 | @property (nonatomic, readonly) LFXLightCollection *allLightsCollection; 42 | @property (nonatomic, readonly) LFXLightCollection *untaggedLightsCollection; 43 | 44 | 45 | // 46 | // Tags 47 | // 48 | 49 | // Querying Tags 50 | @property (nonatomic, readonly) NSArray /* LFXTaggedLightCollection */ *taggedLightCollections; 51 | - (LFXTaggedLightCollection *)taggedLightCollectionForTag:(NSString *)tag; // Convenience method 52 | 53 | // Manipulating Tags 54 | - (LFXTaggedLightCollection *)addTaggedLightCollectionWithTag:(NSString *)tag; 55 | - (void)deleteTaggedLightCollection:(LFXTaggedLightCollection *)taggedLightCollection; 56 | 57 | 58 | 59 | // 60 | // Ad Hoc Collections 61 | // 62 | 63 | - (LFXAdHocLightCollection *)createAdHocLightCollection; 64 | 65 | 66 | 67 | // Observers 68 | 69 | - (void)addNetworkContextObserver:(id )observer; 70 | - (void)removeNetworkContextObserver:(id )observer; 71 | 72 | @end 73 | 74 | 75 | 76 | @interface LFXNetworkContext (Deprecated) 77 | 78 | @property (nonatomic, readonly) BOOL isConnected DEPRECATED_MSG_ATTRIBUTE("use .connectionState instead."); 79 | 80 | @end 81 | 82 | 83 | 84 | @protocol LFXNetworkContextObserver 85 | 86 | @optional 87 | - (void)networkContext:(LFXNetworkContext *)networkContext didChangeIsEnabled:(BOOL)isEnabled; 88 | 89 | - (void)networkContext:(LFXNetworkContext *)networkContext didChangeConnectionState:(LFXConnectionState)connectionState; 90 | - (void)networkContext:(LFXNetworkContext *)networkContext didDisconnectWithError:(NSError *)error; 91 | 92 | - (void)networkContext:(LFXNetworkContext *)networkContext didAddTaggedLightCollection:(LFXTaggedLightCollection *)collection; 93 | - (void)networkContext:(LFXNetworkContext *)networkContext didRemoveTaggedLightCollection:(LFXTaggedLightCollection *)collection; 94 | 95 | // Deprecated 96 | - (void)networkContextDidConnect:(LFXNetworkContext *)networkContext DEPRECATED_MSG_ATTRIBUTE("use networkContext:didChangeConnectionState: instead"); 97 | - (void)networkContextDidDisconnect:(LFXNetworkContext *)networkContext DEPRECATED_MSG_ATTRIBUTE("use networkContext:didChangeConnectionState: instead"); 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXTaggedLightCollection.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXTaggedLightCollection.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 3/03/2014. 6 | // Copyright (c) 2014 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import "LFXLightCollection.h" 10 | @class LFXLight; 11 | 12 | @interface LFXTaggedLightCollection : LFXLightCollection 13 | 14 | 15 | 16 | // Each LFXTaggedLightCollection uniquely corresponds to a particular 17 | @property (nonatomic, readonly) NSString *tag; 18 | 19 | 20 | // Returns YES on success, or NO if there was already a tag with that name 21 | - (BOOL)renameWithNewTag:(NSString *)tag; 22 | 23 | 24 | // Use these methods to manage light/tag relationships 25 | - (void)addLight:(LFXLight *)light; 26 | - (void)removeLight:(LFXLight *)light; 27 | - (void)removeAllLights; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LFXTypes.h: -------------------------------------------------------------------------------- 1 | // 2 | // LFXTypes.h 3 | // LIFX 4 | // 5 | // Created by Nick Forge on 23/09/13. 6 | // Copyright (c) 2013 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | @class LFXHSBKColor, LFXTarget; 11 | 12 | // Device Reachability 13 | 14 | typedef NS_ENUM(NSUInteger, LFXDeviceReachability) { 15 | LFXDeviceReachabilityReachable, 16 | LFXDeviceReachabilityUnreachable, 17 | }; 18 | 19 | // NSString -> LFXDeviceReachability Conversions 20 | 21 | NSString *NSStringFromLFXDeviceReachability(LFXDeviceReachability reachability); 22 | 23 | 24 | // Connection States 25 | 26 | typedef NS_ENUM(NSInteger, LFXConnectionState) { 27 | LFXConnectionStateNotConnected = 0, 28 | LFXConnectionStateConnecting = 1, 29 | LFXConnectionStateConnected = 2, 30 | }; 31 | 32 | NSString *NSStringFromLFXConnectionState(LFXConnectionState connectionState); 33 | 34 | // Power States 35 | 36 | typedef NS_ENUM(NSUInteger, LFXFuzzyPowerState) { 37 | LFXFuzzyPowerStateOff = 0, 38 | LFXFuzzyPowerStateOn = 1, 39 | LFXFuzzyPowerStateMixed = 2, 40 | }; 41 | 42 | typedef NS_ENUM(NSUInteger, LFXPowerState) { 43 | LFXPowerStateOff = 0, 44 | LFXPowerStateOn = 1, 45 | }; 46 | 47 | // LFXPowerState <-> LFXFuzzyPowerState <-> NSString Conversions 48 | LFXFuzzyPowerState LFXFuzzyPowerStateFromPowerState(LFXPowerState powerState); 49 | 50 | NSString *NSStringFromLFXPowerState(LFXPowerState powerState); 51 | NSString *NSStringFromLFXFuzzyPowerState(LFXFuzzyPowerState fuzzyPowerState); 52 | 53 | 54 | 55 | // Light Targets 56 | 57 | @protocol LFXLightTarget 58 | 59 | - (LFXTarget *)target; 60 | 61 | - (NSArray *)lights; // Returns all of the lights "in" the target 62 | 63 | // Light State 64 | - (NSString *)label; 65 | - (LFXHSBKColor *)color; 66 | - (LFXFuzzyPowerState)fuzzyPowerState; 67 | 68 | - (BOOL)labelIsEditable; 69 | 70 | // Light Control 71 | - (void)setLabel:(NSString *)label; 72 | - (void)setColor:(LFXHSBKColor *)color; 73 | - (void)setColor:(LFXHSBKColor *)color overDuration:(NSTimeInterval)duration; 74 | - (void)setPowerState:(LFXPowerState)powerState; 75 | 76 | @end 77 | 78 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Headers/LIFXKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // LIFX.h 3 | // LIFX SDK Obj-C 4 | // 5 | // Created by Nick Forge on 12/03/2014. 6 | // Copyright (c) 2014 LIFX Labs. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "LFXClient.h" 12 | #import "LFXNetworkContext.h" 13 | #import "LFXLight.h" 14 | #import "LFXLightCollection.h" 15 | #import "LFXTaggedLightCollection.h" 16 | #import "LFXTypes.h" 17 | #import "LFXHSBKColor.h" 18 | 19 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/LIFXKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylehowells/HomeKitBridge/6b4424aa18e29f4117ea6c7b99f93fbc67f2cd3f/HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/LIFXKit -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14D136 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | LIFXKit 11 | CFBundleIdentifier 12 | co.lifx.lifxkit.mac 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | LIFXKit 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 0.6.1 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 11 25 | DTCompiler 26 | com.apple.compilers.llvm.clang.1_0 27 | DTPlatformBuild 28 | 6D2105 29 | DTPlatformVersion 30 | GM 31 | DTSDKBuild 32 | 14D125 33 | DTSDKName 34 | macosx10.10 35 | DTXcode 36 | 0632 37 | DTXcodeBuild 38 | 6D2105 39 | NSHumanReadableCopyright 40 | Copyright © 2014 LIFX Labs. All rights reserved. 41 | 42 | 43 | -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Resources/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylehowells/HomeKitBridge/6b4424aa18e29f4117ea6c7b99f93fbc67f2cd3f/HomeKitBridge/LIFX/LIFXKit.framework/Versions/A/Resources/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /HomeKitBridge/LIFX/LIFXKit.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /HomeKitBridge/LaunchAtLoginController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LaunchAtLoginController.h 3 | // 4 | // Copyright 2011 Tomáš Znamenáček 5 | // Copyright 2010 Ben Clark-Robinson 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining 8 | // a copy of this software and associated documentation files (the ‘Software’), 9 | // to deal in the Software without restriction, including without limitation 10 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 | // and/or sell copies of the Software, and to permit persons to whom the 12 | // Software is furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be 15 | // included in all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, 18 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | @import Foundation; 26 | 27 | @interface LaunchAtLoginController : NSObject {} 28 | 29 | @property(assign) BOOL launchAtLogin; 30 | 31 | - (BOOL) willLaunchAtLogin: (NSURL*) itemURL; 32 | - (void) setLaunchAtLogin: (BOOL) enabled forURL: (NSURL*) itemURL; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /HomeKitBridge/LaunchAtLoginController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LaunchAtLoginController.m 3 | // 4 | // Copyright 2011 Tomáš Znamenáček 5 | // Copyright 2010 Ben Clark-Robinson 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining 8 | // a copy of this software and associated documentation files (the ‘Software’), 9 | // to deal in the Software without restriction, including without limitation 10 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 | // and/or sell copies of the Software, and to permit persons to whom the 12 | // Software is furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be 15 | // included in all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, 18 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | #import "LaunchAtLoginController.h" 26 | 27 | static NSString *const StartAtLoginKey = @"launchAtLogin"; 28 | 29 | @interface LaunchAtLoginController () 30 | @property(assign) LSSharedFileListRef loginItems; 31 | @end 32 | 33 | @implementation LaunchAtLoginController 34 | @synthesize loginItems; 35 | 36 | #pragma mark Change Observing 37 | 38 | void sharedFileListDidChange(LSSharedFileListRef inList, void *context) 39 | { 40 | LaunchAtLoginController *self = (id) context; 41 | [self willChangeValueForKey:StartAtLoginKey]; 42 | [self didChangeValueForKey:StartAtLoginKey]; 43 | } 44 | 45 | #pragma mark Initialization 46 | 47 | - (id) init 48 | { 49 | self = [super init]; 50 | if (self) 51 | { 52 | loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL); 53 | LSSharedFileListAddObserver(loginItems, CFRunLoopGetMain(), 54 | (CFStringRef)NSDefaultRunLoopMode, sharedFileListDidChange, self); 55 | } 56 | 57 | return self; 58 | } 59 | 60 | - (void) dealloc 61 | { 62 | LSSharedFileListRemoveObserver(loginItems, CFRunLoopGetMain(), 63 | (CFStringRef)NSDefaultRunLoopMode, sharedFileListDidChange, self); 64 | CFRelease(loginItems); 65 | 66 | [super dealloc]; 67 | } 68 | 69 | #pragma mark Launch List Control 70 | 71 | - (LSSharedFileListItemRef) findItemWithURL: (NSURL*) wantedURL inFileList: (LSSharedFileListRef) fileList 72 | { 73 | if (wantedURL == NULL || fileList == NULL) 74 | return NULL; 75 | 76 | NSArray *listSnapshot = [NSMakeCollectable(LSSharedFileListCopySnapshot(fileList, NULL)) autorelease]; 77 | for (id itemObject in listSnapshot) { 78 | LSSharedFileListItemRef item = (LSSharedFileListItemRef) itemObject; 79 | UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes; 80 | CFURLRef currentItemURL = NULL; 81 | LSSharedFileListItemResolve(item, resolutionFlags, ¤tItemURL, NULL); 82 | if (currentItemURL && CFEqual(currentItemURL, wantedURL)) { 83 | CFRelease(currentItemURL); 84 | return item; 85 | } 86 | if (currentItemURL) 87 | CFRelease(currentItemURL); 88 | } 89 | 90 | return NULL; 91 | } 92 | 93 | - (BOOL) willLaunchAtLogin: (NSURL*) itemURL 94 | { 95 | return !![self findItemWithURL:itemURL inFileList:loginItems]; 96 | } 97 | 98 | - (void) setLaunchAtLogin: (BOOL) enabled forURL: (NSURL*) itemURL 99 | { 100 | LSSharedFileListItemRef appItem = [self findItemWithURL:itemURL inFileList:loginItems]; 101 | if (enabled && !appItem) { 102 | LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, 103 | NULL, NULL, (CFURLRef)itemURL, NULL, NULL); 104 | } else if (!enabled && appItem) 105 | LSSharedFileListItemRemove(loginItems, appItem); 106 | } 107 | 108 | #pragma mark Basic Interface 109 | 110 | - (NSURL*) appURL 111 | { 112 | return [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]; 113 | } 114 | 115 | - (void) setLaunchAtLogin: (BOOL) enabled 116 | { 117 | [self willChangeValueForKey:StartAtLoginKey]; 118 | [self setLaunchAtLogin:enabled forURL:[self appURL]]; 119 | [self didChangeValueForKey:StartAtLoginKey]; 120 | } 121 | 122 | - (BOOL) launchAtLogin 123 | { 124 | return [self willLaunchAtLogin:[self appURL]]; 125 | } 126 | 127 | @end 128 | -------------------------------------------------------------------------------- /HomeKitBridge/NSArray+Map.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Map.h 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 02/06/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | // http://stackoverflow.com/a/7248251/458205 9 | 10 | #import 11 | 12 | @interface NSArray (Map) 13 | -(NSArray*)mapObjectsUsingBlock:(id (^)(id obj, NSUInteger idx))block; 14 | @end 15 | -------------------------------------------------------------------------------- /HomeKitBridge/NSArray+Map.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+Map.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 02/06/2015. 6 | // Copyright (c) 2015 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import "NSArray+Map.h" 10 | 11 | @implementation NSArray (Map) 12 | 13 | -(NSArray*)mapObjectsUsingBlock:(id (^)(id obj, NSUInteger idx))block { 14 | NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self count]]; 15 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 16 | [result addObject:block(obj, idx)]; 17 | }]; 18 | return result; 19 | } 20 | 21 | @end -------------------------------------------------------------------------------- /HomeKitBridge/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HomeKitBridge 4 | // 5 | // Created by Kyle Howells on 11/10/2014. 6 | // Copyright (c) 2014 Kyle Howells. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Demo 2 | ============= 3 | https://www.youtube.com/watch?v=n1Yr9xclh8w 4 | 5 | 6 | 7 | 8 | HomeKitBridge 9 | ============= 10 | 11 | An API designed to easily allow you to hook up existing devices and services to HomeKit using the private "HomeKit Accessory" Framework bundled with the HomeKit Accessory Simulator. 12 | Basically this just wraps the private HomeKitAccessoryKit framework API's in a way designed to bridge across to other products APIs more easily. 13 | 14 | All accessories are their own accessory with this API. It doesn't simulate a HomeKit "bridge" but instead pretends all the accessories natively support HomeKit. 15 | 16 | This doesn't persist accessories to file. This is on purpose as it is presumed you'll be using an existing API to discover and setup devices each time. 17 | 18 | Accessories do cache their "Transport" object to file though, as you can see in HKBTransportCache.m. The reason for this is because each time a "transport" object is created it generates a new password (and ID?). If it wasn't saved to file then on your iPhone you'd have to reconnect to and setup all your devices each time this application starts up. 19 | 20 | Instead the "Transport" objects are saved to file before they have any accessories or characteristics attached to them (so those don't save as well). 21 | 22 | As it is, it appears the connection setup between the accessory and HomeKit on your phone appears to survive restarting this application. 23 | 24 | 25 | 26 | Supported Devices 27 | ============= 28 | - [LIFX Wifi Lightbulbs](http://lifx.co) 29 | 30 | 31 | Building 32 | ============= 33 | 34 | Make sure you have the **HomeKit Accessory Simulator** installed in **"/Applications"** 35 | The project reaches inside it and grabs the private framework as it builds. 36 | 37 | The easiest way to get the HomeKit simulator is to go in Xcode to the menu bar > Xcode > Open Developer Tool > More Developer Tools... > And then download "**Hardware IO Tools for Xcode 6.3**". 38 | 39 | 40 | On your iOS device 41 | ============= 42 | To setup the HomeKit accessories on your device you'll need a HomeKit app. Apple doesn't provide one and I don't know of any in the AppStore. I'm currently using this one: https://github.com/KhaosT/HomeKit-Demo 43 | 44 | 45 | TODO 46 | ============= 47 | Support other device types besides lights. 48 | 49 | Documentation (I'll write some soon (I mean it this time)). 50 | For now just read "HKBAccessory.h" for an overview. Look in AppDelegate.m to see how to use the API once everything is in place (very simple). Look at "HKBLightAccessory" to see an example of how to write an accessory subclass. 51 | 52 | The HKBLightAccessory class is abstract and doesn't link to any devices API directly. It is designed to be subclassed so that you can easily bridge different light bulbs SDKs to HomeKit. 53 | 54 | Instead look at HKBLightAccessoryLIFX.m to see a self contained subclass that links a light object from LIFX's API to the HomeKit API. 55 | 56 | 57 | 58 | Thanks 59 | ============= 60 | 61 | - https://github.com/KhaosT/HomeKitBridge : As example of how to use the framework 62 | - https://github.com/KhaosT/HomeKitLogicalSimulator : As example of how to use the framework 63 | - http://www.hopperapp.com : For letting me reverse the HomeKit simulator and see how it uses the framework 64 | - http://www.cycript.org : For letting me test I understood what was going on by poking around inside the HomeKit simulator while it was running. 65 | 66 | --------------------------------------------------------------------------------