All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.freedesktop.dbus.interfaces.ObjectManager Maven / Gradle / Ivy

Go to download

Improved version of the DBus-Java library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/).

There is a newer version: 3.3.2
Show newest version
package org.freedesktop.dbus.interfaces;

import java.util.List;
import java.util.Map;

import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.annotations.DBusInterfaceName;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.messages.DBusSignal;
import org.freedesktop.dbus.types.Variant;

@DBusInterfaceName("org.freedesktop.DBus.ObjectManager")
public interface ObjectManager extends DBusInterface {
    /**
     * Get a sub-tree of objects. The root of the sub-tree is this object.
     * 
     * @return A Map from object path (DBusInterface) to a Map from interface name to a properties Map (as returned by
     *         Properties.GetAll())
     */
    Map>>> GetManagedObjects();

    /**
     * Signal generated when a new interface is added
     */
    public static class InterfacesAdded extends DBusSignal {
        public final DBusPath                             signalSource;
        public final String                               objectPath;

        public final Map>> interfaces;

        public InterfacesAdded(String _objectPath, DBusPath _source, Map>> interfaces)
                throws DBusException {
            super(_objectPath, _source, interfaces);
            this.objectPath = _objectPath;
            this.signalSource = _source;
            this.interfaces = interfaces;
        }

        /**
         * The source DBus object path (e.g. /org/bluez/hci0/dev_00_11_22_33_44_55).
         * @return DBusPath
         */
        public DBusPath getSignalSource() {
            return signalSource;

        }

        public String getObjectPath() {
            return objectPath;
        }

        /**
         * Returns the added interfaces.
         * Key is a DBus interface name (like org.bluez.Device1).
         * Value is a Map with properties known for the new device.
         * @return Map
         */
        public Map>> getInterfaces() {
            return interfaces;
        }

    }

    /**
     * Signal generated when an interface is removed
     */
    public static class InterfacesRemoved extends DBusSignal {
        public final DBusPath     signalSource;
        public final String       objectPath;

        public final List interfaces;

        public InterfacesRemoved(String _objectPath, DBusPath _source, List interfaces)
                throws DBusException {
            super(_objectPath, _source, interfaces);
            this.objectPath = _objectPath;
            this.signalSource = _source;
            this.interfaces = interfaces;
        }

        /**
         * The source DBus object path (e.g. /org/bluez/hci0/dev_00_11_22_33_44_55).
         * @return DBusPath
         */
        public DBusPath getSignalSource() {
            return signalSource;
        }

        public String getObjectPath() {
            return objectPath;
        }

        /**
         * Returns list of removed DBus interfaces (like org.bluez.Device1).
         * @return List
         */
        public List getInterfaces() {
            return interfaces;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy