]> git.basschouten.com Git - openhab-addons.git/blob
ac31ad4a7fd7c8f834becb960c38fe013e869e01
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2020 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.miele.internal.handler;
14
15 import org.openhab.binding.miele.internal.handler.MieleBridgeHandler.DeviceClassObject;
16 import org.openhab.binding.miele.internal.handler.MieleBridgeHandler.DeviceProperty;
17 import org.openhab.binding.miele.internal.handler.MieleBridgeHandler.HomeDevice;
18
19 /**
20  *
21  * The {@link ApplianceStatusListener} is notified when an appliance status has changed or
22  * an appliance has been removed or added.
23  *
24  * @author Karel Goderis - Initial contribution
25  */
26 public interface ApplianceStatusListener {
27
28     /**
29      * This method is called whenever the state of the given appliance has changed.
30      *
31      * @param uid the UID of the aplliance that has changed
32      * @param dco the POJO containing the new state (properties and/or operations)
33      */
34     void onApplianceStateChanged(String uid, DeviceClassObject dco);
35
36     /**
37      * This method is called whenever a "property" of the given appliance has changed.
38      *
39      * @param uid the UID of the aplliance that has changed
40      * @param dco the POJO containing the new state of the property
41      */
42     void onAppliancePropertyChanged(String uid, DeviceProperty dp);
43
44     /**
45      * This method us called whenever an appliance is removed.
46      *
47      * @param appliance The XGW homedevice definition of the appliance that was removed
48      */
49     void onApplianceRemoved(HomeDevice appliance);
50
51     /**
52      * This method us called whenever an appliance is added.
53      *
54      * @param appliance The XGW homedevice definition of the appliance that was removed
55      */
56     void onApplianceAdded(HomeDevice appliance);
57 }