PartyChatTextReceivedStateChange

Information specific to the ChatTextReceived type of state change.

Syntax

typedef struct PartyChatTextReceivedStateChange {  
    PartyChatControl* senderChatControl;  
    uint32_t receiverChatControlCount;  
    PartyLocalChatControlArray receiverChatControls;  
    PartyString languageCode;  
    PartyString chatText;  
    uint32_t dataSize;  
    const void* data;  
    uint32_t translationCount;  
    PartyTranslation* translations;  
} PartyChatTextReceivedStateChange  

Members

senderChatControl   PartyChatControl*

The chat control object that originated the text message.

receiverChatControlCount   uint32_t

The number of local receiver chat controls to which the text message is addressed.

receiverChatControls   PartyLocalChatControlArray
array of size receiverChatControlCount

The local receiver chat controls to which the text message is addressed.

languageCode   PartyString

The language of the chat text.

The language will only be provided when translation to the local language is enabled. If translation isn't enabled, or failure is encountered during translation, the language code will be an empty string.

The language code will be in BCP 47 format, such as en-US for English (United States). Supported language codes are enumerated at https://docs.microsoft.com/azure/cognitive-services/speech-service/language-support.

chatText   PartyString

The received chat text.

The string may be up to c_maxChatTextMessageLength characters long, not including the null terminator.

dataSize   uint32_t

The size of the data associated with this text message.

data   const void*
buffer of size dataSize bytes

The data associated with this text message.

translationCount   uint32_t

The number of translations associated with the chat text.

Translations will be provided if PartyTextChatOptions::TranslateToLocalLanguage had previously been specified via PartyLocalChatControl::SetTextChatOptions() on a chat control local to this device. There may be more than one translation if multiple local chat controls have enabled translation and the local chat controls have specified different languages via either PartyLocalDevice::CreateChatControl() or PartyLocalChatControl::SetLanguage(). In that case, the app can compare the languageCode field of each PartyTranslation in translations against the language code, obtained via PartyLocalChatControl::GetLanguage(), for each local chat control in receiverChatControls to determine the target local chat control for each translation.

translations   PartyTranslation*
array of size translationCount

An array containing the translations of the chat text string.

Translations will be provided if PartyTextChatOptions::TranslateToLocalLanguage had previously been specified via PartyLocalChatControl::SetTextChatOptions() on a chat control local to this device. There may be more than one translation if multiple local chat controls have enabled translation and the local chat controls have specified different languages via either PartyLocalDevice::CreateChatControl() or PartyLocalChatControl::SetLanguage(). In that case, the app can compare the languageCode field of each PartyTranslation in translations against the language code, obtained via PartyLocalChatControl::GetLanguage(), for each local chat control in receiverChatControls to determine the target local chat control for each translation.

Requirements

Header: Party.h

See also

Party members
PartyLocalDevice::CreateChatControl
PartyLocalChatControl::SendText
PartyLocalChatControl::SetTextChatOptions
PartyLocalChatControl::SetLanguage