Skip to content

Commit

Permalink
Added service support for IP cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
joebelford authored and carol-apple committed Feb 5, 2021
1 parent fc917d7 commit 4967f69
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions HAP/HAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -3392,6 +3392,9 @@ HAP_ENUM_BEGIN(uint8_t, HAPAccessoryCategory) {
*/
kHAPAccessoryCategory_RangeExtenders = 16,

/** IP Cameras. */
kHAPAccessoryCategory_IPCameras = 17,

/** Air Purifiers. */
kHAPAccessoryCategory_AirPurifiers = 19,

Expand Down
6 changes: 6 additions & 0 deletions HAP/HAPServiceTypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ const HAPUUID kHAPServiceType_IrrigationSystem = HAPUUIDCreateAppleDefined(0xCF)
const HAPUUID kHAPServiceType_Valve = HAPUUIDCreateAppleDefined(0xD0);

const HAPUUID kHAPServiceType_Faucet = HAPUUIDCreateAppleDefined(0xD7);

const HAPUUID kHAPServiceType_CameraRTPStreamManagement = HAPUUIDCreateAppleDefined(0x110);

const HAPUUID kHAPServiceType_Microphone = HAPUUIDCreateAppleDefined(0x112);

const HAPUUID kHAPServiceType_Speaker = HAPUUIDCreateAppleDefined(0x113);
19 changes: 19 additions & 0 deletions HAP/HAPServiceTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,25 @@ extern const HAPUUID kHAPServiceType_Valve;
extern const HAPUUID kHAPServiceType_Faucet;
/**@}*/

/**@{*/
#define kHAPServiceDebugDescription_CameraRTPStreamManagement "camera-rtp-stream-management"

extern const HAPUUID kHAPServiceType_CameraRTPStreamManagement;
/**@}*/

/**@{*/
#define kHAPServiceDebugDescription_Microphone "microphone"

extern const HAPUUID kHAPServiceType_Microphone;
/**@}*/

/**@{*/
#define kHAPServiceDebugDescription_Speaker "speaker"

extern const HAPUUID kHAPServiceType_Speaker;
/**@}*/


#if __has_feature(nullability)
#pragma clang assume_nonnull end
#endif
Expand Down
2 changes: 2 additions & 0 deletions Tests/Harness/HAPTestController.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ static void EnumerateHAPTXTRecordsCallback(
case kHAPAccessoryCategory_WindowCoverings:
case kHAPAccessoryCategory_ProgrammableSwitches:
case kHAPAccessoryCategory_RangeExtenders:
case kHAPAccessoryCategory_IPCameras:
case kHAPAccessoryCategory_AirPurifiers:
case kHAPAccessoryCategory_Heaters:
case kHAPAccessoryCategory_AirConditioners:
Expand Down Expand Up @@ -725,6 +726,7 @@ HAPError HAPDiscoverBLEAccessoryServer(
case kHAPAccessoryCategory_WindowCoverings:
case kHAPAccessoryCategory_ProgrammableSwitches:
case kHAPAccessoryCategory_RangeExtenders:
case kHAPAccessoryCategory_IPCameras:
case kHAPAccessoryCategory_AirPurifiers:
case kHAPAccessoryCategory_Heaters:
case kHAPAccessoryCategory_AirConditioners:
Expand Down

0 comments on commit 4967f69

Please sign in to comment.