dbus-sdk
Version:
A Node.js SDK for interacting with DBus, enabling seamless service calling and exposure with TypeScript support
25 lines (24 loc) • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.RootObject = void 0;
const LocalObject_1 = require("../../LocalObject");
const ObjectManagerInterface_1 = require("./ObjectManagerInterface");
/**
* A class representing the root object in a DBus object hierarchy.
* Extends LocalObject to define a root object at the path '/' and automatically
* adds an ObjectManagerInterface for managing sub-objects and interfaces.
* This is typically used as the top-level object in a local DBus service.
*/
class RootObject extends LocalObject_1.LocalObject {
/**
* Constructor for the RootObject class.
* Initializes the root object with the path '/' and adds an instance of
* ObjectManagerInterface to support hierarchical object management as per
* the 'org.freedesktop.DBus.ObjectManager' interface specification.
*/
constructor() {
super('/'); // Root path for the object hierarchy
this.addInterface(new ObjectManagerInterface_1.ObjectManagerInterface()); // Adds support for object management
}
}
exports.RootObject = RootObject;