/[svn]/linuxsampler/trunk/src/network/lscpserver.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscpserver.cpp

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

revision 973 by schoenebeck, Fri Dec 15 21:40:27 2006 UTC revision 1161 by iliev, Mon Apr 16 15:51:18 2007 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This library is free software; you can redistribute it and/or modify  *   *   This library is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 24  Line 24 
24  #include "lscpserver.h"  #include "lscpserver.h"
25  #include "lscpresultset.h"  #include "lscpresultset.h"
26  #include "lscpevent.h"  #include "lscpevent.h"
 //#include "../common/global.h"  
27    
28  #include <fcntl.h>  #include <fcntl.h>
29    
30  #if HAVE_SQLITE3  #if ! HAVE_SQLITE3
31  # include "sqlite3.h"  #define DOESNT_HAVE_SQLITE3 "No database support. SQLITE3 was not installed when linuxsampler was built."
32  #endif  #endif
33    
34  #include "../engines/EngineFactory.h"  #include "../engines/EngineFactory.h"
# Line 66  LSCPServer::LSCPServer(Sampler* pSampler Line 65  LSCPServer::LSCPServer(Sampler* pSampler
65      SocketAddress.sin_addr.s_addr = addr;      SocketAddress.sin_addr.s_addr = addr;
66      SocketAddress.sin_port        = port;      SocketAddress.sin_port        = port;
67      this->pSampler = pSampler;      this->pSampler = pSampler;
68        LSCPEvent::RegisterEvent(LSCPEvent::event_audio_device_count, "AUDIO_OUTPUT_DEVICE_COUNT");
69        LSCPEvent::RegisterEvent(LSCPEvent::event_audio_device_info, "AUDIO_OUTPUT_DEVICE_INFO");
70        LSCPEvent::RegisterEvent(LSCPEvent::event_midi_device_count, "MIDI_INPUT_DEVICE_COUNT");
71        LSCPEvent::RegisterEvent(LSCPEvent::event_midi_device_info, "MIDI_INPUT_DEVICE_INFO");
72      LSCPEvent::RegisterEvent(LSCPEvent::event_channel_count, "CHANNEL_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_channel_count, "CHANNEL_COUNT");
73      LSCPEvent::RegisterEvent(LSCPEvent::event_voice_count, "VOICE_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_voice_count, "VOICE_COUNT");
74      LSCPEvent::RegisterEvent(LSCPEvent::event_stream_count, "STREAM_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_stream_count, "STREAM_COUNT");
75      LSCPEvent::RegisterEvent(LSCPEvent::event_buffer_fill, "BUFFER_FILL");      LSCPEvent::RegisterEvent(LSCPEvent::event_buffer_fill, "BUFFER_FILL");
76      LSCPEvent::RegisterEvent(LSCPEvent::event_channel_info, "CHANNEL_INFO");      LSCPEvent::RegisterEvent(LSCPEvent::event_channel_info, "CHANNEL_INFO");
77        LSCPEvent::RegisterEvent(LSCPEvent::event_fx_send_count, "FX_SEND_COUNT");
78        LSCPEvent::RegisterEvent(LSCPEvent::event_fx_send_info, "FX_SEND_INFO");
79        LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_count, "MIDI_INSTRUMENT_MAP_COUNT");
80        LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_info, "MIDI_INSTRUMENT_MAP_INFO");
81        LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_count, "MIDI_INSTRUMENT_COUNT");
82        LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_info, "MIDI_INSTRUMENT_INFO");
83        LSCPEvent::RegisterEvent(LSCPEvent::event_db_instr_dir_count, "DB_INSTRUMENT_DIRECTORY_COUNT");
84        LSCPEvent::RegisterEvent(LSCPEvent::event_db_instr_dir_info, "DB_INSTRUMENT_DIRECTORY_INFO");
85        LSCPEvent::RegisterEvent(LSCPEvent::event_db_instr_count, "DB_INSTRUMENT_COUNT");
86        LSCPEvent::RegisterEvent(LSCPEvent::event_db_instr_info, "DB_INSTRUMENT_INFO");
87      LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS");      LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS");
88      LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT");      LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT");
89        LSCPEvent::RegisterEvent(LSCPEvent::event_global_info, "GLOBAL_INFO");
90      hSocket = -1;      hSocket = -1;
91  }  }
92    
# Line 80  LSCPServer::~LSCPServer() { Line 94  LSCPServer::~LSCPServer() {
94      if (hSocket >= 0) close(hSocket);      if (hSocket >= 0) close(hSocket);
95  }  }
96    
97    void LSCPServer::EventHandler::ChannelCountChanged(int NewCount) {
98        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_count, NewCount));
99    }
100    
101    void LSCPServer::EventHandler::AudioDeviceCountChanged(int NewCount) {
102        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_audio_device_count, NewCount));
103    }
104    
105    void LSCPServer::EventHandler::MidiDeviceCountChanged(int NewCount) {
106        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_device_count, NewCount));
107    }
108    
109    void LSCPServer::EventHandler::MidiInstrumentCountChanged(int MapId, int NewCount) {
110        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_count, MapId, NewCount));
111    }
112    
113    void LSCPServer::EventHandler::MidiInstrumentInfoChanged(int MapId, int Bank, int Program) {
114        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_info, MapId, Bank, Program));
115    }
116    
117    void LSCPServer::EventHandler::MidiInstrumentMapCountChanged(int NewCount) {
118        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_map_count, NewCount));
119    }
120    
121    void LSCPServer::EventHandler::MidiInstrumentMapInfoChanged(int MapId) {
122        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_instr_map_info, MapId));
123    }
124    
125    void LSCPServer::EventHandler::FxSendCountChanged(int ChannelId, int NewCount) {
126        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_count, ChannelId, NewCount));
127    }
128    
129    void LSCPServer::EventHandler::VoiceCountChanged(int ChannelId, int NewCount) {
130        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_voice_count, ChannelId, NewCount));
131    }
132    
133    void LSCPServer::EventHandler::StreamCountChanged(int ChannelId, int NewCount) {
134        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_stream_count, ChannelId, NewCount));
135    }
136    
137    void LSCPServer::EventHandler::BufferFillChanged(int ChannelId, String FillData) {
138        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_buffer_fill, ChannelId, FillData));
139    }
140    
141    void LSCPServer::EventHandler::TotalVoiceCountChanged(int NewCount) {
142        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_total_voice_count, NewCount));
143    }
144    
145    #if HAVE_SQLITE3
146    void LSCPServer::DbInstrumentsEventHandler::DirectoryCountChanged(String Dir) {
147        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_dir_count, Dir));
148    }
149    
150    void LSCPServer::DbInstrumentsEventHandler::DirectoryInfoChanged(String Dir) {
151        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_dir_info, Dir));
152    }
153    
154    void LSCPServer::DbInstrumentsEventHandler::DirectoryNameChanged(String Dir, String NewName) {
155        Dir = "'" + Dir + "'";
156        NewName = "'" + NewName + "'";
157        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_dir_info, "NAME", Dir, NewName));
158    }
159    
160    void LSCPServer::DbInstrumentsEventHandler::InstrumentCountChanged(String Dir) {
161        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_count, Dir));
162    }
163    
164    void LSCPServer::DbInstrumentsEventHandler::InstrumentInfoChanged(String Instr) {
165        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_info, Instr));
166    }
167    void LSCPServer::DbInstrumentsEventHandler::InstrumentNameChanged(String Instr, String NewName) {
168        Instr = "'" + Instr + "'";
169        NewName = "'" + NewName + "'";
170        LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_db_instr_info, "NAME", Instr, NewName));
171    }
172    #endif // HAVE_SQLITE3
173    
174    
175  /**  /**
176   * Blocks the calling thread until the LSCP Server is initialized and   * Blocks the calling thread until the LSCP Server is initialized and
177   * accepting socket connections, if the server is already initialized then   * accepting socket connections, if the server is already initialized then
# Line 120  int LSCPServer::Main() { Line 212  int LSCPServer::Main() {
212    
213      listen(hSocket, 1);      listen(hSocket, 1);
214      Initialized.Set(true);      Initialized.Set(true);
215        
216        // Registering event listeners
217        pSampler->AddChannelCountListener(&eventHandler);
218        pSampler->AddAudioDeviceCountListener(&eventHandler);
219        pSampler->AddMidiDeviceCountListener(&eventHandler);
220        pSampler->AddVoiceCountListener(&eventHandler);
221        pSampler->AddStreamCountListener(&eventHandler);
222        pSampler->AddBufferFillListener(&eventHandler);
223        pSampler->AddTotalVoiceCountListener(&eventHandler);
224        pSampler->AddFxSendCountListener(&eventHandler);
225        MidiInstrumentMapper::AddMidiInstrumentCountListener(&eventHandler);
226        MidiInstrumentMapper::AddMidiInstrumentInfoListener(&eventHandler);
227        MidiInstrumentMapper::AddMidiInstrumentMapCountListener(&eventHandler);
228        MidiInstrumentMapper::AddMidiInstrumentMapInfoListener(&eventHandler);
229    #if HAVE_SQLITE3
230        InstrumentsDb::GetInstrumentsDb()->AddInstrumentsDbListener(&dbInstrumentsEventHandler);
231    #endif
232      // now wait for client connections and handle their requests      // now wait for client connections and handle their requests
233      sockaddr_in client;      sockaddr_in client;
234      int length = sizeof(client);      int length = sizeof(client);
# Line 140  int LSCPServer::Main() { Line 248  int LSCPServer::Main() {
248                  if ((*itEngineChannel)->StatusChanged()) {                  if ((*itEngineChannel)->StatusChanged()) {
249                      SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex));                      SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex));
250                  }                  }
251    
252                    for (int i = 0; i < (*itEngineChannel)->GetFxSendCount(); i++) {
253                        FxSend* fxs = (*itEngineChannel)->GetFxSend(i);
254                        if(fxs != NULL && fxs->IsInfoChanged()) {
255                            int chn = (*itEngineChannel)->iSamplerChannelIndex;
256                            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, chn, fxs->Id()));
257                            fxs->SetInfoChanged(false);
258                        }
259                    }
260              }              }
261          }          }
262    
# Line 482  String LSCPServer::DestroyMidiInputDevic Line 599  String LSCPServer::DestroyMidiInputDevic
599      return result.Produce();      return result.Produce();
600  }  }
601    
602    EngineChannel* LSCPServer::GetEngineChannel(uint uiSamplerChannel) {
603        SamplerChannel* pSamplerChannel = pSampler->GetSamplerChannel(uiSamplerChannel);
604        if (!pSamplerChannel) throw Exception("Invalid sampler channel number " + ToString(uiSamplerChannel));
605    
606        EngineChannel* pEngineChannel = pSamplerChannel->GetEngineChannel();
607        if (!pEngineChannel) throw Exception("There is no engine deployed on this sampler channel yet");
608    
609        return pEngineChannel;        
610    }
611    
612  /**  /**
613   * Will be called by the parser to load an instrument.   * Will be called by the parser to load an instrument.
614   */   */
# Line 662  String LSCPServer::GetChannelInfo(uint u Line 789  String LSCPServer::GetChannelInfo(uint u
789          String AudioRouting;          String AudioRouting;
790          int Mute = 0;          int Mute = 0;
791          bool Solo = false;          bool Solo = false;
792          String MidiInstrumentMap;          String MidiInstrumentMap = "NONE";
793    
794          if (pEngineChannel) {          if (pEngineChannel) {
795              EngineName          = pEngineChannel->EngineName();              EngineName          = pEngineChannel->EngineName();
# Line 1185  String LSCPServer::SetAudioOutputChannel Line 1312  String LSCPServer::SetAudioOutputChannel
1312    
1313          // set new channel parameter value          // set new channel parameter value
1314          pParameter->SetValue(ParamVal);          pParameter->SetValue(ParamVal);
1315            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_audio_device_info, DeviceId));
1316      }      }
1317      catch (Exception e) {      catch (Exception e) {
1318          result.Error(e);          result.Error(e);
# Line 1202  String LSCPServer::SetAudioOutputDeviceP Line 1330  String LSCPServer::SetAudioOutputDeviceP
1330          std::map<String,DeviceCreationParameter*> parameters = pDevice->DeviceParameters();          std::map<String,DeviceCreationParameter*> parameters = pDevice->DeviceParameters();
1331          if (!parameters.count(ParamKey)) throw Exception("Audio output device " + ToString(DeviceIndex) + " does not have a device parameter '" + ParamKey + "'");          if (!parameters.count(ParamKey)) throw Exception("Audio output device " + ToString(DeviceIndex) + " does not have a device parameter '" + ParamKey + "'");
1332          parameters[ParamKey]->SetValue(ParamVal);          parameters[ParamKey]->SetValue(ParamVal);
1333            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_audio_device_info, DeviceIndex));
1334      }      }
1335      catch (Exception e) {      catch (Exception e) {
1336          result.Error(e);          result.Error(e);
# Line 1219  String LSCPServer::SetMidiInputDevicePar Line 1348  String LSCPServer::SetMidiInputDevicePar
1348          std::map<String,DeviceCreationParameter*> parameters = pDevice->DeviceParameters();          std::map<String,DeviceCreationParameter*> parameters = pDevice->DeviceParameters();
1349          if (!parameters.count(ParamKey)) throw Exception("MIDI input device " + ToString(DeviceIndex) + " does not have a device parameter '" + ParamKey + "'");          if (!parameters.count(ParamKey)) throw Exception("MIDI input device " + ToString(DeviceIndex) + " does not have a device parameter '" + ParamKey + "'");
1350          parameters[ParamKey]->SetValue(ParamVal);          parameters[ParamKey]->SetValue(ParamVal);
1351            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_device_info, DeviceIndex));
1352      }      }
1353      catch (Exception e) {      catch (Exception e) {
1354          result.Error(e);          result.Error(e);
# Line 1243  String LSCPServer::SetMidiInputPortParam Line 1373  String LSCPServer::SetMidiInputPortParam
1373          std::map<String,DeviceRuntimeParameter*> parameters = pMidiInputPort->PortParameters();          std::map<String,DeviceRuntimeParameter*> parameters = pMidiInputPort->PortParameters();
1374          if (!parameters.count(ParamKey)) throw Exception("MIDI input device " + ToString(PortIndex) + " does not have a parameter '" + ParamKey + "'");          if (!parameters.count(ParamKey)) throw Exception("MIDI input device " + ToString(PortIndex) + " does not have a parameter '" + ParamKey + "'");
1375          parameters[ParamKey]->SetValue(ParamVal);          parameters[ParamKey]->SetValue(ParamVal);
1376            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_midi_device_info, DeviceIndex));
1377      }      }
1378      catch (Exception e) {      catch (Exception e) {
1379          result.Error(e);          result.Error(e);
# Line 1490  String LSCPServer::SetChannelSolo(bool b Line 1621  String LSCPServer::SetChannelSolo(bool b
1621    
1622          bool oldSolo = pEngineChannel->GetSolo();          bool oldSolo = pEngineChannel->GetSolo();
1623          bool hadSoloChannel = HasSoloChannel();          bool hadSoloChannel = HasSoloChannel();
1624            
1625          pEngineChannel->SetSolo(bSolo);          pEngineChannel->SetSolo(bSolo);
1626            
1627          if(!oldSolo && bSolo) {          if(!oldSolo && bSolo) {
1628              if(pEngineChannel->GetMute() == -1) pEngineChannel->SetMute(0);              if(pEngineChannel->GetMute() == -1) pEngineChannel->SetMute(0);
1629              if(!hadSoloChannel) MuteNonSoloChannels();              if(!hadSoloChannel) MuteNonSoloChannels();
1630          }          }
1631            
1632          if(oldSolo && !bSolo) {          if(oldSolo && !bSolo) {
1633              if(!HasSoloChannel()) UnmuteChannels();              if(!HasSoloChannel()) UnmuteChannels();
1634              else if(!pEngineChannel->GetMute()) pEngineChannel->SetMute(-1);              else if(!pEngineChannel->GetMute()) pEngineChannel->SetMute(-1);
# Line 1555  void  LSCPServer::UnmuteChannels() { Line 1686  void  LSCPServer::UnmuteChannels() {
1686      }      }
1687  }  }
1688    
1689  String LSCPServer::AddOrReplaceMIDIInstrumentMapping(uint MidiMapID, uint MidiBank, uint MidiProg, String EngineType, String InstrumentFile, uint InstrumentIndex, float Volume, MidiInstrumentMapper::mode_t LoadMode, String Name) {  String LSCPServer::AddOrReplaceMIDIInstrumentMapping(uint MidiMapID, uint MidiBank, uint MidiProg, String EngineType, String InstrumentFile, uint InstrumentIndex, float Volume, MidiInstrumentMapper::mode_t LoadMode, String Name, bool bModal) {
1690      dmsg(2,("LSCPServer: AddOrReplaceMIDIInstrumentMapping()\n"));      dmsg(2,("LSCPServer: AddOrReplaceMIDIInstrumentMapping()\n"));
1691    
1692      midi_prog_index_t idx;      midi_prog_index_t idx;
# Line 1573  String LSCPServer::AddOrReplaceMIDIInstr Line 1704  String LSCPServer::AddOrReplaceMIDIInstr
1704    
1705      LSCPResultSet result;      LSCPResultSet result;
1706      try {      try {
1707          // PERSISTENT mapping commands might bloock for a long time, so in          // PERSISTENT mapping commands might block for a long time, so in
1708          // that case we add/replace the mapping in another thread          // that case we add/replace the mapping in another thread in case
1709          bool bInBackground = (entry.LoadMode == MidiInstrumentMapper::PERSISTENT);          // the NON_MODAL argument was supplied, non persistent mappings
1710            // should return immediately, so we don't need to do that for them
1711            bool bInBackground = (entry.LoadMode == MidiInstrumentMapper::PERSISTENT && !bModal);
1712          MidiInstrumentMapper::AddOrReplaceEntry(MidiMapID, idx, entry, bInBackground);          MidiInstrumentMapper::AddOrReplaceEntry(MidiMapID, idx, entry, bInBackground);
1713      } catch (Exception e) {      } catch (Exception e) {
1714          result.Error(e);          result.Error(e);
# Line 1686  String LSCPServer::ListMidiInstrumentMap Line 1819  String LSCPServer::ListMidiInstrumentMap
1819          for (; iter != mappings.end(); iter++) {          for (; iter != mappings.end(); iter++) {
1820              if (s.size()) s += ",";              if (s.size()) s += ",";
1821              s += "{" + ToString(MidiMapID) + ","              s += "{" + ToString(MidiMapID) + ","
1822                       + ToString((int(iter->first.midi_bank_msb) << 7) & int(iter->first.midi_bank_lsb)) + ","                       + ToString((int(iter->first.midi_bank_msb) << 7) | int(iter->first.midi_bank_lsb)) + ","
1823                       + ToString(int(iter->first.midi_prog)) + "}";                       + ToString(int(iter->first.midi_prog)) + "}";
1824          }          }
1825          result.Add(s);          result.Add(s);
# Line 1708  String LSCPServer::ListAllMidiInstrument Line 1841  String LSCPServer::ListAllMidiInstrument
1841              for (; iter != mappings.end(); iter++) {              for (; iter != mappings.end(); iter++) {
1842                  if (s.size()) s += ",";                  if (s.size()) s += ",";
1843                  s += "{" + ToString(maps[i]) + ","                  s += "{" + ToString(maps[i]) + ","
1844                           + ToString((int(iter->first.midi_bank_msb) << 7) & int(iter->first.midi_bank_lsb)) + ","                           + ToString((int(iter->first.midi_bank_msb) << 7) | int(iter->first.midi_bank_lsb)) + ","
1845                           + ToString(int(iter->first.midi_prog)) + "}";                           + ToString(int(iter->first.midi_prog)) + "}";
1846              }              }
1847          }          }
# Line 1810  String LSCPServer::GetMidiInstrumentMap( Line 1943  String LSCPServer::GetMidiInstrumentMap(
1943      LSCPResultSet result;      LSCPResultSet result;
1944      try {      try {
1945          result.Add("NAME", MidiInstrumentMapper::MapName(MidiMapID));          result.Add("NAME", MidiInstrumentMapper::MapName(MidiMapID));
1946            result.Add("DEFAULT", MidiInstrumentMapper::GetDefaultMap() == MidiMapID);
1947      } catch (Exception e) {      } catch (Exception e) {
1948          result.Error(e);          result.Error(e);
1949      }      }
# Line 1854  String LSCPServer::SetChannelMap(uint ui Line 1988  String LSCPServer::SetChannelMap(uint ui
1988      return result.Produce();      return result.Produce();
1989  }  }
1990    
1991    String LSCPServer::CreateFxSend(uint uiSamplerChannel, uint MidiCtrl, String Name) {
1992        dmsg(2,("LSCPServer: CreateFxSend()\n"));
1993        LSCPResultSet result;
1994        try {
1995            EngineChannel* pEngineChannel = GetEngineChannel(uiSamplerChannel);
1996            
1997            FxSend* pFxSend = pEngineChannel->AddFxSend(MidiCtrl, Name);
1998            if (!pFxSend) throw Exception("Could not add FxSend, don't ask, I don't know why (probably a bug)");
1999    
2000            result = LSCPResultSet(pFxSend->Id()); // success
2001        } catch (Exception e) {
2002            result.Error(e);
2003        }
2004        return result.Produce();
2005    }
2006    
2007    String LSCPServer::DestroyFxSend(uint uiSamplerChannel, uint FxSendID) {
2008        dmsg(2,("LSCPServer: DestroyFxSend()\n"));
2009        LSCPResultSet result;
2010        try {
2011            EngineChannel* pEngineChannel = GetEngineChannel(uiSamplerChannel);
2012    
2013            FxSend* pFxSend = NULL;
2014            for (int i = 0; i < pEngineChannel->GetFxSendCount(); i++) {
2015                if (pEngineChannel->GetFxSend(i)->Id() == FxSendID) {
2016                    pFxSend = pEngineChannel->GetFxSend(i);
2017                    break;
2018                }
2019            }
2020            if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");
2021            pEngineChannel->RemoveFxSend(pFxSend);
2022        } catch (Exception e) {
2023            result.Error(e);
2024        }
2025        return result.Produce();
2026    }
2027    
2028    String LSCPServer::GetFxSends(uint uiSamplerChannel) {
2029        dmsg(2,("LSCPServer: GetFxSends()\n"));
2030        LSCPResultSet result;
2031        try {
2032            EngineChannel* pEngineChannel = GetEngineChannel(uiSamplerChannel);
2033    
2034            result.Add(pEngineChannel->GetFxSendCount());
2035        } catch (Exception e) {
2036            result.Error(e);
2037        }
2038        return result.Produce();
2039    }
2040    
2041    String LSCPServer::ListFxSends(uint uiSamplerChannel) {
2042        dmsg(2,("LSCPServer: ListFxSends()\n"));
2043        LSCPResultSet result;
2044        String list;
2045        try {
2046            EngineChannel* pEngineChannel = GetEngineChannel(uiSamplerChannel);
2047    
2048            for (int i = 0; i < pEngineChannel->GetFxSendCount(); i++) {
2049                FxSend* pFxSend = pEngineChannel->GetFxSend(i);
2050                if (list != "") list += ",";
2051                list += ToString(pFxSend->Id());
2052            }
2053            result.Add(list);
2054        } catch (Exception e) {
2055            result.Error(e);
2056        }
2057        return result.Produce();
2058    }
2059    
2060    FxSend* LSCPServer::GetFxSend(uint uiSamplerChannel, uint FxSendID) {
2061        EngineChannel* pEngineChannel = GetEngineChannel(uiSamplerChannel);
2062    
2063        FxSend* pFxSend = NULL;
2064        for (int i = 0; i < pEngineChannel->GetFxSendCount(); i++) {
2065            if (pEngineChannel->GetFxSend(i)->Id() == FxSendID) {
2066                pFxSend = pEngineChannel->GetFxSend(i);
2067                break;
2068            }
2069        }
2070        if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel");
2071        return pFxSend;
2072    }
2073    
2074    String LSCPServer::GetFxSendInfo(uint uiSamplerChannel, uint FxSendID) {
2075        dmsg(2,("LSCPServer: GetFxSendInfo()\n"));
2076        LSCPResultSet result;
2077        try {
2078            EngineChannel* pEngineChannel = GetEngineChannel(uiSamplerChannel);
2079            FxSend* pFxSend = GetFxSend(uiSamplerChannel, FxSendID);
2080            
2081            // gather audio routing informations
2082            String AudioRouting;
2083            for (int chan = 0; chan < pEngineChannel->Channels(); chan++) {
2084                if (AudioRouting != "") AudioRouting += ",";
2085                AudioRouting += ToString(pFxSend->DestinationChannel(chan));
2086            }
2087    
2088            // success
2089            result.Add("NAME", pFxSend->Name());
2090            result.Add("MIDI_CONTROLLER", pFxSend->MidiController());
2091            result.Add("LEVEL", ToString(pFxSend->Level()));
2092            result.Add("AUDIO_OUTPUT_ROUTING", AudioRouting);
2093        } catch (Exception e) {
2094            result.Error(e);
2095        }
2096        return result.Produce();
2097    }
2098    
2099    String LSCPServer::SetFxSendName(uint uiSamplerChannel, uint FxSendID, String Name) {
2100        dmsg(2,("LSCPServer: SetFxSendName()\n"));
2101        LSCPResultSet result;
2102        try {
2103            FxSend* pFxSend = GetFxSend(uiSamplerChannel, FxSendID);
2104    
2105            pFxSend->SetName(Name);
2106            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID));
2107        } catch (Exception e) {
2108            result.Error(e);
2109        }
2110        return result.Produce();
2111    }
2112    
2113    String LSCPServer::SetFxSendAudioOutputChannel(uint uiSamplerChannel, uint FxSendID, uint FxSendChannel, uint DeviceChannel) {
2114        dmsg(2,("LSCPServer: SetFxSendAudioOutputChannel()\n"));
2115        LSCPResultSet result;
2116        try {
2117            FxSend* pFxSend = GetFxSend(uiSamplerChannel, FxSendID);
2118    
2119            pFxSend->SetDestinationChannel(FxSendChannel, DeviceChannel);
2120            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID));
2121        } catch (Exception e) {
2122            result.Error(e);
2123        }
2124        return result.Produce();
2125    }
2126    
2127    String LSCPServer::SetFxSendMidiController(uint uiSamplerChannel, uint FxSendID, uint MidiController) {
2128        dmsg(2,("LSCPServer: SetFxSendMidiController()\n"));
2129        LSCPResultSet result;
2130        try {
2131            FxSend* pFxSend = GetFxSend(uiSamplerChannel, FxSendID);
2132    
2133            pFxSend->SetMidiController(MidiController);
2134            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID));
2135        } catch (Exception e) {
2136            result.Error(e);
2137        }
2138        return result.Produce();
2139    }
2140    
2141    String LSCPServer::SetFxSendLevel(uint uiSamplerChannel, uint FxSendID, double dLevel) {
2142        dmsg(2,("LSCPServer: SetFxSendLevel()\n"));
2143        LSCPResultSet result;
2144        try {
2145            FxSend* pFxSend = GetFxSend(uiSamplerChannel, FxSendID);
2146    
2147            pFxSend->SetLevel((float)dLevel);
2148            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID));
2149        } catch (Exception e) {
2150            result.Error(e);
2151        }
2152        return result.Produce();
2153    }
2154    
2155  /**  /**
2156   * Will be called by the parser to reset a particular sampler channel.   * Will be called by the parser to reset a particular sampler channel.
2157   */   */
# Line 1893  String LSCPServer::GetServerInfo() { Line 2191  String LSCPServer::GetServerInfo() {
2191      result.Add("DESCRIPTION", "LinuxSampler - modular, streaming capable sampler");      result.Add("DESCRIPTION", "LinuxSampler - modular, streaming capable sampler");
2192      result.Add("VERSION", VERSION);      result.Add("VERSION", VERSION);
2193      result.Add("PROTOCOL_VERSION", ToString(LSCP_RELEASE_MAJOR) + "." + ToString(LSCP_RELEASE_MINOR));      result.Add("PROTOCOL_VERSION", ToString(LSCP_RELEASE_MAJOR) + "." + ToString(LSCP_RELEASE_MINOR));
2194    #if HAVE_SQLITE3
2195        result.Add("INSTRUMENTS_DB_SUPPORT", "yes");
2196    #else
2197        result.Add("INSTRUMENTS_DB_SUPPORT", "no");
2198    #endif
2199        
2200      return result.Produce();      return result.Produce();
2201  }  }
2202    
# Line 1916  String LSCPServer::GetTotalVoiceCountMax Line 2220  String LSCPServer::GetTotalVoiceCountMax
2220      return result.Produce();      return result.Produce();
2221  }  }
2222    
2223    String LSCPServer::GetGlobalVolume() {
2224        LSCPResultSet result;
2225        result.Add(ToString(GLOBAL_VOLUME)); // see common/global.cpp
2226        return result.Produce();
2227    }
2228    
2229    String LSCPServer::SetGlobalVolume(double dVolume) {
2230        LSCPResultSet result;
2231        try {
2232            if (dVolume < 0) throw Exception("Volume may not be negative");
2233            GLOBAL_VOLUME = dVolume; // see common/global.cpp
2234            LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_global_info, "VOLUME", GLOBAL_VOLUME));
2235        } catch (Exception e) {
2236            result.Error(e);
2237        }
2238        return result.Produce();
2239    }
2240    
2241  /**  /**
2242   * Will be called by the parser to subscribe a client (frontend) on the   * Will be called by the parser to subscribe a client (frontend) on the
2243   * server for receiving event messages.   * server for receiving event messages.
# Line 1942  String LSCPServer::UnsubscribeNotificati Line 2264  String LSCPServer::UnsubscribeNotificati
2264      return result.Produce();      return result.Produce();
2265  }  }
2266    
2267  static int select_callback(void * lscpResultSet, int argc,  String LSCPServer::AddDbInstrumentDirectory(String Dir) {
2268                          char **argv, char **azColName)      dmsg(2,("LSCPServer: AddDbInstrumentDirectory(Dir=%s)\n", Dir.c_str()));
2269  {      LSCPResultSet result;
2270      LSCPResultSet* resultSet = (LSCPResultSet*) lscpResultSet;  #if HAVE_SQLITE3
2271      resultSet->Add(argc, argv);      try {
2272      return 0;          InstrumentsDb::GetInstrumentsDb()->AddDirectory(Dir);
2273        } catch (Exception e) {
2274             result.Error(e);
2275        }
2276    #else
2277        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2278    #endif
2279        return result.Produce();
2280  }  }
2281    
2282  String LSCPServer::QueryDatabase(String query) {  String LSCPServer::RemoveDbInstrumentDirectory(String Dir, bool Force) {
2283        dmsg(2,("LSCPServer: RemoveDbInstrumentDirectory(Dir=%s,Force=%d)\n", Dir.c_str(), Force));
2284      LSCPResultSet result;      LSCPResultSet result;
2285  #if HAVE_SQLITE3  #if HAVE_SQLITE3
2286      char* zErrMsg = NULL;      try {
2287      sqlite3 *db;          InstrumentsDb::GetInstrumentsDb()->RemoveDirectory(Dir, Force);
2288      String selectStr = "SELECT " + query;      } catch (Exception e) {
2289             result.Error(e);
2290        }
2291    #else
2292        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2293    #endif
2294        return result.Produce();
2295    }
2296    
2297      int rc = sqlite3_open("linuxsampler.db", &db);  String LSCPServer::GetDbInstrumentDirectoryCount(String Dir) {
2298      if (rc == SQLITE_OK)      dmsg(2,("LSCPServer: GetDbInstrumentDirectoryCount(Dir=%s)\n", Dir.c_str()));
2299      {      LSCPResultSet result;
2300              rc = sqlite3_exec(db, selectStr.c_str(), select_callback, &result, &zErrMsg);  #if HAVE_SQLITE3
2301        try {
2302            result.Add(InstrumentsDb::GetInstrumentsDb()->GetDirectoryCount(Dir));
2303        } catch (Exception e) {
2304             result.Error(e);
2305        }
2306    #else
2307        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2308    #endif
2309        return result.Produce();
2310    }
2311    
2312    String LSCPServer::GetDbInstrumentDirectories(String Dir) {
2313        dmsg(2,("LSCPServer: GetDbInstrumentDirectories(Dir=%s)\n", Dir.c_str()));
2314        LSCPResultSet result;
2315    #if HAVE_SQLITE3
2316        try {
2317            String list;
2318            StringListPtr dirs = InstrumentsDb::GetInstrumentsDb()->GetDirectories(Dir);
2319    
2320            for (int i = 0; i < dirs->size(); i++) {
2321                if (list != "") list += ",";
2322                list += "'" + dirs->at(i) + "'";
2323            }
2324    
2325            result.Add(list);
2326        } catch (Exception e) {
2327             result.Error(e);
2328        }
2329    #else
2330        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2331    #endif
2332        return result.Produce();
2333    }
2334    
2335    String LSCPServer::GetDbInstrumentDirectoryInfo(String Dir) {
2336        dmsg(2,("LSCPServer: GetDbInstrumentDirectoryInfo(Dir=%s)\n", Dir.c_str()));
2337        LSCPResultSet result;
2338    #if HAVE_SQLITE3
2339        try {
2340            DbDirectory info = InstrumentsDb::GetInstrumentsDb()->GetDirectoryInfo(Dir);
2341    
2342            result.Add("DESCRIPTION", info.Description);
2343            result.Add("CREATED", info.Created);
2344            result.Add("MODIFIED", info.Modified);
2345        } catch (Exception e) {
2346             result.Error(e);
2347      }      }
2348      if ( rc != SQLITE_OK )  #else
2349      {      result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2350              result.Error(String(zErrMsg), rc);  #endif
2351        return result.Produce();
2352    }
2353    
2354    String LSCPServer::SetDbInstrumentDirectoryName(String Dir, String Name) {
2355        dmsg(2,("LSCPServer: SetDbInstrumentDirectoryName(Dir=%s,Name=%s)\n", Dir.c_str(), Name.c_str()));
2356        LSCPResultSet result;
2357    #if HAVE_SQLITE3
2358        try {
2359            InstrumentsDb::GetInstrumentsDb()->RenameDirectory(Dir, Name);
2360        } catch (Exception e) {
2361             result.Error(e);
2362      }      }
     sqlite3_close(db);  
2363  #else  #else
2364      result.Error(String("SQLITE3 was not installed when linuxsampler was built. SELECT statement is not available."), 0);      result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2365  #endif  #endif
2366      return result.Produce();      return result.Produce();
2367  }  }
2368    
2369    String LSCPServer::MoveDbInstrumentDirectory(String Dir, String Dst) {
2370        dmsg(2,("LSCPServer: MoveDbInstrumentDirectory(Dir=%s,Dst=%s)\n", Dir.c_str(), Dst.c_str()));
2371        LSCPResultSet result;
2372    #if HAVE_SQLITE3
2373        try {
2374            InstrumentsDb::GetInstrumentsDb()->MoveDirectory(Dir, Dst);
2375        } catch (Exception e) {
2376             result.Error(e);
2377        }
2378    #else
2379        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2380    #endif
2381        return result.Produce();
2382    }
2383    
2384    String LSCPServer::SetDbInstrumentDirectoryDescription(String Dir, String Desc) {
2385        dmsg(2,("LSCPServer: SetDbInstrumentDirectoryDescription(Dir=%s,Desc=%s)\n", Dir.c_str(), Desc.c_str()));
2386        LSCPResultSet result;
2387    #if HAVE_SQLITE3
2388        try {
2389            InstrumentsDb::GetInstrumentsDb()->SetDirectoryDescription(Dir, Desc);
2390        } catch (Exception e) {
2391             result.Error(e);
2392        }
2393    #else
2394        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2395    #endif
2396        return result.Produce();
2397    }
2398    
2399    String LSCPServer::AddDbInstruments(String DbDir, String FilePath, int Index) {
2400        dmsg(2,("LSCPServer: AddDbInstruments(DbDir=%s,FilePath=%s,Index=%d)\n", DbDir.c_str(), FilePath.c_str(), Index));
2401        LSCPResultSet result;
2402    #if HAVE_SQLITE3
2403        try {
2404            InstrumentsDb::GetInstrumentsDb()->AddInstruments(DbDir, FilePath, Index);
2405        } catch (Exception e) {
2406             result.Error(e);
2407        }
2408    #else
2409        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2410    #endif
2411        return result.Produce();
2412    }
2413    
2414    String LSCPServer::AddDbInstrumentsFlat(String DbDir, String FsDir) {
2415        dmsg(2,("LSCPServer: AddDbInstrumentsFlat(DbDir=%s,FilePath=%s)\n", DbDir.c_str(), FsDir.c_str()));
2416        LSCPResultSet result;
2417    #if HAVE_SQLITE3
2418        try {
2419            InstrumentsDb::GetInstrumentsDb()->AddInstrumentsRecursive(DbDir, FsDir, true);
2420        } catch (Exception e) {
2421             result.Error(e);
2422        }
2423    #else
2424        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2425    #endif
2426        return result.Produce();
2427    }
2428    
2429    String LSCPServer::AddDbInstrumentsNonrecursive(String DbDir, String FsDir) {
2430        dmsg(2,("LSCPServer: AddDbInstrumentsNonrecursive(DbDir=%s,FilePath=%s)\n", DbDir.c_str(), FsDir.c_str()));
2431        LSCPResultSet result;
2432    #if HAVE_SQLITE3
2433        try {
2434            InstrumentsDb::GetInstrumentsDb()->AddInstrumentsNonrecursive(DbDir, FsDir);
2435        } catch (Exception e) {
2436             result.Error(e);
2437        }
2438    #else
2439        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2440    #endif
2441        return result.Produce();
2442    }
2443    
2444    String LSCPServer::RemoveDbInstrument(String Instr) {
2445        dmsg(2,("LSCPServer: RemoveDbInstrument(Instr=%s)\n", Instr.c_str()));
2446        LSCPResultSet result;
2447    #if HAVE_SQLITE3
2448        try {
2449            InstrumentsDb::GetInstrumentsDb()->RemoveInstrument(Instr);
2450        } catch (Exception e) {
2451             result.Error(e);
2452        }
2453    #else
2454        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2455    #endif
2456        return result.Produce();
2457    }
2458    
2459    String LSCPServer::GetDbInstrumentCount(String Dir) {
2460        dmsg(2,("LSCPServer: GetDbInstrumentCount(Dir=%s)\n", Dir.c_str()));
2461        LSCPResultSet result;
2462    #if HAVE_SQLITE3
2463        try {
2464            result.Add(InstrumentsDb::GetInstrumentsDb()->GetInstrumentCount(Dir));
2465        } catch (Exception e) {
2466             result.Error(e);
2467        }
2468    #else
2469        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2470    #endif
2471        return result.Produce();
2472    }
2473    
2474    String LSCPServer::GetDbInstruments(String Dir) {
2475        dmsg(2,("LSCPServer: GetDbInstruments(Dir=%s)\n", Dir.c_str()));
2476        LSCPResultSet result;
2477    #if HAVE_SQLITE3
2478        try {
2479            String list;
2480            StringListPtr instrs = InstrumentsDb::GetInstrumentsDb()->GetInstruments(Dir);
2481    
2482            for (int i = 0; i < instrs->size(); i++) {
2483                if (list != "") list += ",";
2484                list += "'" + instrs->at(i) + "'";
2485            }
2486    
2487            result.Add(list);
2488        } catch (Exception e) {
2489             result.Error(e);
2490        }
2491    #else
2492        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2493    #endif
2494        return result.Produce();
2495    }
2496    
2497    String LSCPServer::GetDbInstrumentInfo(String Instr) {
2498        dmsg(2,("LSCPServer: GetDbInstrumentInfo(Instr=%s)\n", Instr.c_str()));
2499        LSCPResultSet result;
2500    #if HAVE_SQLITE3
2501        try {
2502            DbInstrument info = InstrumentsDb::GetInstrumentsDb()->GetInstrumentInfo(Instr);
2503    
2504            result.Add("INSTRUMENT_FILE", info.InstrFile);
2505            result.Add("INSTRUMENT_NR", info.InstrNr);
2506            result.Add("FORMAT_FAMILY", info.FormatFamily);
2507            result.Add("FORMAT_VERSION", info.FormatVersion);
2508            result.Add("SIZE", (int)info.Size);
2509            result.Add("CREATED", info.Created);
2510            result.Add("MODIFIED", info.Modified);
2511            result.Add("DESCRIPTION", FilterEndlines(info.Description));
2512            result.Add("IS_DRUM", info.IsDrum);
2513            result.Add("PRODUCT", FilterEndlines(info.Product));
2514            result.Add("ARTISTS", FilterEndlines(info.Artists));
2515            result.Add("KEYWORDS", FilterEndlines(info.Keywords));
2516        } catch (Exception e) {
2517             result.Error(e);
2518        }
2519    #else
2520        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2521    #endif
2522        return result.Produce();
2523    }
2524    
2525    String LSCPServer::SetDbInstrumentName(String Instr, String Name) {
2526        dmsg(2,("LSCPServer: SetDbInstrumentName(Instr=%s,Name=%s)\n", Instr.c_str(), Name.c_str()));
2527        LSCPResultSet result;
2528    #if HAVE_SQLITE3
2529        try {
2530            InstrumentsDb::GetInstrumentsDb()->RenameInstrument(Instr, Name);
2531        } catch (Exception e) {
2532             result.Error(e);
2533        }
2534    #else
2535        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2536    #endif
2537        return result.Produce();
2538    }
2539    
2540    String LSCPServer::MoveDbInstrument(String Instr, String Dst) {
2541        dmsg(2,("LSCPServer: MoveDbInstrument(Instr=%s,Dst=%s)\n", Instr.c_str(), Dst.c_str()));
2542        LSCPResultSet result;
2543    #if HAVE_SQLITE3
2544        try {
2545            InstrumentsDb::GetInstrumentsDb()->MoveInstrument(Instr, Dst);
2546        } catch (Exception e) {
2547             result.Error(e);
2548        }
2549    #else
2550        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2551    #endif
2552        return result.Produce();
2553    }
2554    
2555    String LSCPServer::SetDbInstrumentDescription(String Instr, String Desc) {
2556        dmsg(2,("LSCPServer: SetDbInstrumentDescription(Instr=%s,Desc=%s)\n", Instr.c_str(), Desc.c_str()));
2557        LSCPResultSet result;
2558    #if HAVE_SQLITE3
2559        try {
2560            InstrumentsDb::GetInstrumentsDb()->SetInstrumentDescription(Instr, Desc);
2561        } catch (Exception e) {
2562             result.Error(e);
2563        }
2564    #else
2565        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
2566    #endif
2567        return result.Produce();
2568    }
2569    
2570    
2571  /**  /**
2572   * Will be called by the parser to enable or disable echo mode; if echo   * Will be called by the parser to enable or disable echo mode; if echo
2573   * mode is enabled, all commands from the client will (immediately) be   * mode is enabled, all commands from the client will (immediately) be
# Line 1991  String LSCPServer::SetEcho(yyparse_param Line 2586  String LSCPServer::SetEcho(yyparse_param
2586      }      }
2587      return result.Produce();      return result.Produce();
2588  }  }
2589    
2590    String LSCPServer::FilterEndlines(String s) {
2591        String s2 = s;
2592        for (int i = 0; i < s2.length(); i++) {
2593            if (s2.at(i) == '\r') s2.at(i) = ' ';
2594            else if (s2.at(i) == '\n') s2.at(i) = ' ';
2595        }
2596        
2597        return s2;
2598    }

Legend:
Removed from v.973  
changed lines
  Added in v.1161

  ViewVC Help
Powered by ViewVC