Skip to content

Commit

Permalink
Add camera recording management service
Browse files Browse the repository at this point in the history
  • Loading branch information
brutella committed Jun 4, 2019
1 parent e301c8e commit c8a4306
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 0 deletions.
18 changes: 18 additions & 0 deletions characteristic/selected_camera_recording_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// THIS FILE IS AUTO-GENERATED
package characteristic

const TypeSelectedCameraRecordingConfiguration = "209"

type SelectedCameraRecordingConfiguration struct {
*Bytes
}

func NewSelectedCameraRecordingConfiguration() *SelectedCameraRecordingConfiguration {
char := NewBytes(TypeSelectedCameraRecordingConfiguration)
char.Format = FormatTLV8
char.Perms = []string{PermRead, PermWrite, PermEvents}

char.SetValue([]byte{})

return &SelectedCameraRecordingConfiguration{char}
}
18 changes: 18 additions & 0 deletions characteristic/supported_audio_recording_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// THIS FILE IS AUTO-GENERATED
package characteristic

const TypeSupportedAudioRecordingConfiguration = "207"

type SupportedAudioRecordingConfiguration struct {
*Bytes
}

func NewSupportedAudioRecordingConfiguration() *SupportedAudioRecordingConfiguration {
char := NewBytes(TypeSupportedAudioRecordingConfiguration)
char.Format = FormatTLV8
char.Perms = []string{PermRead, PermEvents}

char.SetValue([]byte{})

return &SupportedAudioRecordingConfiguration{char}
}
18 changes: 18 additions & 0 deletions characteristic/supported_camera_recording_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// THIS FILE IS AUTO-GENERATED
package characteristic

const TypeSupportedCameraRecordingConfiguration = "205"

type SupportedCameraRecordingConfiguration struct {
*Bytes
}

func NewSupportedCameraRecordingConfiguration() *SupportedCameraRecordingConfiguration {
char := NewBytes(TypeSupportedCameraRecordingConfiguration)
char.Format = FormatTLV8
char.Perms = []string{PermRead, PermEvents}

char.SetValue([]byte{})

return &SupportedCameraRecordingConfiguration{char}
}
18 changes: 18 additions & 0 deletions characteristic/supported_video_recording_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// THIS FILE IS AUTO-GENERATED
package characteristic

const TypeSupportedVideoRecordingConfiguration = "206"

type SupportedVideoRecordingConfiguration struct {
*Bytes
}

func NewSupportedVideoRecordingConfiguration() *SupportedVideoRecordingConfiguration {
char := NewBytes(TypeSupportedVideoRecordingConfiguration)
char.Format = FormatTLV8
char.Perms = []string{PermRead, PermEvents}

char.SetValue([]byte{})

return &SupportedVideoRecordingConfiguration{char}
}
63 changes: 63 additions & 0 deletions gen/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2711,6 +2711,59 @@
"MaximumValue": 100,
"MinimumValue": 0
}
},
{
"Format": "tlv8",
"UUID": "00000205-0000-1000-8000-0026BB765291",
"Properties": [
"read",
"cnotify",
"uncnotify"
],
"Name": "Supported Camera Recording Configuration",
"Permissions": [
"securedRead"
]
},
{
"Format": "tlv8",
"UUID": "00000206-0000-1000-8000-0026BB765291",
"Properties": [
"read",
"cnotify",
"uncnotify"
],
"Name": "Supported Video Recording Configuration",
"Permissions": [
"securedRead"
]
},
{
"Format": "tlv8",
"UUID": "00000207-0000-1000-8000-0026BB765291",
"Properties": [
"read",
"cnotify",
"uncnotify"
],
"Name": "Supported Audio Recording Configuration",
"Permissions": [
"securedRead"
]
},
{
"Format": "tlv8",
"UUID": "00000209-0000-1000-8000-0026BB765291",
"Properties": [
"read",
"write",
"cnotify",
"uncnotify"
],
"Name": "Selected Camera Recording Configuration",
"Permissions": [
"securedRead"
]
}
],
"Version": "1.0",
Expand Down Expand Up @@ -3318,6 +3371,16 @@
],
"Name": "Input Source",
"UUID": "000000D9-0000-1000-8000-0026BB765291"
},
{
"RequiredCharacteristics": [
"00000205-0000-1000-8000-0026BB765291",
"00000206-0000-1000-8000-0026BB765291",
"00000207-0000-1000-8000-0026BB765291",
"00000209-0000-1000-8000-0026BB765291"
],
"Name": "Camera Recording Management",
"UUID": "00000204-0000-1000-8000-0026BB765291"
}
]
}
36 changes: 36 additions & 0 deletions service/camera_recording_management.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// THIS FILE IS AUTO-GENERATED
package service

import (
"github.com/brutella/hc/characteristic"
)

const TypeCameraRecordingManagement = "204"

type CameraRecordingManagement struct {
*Service

SupportedCameraRecordingConfiguration *characteristic.SupportedCameraRecordingConfiguration
SupportedVideoRecordingConfiguration *characteristic.SupportedVideoRecordingConfiguration
SupportedAudioRecordingConfiguration *characteristic.SupportedAudioRecordingConfiguration
SelectedCameraRecordingConfiguration *characteristic.SelectedCameraRecordingConfiguration
}

func NewCameraRecordingManagement() *CameraRecordingManagement {
svc := CameraRecordingManagement{}
svc.Service = New(TypeCameraRecordingManagement)

svc.SupportedCameraRecordingConfiguration = characteristic.NewSupportedCameraRecordingConfiguration()
svc.AddCharacteristic(svc.SupportedCameraRecordingConfiguration.Characteristic)

svc.SupportedVideoRecordingConfiguration = characteristic.NewSupportedVideoRecordingConfiguration()
svc.AddCharacteristic(svc.SupportedVideoRecordingConfiguration.Characteristic)

svc.SupportedAudioRecordingConfiguration = characteristic.NewSupportedAudioRecordingConfiguration()
svc.AddCharacteristic(svc.SupportedAudioRecordingConfiguration.Characteristic)

svc.SelectedCameraRecordingConfiguration = characteristic.NewSelectedCameraRecordingConfiguration()
svc.AddCharacteristic(svc.SelectedCameraRecordingConfiguration.Characteristic)

return &svc
}

0 comments on commit c8a4306

Please sign in to comment.