]> git.basschouten.com Git - openhab-addons.git/blob
4318396e5c94a2a3d2b49ecb601f315a2cc0c0a2
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.samsungtv.internal.service.api;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.types.Command;
19
20 /**
21  * Interface for Samsung TV services.
22  *
23  * @author Pauli Anttila - Initial contribution
24  */
25 @NonNullByDefault
26 public interface SamsungTvService {
27
28     /**
29      * Procedure to get list of supported channel names.
30      *
31      * @return List of supported
32      */
33     List<String> getSupportedChannelNames();
34
35     /**
36      * Procedure for sending command.
37      *
38      * @param channel the channel to which the command applies
39      * @param command the command to be handled
40      */
41     void handleCommand(String channel, Command command);
42
43     /**
44      * Procedure for register event listener.
45      *
46      * @param listener
47      *            Event listener instance to handle events.
48      */
49     void addEventListener(EventListener listener);
50
51     /**
52      * Procedure for remove event listener.
53      *
54      * @param listener
55      *            Event listener instance to remove.
56      */
57     void removeEventListener(EventListener listener);
58
59     /**
60      * Procedure for starting service.
61      *
62      */
63     void start();
64
65     /**
66      * Procedure for stopping service.
67      *
68      */
69     void stop();
70
71     /**
72      * Procedure for clearing internal caches.
73      *
74      */
75     void clearCache();
76
77     /**
78      * Is this an UPnP configured service
79      *
80      * @return whether this service is an UPnP configured / discovered service
81      */
82     boolean isUpnp();
83 }