]> git.basschouten.com Git - openhab-addons.git/blob
dc89a086ab950f233b67c0912455d05f1791c995
[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  * @author Nick Waterton - add checkConnection(), getServiceName(), refactoring
25  */
26 @NonNullByDefault
27 public interface SamsungTvService {
28
29     /**
30      * Procedure to get list of supported channel names.
31      *
32      * @return List of supported
33      */
34     List<String> getSupportedChannelNames(boolean refresh);
35
36     /**
37      * Procedure for sending command.
38      *
39      * @param channel the channel to which the command applies
40      * @param command the command to be handled
41      */
42     boolean handleCommand(String channel, Command command);
43
44     /**
45      * Procedure for starting service.
46      *
47      */
48     void start();
49
50     /**
51      * Procedure for stopping service.
52      *
53      */
54     void stop();
55
56     /**
57      * Procedure for clearing internal caches.
58      *
59      */
60     void clearCache();
61
62     /**
63      * Is this an UPnP configured service
64      *
65      * @return whether this service is an UPnP configured / discovered service
66      */
67     boolean isUpnp();
68
69     /**
70      * Is service connected
71      *
72      * @return whether this service is connected or not
73      */
74     boolean checkConnection();
75
76     /**
77      * get service name.
78      *
79      * @return String SERVICE_NAME
80      */
81     String getServiceName();
82 }