/***************************************************************************
 *   Copyright (C) 2010 by Volker Lanz <vl@fidra.de>                       *
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
 ***************************************************************************/

#if !defined(VENEER__DEVICE__H)

#define VENEER__DEVICE__H

#include <QString>
#include <QList>

namespace Veneer
{
	class Device;

	QList<Device> listHotPluggables();
}

#if defined(HAVE_KDE)

#include <solid/device.h>
#include <solid/block.h>
#include <solid/storageaccess.h>

namespace Veneer
{
	class Device
	{
		public:
			Device();
			Device(const Solid::Device& solidStorage_, const Solid::Device& solidVolume_);

		public:
			QString mountPoint() const;
			QString icon() const;
			QString vendor() const;
			QString product() const;
			QString devicePath() const;

		private:
			Solid::Device m_SolidStorage;
			Solid::Device m_SolidVolume;
			mutable const Solid::Block* m_BlockDevice;
			mutable const Solid::StorageAccess* m_StorageAccess;
	};
}

#else

namespace Veneer
{

	class Device
	{
		public:
			Device(const QString& mountPoint, const QString& icon, const QString& vendor = QString(), const QString& product = QString(), const QString& devicePath = QString());

		public:
			QString mountPoint() const;
			QString icon() const;
			QString vendor() const;
			QString product() const;
			QString devicePath() const;

		private:
			QString m_MountPoint;
			QString m_Icon;
			QString m_Vendor;
			QString m_Product;
			QString m_DevicePath;
	};
}

#endif


#endif
