My Project
|
interface of NPL web service client. More...
#include <IParaWebService.h>
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 More... | |
virtual bool | CloseWebService (const char *sURL)=0 |
close a given web service. More... | |
virtual INPLJabberClient * | GetJabberClient (const char *sJID)=0 |
get an existing jabber client instance interface by its JID. More... | |
virtual INPLJabberClient * | CreateJabberClient (const char *sJID)=0 |
Create a new jabber client instance with the given jabber client ID. More... | |
virtual bool | CloseJabberClient (const char *sJID)=0 |
close a given jabber client instance. More... | |
virtual void | AsyncDownload (const char *url, const char *destFolder, const char *callbackScript, const char *DownloaderName)=0 |
Asynchronously download a file from the url. More... | |
virtual void | CancelDownload (const char *DownloaderName)=0 |
cancel all asynchronous downloads that matches a certain downloader name pattern More... | |
virtual int | Download (const char *url, const char *destFolder, const char *callbackScript, const char *DownloaderName)=0 |
Synchronous call of the function AsyncDownload(). More... | |
virtual int | ProcessResults ()=0 |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface More... | |
virtual int | ProcessDownloaderResults ()=0 |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface More... | |
virtual void | DeleteThis ()=0 |
delete this object when it is no longer needed. More... | |
virtual bool | AppendURLRequest (CURLRequestTask *pUrlTask, const char *sPoolName=NULL)=0 |
Append URL request to a pool. More... | |
virtual bool | ChangeRequestPoolSize (const char *sPoolName, int nCount)=0 |
There is generally no limit to the number of requests sent. More... | |
virtual int | ProcessUrlRequests ()=0 |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface More... | |
interface of NPL web service client.
this class is usually implemented by .Net plug-in. See ParaEnginePlugin/NPLWebServiceClient class ID is WEBSERVICECLIENT_CLASS_ID
|
pure virtual |
Append URL request to a pool.
connections in the same pool are reused as much as possible. There is generally no limit to the number of requests sent. However, each pool has a specified maximum number of concurrent worker slots. the default number is 1. One can change this number with ChangeRequestPoolSize.
pUrlTask | must be new CURLRequestTask(), the ownership of the task is transfered to the manager. so the caller should never delete the pointer. |
sPoolName | the request pool name. If the pool does not exist, it will be created. If null, the default pool is used. |
Implemented in ParaEngine::CNPLNetClient.
|
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} |
Implemented in ParaEngine::CNPLNetClient.
|
pure virtual |
cancel all asynchronous downloads that matches a certain downloader name pattern
DownloaderName:regular | expression. such as "proc1", "proc1.*", ".*" |
Implemented in ParaEngine::CNPLNetClient.
|
pure virtual |
There is generally no limit to the number of requests sent.
However, each pool has a specified maximum number of concurrent worker slots. the default number is 1. One can change this number with this function.
Implemented in ParaEngine::CNPLNetClient.
|
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" |
Implemented in ParaEngine::CNPLNetClient.
|
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
Implemented in ParaEngine::CNPLNetClient.
|
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" |
Implemented in ParaEngine::CNPLNetClient.
|
pure virtual |
delete this object when it is no longer needed.
Implemented in ParaEngine::CNPLNetClient.
|
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.
Implemented in ParaEngine::CNPLNetClient.
|
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" |
Implemented in ParaEngine::CNPLNetClient.
|
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 |
Implemented in ParaEngine::CNPLNetClient.
|
pure virtual |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface
Implemented in ParaEngine::CNPLNetClient.
|
pure virtual |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface
Implemented in ParaEngine::CNPLNetClient.
|
pure virtual |
this function is called once on each frame to polling all results and calling the callbacks in scripting interface
Implemented in ParaEngine::CNPLNetClient.