/*
* 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>

class QDateTime;
class QFileInfo;

#include<polldrop.h>

/**
 * Implements QMail maildir monitor.
 * @short QMail maildir monitor.
 * @author Sirtaj Singh Kang (taj@kde.org)
 * @version $Id: qmail.h,v 1.1 1999/07/22 18:17:08 tibirna 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();

	const char *maildir() const { return _maildir; }
	void setMaildir(const char *);

	virtual void recheck();
	bool valid();


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

	virtual void addConfigPage( KDropCfgDialog * );

protected:
	virtual QWidget *typeSpecificConfig();
};

#endif // SSK_QMAIL_H
