ParaEngine::INPLJabberClient Class Reference

List of all members.

Detailed Description

NPL interface of a Jabber-XMPP client proxy.


Public Member Functions

virtual void SetUser (const char *User)=0
 The username to connect as.
virtual const char * GetUser ()=0
 The username to connect as.
virtual void SetPriority (int nPriority)=0
 Priority for this connection.
virtual int GetPriority ()=0
 Priority for this connection.
virtual void SetPassword (const char *Password)=0
 The password to use for connecting.
virtual const char * GetPassword ()=0
 The password to use for connecting.
virtual void SetAutoLogin (bool AutoLogin)=0
 Automatically log in on connection.
virtual bool GetAutoLogin ()=0
 Automatically log in on connection.
virtual void SetAutoRoster (bool AutoRoster)=0
 Automatically retrieve roster on connection.
virtual bool GetAutoRoster ()=0
 Automatically retrieve roster on connection.
virtual void SetAutoIQErrors (bool AutoIQErrors)=0
 Automatically send back 501/feature-not-implemented to IQs that have not been handled.
virtual bool GetAutoIQErrors ()=0
 Automatically send back 501/feature-not-implemented to IQs that have not been handled.
virtual void SetAutoPresence (bool AutoPresence)=0
 Automatically send presence on connection.
virtual bool GetAutoPresence ()=0
 Automatically send presence on connection.
virtual void SetResource (const char *Resource)=0
 The connecting resource.
virtual const char * GetResource ()=0
 The connecting resource.
virtual void SetIsAuthenticated (bool IsAuthenticated)=0
 Are we currently connected?
virtual bool GetIsAuthenticated ()=0
 Are we currently connected?
virtual void SetServer (const char *Server)=0
 The name of the server to connect to.
virtual const char * GetServer ()=0
 The name of the server to connect to.
virtual void SetNetworkHost (const char *NetworkHost)=0
 The address to use on the "to" attribute of the stream:stream.
virtual const char * GetNetworkHost ()=0
 The address to use on the "to" attribute of the stream:stream.
virtual void SetPort (int Port)=0
 Automatically send presence on connection.
virtual int GetPort ()=0
 The TCP port to connect to.
virtual void SetPlaintextAuth (bool PlaintextAuth)=0
 Allow plaintext authentication? default to false.
virtual bool GetPlaintextAuth ()=0
 Allow plaintext authentication? default to false.
virtual bool IsSSLon ()=0
 Is the current connection SSL/TLS protected?
virtual bool IsCompressionOn ()=0
 Is the current connection XEP-138 compressed?
virtual void SetSSL (bool SSL)=0
 Do SSL3/TLS1 on startup.
virtual bool GetSSL ()=0
 Do SSL3/TLS1 on startup.
virtual void SetAutoStartTLS (bool AutoStartTLS)=0
 Allow Start-TLS on connection, if the server supports it.
virtual bool GetAutoStartTLS ()=0
 Allow Start-TLS on connection, if the server supports it.
virtual void SetAutoStartCompression (bool AutoStartCompression)=0
 Allow start compression on connection, if the server supports it.
virtual bool GetAutoStartCompression ()=0
 Allow start compression on connection, if the server supports it.
virtual void SetKeepAlive (float KeepAlive)=0
 Time, in seconds, between keep-alive spaces.
virtual float GetKeepAlive ()=0
 Time, in seconds, between keep-alive spaces.
virtual void SetAutoReconnect (float AutoReconnect)=0
 Seconds before automatically reconnecting if the connection drops.
virtual float GetAutoReconnect ()=0
 Seconds before automatically reconnecting if the connection drops.
virtual const char * GetServerVersion ()=0
 The version string returned in the server's open stream element.
virtual void SetRequiresSASL (bool RequiresSASL)=0
 Is SASL required? This will default to true in the future.
virtual bool GetRequiresSASL ()=0
 Is SASL required? This will default to true in the future.
virtual bool Connect ()=0
 Connect to the server.
virtual void Close ()=0
 Close down the connection, as gracefully as possible.
virtual bool WriteNPLMessage (const char *to, const char *neuronfile, const char *sCode)=0
 Send a NPL message.
virtual bool WriteRawString (const char *rawstring)=0
 Send raw string.
virtual bool Login ()=0
 Initiate the auth process.
