]> git.basschouten.com Git - openhab-addons.git/blob
e8673eacd6d096dfea4fbf8933e57518d49f9fc8
[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.yamahareceiver.internal.protocol.xml;
14
15 import java.util.HashMap;
16 import java.util.Map;
17
18 import org.openhab.binding.yamahareceiver.internal.YamahaReceiverBindingConstants.Feature;
19
20 /**
21  * XML protocol constants.
22  *
23  * @author Tomasz Maruszak - Initial contribution
24  */
25 public class XMLConstants {
26
27     public static final String ON = "On";
28     public static final String OFF = "Off";
29     public static final String POWER_STANDBY = "Standby";
30     public static final Map<String, Feature> FEATURE_BY_YNC_TAG;
31     public static final String GET_PARAM = "GetParam";
32     public static final String UP = "Up";
33     public static final String DOWN = "Down";
34
35     public static class Commands {
36
37         public static final String SYSTEM_STATUS_CONFIG_CMD = "<System><Config>GetParam</Config></System>";
38         public static final String SYSTEM_STATUS_CONFIG_PATH = "System/Config";
39
40         public static final String ZONE_BASIC_STATUS_CMD = "<Basic_Status>GetParam</Basic_Status>";
41         public static final String ZONE_BASIC_STATUS_PATH = "Basic_Status";
42
43         public static final String ZONE_INPUT_QUERY = "<Input><Input_Sel_Item>GetParam</Input_Sel_Item></Input>";
44         public static final String ZONE_INPUT_PATH = "Input/Input_Sel_Item";
45
46         public static final String PLAYBACK_STATUS_CMD = "<Play_Info>GetParam</Play_Info>";
47     }
48
49     static {
50         FEATURE_BY_YNC_TAG = new HashMap<>();
51         FEATURE_BY_YNC_TAG.put("Tuner", Feature.TUNER);
52         FEATURE_BY_YNC_TAG.put("DAB", Feature.DAB);
53         FEATURE_BY_YNC_TAG.put("Spotify", Feature.SPOTIFY);
54         FEATURE_BY_YNC_TAG.put("Bluetooth", Feature.BLUETOOTH);
55         FEATURE_BY_YNC_TAG.put("AirPlay", Feature.AIRPLAY);
56         FEATURE_BY_YNC_TAG.put("NET_RADIO", Feature.NET_RADIO);
57         FEATURE_BY_YNC_TAG.put("USB", Feature.USB);
58         FEATURE_BY_YNC_TAG.put("NET_USB", Feature.NET_USB);
59     }
60 }