> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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

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

## 语法

```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,  
}  
```

## 常量

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

## 备注

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

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

## 需求

**头文件:** GameChat2.h

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

## 另请参阅

[Game Chat 2 简介](https://docs.xbox.com/zh-CN/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)\
[GameChat2 members](https://docs.xbox.com/zh-CN/reference/chat/gamechat2/gamechat2_members.md)\
[chat\_user\_local](https://docs.xbox.com/zh-CN/reference/chat/gamechat2/classes/chat_user/chat_user_local/chat_user_local.md)


## Related topics

- [game_chat_communication_relationship_adjuster](https://docs.xbox.com/zh-CN/reference/chat/gamechat2/enums/game_chat_communication_relationship_adjuster.md)
- [set_communication_relationship](https://docs.xbox.com/zh-CN/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_set_communication_relationship.md)
- [get_effective_communication_relationship](https://docs.xbox.com/zh-CN/reference/chat/gamechat2/classes/chat_user/chat_user_local/methods/chat_user_local_get_effective_communication_relationship.md)
- [GameChat2 成员（API 内容）](https://docs.xbox.com/zh-CN/reference/chat/gamechat2/gamechat2_members.md)
- [使用 Game Chat 2 C++ API](https://docs.xbox.com/zh-CN/services/xbox-services/multiplayer/chat/game-chat2/using-game-chat-2.md)
