/[svn]/jlscp/trunk/src/org/linuxsampler/lscp/AbstractDevice.java
ViewVC logotype

Diff of /jlscp/trunk/src/org/linuxsampler/lscp/AbstractDevice.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1138 by iliev, Mon Oct 10 14:55:44 2005 UTC revision 1139 by iliev, Mon Apr 2 20:43:58 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *   jlscp - a java LinuxSampler control protocol API   *   jlscp - a java LinuxSampler control protocol API
3   *   *
4   *   Copyright (C) 2005 Grigor Kirilov Iliev   *   Copyright (C) 2005-2006 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of jlscp.   *   This file is part of jlscp.
7   *   *
# Line 32  import java.util.Vector; Line 32  import java.util.Vector;
32  public abstract class AbstractDevice implements Device {  public abstract class AbstractDevice implements Device {
33          private int id = -1;          private int id = -1;
34          private String driver = null;          private String driver = null;
35          private boolean active = false;          private BoolParameter active = new BoolParameter("ACTIVE", true);
36                    
37          private final Vector<Parameter> prmList = new Vector<Parameter>();          private final Vector<Parameter> prmList = new Vector<Parameter>();
38                    
# Line 46  public abstract class AbstractDevice imp Line 46  public abstract class AbstractDevice imp
46           * @return The numerical ID of this device or -1 if the device number is not set.           * @return The numerical ID of this device or -1 if the device number is not set.
47           */           */
48          public int          public int
49          getDeviceID() { return id; }          getDeviceId() { return id; }
50                    
51          /**          /**
52           * Sets the numerical ID of this device.           * Sets the numerical ID of this device.
53           * @param id The new numerical ID of this device.           * @param id The new numerical ID of this device.
54           */           */
55          public void          public void
56          setDeviceID(int id) { this.id = id; }          setDeviceId(int id) { this.id = id; }
57                    
58          /**          /**
59           * Gets the driver name used by this device.           * Gets the driver name used by this device.
# Line 74  public abstract class AbstractDevice imp Line 74  public abstract class AbstractDevice imp
74           * @return <code>false</code> if the device is inactive and <code>true</code> otherwise.           * @return <code>false</code> if the device is inactive and <code>true</code> otherwise.
75           */           */
76          public boolean          public boolean
77          isActive() { return active; }          isActive() { return active.getValue(); }
78                    
79          /**          /**
80           * Sets whether this audio output device is active or not.           * Sets whether this audio output device is active or not.
# Line 82  public abstract class AbstractDevice imp Line 82  public abstract class AbstractDevice imp
82           * <code>true</code> otherwise.           * <code>true</code> otherwise.
83           */           */
84          public void          public void
85          setActive(boolean active) { this.active = active; }          setActive(boolean active) { this.active.setValue(active); }
86            
87            /**
88             * Gets the <code>ACTIVE</code> parameter.
89             * @return A <code>Parameter<Boolean></code> instance
90             * representing the active state of the device.
91             */
92            public Parameter<Boolean>
93            getActiveParameter() { return active; }
94                    
95          /**          /**
96           * Adds additional parameter to this device.           * Adds additional parameter to this device.
# Line 111  public abstract class AbstractDevice imp Line 119  public abstract class AbstractDevice imp
119           * @return The numerical ID of the device.           * @return The numerical ID of the device.
120           */           */
121          public String          public String
122          toString() { return String.valueOf(getDeviceID()); }          toString() { return String.valueOf(getDeviceId()); }
123  }  }

Legend:
Removed from v.1138  
changed lines
  Added in v.1139

  ViewVC Help
Powered by ViewVC