|
My Project
|
auto updater interface. More...
#include <AutoUpdaterClient.h>
Classes | |
| class | IAutoUpdaterCallback |
| progress call back. More... | |
| struct | ProgressMessage |
| progress message More... | |
Public Types | |
| enum | AutoUpdaterProgress { AUP_NOT_STARTED, AUP_STARTED, AUP_NOCHANGE, AUP_UNKNOWN, AUP_BROKENFILE, AUP_ERROR, AUP_PROGRESS, AUP_COMPLETED, AUP_DO_APPLY_PATCH } |
| auto update progress | |
Public Member Functions | |
| virtual void | SetUpdaterDllPath (const char *sDllPath=NULL)=0 |
| set the autoupdater.dll file path More... | |
| virtual void | OnProgress (AutoUpdaterProgress eventType, const char *msg=NULL, int finishcount=0, int allcount=0)=0 |
| This function is called for update progress. | |
| virtual int | BeginUpdate (const std::string &curVersion, const char *sUpdaterName=NULL)=0 |
| start updating the client in the current working directory. More... | |
| virtual void | ActivateAutoUpdater (const std::string &sMsg)=0 |
| call the auto updater. More... | |
| virtual void | OnMessageCallback (NPLInterface::NPLObjectProxy &msg)=0 |
| this function is called whenever we receive a message from autoupdater.dll | |
| virtual AutoUpdaterProgress | WaitForCompletion (IAutoUpdaterCallback *pCallback=0)=0 |
| this function returns until auto updater is finished. More... | |
| virtual bool | GetUpdaterMessage (ProgressMessage &msg)=0 |
| Get a progress message from the queue. More... | |
| virtual bool | PeekUpdaterMessage (ProgressMessage &msg)=0 |
| Peek a progress message from the queue. More... | |
| virtual void | ExitUpdater ()=0 |
| join all threads and unload dll. More... | |
| virtual void | ApplyPatch ()=0 |
| apply the recently downloaded patch | |
auto updater interface.
|
pure virtual |
call the auto updater.
Implemented in NPL::CAutoUpdaterClient.
|
pure virtual |
start updating the client in the current working directory.
| curVersion | 0 is forcing full update, -1 is using the current version in the current working directory. or a version number like "0.2.70" |
| sUpdaterName | we will keep temporary download file under update/[sUpdaterName]/[version] directory. if this is NULL, we will use the default name "web" |
Implemented in NPL::CAutoUpdaterClient.
|
pure virtual |
join all threads and unload dll.
This function is automatically called when the interface is cleaned up.
Implemented in NPL::CAutoUpdaterClient.
|
pure virtual |
Get a progress message from the queue.
This function will block until a message arrive, much like the Win32 API.
Implemented in NPL::CAutoUpdaterClient.
|
pure virtual |
Peek a progress message from the queue.
This function will return false if there is no message in the queue, much like the Win32 API.
Implemented in NPL::CAutoUpdaterClient.
|
pure virtual |
set the autoupdater.dll file path
| sDllPath | if not set, it will default to "AutoUpdater.dll" in the current working directory. |
Implemented in NPL::CAutoUpdaterClient.
|
pure virtual |
this function returns until auto updater is finished.
One can use GetMessage() and PeekMessage() instead of this function.
| pCallback | the caller can implement the interface. The callback will be called in the main thread. So there is no threading issues. return the last progress message. |
Implemented in NPL::CAutoUpdaterClient.
1.8.12