]> git.basschouten.com Git - openhab-addons.git/blob
9c8f4f8521927df1e96e6e28836c48c5efce3e00
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.pulseaudio.internal;
14
15 import java.util.HashMap;
16 import java.util.Map;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.core.thing.ThingTypeUID;
20
21 /**
22  * The {@link PulseaudioBinding} class defines common constants, which are
23  * used across the whole binding.
24  *
25  * @author Tobias Bräutigam - Initial contribution
26  */
27 @NonNullByDefault
28 public class PulseaudioBindingConstants {
29
30     public static final String BINDING_ID = "pulseaudio";
31
32     // List of all Thing Type UIDs
33     public static final ThingTypeUID COMBINED_SINK_THING_TYPE = new ThingTypeUID(BINDING_ID, "combinedSink");
34     public static final ThingTypeUID SINK_THING_TYPE = new ThingTypeUID(BINDING_ID, "sink");
35     public static final ThingTypeUID SOURCE_THING_TYPE = new ThingTypeUID(BINDING_ID, "source");
36     public static final ThingTypeUID SINK_INPUT_THING_TYPE = new ThingTypeUID(BINDING_ID, "sinkInput");
37     public static final ThingTypeUID SOURCE_OUTPUT_THING_TYPE = new ThingTypeUID(BINDING_ID, "sourceOutput");
38
39     public static final ThingTypeUID BRIDGE_THING_TYPE = new ThingTypeUID(BINDING_ID, "bridge");
40
41     // List of all Channel ids
42     public static final String VOLUME_CHANNEL = "volume";
43     public static final String MUTE_CHANNEL = "mute";
44     public static final String STATE_CHANNEL = "state";
45     public static final String SLAVES_CHANNEL = "slaves";
46     public static final String ROUTE_TO_SINK_CHANNEL = "routeToSink";
47
48     // List of all Parameters
49     public static final String BRIDGE_PARAMETER_HOST = "host";
50     public static final String BRIDGE_PARAMETER_PORT = "port";
51     public static final String BRIDGE_PARAMETER_REFRESH_INTERVAL = "refresh";
52
53     public static final String DEVICE_PARAMETER_NAME = "name";
54     public static final String DEVICE_PARAMETER_AUDIO_SINK_ACTIVATION = "activateSimpleProtocolSink";
55     public static final String DEVICE_PARAMETER_AUDIO_SINK_PORT = "simpleProtocolSinkPort";
56
57     public static final String MODULE_SIMPLE_PROTOCOL_TCP_NAME = "module-simple-protocol-tcp";
58     public static final int MODULE_SIMPLE_PROTOCOL_TCP_DEFAULT_PORT = 4711;
59
60     public static final Map<String, Boolean> TYPE_FILTERS = new HashMap<>();
61
62     static {
63         TYPE_FILTERS.put(SINK_THING_TYPE.getId(), true);
64         TYPE_FILTERS.put(SINK_INPUT_THING_TYPE.getId(), false);
65         TYPE_FILTERS.put(SOURCE_THING_TYPE.getId(), false);
66         TYPE_FILTERS.put(SOURCE_OUTPUT_THING_TYPE.getId(), false);
67     }
68 }