/*
* 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.2 2000/06/14 19:37:24 rikkus 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
