C++客户端开发接口库 V5.1.8.15
连接信创集成中间件服务程序的二次开发接口
载入中...
搜索中...
未找到
AutoUpdateHelper.h
1#pragma once
2#include <string>
3#include <mutex>
4#include "MidLinkComm.h"
5#include "mdwclient_global.h"
6
7namespace mdwc
8{
10 class MDWC_COMPLILE CAutoUpdateHelper
11 {
12 private:
14 mutable std::mutex m_errorMutex;
16 int m_iLassErrorCode;
17
19 std::string m_sLastErrorMsg;
21 void SetLastError(int iErrorCode, const std::string& sErrorMsg);
22 private:
23 // 禁止拷贝构造函数
24 CAutoUpdateHelper(const CAutoUpdateHelper&) = delete;
25 // 禁止拷贝赋值运算符
26 CAutoUpdateHelper& operator=(const CAutoUpdateHelper&) = delete;
27 public:
32 std::string GetLastErrorMessage();
33
38 int GetLastErrorCode();
39
51 int CheckUpdateSoftWare(const std::string& sProductTag, const std::string& sVersion,
52 std::string& sPackFileName, int64_t& iPackFileSize, std::string& sPackFileMD5, CMidLinkComm* comm = nullptr);
53
62 bool UpdateLocalSoft(const std::string& sPackFileName, int64_t iPackFileSize, const std::string& sPackFileMD5, const std::string& sRunPrgName);
63
65 CAutoUpdateHelper();
67 ~CAutoUpdateHelper();
68 };
69}
int CheckUpdateSoftWare(const std::string &sProductTag, const std::string &sVersion, std::string &sPackFileName, int64_t &iPackFileSize, std::string &sPackFileMD5, CMidLinkComm *comm=nullptr)
定义 AutoUpdateHelper.cpp:52
bool UpdateLocalSoft(const std::string &sPackFileName, int64_t iPackFileSize, const std::string &sPackFileMD5, const std::string &sRunPrgName)
定义 AutoUpdateHelper.cpp:110
int GetLastErrorCode()
定义 AutoUpdateHelper.cpp:37
std::string GetLastErrorMessage()
定义 AutoUpdateHelper.cpp:29
定义 AutoUpdateHelper.h:8