My Project
Static Public Member Functions | List of all members
ParaScripting::JabberClientManager Class Reference

jabber client manager or factory More...

#include <ParaScriptingJabberClient.h>

Static Public Member Functions

static NPLJabberClient GetJabberClient (const char *sJID)
 get an existing jabber client instance interface by its JID. More...
 
static NPLJabberClient CreateJabberClient (const char *sJID)
 Create a new jabber client instance with the given jabber client ID. More...
 
static bool CloseJabberClient (const char *sJID)
 close a given jabber client instance. More...
 
static void AddStringMap (int nID, const char *sString)
 add string a string mapping. More...
 
static void ClearStringMap ()
 clear all string mapping
 

Detailed Description

jabber client manager or factory

Member Function Documentation

§ AddStringMap()

static void ParaScripting::JabberClientManager::AddStringMap ( int  nID,
const char *  sString 
)
static

add string a string mapping.

We will automatically encode NPL filename string if it is in this string map. It means shorter message sent over the network. use AddStringMap whenever you want to add a string to the map. Please note, that the sender and the receiver must maintain the same string map in memory in order to have consistent string translation result. the function is static, it will apply to all client instances.

Parameters
nIDthe integer to encode the string. it is usually positive.
sStringthe string for the id. if input is NULL, it means removing the mapping of nID.

§ CloseJabberClient()

static bool ParaScripting::JabberClientManager::CloseJabberClient ( const char *  sJID)
static

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

Parameters
sJIDsuch as "lixizhi@paraweb3d.com", if this is "", it will close all jabber clients.

§ CreateJabberClient()

static NPLJabberClient ParaScripting::JabberClientManager::CreateJabberClient ( const char *  sJID)
static

Create a new jabber client instance with the given jabber client ID.

It does not open a connection immediately.

Parameters
sJIDsuch as "lixizhi@paraweb3d.com"

§ GetJabberClient()

static NPLJabberClient ParaScripting::JabberClientManager::GetJabberClient ( const char *  sJID)
static

get an existing jabber client instance interface by its JID.

If the client is not created using CreateJabberClient() before, function may return NULL.

Parameters
sJIDsuch as "lixizhi@paraweb3d.com"

The documentation for this class was generated from the following file: