this class is usually implemented by .Net plug-in. See ParaEnginePlugin/NPLWebServiceClient class ID is WEBSERVICECLIENT_CLASS_ID
Public Member Functions | |
virtual INPLWebService * | GetWebService (const char *sURL)=0 |
get the web service interface by its URL, if the web service does not exists it will return NULL, in which case one needs to call OpenWebService() | |
virtual INPLWebService * | OpenWebService (const char *sURL, const char *sUserName, const char *sPassword, const char *sDomain)=0 |
open a new web service with optional credentials | |
virtual bool | CloseWebService (const char *sURL)=0 |
close a given web service. | |
virtual INPLJabberClient * | GetJabberClient (const char *sJID)=0 |
get an existing jabber client instance interface by its JID. | |
virtual INPLJabberClient * | CreateJabberClient (const char *sJID)=0 |
Create a new jabber client instance with the given jabber client ID. | |
virtual bool | CloseJabberClient (const char *sJID)=0 |
close a given jabber client instance. | |
virtual void | AsyncDownload (const char *url, const char *destFolder, const char *callbackScript, const char *DownloaderName)=0 |
Asynchronously download a file from the url. | |
virtual void | CancelDownload (const char *DownloaderName)=0 |
cancel all asynchronous downloads that matches a certain downloader name pattern | |
virtual int | Download (const char *url, const char *destFolder, const char *callbackScript, const char *DownloaderName)=0 |
Synchronous call of the function AsyncDownload(). | |
virtual int | ProcessResults ()=0 |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface | |
virtual int | ProcessDownloaderResults ()=0 |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface | |
virtual void | DeleteThis ()=0 |
delete this object when it is no longer needed. |
virtual INPLWebService* ParaEngine::INPLWebServiceClient::OpenWebService | ( | const char * | sURL, | |
const char * | sUserName, | |||
const char * | sPassword, | |||
const char * | sDomain | |||
) | [pure virtual] |
open a new web service with optional credentials
sURL,: | url of the web service, such as http://paraengine.com/test.asmx | |
sUserName | the user name associated with the credentials | |
sPassword | the password for the user name associated with the credentials. | |
sDomain | the domain or computer name that verifies the credentials |
virtual bool ParaEngine::INPLWebServiceClient::CloseWebService | ( | const char * | sURL | ) | [pure virtual] |
close a given web service.
Basically, there is no need to close a web service, unless one wants to reopen it with different credentials
virtual INPLJabberClient* ParaEngine::INPLWebServiceClient::GetJabberClient | ( | const char * | sJID | ) | [pure virtual] |
get an existing jabber client instance interface by its JID.
If the client is not created using CreateJabberClient() before, function may return NULL.
sJID,: | such as "lixizhi@paraweb3d.com" |
virtual INPLJabberClient* ParaEngine::INPLWebServiceClient::CreateJabberClient | ( | const char * | sJID | ) | [pure virtual] |
Create a new jabber client instance with the given jabber client ID.
It does not open a connection immediately.
sJID,: | such as "lixizhi@paraweb3d.com" |
virtual bool ParaEngine::INPLWebServiceClient::CloseJabberClient | ( | const char * | sJID | ) | [pure virtual] |
close a given jabber client instance.
Basically, there is no need to close a web service, unless one wants to reopen it with different credentials
sJID,: | such as "lixizhi@paraweb3d.com" |
virtual void ParaEngine::INPLWebServiceClient::AsyncDownload | ( | const char * | url, | |
const char * | destFolder, | |||
const char * | callbackScript, | |||
const char * | DownloaderName | |||
) | [pure virtual] |
Asynchronously download a file from the url.
callbackScript,: | script code to be called, a global variable called msg is assigned, as below msg = {DownloadState=""|"complete"|"terminated", totalFileSize=number, currentFileSize=number, PercentDone=number} |
virtual void ParaEngine::INPLWebServiceClient::CancelDownload | ( | const char * | DownloaderName | ) | [pure virtual] |
cancel all asynchronous downloads that matches a certain downloader name pattern
DownloaderName:regular | expression. such as "proc1", "proc1.*", ".*" |
virtual int ParaEngine::INPLWebServiceClient::Download | ( | const char * | url, | |
const char * | destFolder, | |||
const char * | callbackScript, | |||
const char * | DownloaderName | |||
) | [pure virtual] |
Synchronous call of the function AsyncDownload().
This function will not return until download is complete or an error occurs. this function is rarely used. AsyncDownload() is used.
virtual int ParaEngine::INPLWebServiceClient::ProcessResults | ( | ) | [pure virtual] |
virtual int ParaEngine::INPLWebServiceClient::ProcessDownloaderResults | ( | ) | [pure virtual] |
virtual void ParaEngine::INPLWebServiceClient::DeleteThis | ( | ) | [pure virtual] |
delete this object when it is no longer needed.