HyphenateChatSDK 4.5.0
构造函数 | 属性 | 所有成员列表
EMFileMessageBody类 参考

#import <EMFileMessageBody.h>

类 EMFileMessageBody 继承关系图:
EMMessageBody EMCombineMessageBody EMImageMessageBody EMVideoMessageBody EMVoiceMessageBody

构造函数

(instancetype _Nonnull) - initWithLocalPath:displayName:
 
(instancetype _Nonnull) - initWithData:displayName:
 

属性

NSString * displayName
 
NSString * localPath
 
NSString * remotePath
 
NSString * secretKey
 
long long fileLength
 
EMDownloadStatus downloadStatus
 
- 属性 继承自 EMMessageBody
EMMessageBodyType type
 
NSUInteger operationTime
 
NSString * operatorId
 
NSUInteger operatorCount
 

详细描述

文件消息体。

函数文档

◆ initWithData:displayName:

- (instancetype _Nonnull) initWithData: (NSData *_Nullable)  aData
displayName: (NSString *_Nullable)  aDisplayName 

初始化文件消息体。

参数
aData附件内容数据。
aDisplayName附件显示名(不包含路径)。
返回
消息体实例。

◆ initWithLocalPath:displayName:

- (instancetype _Nonnull) initWithLocalPath: (NSString *_Nullable)  aLocalPath
displayName: (NSString *_Nullable)  aDisplayName 

初始化文件消息体。

参数
aLocalPath附件本地路径。
aDisplayName附件显示名称(不包含路径)。
返回
消息体实例。

属性说明

◆ displayName

- (NSString*) displayName
readwritenonatomiccopy

附件的显示名称。

◆ downloadStatus

- (EMDownloadStatus) downloadStatus
readwritenonatomicassign

附件的下载状态。

◆ fileLength

- (long long) fileLength
readwritenonatomicassign

附件的大小, 以字节为单位。

◆ localPath

- (NSString*) localPath
readwritenonatomiccopy

附件的本地路径。

◆ remotePath

- (NSString*) remotePath
readwritenonatomiccopy

附件在服务器上的路径。

◆ secretKey

- (NSString*) secretKey
readwritenonatomiccopy

附件的密钥, 下载附件时需要密匙做校验。


该类的文档由以下文件生成: