53 lines
869 B
C++
Executable File
53 lines
869 B
C++
Executable File
/*
|
|
* This file is a part of CMSLU -- Content Management System like Unix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2009, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
|
|
#ifndef headerfilecmslucorecoremounts
|
|
#define headerfilecmslucorecoremounts
|
|
|
|
|
|
#include <map>
|
|
#include <string>
|
|
#include "mount.h"
|
|
|
|
|
|
|
|
class Mounts
|
|
{
|
|
public:
|
|
|
|
void ReadMounts(const std::string & mounts);
|
|
void ReadMounts();
|
|
|
|
void CalculateCurrentMountType();
|
|
|
|
// !! nie lepiej aby zwracal tutaj referencje albo wskaznik na biezacy punkt?
|
|
// !! w Mount mamy strukture std::set
|
|
//Mount GetCurrentMountPoint();
|
|
|
|
Mount::Type CurrentMountType();
|
|
bool CurrentMountIsParam(Mount::Param p);
|
|
bool CurrentMountIsParam(Mount::Param p, int * first_arg);
|
|
|
|
void MountCmsForRoot();
|
|
|
|
|
|
private:
|
|
|
|
Mount current_dir;
|
|
|
|
// dir_id, mount_point
|
|
std::map<long, Mount> mount_table;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|