Commit fdb19f90 authored by Lukas Appelhans's avatar Lukas Appelhans

Config docu

parent 57aea244
......@@ -17,26 +17,74 @@ class QString;
class QStringList;
class QDir;
namespace Akabei {
/**
* \class Config Akabei/Config
*
* \brief This class just holds certain config values which akabeicore needs to be working.
*/
class AKABEICORESHARED_EXPORT Config
{
public:
/**
* @returns the config singleton
*/
static Config *instance();
~Config();
/**
* @returns the root path which akabeicore operates in.
* In most cases this is going to be "/".
*/
QString root() const;
/**
* @returns the \c QDir object of the root path.
* This is useful for operations like absoluteFilePath().
*/
QDir rootDir() const;
/**
* Sets a new root path for akabeicore to use.
* @param root the new root path
*/
void setRoot(const QString &root);
/**
* @returns the dir where all databases are placed in.
*/
QString databasePath() const;
/**
* @returns the \c QDir object of the database path.
* This is useful for operations like absoluteFilePath().
*/
QDir databaseDir() const;
/**
* Sets a new database path for akabeicore to use.
* @param path the new database path
*/
void setDatabasePath(const QString &path);
/**
* @returns the dir where all packages/deltas get cached
*/
QString cachePath() const;
/**
* @returns the \c QDir object of the cache path.
* This is useful for operations like absoluteFilePath().
*/
QDir cacheDir() const;
/**
* Sets a new cache path for akabeicore to use.
* @param path the new cache path
*/
void setCachePath(const QString &path);
/**
* @returns the databases which \c Backend is trying to parse
*/
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);
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