/*
 * This file describes the RPC interface for the driver manager.
 *
 * A generic interface for use by drivers to register/remove devices, and query the hardware in the
 * system.
 */
interface Driverman {
    // Registers a new device on the device tree; returns path or empty string on failure
    addDevice(parent: String, driverId: String) => (path: String)

    // Sets a property on a device based on its path
    SetDeviceProperty(path: String, key: String, data: Blob) => (status: Int32)
    // Gets the value of a property on a device based on its path
    GetDeviceProperty(path: String, key: String) => (status: Int32, data: Blob)

    // Start the given device.
    StartDevice(path: String) => (status: Int32)
    // Stop the given device.
    StopDevice(path: String) => (status: Int32)

    /**
     * Sends a notification to the given device. If the path is an empty string, the notification
     * is delivered to the driver manager itself.
     */
    Notify(path: String, key: UInt64) => (status: Int32)
}
