GetContext

Gets the value of the context entity identified by the name in the context session of the message.

Syntax

ASCII Version
const char* getContext(const char* name) 
Unicode Version
const UnicodeString getContext(const UnicodeString name) 

Parameters

  • The name whose associated value is to be returned

Results

Returns the value for the name in the context entity. If the name does not exist, the method returns empty string.

Example

ASCII Version
const char* value= msg->getContext(Server::ACCOUNT_ID); 
Unicode Version

Same as ASCII or:

UnicodeString name= Server::ACCOUNT_ID;// Or input unicode string
UnicodeString value= msg->getContext(name);