]> git.basschouten.com Git - openhab-addons.git/blob
a6f982d9c6b8124a323163a35e473a5045d05e94
[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.lgwebos.internal;
14
15 import java.util.Collections;
16 import java.util.Set;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.jupnp.model.types.ServiceType;
20 import org.openhab.core.thing.ThingTypeUID;
21
22 /**
23  * This class defines common constants, which are used across the whole binding.
24  *
25  * @author Sebastian Prehn - Initial contribution
26  */
27 @NonNullByDefault
28 public class LGWebOSBindingConstants {
29
30     public static final String BINDING_ID = "lgwebos";
31
32     public static final ThingTypeUID THING_TYPE_WEBOSTV = new ThingTypeUID(BINDING_ID, "WebOSTV");
33
34     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.singleton(THING_TYPE_WEBOSTV);
35
36     public static final ServiceType UPNP_SERVICE_TYPE = new ServiceType("lge-com", "webos-second-screen", 1);
37
38     /*
39      * Config names must match property names in
40      * - WebOSConfiguration
41      * - parameter names in OH-INF/config/config.xml
42      * - property names in OH-INF/thing/thing-types.xml
43      */
44     public static final String CONFIG_HOST = "host";
45     public static final String CONFIG_KEY = "key";
46     public static final String CONFIG_MAC_ADDRESS = "macAddress";
47
48     /*
49      * Property names must match property names in
50      * - property names in OH-INF/thing/thing-types.xml
51      */
52     public static final String PROPERTY_DEVICE_ID = "deviceId";
53     public static final String PROPERTY_DEVICE_OS = "deviceOS";
54     public static final String PROPERTY_DEVICE_OS_VERSION = "deviceOSVersion";
55     public static final String PROPERTY_DEVICE_OS_RELEASE_VERSION = "deviceOSReleaseVersion";
56     public static final String PROPERTY_LAST_CONNECTED = "lastConnected";
57
58     /*
59      * List of all Channel ids.
60      * Values have to match ids in thing-types.xml
61      */
62     public static final String CHANNEL_VOLUME = "volume";
63     public static final String CHANNEL_POWER = "power";
64     public static final String CHANNEL_MUTE = "mute";
65     public static final String CHANNEL_CHANNEL = "channel";
66     public static final String CHANNEL_TOAST = "toast";
67     public static final String CHANNEL_MEDIA_PLAYER = "mediaPlayer";
68     public static final String CHANNEL_MEDIA_STOP = "mediaStop";
69     public static final String CHANNEL_APP_LAUNCHER = "appLauncher";
70     public static final String CHANNEL_RCBUTTON = "rcButton";
71 }