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

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

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

revision 1780 by iliev, Sun Mar 16 17:43:20 2008 UTC revision 1781 by iliev, Mon Sep 29 18:21:21 2008 UTC
# Line 302  namespace LinuxSampler { Line 302  namespace LinuxSampler {
302               * @param Index The index of the instrument (in the given               * @param Index The index of the instrument (in the given
303               * instrument file) to add. If -1 is specified, all instruments in               * instrument file) to add. If -1 is specified, all instruments in
304               * the supplied instrument file will be added.               * the supplied instrument file will be added.
305                             * @param insDir if true a separate directory will be created for
306                             * the gig file.
307               */               */
308              AddInstrumentsFromFileJob(int JobId, String DbDir, String FilePath, int Index = -1);              AddInstrumentsFromFileJob(int JobId, String DbDir, String FilePath, int Index = -1, bool insDir = false);
309                            
310              /**              /**
311               * The entry point of the job.               * The entry point of the job.
# Line 316  namespace LinuxSampler { Line 318  namespace LinuxSampler {
318                  String FilePath;                  String FilePath;
319                  int Index;                  int Index;
320                  ScanProgress Progress;                  ScanProgress Progress;
321                                    bool insDir;
322      };      };
323    
324      /**      /**
# Line 343  namespace LinuxSampler { Line 346  namespace LinuxSampler {
346               * (that are not already in the database) will be added.               * (that are not already in the database) will be added.
347               * @param FsDir The absolute path name of a directory in the               * @param FsDir The absolute path name of a directory in the
348               * file system.               * file system.
349                             * @param insDir If true a separate directory will be created for
350                             * each gig file
351               */               */
352              AddInstrumentsJob(int JobId, ScanMode Mode, String DbDir, String FsDir);              AddInstrumentsJob(int JobId, ScanMode Mode, String DbDir, String FsDir, bool insDir = false);
353                            
354              /**              /**
355               * The entry point of the job.               * The entry point of the job.
# Line 357  namespace LinuxSampler { Line 362  namespace LinuxSampler {
362                  String DbDir;                  String DbDir;
363                  String FsDir;                  String FsDir;
364                  ScanProgress Progress;                  ScanProgress Progress;
365                                    bool insDir;
366    
367                  int GetFileCount();                  int GetFileCount();
368      };      };
# Line 366  namespace LinuxSampler { Line 372  namespace LinuxSampler {
372              /**              /**
373               * Recursively scans all subdirectories of the specified file               * Recursively scans all subdirectories of the specified file
374               * system directory and adds the supported instruments to the database.               * system directory and adds the supported instruments to the database.
375                             * @param insDir is true this will create a directory for each gig file.
376               * @param pProgress The progress used to monitor the scan process.               * @param pProgress The progress used to monitor the scan process.
377               * @throws Exception - if the specified directories are invalid.               * @throws Exception - if the specified directories are invalid.
378               */               */
379             void Scan(String DbDir, String FsDir, bool Flat, ScanProgress* pProgress = NULL);             void Scan(String DbDir, String FsDir, bool Flat, bool insDir = false, ScanProgress* pProgress = NULL);
380    
381             virtual void DirectoryEntry(std::string Path);             virtual void DirectoryEntry(std::string Path);
382             virtual void FileEntry(std::string Path) { }             virtual void FileEntry(std::string Path) { }
# Line 380  namespace LinuxSampler { Line 387  namespace LinuxSampler {
387              bool Flat;              bool Flat;
388              ScanProgress* pProgress;              ScanProgress* pProgress;
389              bool HasInstrumentFiles(String Dir);              bool HasInstrumentFiles(String Dir);
390                            bool insDir;
391      };      };
392            
393      class InstrumentFileCounter: public File::DirectoryWalker {      class InstrumentFileCounter: public File::DirectoryWalker {

Legend:
Removed from v.1780  
changed lines
  Added in v.1781

  ViewVC Help
Powered by ViewVC