]> git.basschouten.com Git - openhab-addons.git/blob
68b7c460aaf7c8516cecd15ba1f2d41cb6287e0e
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.lifx.internal.listener;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.lifx.internal.LifxLightState;
18 import org.openhab.binding.lifx.internal.fields.HSBK;
19 import org.openhab.binding.lifx.internal.protocol.Effect;
20 import org.openhab.binding.lifx.internal.protocol.PowerState;
21 import org.openhab.binding.lifx.internal.protocol.SignalStrength;
22 import org.openhab.core.library.types.PercentType;
23
24 /**
25  * The {@link LifxLightStateListener} is notified when the properties of a {@link LifxLightState} change.
26  *
27  * @author Wouter Born - Initial contribution
28  */
29 @NonNullByDefault
30 public interface LifxLightStateListener {
31
32     /**
33      * Called when the colors property changes.
34      *
35      * @param oldColors the old colors value
36      * @param newColors the new colors value
37      */
38     void handleColorsChange(HSBK[] oldColors, HSBK[] newColors);
39
40     /**
41      * Called when the power state property changes.
42      *
43      * @param oldPowerState the old power state value
44      * @param newPowerState the new power state value
45      */
46     void handlePowerStateChange(@Nullable PowerState oldPowerState, PowerState newPowerState);
47
48     /**
49      * Called when the infrared property changes.
50      *
51      * @param oldInfrared the old infrared value
52      * @param newInfrared the new infrared value
53      */
54     void handleInfraredChange(@Nullable PercentType oldInfrared, PercentType newInfrared);
55
56     /**
57      * Called when the signal strength property changes.
58      *
59      * @param oldSignalStrength the old signal strength value
60      * @param newSignalStrength the new signal strength value
61      */
62     void handleSignalStrengthChange(@Nullable SignalStrength oldSignalStrength, SignalStrength newSignalStrength);
63
64     /**
65      * Called when the tile effect changes.
66      *
67      * @param oldEffect the old tile effect value
68      * @param newEffect new tile effectvalue
69      */
70     void handleTileEffectChange(@Nullable Effect oldEffect, Effect newEffect);
71 }