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

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

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

revision 1340 by iliev, Mon Sep 10 21:26:10 2007 UTC revision 1494 by iliev, Mon Nov 19 22:00:04 2007 UTC
# Line 34  import java.util.Vector; Line 34  import java.util.Vector;
34  import java.util.logging.Level;  import java.util.logging.Level;
35  import java.util.logging.Logger;  import java.util.logging.Logger;
36    
 import static org.linuxsampler.lscp.Parser.*;  
37  import org.linuxsampler.lscp.event.*;  import org.linuxsampler.lscp.event.*;
38    
39    import static org.linuxsampler.lscp.Parser.*;
40    
41    
42  /**  /**
43   * This class is the abstraction representing a client endpoint for communication with LinuxSampler   * This class is the abstraction representing a client endpoint for communication with LinuxSampler
# Line 542  public class Client { Line 543  public class Client {
543                          if(s.startsWith("NAME ")) {                          if(s.startsWith("NAME ")) {
544                                  String[] list;                                  String[] list;
545                                  try {                                  try {
546                                          list = parseQuotedStringList(s.substring("NAME ".length()), ' ');                                          s = s.substring("NAME ".length());
547                                            list = parseEscapedStringList(s, ' ');
548                                          if(list.length != 2) throw new LscpException();                                          if(list.length != 2) throw new LscpException();
549                                            list[1] = toNonEscapedString(list[1]);
550                                          e = new InstrumentsDbEvent(this, list[0], list[1]);                                          e = new InstrumentsDbEvent(this, list[0], list[1]);
551                                          for(InstrumentsDbListener l : llID) {                                          for(InstrumentsDbListener l : llID) {
552                                                  l.directoryNameChanged(e);                                                  l.directoryNameChanged(e);
# Line 569  public class Client { Line 572  public class Client {
572                          if(s.startsWith("NAME ")) {                          if(s.startsWith("NAME ")) {
573                                  String[] list;                                  String[] list;
574                                  try {                                  try {
575                                          list = parseQuotedStringList(s.substring("NAME ".length()), ' ');                                          s = s.substring("NAME ".length());
576                                            list = parseEscapedStringList(s, ' ');
577                                          if(list.length != 2) throw new LscpException();                                          if(list.length != 2) throw new LscpException();
578                                            list[1] = toNonEscapedString(list[1]);
579                                          e = new InstrumentsDbEvent(this, list[0], list[1]);                                          e = new InstrumentsDbEvent(this, list[0], list[1]);
580                                          for(InstrumentsDbListener l : llID) {                                          for(InstrumentsDbListener l : llID) {
581                                                  l.instrumentNameChanged(e);                                                  l.instrumentNameChanged(e);
# Line 2211  public class Client { Line 2216  public class Client {
2216                                  mid.setActive(Boolean.parseBoolean(s));                                  mid.setActive(Boolean.parseBoolean(s));
2217                          } else if(s.startsWith("PORTS: ")) {                          } else if(s.startsWith("PORTS: ")) {
2218                                  s = s.substring("PORTS: ".length());                                  s = s.substring("PORTS: ".length());
2219                                  int ports = Parser.parseInt(s);                                  
2220                                  MidiPort[] midiPorts = new MidiPort[ports > 0 ? ports : 0];                                  Parameter<Integer> ports = (Parameter<Integer>)
2221                                            getMidiInputDriverParameterInfo(drv, "PORTS");
2222                                    
2223                                    ports.parseValue(s);
2224                                    mid.setPortsParameter(ports);
2225                                    
2226                                    int j = ports.getValue();
2227                                    MidiPort[] midiPorts = new MidiPort[j > 0 ? j : 0];
2228                                                                    
2229                                  for(int i = 0; i < midiPorts.length; i++)                                  for(int i = 0; i < midiPorts.length; i++)
2230                                          midiPorts[i] = getMidiInputPortInfo(deviceId, i);                                          midiPorts[i] = getMidiInputPortInfo(deviceId, i);
# Line 2455  public class Client { Line 2467  public class Client {
2467          public synchronized int          public synchronized int
2468          addMidiInstrumentMap(String name) throws IOException, LSException, LscpException {          addMidiInstrumentMap(String name) throws IOException, LSException, LscpException {
2469                  verifyConnection();                  verifyConnection();
2470                  out.writeLine("ADD MIDI_INSTRUMENT_MAP '" + name + "'");                  out.writeLine("ADD MIDI_INSTRUMENT_MAP '" + toEscapedString(name) + "'");
2471                  if(getPrintOnlyMode()) return -1;                  if(getPrintOnlyMode()) return -1;
2472                                    
2473                  ResultSet rs = getEmptyResultSet();                  ResultSet rs = getEmptyResultSet();
# Line 2558  public class Client { Line 2570  public class Client {
2570                                    
2571                  for(String s : lnS) {                  for(String s : lnS) {
2572                          if(s.startsWith("NAME: ")) {                          if(s.startsWith("NAME: ")) {
2573                                  name = s.substring("NAME: ".length());                                  name = toNonEscapedString(s.substring("NAME: ".length()));
2574                          } else if(s.startsWith("DEFAULT: ")) {                          } else if(s.startsWith("DEFAULT: ")) {
2575                                  b = Boolean.parseBoolean(s.substring("DEFAULT: ".length()));                                  b = Boolean.parseBoolean(s.substring("DEFAULT: ".length()));
2576                          } else {                          } else {
# Line 2606  public class Client { Line 2618  public class Client {
2618                                  throws IOException, LscpException, LSException {                                  throws IOException, LscpException, LSException {
2619                                    
2620                  verifyConnection();                  verifyConnection();
2621                    name = toEscapedString(name);
2622                  out.writeLine("SET MIDI_INSTRUMENT_MAP NAME " +  + mapId + " '" + name + "'");                  out.writeLine("SET MIDI_INSTRUMENT_MAP NAME " +  + mapId + " '" + name + "'");
2623                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
2624                                    
# Line 2661  public class Client { Line 2674  public class Client {
2674                  if(!info.getLoadMode().name().equals("DEFAULT")) {                  if(!info.getLoadMode().name().equals("DEFAULT")) {
2675                          cmd.append(' ').append(info.getLoadMode().name());                          cmd.append(' ').append(info.getLoadMode().name());
2676                  }                  }
2677                  if(info.getName() != null) cmd.append(" '").append(info.getName()).append("'");                  
2678                    if(info.getName() != null) {
2679                            String s = toEscapedString(info.getName());
2680                            cmd.append(" '").append(s).append("'");
2681                    }
2682                                    
2683                  out.writeLine(cmd.toString());                  out.writeLine(cmd.toString());
2684                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
# Line 2857  public class Client { Line 2874  public class Client {
2874          loadInstrument(String filename, int instrIdx, int samplerChn, boolean nonModal)          loadInstrument(String filename, int instrIdx, int samplerChn, boolean nonModal)
2875                                                  throws IOException, LscpException, LSException {                                                  throws IOException, LscpException, LSException {
2876                                    
                 filename = getEscapedString(filename);  
2877                  String cmd = nonModal ? "LOAD INSTRUMENT NON_MODAL " : "LOAD INSTRUMENT ";                  String cmd = nonModal ? "LOAD INSTRUMENT NON_MODAL " : "LOAD INSTRUMENT ";
2878                  String args = '\'' + filename + "' " + instrIdx + ' ' + samplerChn;                  String args = '\'' + filename + "' " + instrIdx + ' ' + samplerChn;
2879                                    
# Line 3040  public class Client { Line 3056  public class Client {
3056                  out.writeLine("LIST AVAILABLE_ENGINES");                  out.writeLine("LIST AVAILABLE_ENGINES");
3057                  if(getPrintOnlyMode()) return null;                  if(getPrintOnlyMode()) return null;
3058                                    
3059                  return parseQuotedStringList(getSingleLineResultSet().getResult());                  return parseStringList(getSingleLineResultSet().getResult());
3060          }          }
3061                    
3062          /**          /**
# Line 3511  public class Client { Line 3527  public class Client {
3527                                    
3528                  verifyConnection();                  verifyConnection();
3529                  String s = String.valueOf(channel) + " " + String.valueOf(midiCtrl);                  String s = String.valueOf(channel) + " " + String.valueOf(midiCtrl);
3530                  if(name != null) s += " '" + name + "'";                  if(name != null) s += " '" + toEscapedString(name) + "'";
3531                  out.writeLine("CREATE FX_SEND " + s);                  out.writeLine("CREATE FX_SEND " + s);
3532                  if(getPrintOnlyMode()) return -1;                  if(getPrintOnlyMode()) return -1;
3533                                    
# Line 3642  public class Client { Line 3658  public class Client {
3658                                  throws IOException, LscpException, LSException {                                  throws IOException, LscpException, LSException {
3659                                    
3660                  verifyConnection();                  verifyConnection();
3661                  String args = " " + channel + " " + fxSend + " '" + name + "'";                  String args = " " + channel + " " + fxSend + " '" + toEscapedString(name) + "'";
3662                  out.writeLine("SET FX_SEND NAME" + args);                  out.writeLine("SET FX_SEND NAME" + args);
3663                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
3664                                    
# Line 3741  public class Client { Line 3757  public class Client {
3757           * @see #getSamplerChannels           * @see #getSamplerChannels
3758           */           */
3759          public synchronized void          public synchronized void
3760          editInstrument(int samplerChn) throws IOException, LscpException, LSException {          editChannelInstrument(int samplerChn) throws IOException, LscpException, LSException {
3761                  verifyConnection();                  verifyConnection();
3762                  out.writeLine("EDIT INSTRUMENT " + samplerChn);                  out.writeLine("EDIT CHANNEL INSTRUMENT " + samplerChn);
3763                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
3764                                    
3765                  ResultSet rs = getEmptyResultSet();                  ResultSet rs = getEmptyResultSet();
# Line 3753  public class Client { Line 3769  public class Client {
3769                    
3770          /**          /**
3771           * Adds the specified directory to the instruments database.           * Adds the specified directory to the instruments database.
3772           * @param dir The absolute path name of the directory to add.           * @param dir The absolute (escaped) path name of the directory to add.
3773           * @throws IOException If some I/O error occurs.           * @throws IOException If some I/O error occurs.
3774           * @throws LSException If the creation of the directory failed.           * @throws LSException If the creation of the directory failed.
3775           * @throws LscpException If LSCP protocol corruption occurs.           * @throws LscpException If LSCP protocol corruption occurs.
# Line 3769  public class Client { Line 3785  public class Client {
3785                    
3786          /**          /**
3787           * Removes the specified directory from the instruments database.           * Removes the specified directory from the instruments database.
3788           * @param dir The absolute path name of the directory to remove.           * @param dir The absolute (escaped) path name of the directory to remove.
3789           * @throws IOException If some I/O error occurs.           * @throws IOException If some I/O error occurs.
3790           * @throws LscpException If LSCP protocol corruption occurs.           * @throws LscpException If LSCP protocol corruption occurs.
3791           * @throws LSException If the specified directory is not           * @throws LSException If the specified directory is not
# Line 3804  public class Client { Line 3820  public class Client {
3820                    
3821          /**          /**
3822           * Removes the specified directories from the instruments database.           * Removes the specified directories from the instruments database.
3823           * @param dirs The absolute path names of the directories to remove.           * @param dirs The absolute (escaped) path names of the directories to remove.
3824           * @param force If <code>true</code> forces the removal of non-empty           * @param force If <code>true</code> forces the removal of non-empty
3825           * directories.           * directories.
3826           * @throws IOException If some I/O error occurs.           * @throws IOException If some I/O error occurs.
# Line 3879  public class Client { Line 3895  public class Client {
3895                  out.writeLine("LIST DB_INSTRUMENT_DIRECTORIES '" + dir + "'");                  out.writeLine("LIST DB_INSTRUMENT_DIRECTORIES '" + dir + "'");
3896                  if(getPrintOnlyMode()) return null;                  if(getPrintOnlyMode()) return null;
3897                                    
3898                  return parseQuotedStringList(getSingleLineResultSet().getResult());                  String[] names = parseEscapedStringList(getSingleLineResultSet().getResult());
3899                    for(int i = 0; i < names.length; i++) {
3900                            names[i] = toNonEscapedString(names[i]);
3901                    }
3902                    return names;
3903          }          }
3904                    
3905          /**          /**
# Line 3901  public class Client { Line 3921  public class Client {
3921                  DbDirectoryInfo info = new DbDirectoryInfo(rs.getMultiLineResult());                  DbDirectoryInfo info = new DbDirectoryInfo(rs.getMultiLineResult());
3922                  if(dir.equals("/")) {                  if(dir.equals("/")) {
3923                          info.setName("/");                          info.setName("/");
3924                  } else if(dir.length() > 1 && dir.charAt(dir.length() - 1) == '/') {                  } else {
3925                          dir = dir.substring(0, dir.length() - 1);                          dir = removeEndingFileSeparator(dir);
                 }  
                 int i = dir.lastIndexOf('/');  
                 if(i != -1 && i < dir.length() - 1) {  
                         info.setName(dir.substring(i + 1));  
                         if(i == 0) info.setParentDirectoryPath("/");  
                         else info.setParentDirectoryPath(dir.substring(0, i));  
3926                  }                  }
3927                    String s = getFileName(dir);
3928                    if(s != null) info.setName(toNonEscapedFileName(s));
3929                    s = getParentDirectory(dir);
3930                    if(s != null) info.setParentDirectoryPath(s);
3931                                    
3932                  return info;                  return info;
3933          }          }
# Line 3926  public class Client { Line 3944  public class Client {
3944          public synchronized DbDirectoryInfo[]          public synchronized DbDirectoryInfo[]
3945          getDbDirectories(String dir) throws IOException, LscpException, LSException {          getDbDirectories(String dir) throws IOException, LscpException, LSException {
3946                  String[] dirS = getDbDirectoryNames(dir);                  String[] dirS = getDbDirectoryNames(dir);
3947                  if(dir.charAt(dir.length() - 1) != '/') dir += "/";                  if(!hasEndingFileSeparator(dir)) dir += "/";
3948                  DbDirectoryInfo[] infoS = new DbDirectoryInfo[dirS.length];                  DbDirectoryInfo[] infoS = new DbDirectoryInfo[dirS.length];
3949                  for(int i = 0; i < dirS.length; i++) infoS[i] = getDbDirectoryInfo(dir + dirS[i]);                  for(int i = 0; i < dirS.length; i++) {
3950                            infoS[i] = getDbDirectoryInfo(dir + toEscapedFileName(dirS[i]));
3951                    }
3952                  return infoS;                  return infoS;
3953          }          }
3954                    
# Line 3993  public class Client { Line 4013  public class Client {
4013          public synchronized void          public synchronized void
4014          renameDbDirectory(String dir, String name) throws IOException, LSException, LscpException {          renameDbDirectory(String dir, String name) throws IOException, LSException, LscpException {
4015                  verifyConnection();                  verifyConnection();
4016                    name = toEscapedString(name);
4017                  out.writeLine("SET DB_INSTRUMENT_DIRECTORY NAME '" + dir + "' '" + name + "'");                  out.writeLine("SET DB_INSTRUMENT_DIRECTORY NAME '" + dir + "' '" + name + "'");
4018                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
4019                                    
# Line 4085  public class Client { Line 4106  public class Client {
4106                                    
4107                  verifyConnection();                  verifyConnection();
4108                  String s = "SET DB_INSTRUMENT_DIRECTORY DESCRIPTION '";                  String s = "SET DB_INSTRUMENT_DIRECTORY DESCRIPTION '";
4109                  out.writeLine(s + dir + "' '" + desc + "'");                  out.writeLine(s + dir + "' '" + toEscapedString(desc) + "'");
4110                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
4111                                    
4112                  ResultSet rs = getEmptyResultSet();                  ResultSet rs = getEmptyResultSet();
# Line 4264  public class Client { Line 4285  public class Client {
4285                                  break;                                  break;
4286                  }                  }
4287                                    
4288                  sb.append(" '").append(dbDir).append("' '").append(fsDir).append("'");                  sb.append(" '").append(dbDir).append("' '");
4289                    sb.append(fsDir).append("'");
4290                  out.writeLine(sb.toString());                  out.writeLine(sb.toString());
4291                  if(getPrintOnlyMode()) return -1;                  if(getPrintOnlyMode()) return -1;
4292                                    
# Line 4360  public class Client { Line 4382  public class Client {
4382                  out.writeLine("LIST DB_INSTRUMENTS '" + dir + "'");                  out.writeLine("LIST DB_INSTRUMENTS '" + dir + "'");
4383                  if(getPrintOnlyMode()) return null;                  if(getPrintOnlyMode()) return null;
4384                                    
4385                  return parseQuotedStringList(getSingleLineResultSet().getResult());                  String[] names = parseEscapedStringList(getSingleLineResultSet().getResult());
4386                    for(int i = 0; i < names.length; i++) {
4387                            names[i] = toNonEscapedString(names[i]);
4388                    }
4389                    return names;
4390          }          }
4391                    
4392          /**          /**
# Line 4380  public class Client { Line 4406  public class Client {
4406                                    
4407                  ResultSet rs = getMultiLineResultSet();                  ResultSet rs = getMultiLineResultSet();
4408                  DbInstrumentInfo info = new DbInstrumentInfo(rs.getMultiLineResult());                  DbInstrumentInfo info = new DbInstrumentInfo(rs.getMultiLineResult());
4409                  int i = instr.lastIndexOf('/');                  String s = getParentDirectory(instr);
4410                  if(i != -1 && i < instr.length() - 1) {                  if(s != null) info.setDirectoryPath(s);
4411                          info.setName(instr.substring(i + 1));                  s = getFileName(instr);
4412                          if(i == 0) info.setDirectoryPath("/");                  if(s != null) info.setName(toNonEscapedFileName(s));
                         else info.setDirectoryPath(instr.substring(0, i));  
                 }  
4413                                    
4414                  return info;                  return info;
4415          }          }
# Line 4402  public class Client { Line 4426  public class Client {
4426          public synchronized DbInstrumentInfo[]          public synchronized DbInstrumentInfo[]
4427          getDbInstruments(String dir) throws IOException, LscpException, LSException {          getDbInstruments(String dir) throws IOException, LscpException, LSException {
4428                  String[] instrS = getDbInstrumentNames(dir);                  String[] instrS = getDbInstrumentNames(dir);
4429                  if(dir.charAt(dir.length() - 1) != '/') dir += "/";                  if(!hasEndingFileSeparator(dir)) dir += "/";
4430                                    
4431                  DbInstrumentInfo[] infoS = new DbInstrumentInfo[instrS.length];                  DbInstrumentInfo[] infoS = new DbInstrumentInfo[instrS.length];
4432                  for(int i = 0; i < instrS.length; i++) {                  for(int i = 0; i < instrS.length; i++) {
4433                          infoS[i] = getDbInstrumentInfo(dir + instrS[i]);                          infoS[i] = getDbInstrumentInfo(dir + toEscapedFileName(instrS[i]));
4434                  }                  }
4435                  return infoS;                  return infoS;
4436          }          }
# Line 4474  public class Client { Line 4498  public class Client {
4498                                  throws IOException, LSException, LscpException {                                  throws IOException, LSException, LscpException {
4499                                    
4500                  verifyConnection();                  verifyConnection();
4501                    name = toEscapedString(name);
4502                  out.writeLine("SET DB_INSTRUMENT NAME '" + instr + "' '" + name + "'");                  out.writeLine("SET DB_INSTRUMENT NAME '" + instr + "' '" + name + "'");
4503                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
4504                                    
# Line 4565  public class Client { Line 4590  public class Client {
4590                                  throws IOException, LSException, LscpException {                                  throws IOException, LSException, LscpException {
4591                                    
4592                  verifyConnection();                  verifyConnection();
4593                    desc = toEscapedString(desc);
4594                  out.writeLine("SET DB_INSTRUMENT DESCRIPTION '" + instr + "' '" + desc + "'");                  out.writeLine("SET DB_INSTRUMENT DESCRIPTION '" + instr + "' '" + desc + "'");
4595                  if(getPrintOnlyMode()) return;                  if(getPrintOnlyMode()) return;
4596                                    
# Line 4612  public class Client { Line 4638  public class Client {
4638                  sb.append(" '").append(dir).append("'");                  sb.append(" '").append(dir).append("'");
4639                                    
4640                  if(query.name != null && query.name.length() > 0) {                  if(query.name != null && query.name.length() > 0) {
4641                          sb.append(" NAME='").append(query.name).append("'");                          sb.append(" NAME='").append(toEscapedString(query.name)).append("'");
4642                  }                  }
4643                                    
4644                  String s = query.getCreatedAfter();                  String s = query.getCreatedAfter();
# Line 4636  public class Client { Line 4662  public class Client {
4662                  }                  }
4663                                    
4664                  if(query.description != null && query.description.length() > 0) {                  if(query.description != null && query.description.length() > 0) {
4665                          sb.append(" DESCRIPTION='").append(query.description).append("'");                          sb.append(" DESCRIPTION='");
4666                            sb.append(toEscapedString(query.description)).append("'");
4667                  }                  }
4668                                    
4669                  out.writeLine(sb.toString());                  out.writeLine(sb.toString());
4670                  if(getPrintOnlyMode()) return null;                  if(getPrintOnlyMode()) return null;
4671                                    
4672                  String[] dirS = parseQuotedStringList(getSingleLineResultSet().getResult());                  String[] dirS = parseEscapedStringList(getSingleLineResultSet().getResult());
4673                                    
4674                  DbDirectoryInfo[] infoS = new DbDirectoryInfo[dirS.length];                  DbDirectoryInfo[] infoS = new DbDirectoryInfo[dirS.length];
4675                  for(int i = 0; i < dirS.length; i++) {                  for(int i = 0; i < dirS.length; i++) {
# Line 4692  public class Client { Line 4719  public class Client {
4719                  sb.append(" '").append(dir).append("'");                  sb.append(" '").append(dir).append("'");
4720                                    
4721                  if(query.name != null && query.name.length() > 0) {                  if(query.name != null && query.name.length() > 0) {
4722                          sb.append(" NAME='").append(query.name).append("'");                          sb.append(" NAME='").append(toEscapedString(query.name)).append("'");
4723                  }                  }
4724                                    
4725                  if(query.formatFamilies.size() > 0) {                  if(query.formatFamilies.size() > 0) {
# Line 4732  public class Client { Line 4759  public class Client {
4759                  }                  }
4760                                    
4761                  if(query.description != null && query.description.length() > 0) {                  if(query.description != null && query.description.length() > 0) {
4762                          sb.append(" DESCRIPTION='").append(query.description).append("'");                          sb.append(" DESCRIPTION='");
4763                            sb.append(toEscapedString(query.description)).append("'");
4764                  }                  }
4765                                    
4766                  if(query.instrumentType != DbSearchQuery.InstrumentType.BOTH) {                  if(query.instrumentType != DbSearchQuery.InstrumentType.BOTH) {
# Line 4745  public class Client { Line 4773  public class Client {
4773                  }                  }
4774                                    
4775                  if(query.product != null && query.product.length() > 0) {                  if(query.product != null && query.product.length() > 0) {
4776                          sb.append(" PRODUCT='").append(query.product).append("'");                          sb.append(" PRODUCT='").append(toEscapedString(query.product)).append("'");
4777                  }                  }
4778                                    
4779                  if(query.artists != null && query.artists.length() > 0) {                  if(query.artists != null && query.artists.length() > 0) {
4780                          sb.append(" ARTISTS='").append(query.artists).append("'");                          sb.append(" ARTISTS='").append(toEscapedString(query.artists)).append("'");
4781                  }                  }
4782                                    
4783                  if(query.keywords != null && query.keywords.length() > 0) {                  if(query.keywords != null && query.keywords.length() > 0) {
4784                          sb.append(" KEYWORDS='").append(query.keywords).append("'");                          sb.append(" KEYWORDS='");
4785                            sb.append(toEscapedString(query.keywords)).append("'");
4786                  }                  }
4787                                    
4788                  out.writeLine(sb.toString());                  out.writeLine(sb.toString());
4789                  if(getPrintOnlyMode()) return null;                  if(getPrintOnlyMode()) return null;
4790                                    
4791                  String[] instrS = parseQuotedStringList(getSingleLineResultSet().getResult());                  String[] instrS = parseEscapedStringList(getSingleLineResultSet().getResult());
4792                                    
4793                  DbInstrumentInfo[] infoS = new DbInstrumentInfo[instrS.length];                  DbInstrumentInfo[] infoS = new DbInstrumentInfo[instrS.length];
4794                  for(int i = 0; i < instrS.length; i++) {                  for(int i = 0; i < instrS.length; i++) {
# Line 4790  public class Client { Line 4819  public class Client {
4819          }          }
4820                    
4821          /**          /**
4822             * Removes all instruments and directories and re-creates
4823             * the instruments database structure.
4824             * @throws IOException If some I/O error occurs.
4825             * @throws LscpException If LSCP protocol corruption occurs.
4826             * @throws LSException If the formatting of the instruments database failed.
4827             */
4828            public synchronized void
4829            formatInstrumentsDb() throws IOException, LscpException, LSException {
4830                    verifyConnection();
4831                    out.writeLine("FORMAT INSTRUMENTS_DB");
4832                    if(getPrintOnlyMode()) return;
4833                    
4834                    ResultSet rs = getEmptyResultSet();
4835            }
4836            
4837            /**
4838           * Resets the specified sampler channel.           * Resets the specified sampler channel.
4839           *           *
4840           * @param samplerChn The sampler channel number.           * @param samplerChn The sampler channel number.

Legend:
Removed from v.1340  
changed lines
  Added in v.1494

  ViewVC Help
Powered by ViewVC