Changeset View
Changeset View
Standalone View
Standalone View
src/core-impl/storage/StorageManager.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 42 | public: | |||
---|---|---|---|---|---|
53 | static StorageManager *instance(); | 53 | static StorageManager *instance(); | ||
54 | 54 | | |||
55 | /** Destroys the instance of the StorageManager. | 55 | /** Destroys the instance of the StorageManager. | ||
56 | */ | 56 | */ | ||
57 | static void destroy(); | 57 | static void destroy(); | ||
58 | 58 | | |||
59 | /** | 59 | /** | ||
60 | retrieve an interface which allows client-code to store/load data in a relational database. | 60 | retrieve an interface which allows client-code to store/load data in a relational database. | ||
61 | Note: code using this method does NOT take ownership of the pointer, but may cache the pointer | 61 | Note: You should never modify the database unless you really really know what you do. | ||
62 | Note2: You should never modify the database unless you really really know what you do. | | |||
63 | Using the SqlMeta (e.g. SqlRegistry or SqlTrack) is much better. | 62 | Using the SqlMeta (e.g. SqlRegistry or SqlTrack) is much better. | ||
64 | @return Returns a pointer to the amarok wide SqlStorage or | 63 | @return Returns a pointer to the amarok wide SqlStorage or | ||
65 | to an internal dummy SqlStorage if that cannot be found. | 64 | to an internal dummy SqlStorage if that cannot be found. | ||
66 | It never returns a null pointer. | 65 | It never returns a null pointer. | ||
67 | */ | 66 | */ | ||
68 | QSharedPointer<SqlStorage> sqlStorage() const; | 67 | QSharedPointer<SqlStorage> sqlStorage() const; | ||
69 | 68 | | |||
70 | /** | 69 | /** | ||
71 | * Set the list of current factories | 70 | * Set the list of current factories | ||
72 | * | 71 | * | ||
73 | * For every factory that is a CollectionFactory uses it to create new | 72 | * For every factory that is a CollectionFactory uses it to create new | ||
74 | * collections and register with this manager. | 73 | * collections and register with this manager. | ||
75 | */ | 74 | */ | ||
76 | void setFactories( const QList<Plugins::PluginFactory*> &factories ); | 75 | void setFactories( const QList<QSharedPointer<Plugins::PluginFactory> > &factories ); | ||
77 | 76 | | |||
78 | /** Returns a list of the last sql errors. | 77 | /** Returns a list of the last sql errors. | ||
79 | The list might not include every one error if the number | 78 | The list might not include every one error if the number | ||
80 | is beyond a sensible limit. | 79 | is beyond a sensible limit. | ||
81 | */ | 80 | */ | ||
82 | QStringList getLastErrors() const; | 81 | QStringList getLastErrors() const; | ||
83 | 82 | | |||
84 | /** Clears the list of the last errors. */ | 83 | /** Clears the list of the last errors. */ | ||
Show All 38 Lines |