2023-02-25 22:58:28 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CKDefines.hpp"
|
|
|
|
#include "CKEnums.hpp"
|
|
|
|
#include "VTEncoding.hpp"
|
2023-02-26 13:57:32 +08:00
|
|
|
#include "VTObjects.hpp"
|
2023-02-25 22:58:28 +08:00
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
namespace LibCmo {
|
|
|
|
|
|
|
|
class CKMinContext {
|
|
|
|
public:
|
|
|
|
CKMinContext();
|
|
|
|
CKMinContext(const CKMinContext&) = delete;
|
|
|
|
CKMinContext& operator=(const CKMinContext&) = delete;
|
|
|
|
~CKMinContext();
|
|
|
|
|
|
|
|
void Printf(CKSTRING fmt, ...);
|
|
|
|
|
2023-02-26 13:57:32 +08:00
|
|
|
ObjsImpl::CKObject* CreateObject(CK_ID id, CK_CLASSID cls, CKSTRING name);
|
2023-02-25 22:58:28 +08:00
|
|
|
void DestroyObject(ObjsImpl::CKObject* obj);
|
|
|
|
|
|
|
|
void GetUtf8ObjectName(std::string& native_name, std::string& u8_name);
|
|
|
|
void GetNativeObjectName(std::string& u8_name, std::string& native_name);
|
|
|
|
|
|
|
|
void SetEncoding(CKSTRING encoding);
|
|
|
|
void SetTempPath(CKSTRING u8_temp);
|
|
|
|
|
|
|
|
FILE* OpenTempFile(CKSTRING u8_filename, bool is_read);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void RefetchEncodingToken(void);
|
|
|
|
|
|
|
|
std::string NameEncoding;
|
|
|
|
Encoding::ENCODING_TOKEN NameEncodingToken;
|
|
|
|
std::filesystem::path TempFolder;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|