#pragma once #include "CKDefines.hpp" #include "CKEnums.hpp" #include "VTEncoding.hpp" #include "VTObjects.hpp" #include namespace LibCmo { class CKMinContext { public: CKMinContext(); CKMinContext(const CKMinContext&) = delete; CKMinContext& operator=(const CKMinContext&) = delete; ~CKMinContext(); void Printf(CKSTRING fmt, ...); ObjsImpl::CKObject* CreateObject(CK_ID id, CK_CLASSID cls, CKSTRING name); 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; }; }