聊天室消息创建器
更多...
#include <v2_nim_utilities.hpp>
|
static nstd::optional< V2NIMChatroomMessage > | createTextMessage (nstd::string text) |
| 创建文本消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createImageMessage (nstd::string imagePath, nstd::string name, nstd::string sceneName, uint32_t width, uint32_t height) |
| 创建图片消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createAudioMessage (nstd::string audioPath, nstd::string name, nstd::string sceneName, uint32_t duration) |
| 创建音频消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createVideoMessage (nstd::string videoPath, nstd::string name, nstd::string sceneName, uint32_t duration, uint32_t width, uint32_t height) |
| 创建视频消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createFileMessage (nstd::string filePath, nstd::string name, nstd::string sceneName) |
| 创建文件消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createLocationMessage (double latitude, double longitude, nstd::string address) |
| 创建位置消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createCustomMessage (nstd::string rawAttachment) |
| 创建自定义消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createTipsMessage (nstd::string text) |
| 创建提示消息
|
|
static nstd::optional< V2NIMChatroomMessage > | createForwardMessage (V2NIMChatroomMessage message) |
| 创建转发消息
|
|
◆ createAudioMessage()
创建音频消息
- 参数
-
audioPath | 音频路径 |
name | 文件显示名称, 为空则使用文件名 |
sceneName | 文件存储场景 |
duration | 音频时长 |
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
if(!audioMessage) {
}
static const char * V2NIM_STORAGE_SCENE_NAME_DEFAULT_IM
Definition: v2_nim_def_enum.hpp:1606
static nstd::optional< V2NIMChatroomMessage > createAudioMessage(nstd::string audioPath, nstd::string name, nstd::string sceneName, uint32_t duration)
创建音频消息
Definition: v2_nim_internal.hpp:201
◆ createCustomMessage()
创建自定义消息
- 参数
-
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
if(!customMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createCustomMessage(nstd::string rawAttachment)
创建自定义消息
Definition: v2_nim_internal.hpp:225
◆ createFileMessage()
创建文件消息
- 参数
-
filePath | 文件路径 |
name | 文件显示名称, 为空则使用文件名 |
sceneName | 文件存储场景 |
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
if(!fileMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createFileMessage(nstd::string filePath, nstd::string name, nstd::string sceneName)
创建文件消息
Definition: v2_nim_internal.hpp:215
◆ createForwardMessage()
创建转发消息
- 参数
-
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
if(!forwardMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createForwardMessage(V2NIMChatroomMessage message)
创建转发消息
Definition: v2_nim_internal.hpp:231
◆ createImageMessage()
创建图片消息
- 参数
-
imagePath | 图片路径 |
name | 文件显示名称, 为空则使用文件名 |
sceneName | 文件存储场景 |
width | 图片宽度 |
height | 图片高度 |
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
100); if(!imageMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createImageMessage(nstd::string imagePath, nstd::string name, nstd::string sceneName, uint32_t width, uint32_t height)
创建图片消息
Definition: v2_nim_internal.hpp:194
◆ createLocationMessage()
创建位置消息
- 参数
-
latitude | 纬度 |
longitude | 经度 |
address | 详细位置信息 |
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
if(!locationMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createLocationMessage(double latitude, double longitude, nstd::string address)
创建位置消息
Definition: v2_nim_internal.hpp:220
◆ createTextMessage()
创建文本消息
- 参数
-
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
if(!textMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createTextMessage(nstd::string text)
创建文本消息
Definition: v2_nim_internal.hpp:191
◆ createTipsMessage()
创建提示消息
- 参数
-
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
if(!tipMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createTipsMessage(nstd::string text)
创建提示消息
Definition: v2_nim_internal.hpp:228
◆ createVideoMessage()
创建视频消息
- 参数
-
videoPath | 视频路径 |
name | 文件显示名称, 为空则使用文件名 |
sceneName | 文件存储场景 |
duration | 视频时长 |
width | 视频宽度 |
height | 视频高度 |
- 返回
- nstd::optional<V2NIMChatroomMessage>
- 示例代码
100); if (!videoMessage) {
}
static nstd::optional< V2NIMChatroomMessage > createVideoMessage(nstd::string videoPath, nstd::string name, nstd::string sceneName, uint32_t duration, uint32_t width, uint32_t height)
创建视频消息
Definition: v2_nim_internal.hpp:207
该类的文档由以下文件生成:
- D:/GitLab/builds/7_aFT3sv/0/nim-pc/california/nim-cross-platform-sdk/exports/include/v2_nim_utilities.hpp
- D:/GitLab/builds/7_aFT3sv/0/nim-pc/california/nim-cross-platform-sdk/exports/include/v2_nim_internal.hpp