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.freebox.internal.api.model;
16 * The {@link FreeboxAirMediaReceiverRequest} is the Java class used to map the "AirMediaReceiverRequest"
17 * structure used by the sending request to an AirMedia receiver API
18 * https://dev.freebox.fr/sdk/os/airmedia/#
20 * @author Laurent Garnier - Initial contribution
22 public class FreeboxAirMediaReceiverRequest {
24 private static enum MediaAction {
28 private String action;
30 private MediaAction(String action) {
34 public String getAction() {
39 private static enum MediaType {
43 private String mediaType;
45 private MediaType(String mediaType) {
46 this.mediaType = mediaType;
49 public String getMediaType() {
54 private String action;
55 private String mediaType;
56 private String password;
57 private Integer position;
60 public void setStartAction() {
61 this.action = MediaAction.START.getAction();
64 public void setStopAction() {
65 this.action = MediaAction.STOP.getAction();
68 public void setVideoMediaType() {
69 this.mediaType = MediaType.VIDEO.getMediaType();
72 public void setPassword(String password) {
73 this.password = password;
76 public void setPosition(Integer position) {
77 this.position = position;
80 public void setMedia(String media) {