Commit Graph

9 Commits

Author SHA1 Message Date
Tobias Doerffel
18282e0de3 Made UnifiedResourcesProvider actually pull ResourceItem's from its
merged databases into its own database (and also keep them up to date).

Furthermore added code to properly destroy merged databases and their
providers in desctrutor.
2009-02-28 17:10:48 +01:00
Tobias Doerffel
75c03f65f2 Added UnifiedResourcesProvider which merges multiple ResourcesDB's and
offers one unified database.
2009-02-28 15:46:29 +01:00
Tobias Doerffel
a93a400539 Refactored resources framework to use the new LocalResourcesProvider for
scanning local directories and filling its ResourcesDB.

The ResourcesDB is responsible for writing local catalogue files. It
automatically loads back the appropriate catalogue file (depending on
the provider that operates on the ResourcesDB object) at initialization.
Will be useful for WebResourcesProvider as well to cache metadata of
online resources.

All you have to do now is to create an according ResourcesProvider which
will automatically setup a ResourcesDB that can be operated on by the
ResourcesTreeModel.
2009-02-27 19:01:51 +01:00
Tobias Doerffel
f49274cac2 Separated out ResourcesDB::Item and ResourcesDB::TreeItem into
ResourcesItem and ResourcesTreeItem in own header- and source-files
2009-02-27 11:25:39 +01:00
Tobias Doerffel
0804318b57 ResourcesDB: added typedef's for enumerations in ResourcesDB::Item 2009-02-27 00:53:33 +01:00
Tobias Doerffel
9ebdc72404 ResourcesDB: added nameHash property in order to avoid unnecessary
string comparisons (now comparing two int's before comparing two whole
string objects)
2009-02-27 00:01:38 +01:00
Tobias Doerffel
57c7c64103 ResourcesDB: use pointers to manage hash-tree (both in tree-structure
and hash-map) - avoids local copies of objects as well as accidently
overwritten ResourcesDB::Item's in hash-map, which resulted in
inconsistencies in tree and finally crashes in several situations, e.g
removal of previously existing objects (closes #2584125)
2009-02-26 23:55:20 +01:00
Tobias Doerffel
7d808d434f added ResourcesDB::Item::TypeMidiFile
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1880 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-12-08 01:32:24 +00:00
Tobias Doerffel
bb186c5b62 introduced ResourcesDB class for easily managing all kind of resources in the future
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1856 0778d3d1-df1d-0410-868b-ea421aaaa00d
2008-11-29 22:30:26 +00:00