mirror of
https://github.com/koush/scrypted.git
synced 2026-03-06 03:12:00 +00:00
44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
export * from './types';
|
|
import { DeviceBase } from './types';
|
|
import type { ScryptedNativeId, EventListenerRegister } from './types';
|
|
import type { ScryptedInterface, ScryptedStatic, Logger, DeviceState } from './types';
|
|
export declare class ScryptedDeviceBase extends DeviceBase {
|
|
nativeId?: string;
|
|
private _storage;
|
|
private _log;
|
|
private _console;
|
|
private _deviceState;
|
|
constructor(nativeId?: string);
|
|
get storage(): Storage;
|
|
get log(): Logger;
|
|
get console(): Console;
|
|
_lazyLoadDeviceState(): void;
|
|
/**
|
|
* Fire an event for this device.
|
|
*/
|
|
onDeviceEvent(eventInterface: string, eventData: any): Promise<void>;
|
|
}
|
|
export declare class MixinDeviceBase<T> extends DeviceBase implements DeviceState {
|
|
mixinDevice: T;
|
|
mixinDeviceInterfaces: ScryptedInterface[];
|
|
mixinProviderNativeId: ScryptedNativeId;
|
|
private _mixinStorageSuffix?;
|
|
private _storage;
|
|
private _log;
|
|
private _console;
|
|
private _deviceState;
|
|
private _listeners;
|
|
constructor(mixinDevice: T, mixinDeviceInterfaces: ScryptedInterface[], mixinDeviceState: DeviceState, mixinProviderNativeId: ScryptedNativeId, _mixinStorageSuffix?: string);
|
|
get storage(): Storage;
|
|
get console(): Console;
|
|
/**
|
|
* Fire an event for this device.
|
|
*/
|
|
onDeviceEvent(eventInterface: string, eventData: any): Promise<void>;
|
|
_lazyLoadDeviceState(): void;
|
|
manageListener(listener: EventListenerRegister): void;
|
|
release(): void;
|
|
}
|
|
declare let sdk: ScryptedStatic;
|
|
export default sdk;
|