> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# game_chat_communication_relationship_flags

> game_chat_communication_relationship_flags

# game\_chat\_communication\_relationship\_flags

定义两个用户之间的通信关系。

<a id="syntaxSection" />

## 语法

```cpp theme={null}
enum class game_chat_communication_relationship_flags  
{  
    none = 0x0,  
    send_microphone_audio = 0x1,  
    send_text_to_speech_audio = 0x2,  
    send_text = 0x4,  
    receive_audio = 0x8,  
    receive_text = 0x10,  
}  
```

<a id="constantsSection" />

## 常量

| 常量                            | 描述                     |
| ----------------------------- | ---------------------- |
| none                          | 不允许本地用户与目标用户之间进行任何通信。  |
| send\_microphone\_audio       | 允许从本地用户向目标用户进行麦克风通信。   |
| send\_text\_to\_speech\_audio | 允许从本地用户向目标用户进行文本转语音通信。 |
| send\_text                    | 允许从本地用户向目标用户进行文本通信。    |
| receive\_audio                | 允许从目标用户向本地用户进行音频通信。    |
| receive\_text                 | 允许从目标用户向本地用户进行文本通信。    |

<a id="remarksSection" />

## 备注

此枚举描述应用可从 Game Chat 2 请求的两个用户之间的通信关系。您可以通过调用 [chat\_user\_local::get\_effective\_communication\_relationship](/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_get_effective_communication_relationship) 方法来检索本地用户与指定目标用户之间的当前通信关系,或通过调用 [chat\_user\_local::set\_communication\_relationship](/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_set_communication_relationship) 方法进行设置。也可在初始化聊天实例时通过调用 [chat\_manager::initialize](/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_initialize) 方法来设置用户之间的默认通信关系。

有关初始化和使用聊天实例的更多信息,请参阅 [使用 Game Chat 2 C++ API](/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2)。

<a id="requirementsSection" />

## 需求

**头文件:** GameChat2.h

**支持的平台:** Windows、XBOX One 家族主机以及 XBOX Series 主机

<a id="seealsoSection" />

## 另请参阅

[Game Chat 2 简介](/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)\
[GameChat2 members](/reference/chat/gamechat2/gamechat2_members)\
[chat\_user\_local](/reference/chat/gamechat2/classes/chat_user/chat_user_local/chat_user_local)


## Related topics

- [game_chat_communication_relationship_adjuster](/zh-CN/reference/chat/gamechat2/enums/game_chat_communication_relationship_adjuster.md)
- [chat_user_local::set_communication_relationship](/zh-CN/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_set_communication_relationship.md)
- [chat_user_local::get_effective_communication_relationship](/zh-CN/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_get_effective_communication_relationship.md)
- [GameChat2 members](/zh-CN/reference/chat/gamechat2/gamechat2_members.md)
- [chat_manager::initialize](/zh-CN/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_initialize.md)
