/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *         (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#ifndef __PACKAGESETTINGS_H
#define __PACKAGESETTINGS_H

#include <dbsdsettings.h>

/** @brief DBSDSettings class managing all settings related to package management.
  *
  * @see DBSDSettings
  */
class PackageSettings : public DBSDSettings {
public:
	QString getUpdateServer();
	bool setUpdateServer(const QString &);
	
	QString getSupFile();
	bool setSupFile(const QString &);

	bool getUpwardRecursive();
	bool setUpwardRecursive(bool);
	
	bool getRecursive();
	bool setRecursive(bool);
	
	bool getKDialogOptions();
	bool setKDialogOptions(bool);
	
	bool getKeepGoing();
	bool setKeepGoing(bool);
	
	int getPackageUse();
	bool setPackageUse(int);
	
	QStringList getMakeArguments();
	bool setMakeArguments(const QStringList &);
	
	QStringList getMakeEnvironment();
	bool setMakeEnvironment(const QStringList &);
	
	QString getPackageDirectory();
	bool setPackageDirectory(const QString &);
	
	bool isFirstRun();
	bool setFirstRun(bool);
	
	enum PortsUpdateMethod
	{
		CvsUp = 1,
		Portsnap = 2
	};
	
	int getPortsUpdateMethod();
	bool setPortsUpdateMethod(int);
	
	QString getPortsnapWorkingDirectory();
	bool setPortsnapWorkingDirectory(const QString &);
	
	enum InstalledPkgsGroupBy
	{
		None = 1,
		Category = 2,
		Version = 3,
		References = 4
	};

	int getInstalledPkgsGroupBy();
	bool setInstalledPkgsGroupBy(int);

	enum Notifications
	{
		Disabled = 0x0,					/**< Notifications disabled */
		InstallationFinished = 0x01,	/**< "Installation finished" enabled */
		UserInputRequired = 0x02,		/**< "User input required" enabled */
		PackageCompleted = 0x04			/**< "Package completed" enabled */
	};

	int getNotifications();
	bool setNotifications(int);
	
	int getNotificationTimeout();
	bool setNotificationTimeout(int);
	
	bool getIncrementalPackageFind();
	bool setIncrementalPackageFind(bool);
};

#endif /* __PACKAGESETTINGS_H */

