View Javadoc
1   /*
2    * Copyright (C) 2013 4th Line GmbH, Switzerland
3    *
4    * The contents of this file are subject to the terms of either the GNU
5    * Lesser General Public License Version 2 or later ("LGPL") or the
6    * Common Development and Distribution License Version 1 or later
7    * ("CDDL") (collectively, the "License"). You may not use this file
8    * except in compliance with the License. See LICENSE.txt for more
9    * information.
10   *
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14   */
15  package org.fourthline.cling.support.model.dlna.types;
16  
17  import org.fourthline.cling.model.types.BytesRange;
18  
19  /**
20   *
21   * @author Mario Franco
22   */
23  public class AvailableSeekRangeType {
24  
25  
26      public enum Mode {
27          MODE_0,
28          MODE_1,
29      }
30      
31      private Mode modeFlag;
32      private NormalPlayTimeRange normalPlayTimeRange;
33      private BytesRange bytesRange;
34      
35  
36      public AvailableSeekRangeType(Mode modeFlag, NormalPlayTimeRange nptRange) {
37          this.modeFlag = modeFlag;
38          this.normalPlayTimeRange = nptRange;
39      }
40      
41      public AvailableSeekRangeType(Mode modeFlag, BytesRange byteRange) {
42          this.modeFlag = modeFlag;
43          this.bytesRange = byteRange;
44      }
45      
46      public AvailableSeekRangeType(Mode modeFlag, NormalPlayTimeRange nptRange, BytesRange byteRange) {
47          this.modeFlag = modeFlag;
48          this.normalPlayTimeRange = nptRange;
49          this.bytesRange = byteRange;
50      }
51  
52      /**
53       * @return the normalPlayTimeRange
54       */
55      public NormalPlayTimeRange getNormalPlayTimeRange() {
56          return normalPlayTimeRange;
57      }
58  
59      /**
60       * @return the bytesRange
61       */
62      public BytesRange getBytesRange() {
63          return bytesRange;
64      }
65  
66      /**
67       * @return the modeFlag
68       */
69      public Mode getModeFlag() {
70          return modeFlag;
71      }
72  
73  }