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