2 * Copyright (c) 2010-2024 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.plex.internal.dto;
15 import java.util.List;
17 import com.thoughtworks.xstream.annotations.XStreamAlias;
18 import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
19 import com.thoughtworks.xstream.annotations.XStreamImplicit;
23 * @author Brian Homeyer - Initial contribution
24 * @author Aron Beurskens - Binding development
26 @XStreamAlias("MediaContainer")
27 public class MediaContainer {
32 private List<Video> video = null;
36 private List<Track> track = null;
40 private List<Device> device = null;
42 public List<Device> getDevice() {
46 public Integer getSize() {
50 public List<Video> getVideo() {
54 public List<Track> getTrack() {
59 * Returns a list of video or track objects, depends on what is playing
61 public List<? extends MediaType> getMediaTypes() {
72 public class MediaType {
80 private String grandparentThumb;
82 private String grandparentTitle;
84 private String parentThumb;
86 private String parentTitle;
88 private long viewOffset;
92 private String sessionKey;
93 @XStreamAlias("Media")
95 @XStreamAlias("Player")
96 private Player player;
100 public String getGrandparentThumb() {
101 return this.grandparentThumb;
104 public void setGrandparentThumb(String grandparentThumb) {
105 this.grandparentThumb = grandparentThumb;
108 public String getGrandparentTitle() {
109 return this.grandparentTitle;
112 public void setGrandparentTitle(String grandparentTitle) {
113 this.grandparentTitle = grandparentTitle;
116 public String getParentThumb() {
117 return this.parentThumb;
120 public void setParentThumb(String parentThumb) {
121 this.parentThumb = parentThumb;
124 public String getParentTitle() {
125 return this.parentTitle;
128 public void setParentTitle(String parentTitle) {
129 this.parentTitle = parentTitle;
132 public Media getMedia() {
136 public Player getPlayer() {
140 public String getTitle() {
144 public void setTitle(String title) {
148 public long getViewOffset() {
149 return this.viewOffset;
152 public String getType() {
156 public String getThumb() {
160 public void setThumb(String art) {
164 public String getArt() {
168 public void setArt(String art) {
172 public String getSessionKey() {
176 public void setSessionKey(String sessionKey) {
177 this.sessionKey = sessionKey;
180 public User getUser() {
184 public class Player {
186 private String machineIdentifier;
188 private String state;
190 private String local;
192 public String getMachineIdentifier() {
193 return this.machineIdentifier;
196 public String getState() {
200 public void setState(String state) {
204 public String getLocal() {
212 private long duration;
214 public long getDuration() {
215 return this.duration;
219 @XStreamAlias("User")
224 public Integer getId() {
229 private String title;
231 public String getTitle() {
237 @XStreamAlias("Video")
238 public class Video extends MediaType {
241 @XStreamAlias("Track")
242 public class Track extends MediaType {
245 @XStreamAlias("Device")
246 public class Device {
250 public String getName() {
254 @XStreamAlias("Connection")
256 private List<Connection> connection = null;
258 public List<Connection> getConnection() {
262 public class Connection {
264 private String protocol;
266 private String address;
268 public String getProtocol() {
269 return this.protocol;
272 public String getAddress() {