chat_user
Represents an individual local or remote user that has been added to the local chat_manager instance.
Syntax
class chat_user
Methods
Method | Description |
---|---|
chat_indicator | Indicates whether chat is possible and if audio is currently being produced for this user. |
custom_user_context | Retrieves the app's optional, private, custom pointer-sized context value previously associated with this user. |
local function | Returns a pointer to the chat_user_local object associated with this user, if the user is local. |
set_custom_user_context | Sets the app's optional, private, custom pointer-sized context value for this user. |
xbox_user_id | Returns the unique Xbox User ID of this user. |
Remarks
The chat_user
class represents a user in Game Chat 2 that has been added to the local singleton instance of the chat_manager class, by calling either chat_manager::add_local_user or chat_manager::add_remote_user.
You can use this class to retrieve the Xbox user ID, manage the custom user context, and retrieve the game_chat_user_chat_indicator for a user. You can also retrieve the chat_user_local instance for a local user.
For more information about working with users in Game Chat 2, see the Configuring users section of Using the Game Chat 2 C++ API.
chat_user_array
The chat_user_array
type is a constant array of chat_user
pointers. This type is provided for convenience, and is used with:
- chat_manager::get_chat_users method
- game_chat_text_chat_received_state_change structure
- game_chat_transcribed_chat_received_state_change structure
- post_decode_audio_sink_stream::get_users method
- post_decode_audio_source_stream::get_users method
- pre_encode_audio_stream::get_users method
typedef class chat_user * const * chat_user_array;
Requirements
Header: GameChat2.h
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles