]> git.basschouten.com Git - openhab-addons.git/blob
8e1d73d69c5c79cc4226138da4e44ad04db87342
[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 java.util.Collections;
16 import java.util.Set;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
19
20 import org.openhab.core.thing.ThingTypeUID;
21
22 /**
23  * The {@link LIRCBinding} class defines common constants, which are
24  * used across the whole binding.
25  *
26  * @author Andrew Nagle - Initial contribution
27  */
28 public class LIRCBindingConstants {
29
30     public static final String BINDING_ID = "lirc";
31     public static final int DISCOVERY_TIMOUT = 5;
32
33     // List of all Thing Type UIDs
34     public static final ThingTypeUID THING_TYPE_BRIDGE = new ThingTypeUID(BINDING_ID, "bridge");
35     public static final ThingTypeUID THING_TYPE_REMOTE = new ThingTypeUID(BINDING_ID, "remote");
36
37     // List of all channel ids
38     public static final String CHANNEL_EVENT = "event";
39     public static final String CHANNEL_TRANSMIT = "transmit";
40
41     // List of all supported thing types
42     public static final Set<ThingTypeUID> SUPPORTED_DEVICE_TYPES = Collections.singleton(THING_TYPE_REMOTE);
43     public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_TYPES = Collections.singleton(THING_TYPE_BRIDGE);
44     public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Stream.of(THING_TYPE_REMOTE, THING_TYPE_BRIDGE)
45             .collect(Collectors.toSet());
46
47     // List of all properties
48     public static final String PROPERTY_REMOTE = "remote";
49 }