2009-04-20 00:13:21 +02:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2009-04-21 22:50:55 +02:00
|
|
|
#ifndef headerfilecmslucoremount
|
|
|
|
#define headerfilecmslucoremount
|
2009-04-20 00:13:21 +02:00
|
|
|
|
2009-06-05 22:29:06 +02:00
|
|
|
#include <map>
|
2009-04-21 01:49:28 +02:00
|
|
|
#include <string>
|
2009-06-05 22:29:06 +02:00
|
|
|
#include <vector>
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
class Mount
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
enum Type
|
|
|
|
{
|
|
|
|
cms = 0,
|
|
|
|
thread
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-04-21 01:49:28 +02:00
|
|
|
enum Param
|
|
|
|
{
|
|
|
|
none = 0,
|
|
|
|
asc,
|
2009-06-05 22:29:06 +02:00
|
|
|
desc,
|
|
|
|
withheader,
|
|
|
|
withinfo,
|
2009-06-07 04:40:27 +02:00
|
|
|
thread_with_header,
|
|
|
|
thread_with_info,
|
2009-06-05 22:29:06 +02:00
|
|
|
restrictcreatethread,
|
|
|
|
only_root_can_remove,
|
|
|
|
can_use_emacs_on,
|
|
|
|
can_use_mkdir_on
|
2009-04-21 01:49:28 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-04-20 00:13:21 +02:00
|
|
|
long dir_id;
|
|
|
|
Type type;
|
|
|
|
|
2009-04-21 01:49:28 +02:00
|
|
|
Mount();
|
|
|
|
const char * TypeToStr();
|
2009-06-05 22:29:06 +02:00
|
|
|
bool ParseStrParam(const std::string & param, const std::vector<int> & args);
|
2009-04-21 01:49:28 +02:00
|
|
|
bool IsParam(Param p);
|
2009-06-05 22:29:06 +02:00
|
|
|
bool IsParam(Param p, int * first_arg);
|
|
|
|
void ClearParams();
|
2009-04-21 01:49:28 +02:00
|
|
|
|
|
|
|
private:
|
2009-06-05 22:29:06 +02:00
|
|
|
typedef std::map<Param, std::vector<int> > ParamTable;
|
|
|
|
ParamTable param_table;
|
2009-04-20 00:13:21 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|