/*
 * Bookmark.h
 *
 * (c) 2002 by Thorsten Scheuermann <tscheuermann@gmx.net>
 *
 * 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 _BOOKMARK_H
#define _BOOKMARK_H

#include <qstring.h>

class Bookmark
{
public:
  Bookmark();
  ~Bookmark();

  enum StorageType
  {
    STORAGE_CF = 0,
    STORAGE_SD = 1,
    STORAGE_INTERNAL = 2
  };

  void setName(const QString& name);
  QString name() const { return theName; }
  
  void setDirectory(const QString& dir);
  QString directory() const { return theDir; }
  QString fullPath() const;
  
  bool available() const;   // is bookmarked directory accessible?

  void setStorage(enum StorageType st);
  enum StorageType storage() const { return theStorage; }
  
  friend bool operator== (const Bookmark&, const Bookmark&);

protected:
  QString theName;
  QString theDir;
  enum StorageType theStorage;

  static QString rootDir[3];
};

inline bool operator== (const Bookmark& a, const Bookmark& b)
{
  if(a.theStorage == b.theStorage)
    return (a.theDir == b.theDir);
  return false;
}

#endif
