//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Created 2006-12-03 11:36:58 by Felix Rauscher
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#ifndef _MEDIA_
#define _MEDIA_

// c - c++
#include "vector"
#include "ctime"

//this
#include "Medium.H"

class Media
	{
	private:
//============================private data members==============================
	//list of media
		std::vector<Medium> _media;
	//list of user mountable media
		std::vector<Medium> _user_mountable;
		std::vector<Medium> _user_unmountable;
	//last update
		time_t _last_update;
	//realy do update
		void _do_update();
	public:
//===========================constructor========================================
	//default constructor
		inline Media() : _last_update(0)
			{
			}
//==========================public member functions=============================
	//update list - check /etc/fstab and /etc/mtab
		void UpdateList();
	//get Media
		inline const std::vector<Medium> &GetMedia() const
			{
			return _media;
			}
		inline  std::vector<Medium> &GetMountableMedia() 
			{
			return _user_mountable;
			}
		inline  std::vector<Medium> &GetUnMountableMedia() 
			{
			return _user_unmountable;
			}
	};
	

#endif
