]> git.basschouten.com Git - openhab-addons.git/blob
e99d75947ee33997d382560d4dbc9faec760b27e
[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.mynice.internal.xml.dto;
14
15 import static org.openhab.binding.mynice.internal.xml.RequestBuilder.*;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18
19 /**
20  * The CommandType enum lists all handled command with according syntax
21  *
22  * @author GaĆ«l L'hopital - Initial contribution
23  */
24 @NonNullByDefault
25 public enum CommandType {
26     PAIR(false,
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 + "\"/>"),
31     INFO(true, ""),
32     STATUS(true, ""),
33     CHANGE(true, "<Devices><Device id=\"%s\"><Services>%s</Services></Device></Devices>");
34
35     public final boolean signNeeded;
36     public final String body;
37
38     CommandType(boolean signNeeded, String body) {
39         this.signNeeded = signNeeded;
40         this.body = body;
41     }
42 }