/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *         (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#ifndef __FSDEVICE_H
#define __FSDEVICE_H

#include <device.h>
#include <size.h>

class QString;

/** @brief Super class for devices with file systems on it. */
class FSDevice : public Device {
public:
   FSDevice(const QString &);

   /** @attention
     *   Don't change the order of the entries!
     *
     *   @see FSDevice::mountType()
     */
   enum FSType {
      Whole,
      Unused,
      Unknown,

      FAT,
      NTFS,
      ext2fs,
      ReiserFS,
      Linux,
      UFS,
      FFS = UFS,
      Extended,

      CDROM, /**< Handled different because file system is recognized when at mount time */
      ISO9660,
      UDF
   };

   virtual  Size     getSize()    const;
   virtual  QString  getDesc()    const;
   virtual  FSType   getFSType()  const;

   virtual  QString  mountType(FSType)  const;

protected:
   FSDevice();
   FSDevice(const QString&,  Size,  FSType = Unknown);

   FSType  typeFromSysId(uint)  const;
	uint    sysIdFromType(FSType) const;

   Size    size;
   FSType  fstype;
};


#endif /* __FSDEVICE_H */
