the first part of reimplementing has been done
now we have app object and singletons are only: log logn plugin and app git-svn-id: svn://ttmath.org/publicrep/winix/trunk@628 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
15
core/dirs.h
15
core/dirs.h
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "item.h"
|
||||
#include "dircontainer.h"
|
||||
#include "db.h"
|
||||
#include "request.h"
|
||||
|
||||
|
||||
// we do not support '..' in a path (for simplicity and security reasons)
|
||||
@@ -28,7 +30,9 @@ public:
|
||||
|
||||
void Clear();
|
||||
void ReadDirs();
|
||||
|
||||
|
||||
void SetRequest(Request * prequest);
|
||||
void SetDb(Db * pdb);
|
||||
|
||||
// these methods return false if there is no such a dir
|
||||
bool IsDir(long dir_id);
|
||||
@@ -47,6 +51,7 @@ public:
|
||||
|
||||
|
||||
// these methods return null if there is no such a dir
|
||||
// !! zmienic nazwy wskazujace ze operujemy tylko na lokalnej tablicy
|
||||
Item * GetRootDir();
|
||||
Item * GetEtcDir();
|
||||
Item * GetDir(const std::string & name, long parent);
|
||||
@@ -56,16 +61,22 @@ public:
|
||||
|
||||
void CheckRootDir();
|
||||
|
||||
|
||||
// !! jak juz wczesniejsze nazwy beda zmienione to tutaj damy AddDir()
|
||||
Error AddDirectory(Item & item, bool add_to_dir_table = false);
|
||||
|
||||
private:
|
||||
|
||||
Request * request;
|
||||
Db * db;
|
||||
|
||||
DirContainer dir_table;
|
||||
|
||||
size_t AnalyzeDir(Item * pdir, const std::string & path, long & dir_id, std::string & dir);
|
||||
std::string analyze_temp;
|
||||
|
||||
bool ExtractName(const char * & s, std::string & name);
|
||||
|
||||
bool HasReadExecAccessForRoot(const Item & item);
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user