]> git.basschouten.com Git - openhab-addons.git/blob
22cfb5c3e1be8c54c17b56e3a139224c56ec4523
[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.magentatv.internal.handler;
14
15 import java.util.Map;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.magentatv.internal.MagentaTVException;
19
20 /**
21  * The {@link MagentaTVListener} defines the interface to pass back the pairing
22  * code and device events to the listener
23  *
24  * @author Markus Michels - Initial contribution
25  */
26 @NonNullByDefault
27 public interface MagentaTVListener {
28     /**
29      * Device returned pairing code
30      *
31      * @param pairingCode Code to be used for pairing process
32      * @throws MagentaTVException
33      */
34     void onPairingResult(String pairingCode) throws MagentaTVException;
35
36     /**
37      * Device woke up (UPnP)
38      *
39      * @param discoveredProperties Properties from UPnP discovery
40      * @throws MagentaTVException
41      */
42     void onWakeup(Map<String, String> discoveredProperties) throws MagentaTVException;
43
44     /**
45      * An event has been received from the MR
46      *
47      * @param playContent event information
48      * @throws MagentaTVException
49      */
50     void onMREvent(String playContent) throws MagentaTVException;
51
52     /**
53      * A power-off was detected (SSDN message received)
54      *
55      * @throws MagentaTVException
56      */
57     void onPowerOff() throws MagentaTVException;
58 }