]> git.basschouten.com Git - openhab-addons.git/blob
9992896ab3e11fa775b258ec828bdcf800a70ba5
[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.lirc.internal;
14
15 import org.openhab.binding.lirc.internal.messages.LIRCButtonEvent;
16 import org.openhab.binding.lirc.internal.messages.LIRCResponse;
17 import org.openhab.core.thing.ThingUID;
18
19 /**
20  * Interface for listeners to receive messages from LIRC server
21  *
22  * @author Andrew Nagle
23  */
24 public interface LIRCMessageListener {
25
26     /**
27      * This method is called whenever the message is received from the bridge.
28      *
29      * @param bridge
30      *            The LIRC bridge where message is received.
31      * @param message
32      *            The message which received.
33      */
34     void onMessageReceived(ThingUID bridge, LIRCResponse message);
35
36     /**
37      * This method is called whenever a button is pressed on a remote.
38      *
39      * @param bridge
40      *            The LIRC bridge where message is received.
41      * @param buttonEvent
42      *            Button event details
43      */
44     void onButtonPressed(ThingUID bridge, LIRCButtonEvent buttonEvent);
45 }