140 |
/** |
/** |
141 |
* Gets the number of directories in the specified directory. |
* Gets the number of directories in the specified directory. |
142 |
* @param Dir The absolute path name of the directory. |
* @param Dir The absolute path name of the directory. |
143 |
|
* All slashes in the directory names should be replaced with '\0'. |
144 |
* @param Recursive If true, the number of all directories |
* @param Recursive If true, the number of all directories |
145 |
* in the specified subtree will be returned. |
* in the specified subtree will be returned. |
146 |
* @throws Exception - if database error occurs, or |
* @throws Exception - if database error occurs, or |
152 |
/** |
/** |
153 |
* Gets the list of directories in the specified directory. |
* Gets the list of directories in the specified directory. |
154 |
* @param Dir The absolute path name of the directory. |
* @param Dir The absolute path name of the directory. |
155 |
|
* All slashes in the directory names should be replaced with '\0'. |
156 |
* @param Recursive If true, all directories |
* @param Recursive If true, all directories |
157 |
* in the specified subtree will be returned. |
* in the specified subtree will be returned. |
158 |
* @throws Exception - if database error occurs, or |
* @throws Exception - if database error occurs, or |
159 |
* the specified path name is invalid. |
* the specified path name is invalid. |
160 |
|
* @returns The list of directories, where the directories are |
161 |
|
* represented in abstract path - all slashes in the directory |
162 |
|
* names are replaced with '\0'. |
163 |
*/ |
*/ |
164 |
StringListPtr GetDirectories(String Dir, bool Recursive); |
StringListPtr GetDirectories(String Dir, bool Recursive); |
165 |
|
|
166 |
/** |
/** |
167 |
* Adds the specified directory to the database. |
* Adds the specified directory to the database. |
168 |
* @param Dir The absolute path name of the directory to add. |
* @param Dir The absolute path name of the directory to add. |
169 |
|
* All slashes in the directory names should be replaced with '\0'. |
170 |
* @throws Exception - if database error occurs, or the |
* @throws Exception - if database error occurs, or the |
171 |
* specified path is invalid. |
* specified path is invalid. |
172 |
*/ |
*/ |
175 |
/** |
/** |
176 |
* Removes the specified directory from the database. |
* Removes the specified directory from the database. |
177 |
* @param Dir The absolute path name of the directory to remove. |
* @param Dir The absolute path name of the directory to remove. |
178 |
|
* All slashes in the directory names should be replaced with '\0'. |
179 |
* @throws Exception - If the specified path is invalid, or |
* @throws Exception - If the specified path is invalid, or |
180 |
* Force is false and the specified directory is |
* Force is false and the specified directory is |
181 |
* not empty, or if database error occurs. |
* not empty, or if database error occurs. |
184 |
|
|
185 |
/** |
/** |
186 |
* Determines whether the specified directory exists in the database. |
* Determines whether the specified directory exists in the database. |
187 |
|
* @param Dir The absolute path name of the directory. |
188 |
|
* All slashes in the directory names should be replaced with '\0'. |
189 |
* @throws Exception - If database error occurs. |
* @throws Exception - If database error occurs. |
190 |
*/ |
*/ |
191 |
bool DirectoryExist(String Dir); |
bool DirectoryExist(String Dir); |
193 |
/** |
/** |
194 |
* Gets information about the specified directory. |
* Gets information about the specified directory. |
195 |
* @param Dir The absolute path name of the directory. |
* @param Dir The absolute path name of the directory. |
196 |
|
* All slashes in the directory names should be replaced with '\0'. |
197 |
* @throws Exception - if database error occurs, or if |
* @throws Exception - if database error occurs, or if |
198 |
* the specified directory is not found. |
* the specified directory is not found. |
199 |
*/ |
*/ |
202 |
/** |
/** |
203 |
* Renames the specified directory. |
* Renames the specified directory. |
204 |
* @param Dir The absolute path name of the directory to rename. |
* @param Dir The absolute path name of the directory to rename. |
205 |
|
* All slashes in the directory names should be replaced with '\0'. |
206 |
* @param Name The new name for the directory. |
* @param Name The new name for the directory. |
207 |
* @throws Exception - In case the given directory does not exists, |
* @throws Exception - In case the given directory does not exists, |
208 |
* or the specified name is not a valid name, |
* or the specified name is not a valid name, |
214 |
/** |
/** |
215 |
* Moves the specified directory into the specified location. |
* Moves the specified directory into the specified location. |
216 |
* @param Dir The absolute path name of the directory to move. |
* @param Dir The absolute path name of the directory to move. |
217 |
|
* All slashes in the directory names should be replaced with '\0'. |
218 |
* @param Dst The location where the directory will be moved to. |
* @param Dst The location where the directory will be moved to. |
219 |
|
* All slashes in the directory names should be replaced with '\0'. |
220 |
* @throws Exception - In case a given directory does not exists, |
* @throws Exception - In case a given directory does not exists, |
221 |
* or if a directory with name equal to the directory name already |
* or if a directory with name equal to the directory name already |
222 |
* exists in the specified destination directory, or if database error |
* exists in the specified destination directory, or if database error |
228 |
/** |
/** |
229 |
* Copies the specified directory into the specified location. |
* Copies the specified directory into the specified location. |
230 |
* @param Dir The absolute path name of the directory to copy. |
* @param Dir The absolute path name of the directory to copy. |
231 |
|
* All slashes in the directory names should be replaced with '\0'. |
232 |
* @param Dst The location where the directory will be copied to. |
* @param Dst The location where the directory will be copied to. |
233 |
|
* All slashes in the directory names should be replaced with '\0'. |
234 |
* @throws Exception - In case a given directory does not exists, |
* @throws Exception - In case a given directory does not exists, |
235 |
* or if a directory with name equal to the directory name already |
* or if a directory with name equal to the directory name already |
236 |
* exists in the specified destination directory, or if database error |
* exists in the specified destination directory, or if database error |
241 |
|
|
242 |
/** |
/** |
243 |
* Changes the description of the specified directory. |
* Changes the description of the specified directory. |
244 |
|
* @param Dir The absolute path name of the directory. |
245 |
|
* All slashes in the directory names should be replaced with '\0'. |
246 |
* @throws Exception - if database error occurs, or if |
* @throws Exception - if database error occurs, or if |
247 |
* the specified directory is not found. |
* the specified directory is not found. |
248 |
*/ |
*/ |
388 |
/** |
/** |
389 |
* Copies the specified instrument into the specified directory. |
* Copies the specified instrument into the specified directory. |
390 |
* @param Instr The absolute path name of the instrument to copy. |
* @param Instr The absolute path name of the instrument to copy. |
391 |
* @param Dst The directory where the instrument will be copied to. |
* All slashes in the directory/instrument names should be replaced with '\0'. |
392 |
|
* @param Dst The absolute path name of the directory where the |
393 |
|
* instrument will be copied to. All slashes in the directory names |
394 |
|
* should be replaced with '\0'. |
395 |
* @throws Exception - In case the given directory or instrument |
* @throws Exception - In case the given directory or instrument |
396 |
* does not exist, or if an instrument with name equal to the name |
* does not exist, or if an instrument with name equal to the name |
397 |
* of the specified instrument already exists in the specified |
* of the specified instrument already exists in the specified |
416 |
* that match the search query. |
* that match the search query. |
417 |
*/ |
*/ |
418 |
StringListPtr FindInstruments(String Dir, SearchQuery* pQuery, bool Recursive); |
StringListPtr FindInstruments(String Dir, SearchQuery* pQuery, bool Recursive); |
419 |
|
|
420 |
|
/** |
421 |
|
* All '\0' chars in the string are replaced with "\/"; |
422 |
|
* ', ", \ are escaped with backslash and |
423 |
|
* <CR> and <LF> are replaced with \r and \n. |
424 |
|
*/ |
425 |
|
static String toEscapedPath(String AbstractPath); |
426 |
|
|
427 |
|
/** |
428 |
|
* The characters ', ", \ are escaped with backslash and |
429 |
|
* <CR> and <LF> are replaced with \r and \n. |
430 |
|
*/ |
431 |
|
static String toEscapedText(String text); |
432 |
|
|
433 |
|
/** |
434 |
|
* All '\0' chars in the string are replaced with '/'; |
435 |
|
* The characthers ', ", \ are escaped with backslash and |
436 |
|
* <CR> and <LF> are replaced with \r and \n. |
437 |
|
*/ |
438 |
|
static String toEscapedName(String AbstractName); |
439 |
|
|
440 |
/** |
/** |
441 |
* Closes the database connection if opened and deletes |
* Closes the database connection if opened and deletes |
484 |
/** |
/** |
485 |
* Gets the list of directories in the specified directory. |
* Gets the list of directories in the specified directory. |
486 |
* @param DirId The ID of the directory. |
* @param DirId The ID of the directory. |
487 |
|
* @returns The list of directories, where the directories are |
488 |
|
* represented in abstract path - all slashes in the directory |
489 |
|
* names are replaced with '\0'. |
490 |
* @throws Exception - if database error occurs, or |
* @throws Exception - if database error occurs, or |
491 |
* the specified ID is invalid. |
* the specified ID is invalid. |
492 |
*/ |
*/ |
495 |
/** |
/** |
496 |
* Gets the directory ID. |
* Gets the directory ID. |
497 |
* @param Dir The absolute path name of the directory. |
* @param Dir The absolute path name of the directory. |
498 |
|
* All slashes in the directory names should be replaced with '\0'. |
499 |
* @returns The directory ID or -1 if the directory is not found. |
* @returns The directory ID or -1 if the directory is not found. |
500 |
* @throws Exception - if database error occurs. |
* @throws Exception - if database error occurs. |
501 |
*/ |
*/ |
505 |
* Gets the directory ID. |
* Gets the directory ID. |
506 |
* @param ParentDirId The ID of the parent directory. |
* @param ParentDirId The ID of the parent directory. |
507 |
* @param DirName The directory name. |
* @param DirName The directory name. |
508 |
|
* All slashes in the directory name should be replaced with '\0'. |
509 |
* @throws Exception - if database error occurs. |
* @throws Exception - if database error occurs. |
510 |
* @returns The ID of the specified directory |
* @returns The ID of the specified directory |
511 |
* or -1 if the directory doesn't exist. |
* or -1 if the directory doesn't exist. |
572 |
/** |
/** |
573 |
* Gets the ID of the specified database instrument. |
* Gets the ID of the specified database instrument. |
574 |
* @param Instr The absolute path name of the instrument. |
* @param Instr The absolute path name of the instrument. |
575 |
|
* All slashes in the directory/instrument names should be replaced with '\0'. |
576 |
* @returns The instrument ID or -1 if the instrument is not found. |
* @returns The instrument ID or -1 if the instrument is not found. |
577 |
* @throws Exception - if database error occurs. |
* @throws Exception - if database error occurs. |
578 |
*/ |
*/ |
582 |
* Gets the ID of the specified database instrument. |
* Gets the ID of the specified database instrument. |
583 |
* @param DirId The ID of the directory containing the instrument. |
* @param DirId The ID of the directory containing the instrument. |
584 |
* @param InstrName The name of the instrument. |
* @param InstrName The name of the instrument. |
585 |
|
* All slashes in the instrument name should be replaced with '\0'. |
586 |
* @returns The instrument ID or -1 if the instrument is not found. |
* @returns The instrument ID or -1 if the instrument is not found. |
587 |
* @throws Exception - if database error occurs. |
* @throws Exception - if database error occurs. |
588 |
*/ |
*/ |
591 |
/** |
/** |
592 |
* Gets the name of the instrument with the specified ID. |
* Gets the name of the instrument with the specified ID. |
593 |
* @param InstrId The ID of the instrument, which name should be obtained. |
* @param InstrId The ID of the instrument, which name should be obtained. |
594 |
* @returns The name of the specified instrument. |
* @returns The name of the specified instrument, where all slashes |
595 |
|
* in the name are replaced with '\0'. |
596 |
* @throws Exception - if database error occurs. |
* @throws Exception - if database error occurs. |
597 |
*/ |
*/ |
598 |
String GetInstrumentName(int InstrId); |
String GetInstrumentName(int InstrId); |
637 |
/** |
/** |
638 |
* Copies the specified instrument into the specified directory. |
* Copies the specified instrument into the specified directory. |
639 |
* @param InstrId The ID of the instrument to copy. |
* @param InstrId The ID of the instrument to copy. |
640 |
* @param InstrId The name of the instrument to copy. |
* @param InstrName The name of the instrument to copy. |
641 |
* @param DstDirId The ID of the directory where the |
* @param DstDirId The ID of the directory where the |
642 |
* instrument will be copied to. |
* instrument will be copied to. |
643 |
* @param DstDirId The name of the directory where the |
* @param DstDir The name of the directory where the |
644 |
* instrument will be copied to. |
* instrument will be copied to. |
645 |
* @throws Exception - If database error occurs. |
* @throws Exception - If database error occurs. |
646 |
*/ |
*/ |
715 |
*/ |
*/ |
716 |
void AddGigInstrument(sqlite3_stmt* pStmt, String DbDir, int DirId, String File, ::gig::Instrument* pInstrument, int Index); |
void AddGigInstrument(sqlite3_stmt* pStmt, String DbDir, int DirId, String File, ::gig::Instrument* pInstrument, int Index); |
717 |
|
|
718 |
void DirectoryTreeWalk(String Path, DirectoryHandler* pHandler); |
void DirectoryTreeWalk(String AbstractPath, DirectoryHandler* pHandler); |
719 |
|
|
720 |
void DirectoryTreeWalk(DirectoryHandler* pHandler, String Path, int DirId, int Level); |
void DirectoryTreeWalk(DirectoryHandler* pHandler, String AbstractPath, int DirId, int Level); |
721 |
|
|
722 |
/** Locks the DbInstrumentsMutex and starts a transaction. */ |
/** Locks the DbInstrumentsMutex and starts a transaction. */ |
723 |
void BeginTransaction(); |
void BeginTransaction(); |
782 |
*/ |
*/ |
783 |
String GetUniqueInstrumentName(int DirId, String Name); |
String GetUniqueInstrumentName(int DirId, String Name); |
784 |
|
|
785 |
|
/** |
786 |
|
* All '\0' chars in the string are replaced with '/'. |
787 |
|
*/ |
788 |
|
static String toDbName(String AbstractName); |
789 |
|
|
790 |
|
/** |
791 |
|
* All slashes are replaced with '\0'. |
792 |
|
*/ |
793 |
|
static String toAbstractName(String DbName); |
794 |
|
|
795 |
void FireDirectoryCountChanged(String Dir); |
void FireDirectoryCountChanged(String Dir); |
796 |
void FireDirectoryInfoChanged(String Dir); |
void FireDirectoryInfoChanged(String Dir); |
797 |
void FireDirectoryNameChanged(String Dir, String NewName); |
void FireDirectoryNameChanged(String Dir, String NewName); |