summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/stdafx.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src/stdafx.h')
-rw-r--r--plugins/PluginUpdater/src/stdafx.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/plugins/PluginUpdater/src/stdafx.h b/plugins/PluginUpdater/src/stdafx.h
index 62b5086088..a9628fb7ca 100644
--- a/plugins/PluginUpdater/src/stdafx.h
+++ b/plugins/PluginUpdater/src/stdafx.h
@@ -77,20 +77,22 @@ extern "C"
#define MODULE L"Plugin Updater"
#define DEFAULT_UPDATES_FOLDER L"Plugin Updates"
+typedef wchar_t TFileName[MAX_PATH];
+
struct FILEURL
{
- wchar_t tszDownloadURL[2048];
- wchar_t tszDiskPath[MAX_PATH];
+ wchar_t wszDownloadURL[2048];
+ TFileName wszDiskPath;
int CRCsum;
};
struct FILEINFO
{
- wchar_t tszOldName[MAX_PATH], tszNewName[MAX_PATH];
+ TFileName wszOldName, wszNewName;
FILEURL File;
- bool bEnabled, bDeleteOnly;
+ bool bEnabled, bDeleteOnly;
- bool IsFiltered(const CMStringW &wszFilter);
+ bool IsFiltered(const CMStringW &wszFilter);
};
typedef OBJLIST<FILEINFO> FILELIST;
@@ -151,7 +153,7 @@ enum
using namespace std;
extern DWORD g_mirandaVersion;
-extern wchar_t g_tszRoot[MAX_PATH], g_tszTempPath[MAX_PATH];
+extern wchar_t g_wszRoot[MAX_PATH], g_wszTempPath[MAX_PATH];
extern HANDLE hPipe;
extern HNETLIBUSER hNetlibUser;
@@ -250,9 +252,9 @@ void UnloadNetlib();
void CALLBACK RestartPrompt(void *);
-int BackupFile(wchar_t *ptszSrcFileName, wchar_t *ptszBackFileName);
+int BackupFile(wchar_t *pwszSrcFileName, wchar_t *pwszBackFileName);
-bool ParseHashes(const wchar_t *ptszUrl, ptrW &baseUrl, SERVLIST &arHashes);
+bool ParseHashes(const wchar_t *pwszUrl, ptrW &baseUrl, SERVLIST &arHashes);
int CompareHashes(const ServListEntry *p1, const ServListEntry *p2);
wchar_t* GetDefaultUrl();
@@ -262,19 +264,21 @@ void ShowPopup(LPCTSTR Title, LPCTSTR Text, int Number);
void CheckUpdateOnStartup();
void __stdcall InitTimer(void *type);
-int unzip(const wchar_t *ptszZipFile, wchar_t *ptszDestPath, wchar_t *ptszBackPath,bool ch);
+int unzip(const wchar_t *pwszZipFile, wchar_t *pwszDestPath, wchar_t *pwszBackPath, bool ch);
///////////////////////////////////////////////////////////////////////////////
-int CalculateModuleHash(const wchar_t *tszFileName, char *dest);
+int CalculateModuleHash(const wchar_t *pwszFileName, char *dest);
BOOL IsProcessElevated();
bool PrepareEscalation();
-int SafeCreateDirectory(const wchar_t *ptszDirName);
-int SafeCopyFile(const wchar_t *ptszSrc, const wchar_t *ptszDst);
-int SafeMoveFile(const wchar_t *ptszSrc, const wchar_t *ptszDst);
-int SafeDeleteFile(const wchar_t *ptszSrc);
+void CreateWorkFolders(TFileName &wszTempFolder, TFileName &wszBackupFolder);
+
+int SafeCreateDirectory(const wchar_t *pwszDirName);
+int SafeCopyFile(const wchar_t *pwszSrc, const wchar_t *pwszDst);
+int SafeMoveFile(const wchar_t *pwszSrc, const wchar_t *pwszDst);
+int SafeDeleteFile(const wchar_t *pwszSrc);
int SafeCreateFilePath(const wchar_t *pFolder);
char* StrToLower(char *str);