00001 #ifndef IGUANA_WEB_FRAMEWORK_IG_FILE_MANAGER_H
00002 # define IGUANA_WEB_FRAMEWORK_IG_FILE_MANAGER_H
00003
00004
00005
00006 # include "Iguana/WebFramework/interface/config.h"
00007 # include "Iguana/Framework/interface/IgStateElement.h"
00008 # include <map>
00009 # include <list>
00010 # include <string>
00011 # include <qcstring.h>
00012
00013
00014
00015
00016 class IgState;
00017
00018
00019
00020
00021
00022 class IGUANA_WEB_FRAMEWORK_API IgFileManager : public IgStateElement
00023 {
00024 IG_DECLARE_STATE_ELEMENT (IgFileManager);
00025 public:
00026 IgFileManager (IgState *state);
00027 ~IgFileManager (void);
00028 QByteArray lookup (const std::string &alias);
00029 void add (QByteArray array,
00030 const std::string &alias ,
00031 bool save);
00032 void add (const std::string &filename, const std::string &alias);
00033 void addSearchPath (const std::string &path,
00034 bool prepend = false);
00035 void addPackagePath (const std::string &packageName,
00036 bool prepend = false);
00037 void addPaths (const std::string &relPath,
00038 bool prepend = false);
00039 void addPaths (const std::string &relPath,
00040 const std::string &envVariable,
00041 bool prepend = false);
00042 void addAlias (const std::string &oldAlias,
00043 const std::string &newAlias);
00044
00045
00046
00047
00048 private:
00049 typedef std::map <std::string, QByteArray> CacheMap;
00050 typedef std::list <std::string> PathList;
00051 IgState *m_state;
00052 CacheMap m_cacheMap;
00053 bool m_debugFiles;
00054 PathList m_pathList;
00055 };
00056
00057
00058
00059
00060
00061 #endif // IGUANA_WEB_FRAMEWORK_IG_FILE_MANAGER_H