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.yamahareceiver.internal.protocol.xml;
15 import java.util.HashMap;
18 import org.openhab.binding.yamahareceiver.internal.YamahaReceiverBindingConstants.Feature;
21 * XML protocol constants.
23 * @author Tomasz Maruszak - Initial contribution
25 public class XMLConstants {
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";
35 public static class Commands {
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";
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";
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";
46 public static final String PLAYBACK_STATUS_CMD = "<Play_Info>GetParam</Play_Info>";
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);