winix/core/mount.h

68 lines
908 B
C
Raw Normal View History

/*
* 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 headerfilecmslucoremount
#define headerfilecmslucoremount
#include <map>
#include <string>
#include <vector>
class Mount
{
public:
enum Type
{
cms = 0,
thread
};
enum Param
{
none = 0,
asc,
desc,
withheader,
withinfo,
thread_with_header,
thread_with_info,
restrictcreatethread,
only_root_can_remove,
can_use_emacs_on,
can_use_mkdir_on
};
long dir_id;
Type type;
Mount();
const char * TypeToStr();
bool ParseStrParam(const std::string & param, const std::vector<int> & args);
bool IsParam(Param p);
bool IsParam(Param p, int * first_arg);
void ClearParams();
private:
typedef std::map<Param, std::vector<int> > ParamTable;
ParamTable param_table;
};
#endif