/*
* qmail.h -- Declaration of class KQMailDrop.
* Generated by newclass on Mon Dec  1 00:45:12 EST 1997.
*/
#ifndef SSK_QMAIL_H
#define SSK_QMAIL_H

#include<qstring.h>
#include <qdatetime.h>
#include <qfileinfo.h>

#include"polldrop.h"

/**
 * Implements QMail maildir monitor.
 * @short QMail maildir monitor.
 * @author Sirtaj Singh Kang (taj@kde.org)
 * @version $Id: qmail.h,v 1.3 2003/01/12 16:14:08 mlaurent Exp $
 */
class KQMailDrop : public KPollableDrop
{
public:
	static const char *MaildirConfigKey;
private:
	bool touched();

	QString	_maildir;
	QDateTime _lastMod;
	QFileInfo _info;
	unsigned _lastSize;

	KQMailDrop& operator=( const KQMailDrop& );

	bool _valid;
public:
	/**
	* KQMailDrop Constructor
	*/
	KQMailDrop();

	/**
	* KQMailDrop Destructor
	*/
	virtual ~KQMailDrop();

	QString maildir() const { return _maildir; }
	void setMaildir(const QString &);

	virtual void recheck();
	bool valid();


	virtual KMailDrop* clone () const;
	virtual bool readConfigGroup ( const KConfigBase& cfg );
	virtual bool writeConfigGroup ( KConfigBase& cfg ) const;
	virtual QString type () const { return QString::fromUtf8("qmail"); };

	virtual void addConfigPage( KDropCfgDialog * );

protected:
	virtual QWidget *typeSpecificConfig();
};

#endif // SSK_QMAIL_H
