dbus-sdk
Version:
A Node.js SDK for interacting with DBus, enabling seamless service calling and exposure with TypeScript support
48 lines • 2.66 kB
TypeScript
import { LocalInterface } from '../../LocalInterface';
import { LocalObject } from '../../LocalObject';
/**
* A class representing the DBus ObjectManager interface.
* Implements the 'org.freedesktop.DBus.ObjectManager' interface, which provides
* functionality for managing a hierarchy of objects and their interfaces.
* This interface allows clients to retrieve all managed objects and receive signals
* when interfaces are added or removed from objects.
*/
export declare class ObjectManagerInterface extends LocalInterface {
#private;
/**
* Constructor for the ObjectManagerInterface.
* Initializes the interface with the name 'org.freedesktop.DBus.ObjectManager'
* and defines the 'GetManagedObjects' method to retrieve all managed objects,
* as well as 'InterfacesAdded' and 'InterfacesRemoved' signals to notify about changes.
*/
constructor();
/**
* Retrieves all managed objects, their interfaces, and properties.
* Iterates through all objects in the associated service and collects their
* managed interfaces and properties into a nested structure.
* If no service or objects are available, returns an empty record.
*
* @returns A record mapping object paths to their interfaces
* and properties as a nested structure (Record<string, Record<string, Record<string, any>>>).
*/
protected getManagedObjects(): Record<string, Record<string, Record<string, any>>>;
/**
* Emits the 'InterfacesAdded' signal to notify clients of new interfaces.
* Triggered when one or more interfaces are added to a specific object.
* The signal includes the object path and a record of the added interfaces along with their properties.
*
* @param localObject - The LocalObject instance to which interfaces were added.
* @param interfacesAndProperties - A record mapping interface names to their properties and values.
*/
interfacesAdded(localObject: LocalObject, interfacesAndProperties: Record<string, Record<string, any>>): void;
/**
* Emits the 'InterfacesRemoved' signal to notify clients of removed interfaces.
* Triggered when one or more interfaces are removed from a specific object.
* The signal includes the object path and an array of the names of the removed interfaces.
*
* @param localObject - The LocalObject instance from which interfaces were removed.
* @param interfaces - An array of interface names that were removed from the object.
*/
interfacesRemoved(localObject: LocalObject, interfaces: string[]): void;
}
//# sourceMappingURL=ObjectManagerInterface.d.ts.map