/* 
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Christian Eichinger <ce@desktopbsd.net>
 *         (C) 2006
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */
#ifndef __CONNECTIONDATAMANAGER_H
#define __CONNECTIONDATAMANAGER_H

#include "pppconnectiondata.h"

class QString;

#define MPDTEMPLATE_DIRECTORY	"/usr/local/share/desktopbsd/mpd-templates/"
#define MPDCONF_TEMPLATE		(MPDTEMPLATE_DIRECTORY "mpd.conf.tmpl")
#define MPDLINKS_TEMPLATE		(MPDTEMPLATE_DIRECTORY "mpd.links.tmpl")

#define MPDCONF_DIRECTORY		"/usr/local/etc/mpd/"
#define MPDCONF_FILE				(MPDCONF_DIRECTORY "mpd.conf")
#define MPDLINKS_FILE			(MPDCONF_DIRECTORY "mpd.links")

#define MPD_RCSCRIPT				"/usr/local/etc/rc.d/mpd"
#define MPD_RCSCRIPT_START		(MPD_RCSCRIPT " onerestart")
#define MPD_RCSCRIPT_STOP		(MPD_RCSCRIPT " onestop")

class PPPConnectionManager {

public:
	PPPConnectionManager();
	PPPConnectionManager(const PPPConnectionData& cdata);

	void setConnectionData(const PPPConnectionData& cdata);
	bool deleteDefaultRouter();
	int createConfigurationFiles();
	bool setNameserver();
	int openConnection();
	int closeConnection();
	bool isConnected();

private:
	PPPConnectionData condata;
	bool connected;
};

#endif /* __CONNECTIONDATAMANAGER_H */

