This is used to create an application using interprocess communication.
More...
#include <AutoUpdaterApp.h>
|
typedef std::list< std::string > | Domain_Map_t |
|
|
static int | MatchFilePattern (const std::string &input, const std::string &sPattern) |
| whether the input string match a given file pattern. More...
|
|
static bool | IsAlphaNumeric (char c) |
|
This is used to create an application using interprocess communication.
§ BeginCoreUpdate()
bool ParaEngine::CAutoUpdaterApp::BeginCoreUpdate |
( |
const char * |
sCurVersion, |
|
|
const char * |
sSessionDir |
|
) |
| |
|
virtual |
begin core update.
one can use TryGetNextCoreUpdateMessage() to process the update message.
- Parameters
-
sCurVersion | "0" is forcing full update, "" is using the current version in the current working directory. or a version number like "0.2.70" |
sSessionDir | we will keep temporary download file under update/[sUpdaterName]/[version] directory. if this is NULL, we will use the default name "web" |
§ DoCoreUpdate_imp()
int ParaEngine::CAutoUpdaterApp::DoCoreUpdate_imp |
( |
| ) |
|
|
protected |
update the core game engine.
§ IsUrlTrusted()
bool ParaEngine::CAutoUpdaterApp::IsUrlTrusted |
( |
const std::string & |
sUrl | ) |
|
|
virtual |
whether the url is from a trusted web domain.
§ MatchFilePattern()
int ParaEngine::CAutoUpdaterApp::MatchFilePattern |
( |
const std::string & |
input, |
|
|
const std::string & |
sPattern |
|
) |
| |
|
staticprotected |
whether the input string match a given file pattern.
Only wild card * is supported, where * can only match to AlphaNumeric character. e.g : assert(MatchFilePattern("http://update.paraengine.com/webplayer/redist1.exe", "http://*.paraengine.com/webplayer/") == 1) assert(MatchFilePattern("http://www.paraengine.com/webplayer/redist1.exe", "http://*.paraengine.com/webplayer/*.*") == 0) assert(MatchFilePattern("http://www.paraengine.com/webplayer/redist1.exe", "http://*.paraengine.com/*") == -1)
- Returns
- 0 if it is a perfect match. 1 if the beginning of input matches the sPattern perfectly. or -1 if something does not match.
§ OnProgress()
§ SendError()
void ParaEngine::CAutoUpdaterApp::SendError |
( |
int |
nErrorCode, |
|
|
const char * |
errorMsg = NULL |
|
) |
| |
|
virtual |
send error message to host app.
§ SendHostMsg()
bool ParaEngine::CAutoUpdaterApp::SendHostMsg |
( |
int |
nMsg, |
|
|
DWORD |
param1 = 0 , |
|
|
DWORD |
param2 = 0 , |
|
|
const char * |
filename = NULL , |
|
|
const char * |
sCode = NULL , |
|
|
int |
nPriority = 0 |
|
) |
| |
|
virtual |
§ SendLog()
void ParaEngine::CAutoUpdaterApp::SendLog |
( |
const char * |
logMsg | ) |
|
|
virtual |
send log message to host app.
§ SetAppDir()
int ParaEngine::CAutoUpdaterApp::SetAppDir |
( |
| ) |
|
|
virtual |
set working directory
- Returns
- : -1 if app_dir is not allowed. it must be in user's local dir. return 0 if succeed.
§ SetCommandLine()
int ParaEngine::CAutoUpdaterApp::SetCommandLine |
( |
const char * |
sCmdLine | ) |
|
|
virtual |
init command line so that we can use IPC calls before calling Run() method.
- Returns
- 0 if command line is empty or not changed. otherise return 1.
Reimplemented in ParaEngine::CInterprocessAppClient.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClientApp/AutoUpdaterApp.h
- Client/trunk/ParaEngineClientApp/AutoUpdaterApp.cpp