]> git.basschouten.com Git - openhab-addons.git/blob
7a0731c8807d032e3c1e53829f7c6dd9b4510751
[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.pilight.internal;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.openhab.binding.pilight.internal.dto.Config;
20 import org.openhab.binding.pilight.internal.dto.Status;
21 import org.openhab.binding.pilight.internal.dto.Version;
22 import org.openhab.core.thing.ThingStatus;
23 import org.openhab.core.thing.ThingStatusDetail;
24
25 /**
26  * Callback interface to signal any listeners that an update was received from pilight
27  *
28  * @author Jeroen Idserda - Initial contribution
29  * @author Stefan Röllin - Port to openHAB 2 pilight binding
30  * @author Niklas Dörfler - Port pilight binding to openHAB 3 + add device discovery
31  */
32 @NonNullByDefault
33 public interface IPilightCallback {
34
35     /**
36      * Update thing status
37      *
38      * @param status status of thing
39      * @param statusDetail status detail of thing
40      * @param description description of thing status
41      */
42     void updateThingStatus(ThingStatus status, ThingStatusDetail statusDetail, @Nullable String description);
43
44     /**
45      * Update for one or more device received.
46      *
47      * @param allStatus list of Object containing list of devices that were updated and their current state
48      */
49     void statusReceived(List<Status> allStatus);
50
51     /**
52      * Configuration received.
53      *
54      * @param config Object containing configuration of pilight
55      */
56     void configReceived(Config config);
57
58     /**
59      * Version information received.
60      *
61      * @param version Object containing software version information of pilight daemon
62      */
63     void versionReceived(Version version);
64 }