/*
    knetd, KDE Network Daemon

    Copyright (c) 2005 by Engin AYDOGAN		<engin @ bzzzt.biz>

    *************************************************************************
    *                                                                       *
    * This program is free software; you can redistribute it and/or modify  *
    * it under the terms of the GNU General Public License as published by  *
    * the Free Software Foundation; either version 2 of the License, or     *
    * (at your option) any later version.                                   *
    *                                                                       *
    *************************************************************************
*/

#ifndef SYSFS_CLASS_H_
#define SYSFS_CLASS_H_

#include "abstractdevicehotplug.h"

#include "sysfs_global.h"

/**
* Encapsulates sysfs_class object. Use static 
* SYSFSClass::build(const QString& name, int freq) function
* to get an instance of this class. The c-tor is protected.
*/
class SYSFSClass : public AbstractDeviceHotplug
{
Q_OBJECT
protected:
	SYSFSClass( sysfs_class* , int freq );
public:
	~SYSFSClass();

	static SYSFSClass*
	build( const QString& name, int freq = 100 );

	QStringList devices() const;
protected:
	virtual void timerEvent( QTimerEvent* );
public slots:
	QStringList probe();
private:
	sysfs_class* m_class;
	QStringList m_devList;
	QString m_name;
};

#endif
