Commit fdb19f90 authored by Lukas Appelhans's avatar Lukas Appelhans

Config docu

parent 57aea244
...@@ -17,26 +17,74 @@ class QString; ...@@ -17,26 +17,74 @@ class QString;
class QStringList; class QStringList;
class QDir; class QDir;
namespace Akabei { namespace Akabei {
/**
* \class Config Akabei/Config
*
* \brief This class just holds certain config values which akabeicore needs to be working.
*/
class AKABEICORESHARED_EXPORT Config class AKABEICORESHARED_EXPORT Config
{ {
public: public:
/**
* @returns the config singleton
*/
static Config *instance(); static Config *instance();
~Config(); ~Config();
/**
* @returns the root path which akabeicore operates in.
* In most cases this is going to be "/".
*/
QString root() const; QString root() const;
/**
* @returns the \c QDir object of the root path.
* This is useful for operations like absoluteFilePath().
*/
QDir rootDir() const; QDir rootDir() const;
/**
* Sets a new root path for akabeicore to use.
* @param root the new root path
*/
void setRoot(const QString &root); void setRoot(const QString &root);
/**
* @returns the dir where all databases are placed in.
*/
QString databasePath() const; QString databasePath() const;
/**
* @returns the \c QDir object of the database path.
* This is useful for operations like absoluteFilePath().
*/
QDir databaseDir() const; QDir databaseDir() const;
/**
* Sets a new database path for akabeicore to use.
* @param path the new database path
*/
void setDatabasePath(const QString &path); void setDatabasePath(const QString &path);
/**
* @returns the dir where all packages/deltas get cached
*/
QString cachePath() const; QString cachePath() const;
/**
* @returns the \c QDir object of the cache path.
* This is useful for operations like absoluteFilePath().
*/
QDir cacheDir() const; QDir cacheDir() const;
/**
* Sets a new cache path for akabeicore to use.
* @param path the new cache path
*/
void setCachePath(const QString &path); void setCachePath(const QString &path);
/**
* @returns the databases which \c Backend is trying to parse
*/
QStringList databases() const; QStringList databases() const;
/**
* Sets the names of the databases the \c Backend class is trying to parse when initializing.
* @param dbs a stringlist of database names which are going to be opened by akabeicore
*/
void setDatabases(const QStringList &dbs); void setDatabases(const QStringList &dbs);
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment