Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes services provided in PHKAccessory #45

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PHKAccessory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ Content-Length: %u\r\n\r\n", protocol, statusCode, returnType, replyDataLen);
}

void addInfoServiceToAccessory(Accessory *acc, string accName, string manufactuerName, string modelName, string serialNumber, identifyFunction identifyCallback) {
Service *infoService = new Service(charType_accessoryInfo);
Service *infoService = new Service(serviceType_accessoryInfo);
acc->addService(infoService);

stringCharacteristics *accNameCha = new stringCharacteristics(charType_serviceName, premission_read, 0);
Expand Down
26 changes: 13 additions & 13 deletions PHKAccessory.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,19 @@ typedef enum {
charType_videoValAttr = 0x3D,

#pragma - The following is service provide
charType_accessoryInfo = 0x3E,
charType_camera = 0x3F,
charType_fan = 0x40,
charType_garageDoorOpener = 0x41,
charType_lightBulb = 0x43,
charType_lockManagement = 0x44,
charType_lockMechanism = 0x45,
charType_microphone = 0x46,
charType_outlet = 0x47,
charType_speaker = 0x48,
charType_switch = 0x49,
charType_thermostat = 0x4A
} charType;
serviceType_accessoryInfo = 0x3E,
serviceType_camera = 0x3F,
serviceType_fan = 0x40,
serviceType_garageDoorOpener = 0x41,
serviceType_lightBulb = 0x43,
serviceType_lockManagement = 0x44,
serviceType_lockMechanism = 0x45,
serviceType_microphone = 0x46,
serviceType_outlet = 0x47,
serviceType_speaker = 0x48,
serviceType_switch = 0x49,
serviceType_thermostat = 0x4A
} serviceType;

enum {
premission_read = 1,
Expand Down