/[svn]/linuxsampler/trunk/src/db/InstrumentsDb.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/db/InstrumentsDb.h

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

revision 1350 by iliev, Sun Sep 16 23:06:10 2007 UTC revision 1644 by persson, Sat Jan 19 16:55:03 2008 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2007 Grigor Iliev                                       *   *   Copyright (C) 2007, 2008 Grigor Iliev                                 *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   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 20  Line 20 
20    
21  #include "../common/global.h"  #include "../common/global.h"
22    
 #if HAVE_SQLITE3  
   
23  #ifndef __LS_INSTRUMENTSDB_H__  #ifndef __LS_INSTRUMENTSDB_H__
24  #define __LS_INSTRUMENTSDB_H__  #define __LS_INSTRUMENTSDB_H__
25    
# Line 437  namespace LinuxSampler { Line 435  namespace LinuxSampler {
435              StringListPtr FindInstruments(String Dir, SearchQuery* pQuery, bool Recursive);              StringListPtr FindInstruments(String Dir, SearchQuery* pQuery, bool Recursive);
436    
437              /**              /**
438                 * Removes the old instruments datbase and re-creates
439                 * the instruments database from scratch.
440                 */
441                void Format();
442    
443                /**
444               * All '\0' chars in the string are replaced with "\x2f";               * All '\0' chars in the string are replaced with "\x2f";
445               * ', ", \ are escaped with backslash and               * ', ", \ are escaped with backslash and
446               * <CR> and <LF> are replaced with \r and \n.               * <CR> and <LF> are replaced with \r and \n.
# Line 449  namespace LinuxSampler { Line 453  namespace LinuxSampler {
453               */               */
454              static String toEscapedText(String text);              static String toEscapedText(String text);
455                            
             /**  
              * Closes the database connection if opened and deletes  
              * the InstrumentsDb instance.  
              */  
             static void Destroy();  
   
456              JobList Jobs;              JobList Jobs;
457    
458          private:          private:
459              sqlite3* db;              sqlite3* db;
460              String DbFile;              String DbFile;
461              static InstrumentsDb* pInstrumentsDb;              static InstrumentsDb instance;
462              Mutex DbInstrumentsMutex;              Mutex DbInstrumentsMutex;
463              ListenerList<InstrumentsDb::Listener*> llInstrumentsDbListeners;              ListenerList<InstrumentsDb::Listener*> llInstrumentsDbListeners;
464              bool InTransaction;              bool InTransaction;
# Line 861  namespace LinuxSampler { Line 859  namespace LinuxSampler {
859  } // namespace LinuxSampler  } // namespace LinuxSampler
860    
861  #endif // __LS_INSTRUMENTSDB_H__  #endif // __LS_INSTRUMENTSDB_H__
   
 #endif // HAVE_SQLITE3  

Legend:
Removed from v.1350  
changed lines
  Added in v.1644

  ViewVC Help
Powered by ViewVC