124 |
|
|
125 |
/** |
/** |
126 |
* Creates an instruments database file. |
* Creates an instruments database file. |
127 |
* @param File the pathname of the file to create. |
* @param FilePath the pathname of the file to create. |
128 |
* @throws Exception If the creation of the database file failed. |
* @throws Exception If the creation of the database file failed. |
129 |
*/ |
*/ |
130 |
static void CreateInstrumentsDb(String File); |
static void CreateInstrumentsDb(String FilePath); |
131 |
|
|
132 |
/** |
/** |
133 |
* This method is used to access the instruments database. |
* This method is used to access the instruments database. |
305 |
* @param pProgress The progress used to monitor the scan process. |
* @param pProgress The progress used to monitor the scan process. |
306 |
* @throws Exception if the operation failed. |
* @throws Exception if the operation failed. |
307 |
*/ |
*/ |
308 |
void AddInstruments(String DbDir, String FilePath, int Index = -1, ScanProgress* pProgress = NULL); |
void AddInstruments(String DbDir, bool insDir, String FilePath, int Index = -1, ScanProgress* pProgress = NULL); |
309 |
|
|
310 |
/** |
/** |
311 |
* Adds all supported instruments in the specified file system |
* Adds all supported instruments in the specified file system |
331 |
* @param bBackground Determines whether |
* @param bBackground Determines whether |
332 |
* the task should be done in the background. |
* the task should be done in the background. |
333 |
* @returns If bBackground is true, the ID of the scan job; |
* @returns If bBackground is true, the ID of the scan job; |
334 |
|
* @param insDir if true a directory is added for each instrument file |
335 |
* -1 otherwise. |
* -1 otherwise. |
336 |
* @throws Exception if the operation failed. |
* @throws Exception if the operation failed. |
337 |
*/ |
*/ |
338 |
int AddInstruments(ScanMode Mode, String DbDir, String FsDir, bool bBackground); |
int AddInstruments(ScanMode Mode, String DbDir, String FsDir, bool bBackground, bool insDir = false); |
339 |
|
|
340 |
/** |
/** |
341 |
* Gets the number of instruments in the specified directory. |
* Gets the number of instruments in the specified directory. |
434 |
* that match the search query. |
* that match the search query. |
435 |
*/ |
*/ |
436 |
StringListPtr FindInstruments(String Dir, SearchQuery* pQuery, bool Recursive); |
StringListPtr FindInstruments(String Dir, SearchQuery* pQuery, bool Recursive); |
437 |
|
|
438 |
|
/** |
439 |
|
* Checks all instrument files in the database and returns a list |
440 |
|
* of all files that dosn't exist in the filesystem. |
441 |
|
* @throws Exception - if database error occurs. |
442 |
|
* @returns The absolute path names of all lost instrument files. |
443 |
|
*/ |
444 |
|
StringListPtr FindLostInstrumentFiles(); |
445 |
|
|
446 |
|
/** |
447 |
|
* Substitutes all occurrences of the instrument file |
448 |
|
* OldPath in the database, with NewPath. |
449 |
|
* @throws Exception - If error occurs. |
450 |
|
*/ |
451 |
|
void SetInstrumentFilePath(String OldPath, String NewPath); |
452 |
|
|
453 |
|
/** |
454 |
|
* Gets a list of all instruments in the instruments database |
455 |
|
* that are located in the specified instrument file. |
456 |
|
* @param File The absolute path name of the instrument file. |
457 |
|
* @throws Exception If database error occurs. |
458 |
|
*/ |
459 |
|
StringListPtr GetInstrumentsByFile(String File); |
460 |
|
|
461 |
/** |
/** |
462 |
* Removes the old instruments datbase and re-creates |
* Removes the old instruments datbase and re-creates |
476 |
* <CR> and <LF> are replaced with \r and \n. |
* <CR> and <LF> are replaced with \r and \n. |
477 |
*/ |
*/ |
478 |
static String toEscapedText(String text); |
static String toEscapedText(String text); |
479 |
|
|
480 |
|
static String toNonEscapedText(String text); |
481 |
|
|
482 |
JobList Jobs; |
JobList Jobs; |
483 |
|
|
549 |
int GetDirectoryId(int ParentDirId, String DirName); |
int GetDirectoryId(int ParentDirId, String DirName); |
550 |
|
|
551 |
/** |
/** |
552 |
|
* Gets the ID of the directory, in which the specified instrument is located. |
553 |
|
* @param InstrId The ID of the instrument. |
554 |
|
* @returns The directory ID or -1 if the directory is not found. |
555 |
|
* @throws Exception - if database error occurs. |
556 |
|
*/ |
557 |
|
int GetDirectoryId(int InstrId); |
558 |
|
|
559 |
|
/** |
560 |
* Gets the name of the specified directory. |
* Gets the name of the specified directory. |
561 |
* @throws Exception - if the directory is not found |
* @throws Exception - if the directory is not found |
562 |
* or if database error occurs. |
* or if database error occurs. |
701 |
* All slashes in the directory names should be replaced with '\0'. |
* All slashes in the directory names should be replaced with '\0'. |
702 |
* @param FsDir The absolute path name of a directory in the file |
* @param FsDir The absolute path name of a directory in the file |
703 |
* system. |
* system. |
704 |
|
* @param insDir If true a directory will be create for each gig file |
705 |
* @param pProgress The progress used to monitor the scan process. |
* @param pProgress The progress used to monitor the scan process. |
706 |
* @throws Exception if the operation failed. |
* @throws Exception if the operation failed. |
707 |
*/ |
*/ |
708 |
void AddInstrumentsNonrecursive(String DbDir, String FsDir, ScanProgress* pProgress = NULL); |
void AddInstrumentsNonrecursive(String DbDir, String FsDir, bool insDir = false, ScanProgress* pProgress = NULL); |
709 |
|
|
710 |
/** |
/** |
711 |
* Adds all supported instruments in the specified file system |
* Adds all supported instruments in the specified file system |
724 |
* @param pProgress The progress used to monitor the scan process. |
* @param pProgress The progress used to monitor the scan process. |
725 |
* @throws Exception if the operation failed. |
* @throws Exception if the operation failed. |
726 |
*/ |
*/ |
727 |
void AddInstrumentsRecursive(String DbDir, String FsDir, bool Flat = false, ScanProgress* pProgress = NULL); |
void AddInstrumentsRecursive(String DbDir, String FsDir, bool Flat = false, bool insDir = false, ScanProgress* pProgress = NULL); |
728 |
|
|
729 |
/** |
/** |
730 |
* Adds the instruments in the specified file |
* Adds the instruments in the specified file |
749 |
* @param DbDir The instruments database directory |
* @param DbDir The instruments database directory |
750 |
* in which the instrument will be added. |
* in which the instrument will be added. |
751 |
* All slashes in the directory names should be replaced with '\0'. |
* All slashes in the directory names should be replaced with '\0'. |
752 |
* @param File The absolute path name of the instrument file. |
* @param FilePath The absolute path name of the instrument file. |
753 |
* @param Index The index of the instrument (in the given |
* @param Index The index of the instrument (in the given |
754 |
* instrument file) to add. If -1 is specified, all instruments in |
* instrument file) to add. If -1 is specified, all instruments in |
755 |
* the supplied instrument file will be added. |
* the supplied instrument file will be added. |
757 |
* Specify NULL if you don't want to monitor the scanning process. |
* Specify NULL if you don't want to monitor the scanning process. |
758 |
* @throws Exception if the operation failed. |
* @throws Exception if the operation failed. |
759 |
*/ |
*/ |
760 |
void AddGigInstruments(String DbDir, String File, int Index = -1, ScanProgress* pProgress = NULL); |
void AddGigInstruments(String DbDir, String FilePath, int Index = -1, ScanProgress* pProgress = NULL); |
761 |
|
|
762 |
/** |
/** |
763 |
* Adds the specified GIG instrument. |
* Adds the specified GIG instrument. |
789 |
void ExecSql(String Sql, String Param); |
void ExecSql(String Sql, String Param); |
790 |
|
|
791 |
/** |
/** |
792 |
|
* Used to execute SQL commands which return empty result set. |
793 |
|
*/ |
794 |
|
void ExecSql(String Sql, std::vector<String>& Params); |
795 |
|
|
796 |
|
/** |
797 |
* Used to execute SQL commands which returns integer. |
* Used to execute SQL commands which returns integer. |
798 |
*/ |
*/ |
799 |
int ExecSqlInt(String Sql); |
int ExecSqlInt(String Sql); |
804 |
int ExecSqlInt(String Sql, String Param); |
int ExecSqlInt(String Sql, String Param); |
805 |
|
|
806 |
/** |
/** |
807 |
* Used to execute SQL commands which returns integer. |
* Used to execute SQL commands which returns string. |
808 |
*/ |
*/ |
809 |
String ExecSqlString(String Sql); |
String ExecSqlString(String Sql); |
810 |
|
|
814 |
IntListPtr ExecSqlIntList(String Sql); |
IntListPtr ExecSqlIntList(String Sql); |
815 |
|
|
816 |
/** |
/** |
817 |
|
* Used to execute SQL commands which returns integer list. |
818 |
|
*/ |
819 |
|
IntListPtr ExecSqlIntList(String Sql, String Param); |
820 |
|
|
821 |
|
/** |
822 |
|
* Used to execute SQL commands which returns integer list. |
823 |
|
*/ |
824 |
|
IntListPtr ExecSqlIntList(String Sql, std::vector<String>& Params); |
825 |
|
|
826 |
|
/** |
827 |
* Used to execute SQL commands which returns string list. |
* Used to execute SQL commands which returns string list. |
828 |
*/ |
*/ |
829 |
StringListPtr ExecSqlStringList(String Sql); |
StringListPtr ExecSqlStringList(String Sql); |
861 |
static String toAbstractName(String DbName); |
static String toAbstractName(String DbName); |
862 |
|
|
863 |
static String toEscapedFsPath(String FsPath); |
static String toEscapedFsPath(String FsPath); |
864 |
|
|
865 |
|
static String toNonEscapedFsPath(String FsPath); |
866 |
|
|
867 |
void FireDirectoryCountChanged(String Dir); |
void FireDirectoryCountChanged(String Dir); |
868 |
void FireDirectoryInfoChanged(String Dir); |
void FireDirectoryInfoChanged(String Dir); |