From 74e691804c25c6174cb619d21b19fb5dc94afa22 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 29 Oct 2020 19:21:32 +0300 Subject: Plugin Updater: pu_stub utilities moved to mir_app --- include/m_utils.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include') diff --git a/include/m_utils.h b/include/m_utils.h index f2e3095a31..da87379899 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -411,4 +411,28 @@ struct ENTER_STRING EXTERN_C MIR_APP_DLL(bool) EnterString(ENTER_STRING *pForm); +///////////////////////////////////////////////////////////////////////////////////////// +// pu_stub utilities + +namespace PU +{ + // Checks if we're working via pu_stub or not + MIR_APP_DLL(bool) IsDirect(); + + // Checks if a process has enough rights to write into Miranda's folder + MIR_APP_DLL(bool) IsProcessElevated(); + + // Launches pu_stub.exe with elevated priviledges if needed + MIR_APP_DLL(bool) PrepareEscalation(); + + MIR_APP_DLL(int) SafeCopyFile(const wchar_t *pSrc, const wchar_t *pDst); + MIR_APP_DLL(int) SafeMoveFile(const wchar_t *pSrc, const wchar_t *pDst); + MIR_APP_DLL(int) SafeDeleteFile(const wchar_t *pwszFile); + MIR_APP_DLL(int) SafeCreateDirectory(const wchar_t *pwszFolder); + MIR_APP_DLL(int) SafeDeleteDirectory(const wchar_t *pwszDirName); + MIR_APP_DLL(int) SafeCreateFilePath(const wchar_t *pwszFolder); + + +}; + #endif // M_UTILS_H__ -- cgit v1.2.3