summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-10-29 19:21:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-10-29 19:21:32 +0300
commit74e691804c25c6174cb619d21b19fb5dc94afa22 (patch)
tree98625fbff7a1c7da877f208e13d0e49962ddffa1 /include
parent21aaad51c5e0bcf7157bd8e37e6e8ee0d1e55525 (diff)
Plugin Updater: pu_stub utilities moved to mir_app
Diffstat (limited to 'include')
-rw-r--r--include/m_utils.h24
1 files changed, 24 insertions, 0 deletions
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__