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.mynice.internal.xml.dto;
15 import static org.openhab.binding.mynice.internal.xml.RequestBuilder.*;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
20 * The CommandType enum lists all handled command with according syntax
22 * @author Gaƫl L'hopital - Initial contribution
25 public enum CommandType {
27 "<Authentication username=\"" + USERNAME
28 + "\" cc=\"null\" CType=\"phone\" OSType=\"Android\" OSVer=\"6.0.1\"/>"),
29 VERIFY(false, "<User username=\"" + USERNAME + "\"/>"),
30 CONNECT(false, "<Authentication username=\"" + USERNAME + "\" cc=\"" + CLIENT_CHALLENGE + "\"/>"),
33 CHANGE(true, "<Devices><Device id=\"%s\"><Services>%s</Services></Device></Devices>");
35 public final boolean signNeeded;
36 public final String body;
38 CommandType(boolean signNeeded, String body) {
39 this.signNeeded = signNeeded;