11 #include "RNPlatform/Inc/MemoryTracking.h"
12 #ifndef _PRODUCTPATCHER_H_
13 #define _PRODUCTPATCHER_H_
20 #include "RNPlatform/Inc/SysTime.h"
21 #include "RNPlatform/Inc/ThreadClass.h"
22 #include "RNPlatform/Inc/Thread.h"
24 namespace RNReplicaNet
50 bool Start(
const char *productPath,
const char *patchIndexURL,
const char *patchDataURL,
const bool multiThread =
false,
const size_t chunkSize = 1024*1024);
93 void OpenInternet(
void);
95 int ThreadEntry(
void);
96 int RealThreadEntry(
const char *productPath,
const char *patchIndexURL,
const char *patchDataURL);
97 std::string GetRealFilePath(
const char *url,
const char *patchingFile,
const char *tempName = 0);
99 std::string mProductPath;
100 std::string mPatchIndexURL;
101 std::string mPatchDataURL;
108 volatile bool mCallCompleteRequired;
112 size_t mDownloadAttempts;
113 size_t mDownloadAttemptsFailed;
115 size_t mDownloadedBytes;
116 SysTimeType mDownloadedOverTime;
void GetDownloadSpeed(size_t &totalBytes, float &overTime) const
Gets information that can be used to calculate the download speed.
virtual void CallbackFailedToReadFile(const char *file)
A virtual callback that is triggered when there is an error.
Definition: ProductPatcher.h:32
bool Start(const char *productPath, const char *patchIndexURL, const char *patchDataURL, const bool multiThread=false, const size_t chunkSize=1024 *1024)
virtual void CallbackComplete(const Status status)
A virtual callback that is triggered when the patching is complete.
void GetDownloadAttemptsAndFailed(size_t &attempts, size_t &failed) const
virtual bool CallbackUpdateProgressFile(const char *patchingFile, const size_t filePosition, const size_t fileLength)
virtual bool CallbackUpdateDownloadPatch(const char *patchingFile, const size_t filePosition, const size_t fileLength)
virtual bool CallbackProcessFile(const char *file)
virtual bool CallbackUpdateProgressProduct(const size_t fileIndex, const size_t maxFileIndex)
Definition: ThreadClass.h:96