homebridge
Version:
HomeKit support for the impatient
58 lines • 1.8 kB
TypeScript
/**
* Fabric Manager
*
* Handles fabric info queries, commissioned status checks,
* and fabric removal operations.
*/
import type { ServerNode } from '@matter/main';
export interface FabricInfo {
fabricIndex: number;
fabricId: string;
nodeId: string;
rootVendorId: number;
label?: string;
}
export interface CommissioningSnapshot {
commissioned: boolean;
fabricCount: number;
fabrics: FabricInfo[];
}
export declare class FabricManager {
private readonly getServerNode;
private readonly getMatterStoragePath;
constructor(getServerNode: () => ServerNode | null, getMatterStoragePath: () => string | undefined);
/**
* Get fabric information for commissioned controllers
*/
getFabricInfo(): FabricInfo[];
/**
* Read fabric information from storage files
*/
private readFabricsFromStorage;
/**
* Check if the server is commissioned
*/
isCommissioned(): boolean;
/**
* Get the number of commissioned fabrics
*/
getCommissionedFabricCount(): number;
/**
* Get commissioned/fabricCount/fabrics in a single pass.
*
* Coalesces what would otherwise be three separate getFabricInfo() calls
* (one each from isCommissioned, getCommissionedFabricCount, getFabricInfo).
* In the cold path that means one sync filesystem scan instead of three.
* Preserves the serverNode.state fast-path that isCommissioned() uses.
*/
getCommissioningSnapshot(): CommissioningSnapshot;
/**
* Remove a specific fabric (controller) from the bridge
*/
removeFabric(fabricIndex: number): Promise<void>;
/**
* Check if a specific fabric exists
*/
hasFabric(fabricIndex: number): boolean;
}
//# sourceMappingURL=FabricManager.d.ts.map