xj qian
2024-06-27 e4b4c508c599943ddb22b7d4868ccd40ac05a043
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "xobject.hpp"
#include "xnative.hpp"
#include <kobject/kapp.hpp>
#include <kobject/kcachemgr.hpp>
 
using kcachemgr = Hxsoft::XFrame::xfCacheMgr;
class xcachemgr : public xnative
{
public:
    kcachemgr* GetCacheMgr()
    {
        return (kcachemgr*)getNativePointer();
    }
public:
    int InsertCacheFile(LPTSTR pStrUrl, LPTSTR pCacheFile, DWORD ver = 0)
    {
        return GetCacheMgr()->InsertCacheFile(pStrUrl, pCacheFile, ver);
    }
    LPCTSTR GetCacheFile(LPTSTR pStrUrl)
    {
        return GetCacheMgr()->GetCacheFile(pStrUrl);
    }
    DWORD GetCacheVersion(LPTSTR pStrUrl)
    {
        return GetCacheMgr()->GetCacheVersion(pStrUrl);
    }
public:
    void CacheObject(LPCTSTR pUrl, void* pObject)
    {
        return GetCacheMgr()->CacheObject(pUrl, pObject);
    }
    void* GetCacheObject(LPCTSTR pUrl)
    {
        return GetCacheMgr()->GetCacheObject(pUrl);
    }
};