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

sdk: add TTYSettings #1540

Merged
merged 2 commits into from
Aug 5, 2024
Merged
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
16 changes: 16 additions & 0 deletions sdk/types/scrypted_python/scrypted_sdk/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class ScryptedInterface(str, Enum):
StartStop = "StartStop"
StreamService = "StreamService"
TTY = "TTY"
TTYSettings = "TTYSettings"
TamperSensor = "TamperSensor"
TemperatureSetting = "TemperatureSetting"
Thermometer = "Thermometer"
Expand Down Expand Up @@ -1477,6 +1478,13 @@ class TTY:

pass

class TTYSettings:
"""TTYSettings allows TTY backends to query plugins for modifications to the (non-)interactive terminal environment."""

async def getTTYSettings(self) -> Any:
pass


class TamperSensor:

tampered: TamperState
Expand Down Expand Up @@ -1928,6 +1936,7 @@ class ScryptedInterfaceMethods(str, Enum):
getScryptedUserAccessControl = "getScryptedUserAccessControl"
generateVideoFrames = "generateVideoFrames"
connectStream = "connectStream"
getTTYSettings = "getTTYSettings"

class DeviceState:

Expand Down Expand Up @@ -3142,6 +3151,13 @@ def systemDevice(self, value: ScryptedSystemDeviceInfo):
"methods": [],
"properties": []
},
"TTYSettings": {
"name": "TTYSettings",
"methods": [
"getTTYSettings"
],
"properties": []
},
"ScryptedSystemDevice": {
"name": "ScryptedSystemDevice",
"methods": [],
Expand Down
10 changes: 10 additions & 0 deletions sdk/types/src/types.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,15 @@ export interface StreamService<Input, Output=Input> {
*/
export interface TTY {
}
/**
* TTYSettings allows TTY backends to query plugins for modifications
* to the (non-)interactive terminal environment.
*/
export interface TTYSettings {
getTTYSettings(): Promise<{
paths?: string[];
}>;
}
/**
* Logger is exposed via log.* to allow writing to the Scrypted log.
*/
Expand Down Expand Up @@ -2152,6 +2161,7 @@ export enum ScryptedInterface {
VideoFrameGenerator = 'VideoFrameGenerator',
StreamService = 'StreamService',
TTY = 'TTY',
TTYSettings = 'TTYSettings',

ScryptedSystemDevice = "ScryptedSystemDevice",
ScryptedDeviceCreator = "ScryptedDeviceCreator",
Expand Down