/**
 * The collection of all configured Thingpedia devices.
 */
export default class DeviceDatabase extends Tp.Helpers.ObjectSet.Base<any> {
    /**
     * Construct the device database for this engine.
     *
     * There is only one device database instance per engine,
     * and it is accessible as {@link Engine#devices}.
     *
     * @param {external:thingpedia.BasePlatform} - the platform associated with the engine
     * @param {TierManager} - the tier manager to use for device synchronization
     * @param {external:thingpedia.DeviceFactory} - the factory to load and construct Thingpedia devices
     * @param {external:thingtalk.SchemaRetriever} - the schema retriever to typecheck ThingTalk code
     * @package
     */
    constructor(platform: any, tierManager: any, factory: any, schemas: any);
    _factory: any;
    schemas: any;
    _devices: Map<any, any>;
    _byDescriptor: {};
    _tierManager: any;
    _syncdb: SyncDatabase;
    _subdeviceAddedListener: (subdevice: any) => void;
    _subdeviceRemovedListener: (subdevice: any) => void;
    _isUpdatingState: boolean;
    loadOneDevice(serializedDevice: any, addToDB: any): Promise<any>;
    _objectAddedHandler: ((uniqueId: any, row: any) => void) | undefined;
    _objectDeletedHandler: ((uniqueId: any) => void) | undefined;
    _onObjectAdded(uniqueId: any, row: any): void;
    _onObjectDeleted(uniqueId: any): void;
    _getValuesOfExactKind(kind: any): any[];
    getAllDevices(kind: any): any[];
    getAllDevicesOfKind(kind: any): any[];
    getDeviceByDescriptor(descriptor: any): any;
    _notifySubdeviceAdded(subdevice: any): void;
    _notifySubdeviceRemoved(subdevice: any): void;
    _startSubdevices(subdevices: any): void;
    _stopSubdevices(subdevices: any): void;
    _notifyDeviceAdded(device: any): Promise<any>;
    _notifyDeviceRemoved(device: any): Promise<void>;
    _saveDevice(device: any): Promise<void>;
    _addDeviceInternal(device: any, uniqueId: any, addToDB: any): Promise<any>;
    addDevice(device: any): Promise<void>;
    addSerialized(state: any): Promise<any>;
    addFromOAuth(kind: any): any;
    completeOAuth(kind: any, url: any, session: any): Promise<any>;
    addFromDiscovery(kind: any, publicData: any, privateData: any): any;
    completeDiscovery(instance: any, delegate: any): Promise<any>;
    addInteractively(kind: any, delegate: any): Promise<any>;
    _removeDeviceFromCache(device: any): void;
    removeDevice(device: any): Promise<void>;
    hasDevice(uniqueId: any): boolean;
    getDevice(uniqueId: any): any;
    reloadDevice(device: any): Promise<void>;
    getCachedDeviceClasses(): any;
    updateDevicesOfKind(kind: any): Promise<void[]>;
}
import * as Tp from "thingpedia";
import SyncDatabase from "../db/syncdb";
