2009-04-20 00:13:21 +02:00
|
|
|
/*
|
2010-02-28 01:08:10 +01:00
|
|
|
* This file is a part of Winix
|
2009-04-20 00:13:21 +02:00
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2009-04-21 22:50:55 +02:00
|
|
|
#ifndef headerfilecmslucorecoremounts
|
|
|
|
#define headerfilecmslucorecoremounts
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
#include <map>
|
2009-11-16 00:55:11 +01:00
|
|
|
#include <string>
|
2009-04-20 00:13:21 +02:00
|
|
|
#include "mount.h"
|
2010-01-25 05:52:17 +01:00
|
|
|
#include "error.h"
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Mounts
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
Mounts();
|
|
|
|
Error ReadMounts(const std::string & mounts);
|
|
|
|
Error ReadMounts();
|
|
|
|
|
|
|
|
void CalcCurMount();
|
2010-03-15 02:47:26 +01:00
|
|
|
Mount * CalcMount(long dir_id);
|
2009-04-20 00:13:21 +02:00
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
// current mount point
|
|
|
|
// will not be null after calling CalcCurMount() or ReadMounts([...])
|
|
|
|
Mount * pmount;
|
2009-04-20 00:13:21 +02:00
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
private:
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
// dir_id, mount_point
|
2010-01-25 05:52:17 +01:00
|
|
|
typedef std::map<long, Mount> MountTab;
|
|
|
|
MountTab mount_tab;
|
2009-04-20 00:13:21 +02:00
|
|
|
|
2010-01-25 05:52:17 +01:00
|
|
|
|
|
|
|
void MountCmsForRoot();
|
2009-04-20 00:13:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|