virtual bool SetPresence (int t, const char *status, const char *show, int priority)=0
 / Send a presence packet to the server /
Parameters:
t What kind? public enum PresenceType { / None specified available = -1, / May I subscribe to you? subscribe, / Yes, you may subscribe.

virtual bool Message (int t, const char *to, const char *body)=0
 / Send a message packet to another user /
Parameters:
t What kind? public enum MessageType { / Normal message normal = -1, / Error message error, / Chat (one-to-one) message chat, / Groupchat groupchat, / Headline headline }
/
Parameters:
to Who to send it to?
/
Parameters:
body The message.

virtual bool Message (const char *to, const char *body)=0
 Send a message packet to another user
Parameters:
to Who to send it to?
body The message.

virtual void GetRoster ()=0
 Request a new copy of the roster.
virtual bool Subscribe (const char *to, const char *nickname, const char *groups)=0
 in Jabber, a contact list is called a roster / Send a presence subscription request and update the roster for a new roster contact.
virtual void RemoveRosterItem (const char *to)=0
 in Jabber, a contact list is called a roster / Remove an item from the roster.
virtual bool AllowSubscription (const char *to, bool bAllow)=0
 this function is called in OnSubscription method to confirm or refuse a subscription request from another user.
virtual void GetAgents ()=0
 Request a list of agents from the server.
virtual bool Register (const char *jid)=0
 Attempt to register a new user.
virtual const char * GetRosterItemDetail (const char *jid)=0
 Retrieve details of a given roster item.
virtual const char * GetRosterGroups ()=0
 The group names for the roster as a string.
virtual const char * GetRosterItems ()=0
 The Roster Item names as a string.
virtual void AddEventListener (int nListenerType, const char *callbackScript)=0
 add a NPL call back script to a given even listener
virtual void RemoveEventListener (int nListenerType, const char *callbackScript)=0
 remove a NPL call back script from a given even listener
virtual void ClearEventListener (int nListenerType)=0
 clear all NPL call back script from a given even listener
virtual void ResetAllEventListeners ()=0
 clear all registered event listeners


Member Function Documentation

virtual void ParaEngine::INPLJabberClient::SetUser ( const char *  User  )  [pure virtual]

The username to connect as.

virtual const char* ParaEngine::INPLJabberClient::GetUser (  )  [pure virtual]

The username to connect as.

virtual void ParaEngine::INPLJabberClient::SetPriority ( int  nPriority  )  [pure virtual]

Priority for this connection.

virtual int ParaEngine::INPLJabberClient::GetPriority (  )  [pure virtual]

Priority for this connection.

virtual void ParaEngine::INPLJabberClient::SetPassword ( const char *  Password  )  [pure virtual]

The password to use for connecting.

This may be sent across the wire plaintext, if the server doesn't support digest and PlaintextAuth is true.

virtual const char* ParaEngine::INPLJabberClient::GetPassword (  )  [pure virtual]

The password to use for connecting.

This may be sent across the wire plaintext, if the server doesn't support digest and PlaintextAuth is true.

virtual void ParaEngine::INPLJabberClient::SetAutoLogin ( bool  AutoLogin  )  [pure virtual]

Automatically log in on connection.

virtual bool ParaEngine::INPLJabberClient::GetAutoLogin (  )  [pure virtual]

Automatically log in on connection.

virtual void ParaEngine::INPLJabberClient::SetAutoRoster ( bool  AutoRoster  )  [pure virtual]

Automatically retrieve roster on connection.

virtual bool ParaEngine::INPLJabberClient::GetAutoRoster (  )  [pure virtual]

Automatically retrieve roster on connection.

virtual void ParaEngine::INPLJabberClient::SetAutoIQErrors ( bool  AutoIQErrors  )  [pure virtual]

Automatically send back 501/feature-not-implemented to IQs that have not been handled.

virtual bool ParaEngine::INPLJabberClient::GetAutoIQErrors (  )  [pure virtual]

Automatically send back 501/feature-not-implemented to IQs that have not been handled.

virtual void ParaEngine::INPLJabberClient::SetAutoPresence ( bool  AutoPresence  )  [pure virtual]

Automatically send presence on connection.

virtual bool ParaEngine::INPLJabberClient::GetAutoPresence (  )  [pure virtual]

Automatically send presence on connection.

virtual void ParaEngine::INPLJabberClient::SetResource ( const char *  Resource  )  [pure virtual]

The connecting resource.

Used to identify a unique connection.

virtual const char* ParaEngine::INPLJabberClient::GetResource (  )  [pure virtual]

The connecting resource.

Used to identify a unique connection.

virtual void ParaEngine::INPLJabberClient::SetServer ( const char *  Server  )  [pure virtual]

The name of the server to connect to.

virtual const char* ParaEngine::INPLJabberClient::GetServer (  )  [pure virtual]

The name of the server to connect to.

virtual void ParaEngine::INPLJabberClient::SetNetworkHost ( const char *  NetworkHost  )  [pure virtual]

The address to use on the "to" attribute of the stream:stream.

/ You can put the network hostname or IP address of the server to connect to. / If none is specified, the Server will be used. / Eventually, when SRV is supported, this will be deprecated.

virtual const char* ParaEngine::INPLJabberClient::GetNetworkHost (  )  [pure virtual]

The address to use on the "to" attribute of the stream:stream.

/ You can put the network hostname or IP address of the server to connect to. / If none is specified, the Server will be used. / Eventually, when SRV is supported, this will be deprecated.

virtual void ParaEngine::INPLJabberClient::SetPort ( int  Port  )  [pure virtual]

Automatically send presence on connection.

virtual int ParaEngine::INPLJabberClient::GetPort (  )  [pure virtual]

The TCP port to connect to.

default to 5222

virtual void ParaEngine::INPLJabberClient::SetKeepAlive ( float  KeepAlive  )  [pure virtual]

Time, in seconds, between keep-alive spaces.

default to 20f

virtual float ParaEngine::INPLJabberClient::GetKeepAlive (  )  [pure virtual]

Time, in seconds, between keep-alive spaces.

default to 20f

virtual void ParaEngine::INPLJabberClient::SetAutoReconnect ( float  AutoReconnect  )  [pure virtual]

Seconds before automatically reconnecting if the connection drops.

-1 to disable, 0 for immediate. Default to 30 seconds

virtual float ParaEngine::INPLJabberClient::GetAutoReconnect (  )  [pure virtual]

Seconds before automatically reconnecting if the connection drops.

-1 to disable, 0 for immediate. Default to 30 seconds

virtual const char* ParaEngine::INPLJabberClient::GetServerVersion (  )  [pure virtual]

The version string returned in the server's open stream element.

virtual void ParaEngine::INPLJabberClient::SetRequiresSASL ( bool  RequiresSASL  )  [pure virtual]

Is SASL required? This will default to true in the future.

virtual bool ParaEngine::INPLJabberClient::GetRequiresSASL (  )  [pure virtual]

Is SASL required? This will default to true in the future.

virtual bool ParaEngine::INPLJabberClient::Connect (  )  [pure virtual]

Connect to the server.

This happens asynchronously, and could take a couple of seconds to get the full handshake completed. This will auth, send presence, and request roster info, if the Auto* properties are set.

virtual void ParaEngine::INPLJabberClient::Close (  )  [pure virtual]

Close down the connection, as gracefully as possible.

virtual bool ParaEngine::INPLJabberClient::WriteNPLMessage ( const char *  to,
const char *  neuronfile,
const char *  sCode 
) [pure virtual]

Send a NPL message.

Parameters:
msg,: a NPL table converted to secure code.

virtual bool ParaEngine::INPLJabberClient::WriteRawString ( const char *  rawstring  )  [pure virtual]

Send raw string.

virtual bool ParaEngine::INPLJabberClient::Login (  )  [pure virtual]

Initiate the auth process.

virtual bool ParaEngine::INPLJabberClient::SetPresence ( int  t,
const char *  status,
const char *  show,
int  priority 
) [pure virtual]

/ Send a presence packet to the server /

Parameters:
t What kind? public enum PresenceType { / None specified available = -1, / May I subscribe to you? subscribe, / Yes, you may subscribe.

subscribed, / Unsubscribe from this entity. unsubscribe, / No, you may not subscribe. unsubscribed, / Offline unavailable, / server-side only. probe, / A presence error. error, / Invisible presence: we're unavailable to them, but still see theirs. invisible }

/

Parameters:
status How to show us?
/
Parameters:
show away, dnd, etc.
/
Parameters:
priority How to prioritize this connection. / Higher number mean higher priority. 0 minumum, 127 max. / -1 means this is a presence-only connection.

virtual bool ParaEngine::INPLJabberClient::Message ( int  t,
const char *  to,
const char *  body 
) [pure virtual]

/ Send a message packet to another user /

Parameters:
t What kind? public enum MessageType { / Normal message normal = -1, / Error message error, / Chat (one-to-one) message chat, / Groupchat groupchat, / Headline headline }
/
Parameters:
to Who to send it to?
/
Parameters:
body The message.

virtual bool ParaEngine::INPLJabberClient::Message ( const char *  to,
const char *  body 
) [pure virtual]

Send a message packet to another user

Parameters:
to Who to send it to?
body The message.

virtual void ParaEngine::INPLJabberClient::GetRoster (  )  [pure virtual]

Request a new copy of the roster.

virtual bool ParaEngine::INPLJabberClient::Subscribe ( const char *  to,
const char *  nickname,
const char *  groups 
) [pure virtual]

in Jabber, a contact list is called a roster / Send a presence subscription request and update the roster for a new roster contact.

/

Parameters:
to The JID of the contact (required)
/
Parameters:
nickname The nickname to show for the user.
/
Parameters:
groups A list of groups to put the contact in. Groups are separated by ';'. May be null. Hint: "foo;bar;" or "foo"

virtual void ParaEngine::INPLJabberClient::RemoveRosterItem ( const char *  to  )  [pure virtual]

in Jabber, a contact list is called a roster / Remove an item from the roster.

/ This will have the side-effect of bi-directionally unsubscribing to/from the user. /

Parameters:
to The JID to remove

virtual bool ParaEngine::INPLJabberClient::AllowSubscription ( const char *  to,
bool  bAllow 
) [pure virtual]

this function is called in OnSubscription method to confirm or refuse a subscription request from another user.

Parameters:
to,: the JID
bAllow,: true to allow subscription, false to deny

virtual bool ParaEngine::INPLJabberClient::Register ( const char *  jid  )  [pure virtual]

Attempt to register a new user.

This will fire OnRegisterInfo to retrieve information about the new user, and OnRegistered when the registration is complete or failed.

Parameters:
jid The user to register

virtual const char* ParaEngine::INPLJabberClient::GetRosterItemDetail ( const char *  jid  )  [pure virtual]

Retrieve details of a given roster item.

Parameters:
jid 
Returns:
null or string. the string is an NPL table of the following format "{ [1]={text=[[NickName(status)]], presence=number,groupname=[[name]]}, [2]=...}" Usually a roster item only belongs to one group. so the table usually contains only one item at index 1.

virtual const char* ParaEngine::INPLJabberClient::GetRosterGroups (  )  [pure virtual]

The group names for the roster as a string.

each group name is separated by ; such as "general;friends;relatives;"

virtual const char* ParaEngine::INPLJabberClient::GetRosterItems (  )  [pure virtual]

The Roster Item names as a string.

each name is separated by ; such as "Xizhi;Andy;Clayman;"

virtual void ParaEngine::INPLJabberClient::AddEventListener ( int  nListenerType,
const char *  callbackScript 
) [pure virtual]

add a NPL call back script to a given even listener

Parameters:
nListenerType type of message listener. The user can register NPL callback script with any one listener type.
callbackScript the script to be called when the listener event is raised. Usually parameters are stored in a NPL parameter called "msg".

virtual void ParaEngine::INPLJabberClient::RemoveEventListener ( int  nListenerType,
const char *  callbackScript 
) [pure virtual]

remove a NPL call back script from a given even listener

Parameters:
nListenerType type of message listener. The user can register NPL callback script with any one listener type.
callbackScript the script to be called when the listener event is raised. Usually parameters are stored in a NPL parameter called "msg".

virtual void ParaEngine::INPLJabberClient::ClearEventListener ( int  nListenerType  )  [pure virtual]

clear all NPL call back script from a given even listener

Parameters:
nListenerType type of message listener. The user can register NPL callback script with any one listener type.

virtual void ParaEngine::INPLJabberClient::ResetAllEventListeners (  )  [pure virtual]

clear all registered event listeners


Generated on Mon Dec 1 14:34:44 2008 for NPL Scripting Reference for ParaEngine by  doxygen 1.5.2