mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 18:01:13 +02:00
yWeb 2.8.a.4
- updated nhttpd - Code clean up - changes to nhttpd.conf - some changes for logo display git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@416 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -16,41 +16,44 @@
|
||||
#include "yhook.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef struct
|
||||
{
|
||||
std::string filename;
|
||||
std::string mime_type;
|
||||
std::string category;
|
||||
time_t created;
|
||||
typedef struct {
|
||||
std::string filename;
|
||||
std::string mime_type;
|
||||
std::string category;
|
||||
time_t created;
|
||||
} TCache;
|
||||
|
||||
typedef std::map<std::string, TCache> TCacheList;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
class CmodCache : public Cyhook
|
||||
{
|
||||
class CmodCache: public Cyhook {
|
||||
private:
|
||||
static TCacheList CacheList;
|
||||
std::string cache_directory;
|
||||
void yshowCacheInfo(CyhookHandler *hh);
|
||||
void yCacheClear(CyhookHandler *hh);
|
||||
static TCacheList CacheList;
|
||||
std::string cache_directory;
|
||||
void yshowCacheInfo(CyhookHandler *hh);
|
||||
void yCacheClear(CyhookHandler *hh);
|
||||
public:
|
||||
static pthread_mutex_t mutex;
|
||||
static pthread_mutex_t mutex;
|
||||
|
||||
CmodCache(){};
|
||||
~CmodCache(void){};
|
||||
CmodCache() {
|
||||
}
|
||||
;
|
||||
~CmodCache(void) {
|
||||
}
|
||||
;
|
||||
|
||||
void AddToCache(CyhookHandler *hh, std::string url, std::string content, std::string mime_type, std::string cartegory="none");
|
||||
static void RemoveURLFromCache(std::string url);
|
||||
static void RemoveCategoryFromCache(std::string category);
|
||||
static void DeleteCache(void);
|
||||
void AddToCache(CyhookHandler *hh, std::string url, std::string content,
|
||||
std::string mime_type, std::string cartegory = "none");
|
||||
static void RemoveURLFromCache(std::string url);
|
||||
static void RemoveCategoryFromCache(std::string category);
|
||||
static void DeleteCache(void);
|
||||
|
||||
// Hooks
|
||||
virtual THandleStatus Hook_PrepareResponse(CyhookHandler *hh);
|
||||
virtual THandleStatus Hook_SendResponse(CyhookHandler *hh);
|
||||
virtual std::string getHookVersion(void) {return std::string("$Revision: 1.2 $");}
|
||||
virtual std::string getHookName(void) {return std::string("mod_cache");}
|
||||
virtual THandleStatus Hook_ReadConfig(CConfigFile *Config, CStringList &ConfigList);
|
||||
virtual THandleStatus Hook_ReadConfig(CConfigFile *Config,CStringList &ConfigList);
|
||||
};
|
||||
|
||||
#endif /* __yhttpd_mod_cache_h__ */
|
||||
|
Reference in New Issue
Block a user