2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.freebox.internal;
15 import java.util.Collections;
17 import java.util.stream.Collectors;
18 import java.util.stream.Stream;
20 import org.eclipse.jdt.annotation.NonNullByDefault;
21 import org.openhab.core.thing.ThingTypeUID;
24 * The {@link FreeboxBinding} class defines common constants, which are
25 * used across the whole binding.
27 * @author Gaƫl L'hopital - Initial contribution
30 public class FreeboxBindingConstants {
32 public static final String BINDING_ID = "freebox";
34 // List of all Bridge Type UIDs
35 public static final ThingTypeUID FREEBOX_BRIDGE_TYPE_SERVER = new ThingTypeUID(BINDING_ID, "server");
37 // List of all Thing Type UIDs
38 public static final ThingTypeUID FREEBOX_THING_TYPE_PHONE = new ThingTypeUID(BINDING_ID, "phone");
39 public static final ThingTypeUID FREEBOX_THING_TYPE_NET_DEVICE = new ThingTypeUID(BINDING_ID, "net_device");
40 public static final ThingTypeUID FREEBOX_THING_TYPE_NET_INTERFACE = new ThingTypeUID(BINDING_ID, "net_interface");
41 public static final ThingTypeUID FREEBOX_THING_TYPE_AIRPLAY = new ThingTypeUID(BINDING_ID, "airplay");
43 // All supported Bridge types
44 public static final Set<ThingTypeUID> SUPPORTED_BRIDGE_TYPES_UIDS = Set.of(FREEBOX_BRIDGE_TYPE_SERVER);
46 // All supported Thing types
47 public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
48 .unmodifiableSet(Stream.of(FREEBOX_THING_TYPE_PHONE, FREEBOX_THING_TYPE_NET_DEVICE,
49 FREEBOX_THING_TYPE_NET_INTERFACE, FREEBOX_THING_TYPE_AIRPLAY).collect(Collectors.toSet()));
52 public static final String API_BASE_URL = "apiBaseUrl";
53 public static final String API_VERSION = "apiVersion";
55 // List of all Group Channel ids
56 public static final String STATE = "state";
57 public static final String ANY = "any";
58 public static final String ACCEPTED = "accepted";
59 public static final String MISSED = "missed";
60 public static final String OUTGOING = "outgoing";
62 // List of all Channel ids
63 public static final String FWVERSION = "fwversion";
64 public static final String UPTIME = "uptime";
65 public static final String RESTARTED = "restarted";
66 public static final String TEMPCPUM = "tempcpum";
67 public static final String TEMPCPUB = "tempcpub";
68 public static final String TEMPSWITCH = "tempswitch";
69 public static final String FANSPEED = "fanspeed";
70 public static final String LCDBRIGHTNESS = "lcd_brightness";
71 public static final String LCDORIENTATION = "lcd_orientation";
72 public static final String LCDFORCED = "lcd_forced";
73 public static final String WIFISTATUS = "wifi_status";
74 public static final String XDSLSTATUS = "xdsl_status";
75 public static final String FTTHSTATUS = "ftth_status";
76 public static final String LINESTATUS = "line_status";
77 public static final String IPV4 = "ipv4";
78 public static final String RATEUP = "rate_up";
79 public static final String RATEDOWN = "rate_down";
80 public static final String BYTESUP = "bytes_up";
81 public static final String BYTESDOWN = "bytes_down";
82 public static final String ONHOOK = "onhook";
83 public static final String RINGING = "ringing";
84 public static final String CALLNUMBER = "call_number";
85 public static final String CALLDURATION = "call_duration";
86 public static final String CALLTIMESTAMP = "call_timestamp";
87 public static final String CALLSTATUS = "call_status";
88 public static final String CALLNAME = "call_name";
89 public static final String REBOOT = "reboot";
90 public static final String FTPSTATUS = "ftp_status";
91 public static final String AIRMEDIASTATUS = "airmedia_status";
92 public static final String UPNPAVSTATUS = "upnpav_status";
93 public static final String SAMBAFILESTATUS = "sambafileshare_status";
94 public static final String SAMBAPRINTERSTATUS = "sambaprintershare_status";
95 public static final String REACHABLE = "reachable";
96 public static final String PLAYURL = "playurl";
97 public static final String STOP = "stop";