/[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 1695 by schoenebeck, Sat Feb 16 01:09:33 2008 UTC revision 1727 by iliev, Tue Apr 29 15:44:09 2008 UTC
# Line 21  Line 21 
21   *   MA  02111-1307  USA                                                   *   *   MA  02111-1307  USA                                                   *
22   ***************************************************************************/   ***************************************************************************/
23    
24    #include <algorithm>
25    
26  #include "lscpserver.h"  #include "lscpserver.h"
27  #include "lscpresultset.h"  #include "lscpresultset.h"
28  #include "lscpevent.h"  #include "lscpevent.h"
# Line 2555  String LSCPServer::SetGlobalVolume(doubl Line 2557  String LSCPServer::SetGlobalVolume(doubl
2557      LSCPResultSet result;      LSCPResultSet result;
2558      try {      try {
2559          if (dVolume < 0) throw Exception("Volume may not be negative");          if (dVolume < 0) throw Exception("Volume may not be negative");
2560          GLOBAL_VOLUME = dVolume; // see common/global.cpp          GLOBAL_VOLUME = dVolume; // see common/global_private.cpp
2561          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_global_info, "VOLUME", GLOBAL_VOLUME));          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_global_info, "VOLUME", GLOBAL_VOLUME));
2562      } catch (Exception e) {      } catch (Exception e) {
2563          result.Error(e);          result.Error(e);
# Line 3096  String LSCPServer::SetDbInstrumentDescri Line 3098  String LSCPServer::SetDbInstrumentDescri
3098      } catch (Exception e) {      } catch (Exception e) {
3099           result.Error(e);           result.Error(e);
3100      }      }
3101    #else
3102        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
3103    #endif
3104        return result.Produce();
3105    }
3106    
3107    String LSCPServer::SetDbInstrumentFilePath(String OldPath, String NewPath) {
3108        dmsg(2,("LSCPServer: SetDbInstrumentFilePath(OldPath=%s,NewPath=%s)\n", OldPath.c_str(), NewPath.c_str()));
3109        LSCPResultSet result;
3110    #if HAVE_SQLITE3
3111        try {
3112            InstrumentsDb::GetInstrumentsDb()->SetInstrumentFilePath(OldPath, NewPath);
3113        } catch (Exception e) {
3114             result.Error(e);
3115        }
3116    #else
3117        result.Error(String(DOESNT_HAVE_SQLITE3), 0);
3118    #endif
3119        return result.Produce();
3120    }
3121    
3122    String LSCPServer::FindLostDbInstrumentFiles() {
3123        dmsg(2,("LSCPServer: FindLostDbInstrumentFiles()\n"));
3124        LSCPResultSet result;
3125    #if HAVE_SQLITE3
3126        try {
3127            String list;
3128            StringListPtr pLostFiles = InstrumentsDb::GetInstrumentsDb()->FindLostInstrumentFiles();
3129    
3130            for (int i = 0; i < pLostFiles->size(); i++) {
3131                if (list != "") list += ",";
3132                list += "'" + pLostFiles->at(i) + "'";
3133            }
3134    
3135            result.Add(list);
3136        } catch (Exception e) {
3137             result.Error(e);
3138        }
3139  #else  #else
3140      result.Error(String(DOESNT_HAVE_SQLITE3), 0);      result.Error(String(DOESNT_HAVE_SQLITE3), 0);
3141  #endif  #endif

Legend:
Removed from v.1695  
changed lines
  Added in v.1727

  ViewVC Help
Powered by ViewVC