merge
This commit is contained in:
@@ -23,6 +23,14 @@ const getImToken = () => {
|
||||
}, true)
|
||||
}
|
||||
|
||||
// 删除好友
|
||||
const deleteFriend = (targetId) => {
|
||||
return request({
|
||||
method: 'DELETE',
|
||||
url: 'im/friends/' + targetId,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
const getUserInfo = (targetId) => {
|
||||
return request({
|
||||
@@ -30,6 +38,14 @@ const getUserInfo = (targetId) => {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看好友资料,附带好友关系
|
||||
*/
|
||||
const getFriendInfo = (userId) => {
|
||||
return request({
|
||||
url: 'im/friendInfo/' + userId
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取好友申请列表
|
||||
*/
|
||||
@@ -71,8 +87,10 @@ const pedingFriend = (recipient) => {
|
||||
|
||||
export {
|
||||
getImToken,
|
||||
deleteFriend,
|
||||
getFriends,
|
||||
getUserInfo,
|
||||
getFriendInfo,
|
||||
getPedings,
|
||||
resolveFriend,
|
||||
rejectFriend,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<view class="agress-btn">
|
||||
<span v-if="isAgree" @click="action('agree', item)">通过</span>
|
||||
<span v-if="isAgree" @click="action('reject', item)">拒绝</span>
|
||||
<span v-if="isApply && !item.is_friend" @click="action('apply', item)">申请</span>
|
||||
<span v-if="isApply && !item.is_friend" @click="action('apply', item)">查看</span>
|
||||
<span class="isFri" v-if="isApply && item.is_friend" @click="action('isFriend', item)">已是好友</span>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>RCUniIM.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-i386_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>RCUniIM.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>i386</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
framework module RCUniIM {
|
||||
umbrella header "RCUniIM.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
ZKi4BLBW63/du2J2c5nWLN6cx5s=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
EY+qdINUus6MXwr3v10xmPeDZPY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
EY+qdINUus6MXwr3v10xmPeDZPY=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
rZTK4x62e4Sp6DkEjZ6UZS67FPB7cT+nFHnsfn57EL8=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
framework module RCUniIM {
|
||||
umbrella header "RCUniIM.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
oSjvcmxXGqLnGfyBIwlFI+peXFA=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
EY+qdINUus6MXwr3v10xmPeDZPY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
EY+qdINUus6MXwr3v10xmPeDZPY=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
rZTK4x62e4Sp6DkEjZ6UZS67FPB7cT+nFHnsfn57EL8=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-i386_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>RongChatRoom.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>i386</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>RongChatRoom.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,493 +0,0 @@
|
||||
//
|
||||
// RCChatRoomClient.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2020/7/28.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
#import "RCChatRoomInfo.h"
|
||||
#import "RCChatRoomProtocol.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RCChatRoomClient : NSObject
|
||||
|
||||
+ (instancetype)sharedChatRoomClient;
|
||||
|
||||
#pragma mark - Chatroom Operation
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室(如果聊天室不存在则会创建)
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50
|
||||
@param successBlock 加入聊天室成功的回调
|
||||
@param errorBlock 加入聊天室失败的回调
|
||||
[status: 加入聊天室失败的错误码]
|
||||
|
||||
@discussion
|
||||
可以通过传入的 messageCount 设置加入聊天室成功之后需要获取的历史消息数量。
|
||||
-1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50
|
||||
为具体获取的消息数量,最大值为 50。注:如果是 7.x 系统获取历史消息数量不要大于 30
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
*
|
||||
Join a chatroom (it will be created if the chatroom does not exist).
|
||||
|
||||
@param targetId Chatroom ID.
|
||||
@param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50.
|
||||
@param successBlock Callback for successful joining of the chatroom
|
||||
@param errorBlock Callback for failing to join chatroom.
|
||||
[status: Error code for failure to join chatroom].
|
||||
|
||||
@ discussion
|
||||
You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully.
|
||||
-1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50.
|
||||
For the number of messages specifically obtained, the maximum value is 50. Note: if it is a 7.x system, the number of historical messages should not be greater than 30.
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)joinChatRoom:(NSString *)targetId
|
||||
messageCount:(int)messageCount
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入已经存在的聊天室(如果聊天室不存在返回错误 23410,人数超限返回错误 23411)
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50
|
||||
@param successBlock 加入聊天室成功的回调
|
||||
@param errorBlock 加入聊天室失败的回调
|
||||
[status: 加入聊天室失败的错误码]
|
||||
|
||||
@warning
|
||||
注意:使用 IMKit 库的会话页面,viewDidLoad 会自动调用 joinChatRoom 加入聊天室(聊天室不存在会自动创建)。
|
||||
如果您只想加入已存在的聊天室,需要在 push 到会话页面之前调用这个方法并且 messageCount 传 -1,成功之后 push
|
||||
到会话页面,失败需要您做相应提示处理。
|
||||
|
||||
@discussion
|
||||
可以通过传入的 messageCount 设置加入聊天室成功之后,需要获取的历史消息数量。
|
||||
-1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50
|
||||
为具体获取的消息数量,最大值为 50。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
*
|
||||
Join an existing chatroom (return error 23410 if there is no chatroom, and return error 23411 if the number exceeds the limit).
|
||||
|
||||
@param targetId Chatroom ID.
|
||||
@param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50.
|
||||
@param successBlock Callback for successful joining of the chatroom
|
||||
@param errorBlock Callback for failing to join chatroom.
|
||||
[status: Error code for failing to join chatroom].
|
||||
|
||||
@ warning
|
||||
Note: using the conversation page of the IMKit library, viewDidLoad will automatically call joinChatRoom to join the chatroom (if the chatroom does not exist, it will be created automatically).
|
||||
If you only want to join an existing chatroom, you shall call this method before push to the conversation page and messageCount-1, and push after success.
|
||||
When you go to the conversation page, you shall be prompted to deal with the failure.
|
||||
|
||||
@ discussion
|
||||
You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully.
|
||||
-1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50.
|
||||
For the number of messages specifically obtained, the maximum value is 50.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)joinExistChatRoom:(NSString *)targetId
|
||||
messageCount:(int)messageCount
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
退出聊天室
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param successBlock 退出聊天室成功的回调
|
||||
@param errorBlock 退出聊天室失败的回调
|
||||
[status:退出聊天室失败的错误码]
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
|
||||
Quit the chatroom.
|
||||
|
||||
@param targetId Chatroom ID.
|
||||
@param successBlock Callback for successful exit from the chatroom.
|
||||
@param errorBlock Callback for failing to exit chatroom.
|
||||
[error code for status: 's failure to exit the chatroom].
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)quitChatRoom:(NSString *)targetId
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
获取聊天室的信息(包含部分成员信息和当前聊天室中的成员总数)
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param count 需要获取的成员信息的数量(目前获取到的聊天室信息中仅包含不多于 20 人的成员信息,即 0 <= count <=
|
||||
20,传入 0 获取到的聊天室信息将或仅包含成员总数,不包含具体的成员列表)
|
||||
@param order 需要获取的成员列表的顺序(最早加入或是最晚加入的部分成员)
|
||||
@param successBlock 获取成功的回调 [chatRoomInfo:聊天室信息]
|
||||
@param errorBlock 获取失败的回调 [status:获取失败的错误码]
|
||||
|
||||
@discussion
|
||||
因为聊天室一般成员数量巨大,权衡效率和用户体验,目前返回的聊天室信息仅包含不多于 20
|
||||
人的成员信息和当前成员总数。如果您使用 RC_ChatRoom_Member_Asc
|
||||
升序方式查询,将返回最早加入的成员信息列表,按加入时间从旧到新排列;如果您使用 RC_ChatRoom_Member_Desc
|
||||
降序方式查询,将返回最晚加入的成员信息列表,按加入时间从新到旧排列。
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
*
|
||||
Get the information of the chatroom (including some member information and the total number of members in the current chatroom).
|
||||
|
||||
@param targetId chatroom ID.
|
||||
@param count The number of member information that shall be obtained (at present, the chatroom information obtained contains only the member information of no more than 20 people, that is, 0 < = count < =.
|
||||
20. The chatroom information obtained by passing 0 will contain only the total number of members, not a specific list of members).
|
||||
@param order The order of the list of members to be obtained (the earliest or the latest to join).
|
||||
@param successBlock Callback for successful getting [chatRoomInfo: chatroom information].
|
||||
@param errorBlock Callback for failed getting [status: error code for failed getting].
|
||||
|
||||
@ discussion
|
||||
Because of the large number of chatroom members and the tradeoff between efficiency and user experience, the chatroom information returned so far contains no more than 20%.
|
||||
The member information of the person and the total number of current members. If you use RC_ChatRoom_Member_Asc.
|
||||
Query in ascending order will return a list of the earliest member information, sorted from old to new by join time; if you use RC_ChatRoom_Member_Desc.
|
||||
The query in descending order will return a list of the latest member information, sorted from new to old according to the time of joining.
|
||||
|
||||
@ remarks chatroom
|
||||
*
|
||||
*/
|
||||
- (void)getChatRoomInfo:(NSString *)targetId
|
||||
count:(int)count
|
||||
order:(RCChatRoomMemberOrder)order
|
||||
success:(void (^)(RCChatRoomInfo *chatRoomInfo))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
设置 IMLib 的聊天室状态监听器
|
||||
|
||||
@param delegate IMLib 聊天室状态监听器
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
|
||||
Set the chatroom status listener for IMLib.
|
||||
|
||||
@param delegate IMLib chatroom status listener.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)setChatRoomStatusDelegate:(id<RCChatRoomStatusDelegate>)delegate;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
从服务器端获取聊天室的历史消息
|
||||
@param targetId 聊天室ID
|
||||
@param recordTime 起始的消息发送时间戳,毫秒
|
||||
@param count 需要获取的消息数量, 0 < count <= 200
|
||||
@param order 拉取顺序,RC_Timestamp_Desc:倒序,RC_Timestamp_ASC:正序
|
||||
@param successBlock 获取成功的回调 [messages:获取到的历史消息数组, syncTime:下次拉取消息的时间戳]
|
||||
@param errorBlock 获取失败的回调 [status:获取失败的错误码]
|
||||
|
||||
@discussion
|
||||
此方法从服务器端获取聊天室的历史消息,但是必须先开通聊天室消息云存储功能。
|
||||
指定开始时间,比如20169月1日10点(1472695200000),
|
||||
默认是0(正序:从存储的第一条消息开始拉取,倒序:从存储的最后一条消息开始拉取)
|
||||
|
||||
* \~english
|
||||
|
||||
Get the historical message of the chatroom from the server side.
|
||||
@param targetId Chatroom ID.
|
||||
@param recordTime Initial message sending timestamp, millisecond.
|
||||
@param count The number of messages to be obtained. 0 < count < = 200.
|
||||
@param order Pull order, RC_Timestamp_Desc: reverse order, RC_Timestamp_ASC: positive order.
|
||||
@param successBlock Callback for successful getting [the array of historical messages obtained by messages:, and the timestamp of the next message pulled by syncTime:].
|
||||
@param errorBlock Callback for getting failure [status: Get failed error code].
|
||||
|
||||
@ discussion
|
||||
This method obtains the historical messages of chatrooms from the server, but must first activate the chatroom message cloud storage feature.
|
||||
Specify a start time, such as 10:00 on September 1, 2016 (1472695200000).
|
||||
The default value is 0 (positive order: pull from the first message stored, reverse order: pull from the last message stored).
|
||||
*/
|
||||
- (void)getRemoteChatroomHistoryMessages:(NSString *)targetId
|
||||
recordTime:(long long)recordTime
|
||||
count:(int)count
|
||||
order:(RCTimestampOrder)order
|
||||
success:(void (^)(NSArray *messages, long long syncTime))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
#pragma mark - chatroom state storage function (It must first activate the chatroom state storage function)
|
||||
/*!
|
||||
* \~chinese
|
||||
设置聊天室 KV 状态变化监听器
|
||||
|
||||
@param delegate 聊天室 KV 状态变化的监听器
|
||||
|
||||
@discussion 可以设置并实现此 delegate 来进行聊天室状态变化的监听 。SDK 会在回调中通知您聊天室状态的改变。
|
||||
|
||||
@remarks 功能设置
|
||||
|
||||
* \~english
|
||||
|
||||
Set chatroom KV status change listener.
|
||||
|
||||
@param delegate Listeners for KV status changes in chatrooms.
|
||||
|
||||
@ discussion It can set and implement this delegate to listen to chatroom state changes. SDK will notify you of the change in the status of the chatroom in the callback.
|
||||
|
||||
@ remarks function setting
|
||||
*/
|
||||
- (void)setRCChatRoomKVStatusChangeDelegate:(id<RCChatRoomKVStatusChangeDelegate>)delegate;
|
||||
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
设置聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符
|
||||
@param value 聊天室属性对应的值,最大长度 4096 个字符
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知
|
||||
@param notificationExtra 通知的自定义字段,RC:chrmKVNotiMsg 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值,且只有 key
|
||||
的创建者可以更新属性的值。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
|
||||
Set chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters.
|
||||
@param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted.
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RC:chrmKVNotiMsg notification message with a maximum length of 2 kb.
|
||||
@ param successBlock callback for success.
|
||||
@ param errorBlock callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
Set the custom attribute of the chatroom. When key does not exist, it means to add the attribute; when key already exists, it represents the value of the updated attribute, and only key.
|
||||
Can update the value of the property.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)setChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
value:(NSString *)value
|
||||
sendNotification:(BOOL)sendNotification
|
||||
autoDelete:(BOOL)autoDelete
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
强制设置聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符
|
||||
@param value 聊天室属性对应的值,最大长度 4096 个字符
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知
|
||||
@param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
强制设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Force the setting of chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters.
|
||||
@param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted.
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb.
|
||||
@param successBlock callback for success.
|
||||
@param errorBlock callback for failure
|
||||
|
||||
@discussion It must first activate the chatroom state storage function.
|
||||
Force the chatroom custom property to be set, which means to add the property when the key does not exist, or to update the value of the property when the key already exists.
|
||||
|
||||
@remarks chatroom
|
||||
*/
|
||||
- (void)forceSetChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
value:(NSString *)value
|
||||
sendNotification:(BOOL)sendNotification
|
||||
autoDelete:(BOOL)autoDelete
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
获取聊天室单个属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Get a single attribute of a chatroom.
|
||||
|
||||
@param chatroomId chatroom ID.
|
||||
@param key chatroom attribute name.
|
||||
@param successBlock Callback for success.
|
||||
@param errorBlock Callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)getChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
success:(void (^)(NSDictionary *entry))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
获取聊天室所有自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
|
||||
Get all attributes of a chatroom.
|
||||
|
||||
@param chatroomId chatroom ID.
|
||||
@param successBlock Callback for success.
|
||||
@param errorBlock Callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)getAllChatRoomEntries:(NSString *)chatroomId
|
||||
success:(void (^)(NSDictionary *entry))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
删除聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
删除聊天室自定义属性,只有自己设置的属性可以被删除。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Delete chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb.
|
||||
@ param successBlock Callback for success
|
||||
@ param errorBlock Callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
The custom properties of the chatroom are deleted and only the properties set by yourself can be deleted.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)removeChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
sendNotification:(BOOL)sendNotification
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
强制删除聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
强制删除聊天室自定义属性。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Force deletion of chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb.
|
||||
@ param successBlock callback successfully.
|
||||
@ param errorBlock failed callback.
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
Force the deletion of chatroom custom properties.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)forceRemoveChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
sendNotification:(BOOL)sendNotification
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,95 +0,0 @@
|
||||
//
|
||||
// RCChatRoomEnumDefine.h
|
||||
// RongChatRoom
|
||||
//
|
||||
// Created by RongCloud on 2020/8/12.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#ifndef RCChatRoomEnumDefine_h
|
||||
#define RCChatRoomEnumDefine_h
|
||||
|
||||
#pragma mark RCChatRoomStatus
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室状态码
|
||||
*
|
||||
* \~english
|
||||
* Chatroom status code
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, RCChatRoomStatus) {
|
||||
/*!
|
||||
* \~chinese
|
||||
正在加入聊天室中
|
||||
* \~english
|
||||
Joining the chatroom
|
||||
*/
|
||||
RCChatRoomStatus_Joining = 1,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室成功
|
||||
* \~english
|
||||
Join the chatroom successfully
|
||||
*/
|
||||
RCChatRoomStatus_Joined = 2,
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室失败
|
||||
* \~english
|
||||
Failed to join chatroom
|
||||
*/
|
||||
RCChatRoomStatus_JoinFailed = 3,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
退出了聊天室
|
||||
* \~english
|
||||
Quit the chatroom
|
||||
*/
|
||||
RCChatRoomStatus_Quited = 4,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室被销毁
|
||||
* \~english
|
||||
The chatroom is destroyed
|
||||
*/
|
||||
RCChatRoomStatus_Destroyed = 5,
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室被重置
|
||||
由于聊天室长时间不活跃,已经被系统回收。聊天室 KV 已经被清空,请开发者刷新界面。
|
||||
* \~english
|
||||
The chatroom is reset.
|
||||
As the chatroom has been inactive for a long time, it has been recycled by the system. The chatroom KV has been emptied, please refresh the interface.
|
||||
*/
|
||||
RCChatRoomStatus_Reset = 6,
|
||||
|
||||
};
|
||||
|
||||
#pragma mark RCChatRoomMemberOrder
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室成员的排列顺序
|
||||
* \~english
|
||||
The order of chatroom members
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, RCChatRoomMemberOrder) {
|
||||
/*!
|
||||
* \~chinese
|
||||
升序,返回最早加入的成员列表
|
||||
* \~english
|
||||
Ascending order, return the list of the earliest members
|
||||
*/
|
||||
RC_ChatRoom_Member_Asc = 1,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
降序,返回最晚加入的成员列表
|
||||
* \~english
|
||||
Descending order, return the list of the latest members
|
||||
*/
|
||||
RC_ChatRoom_Member_Desc = 2,
|
||||
};
|
||||
#endif /* RCChatRoomEnumDefine_h */
|
||||
@@ -1,61 +0,0 @@
|
||||
//
|
||||
// RCChatRoomInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/1/11.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCChatRoomMemberInfo.h"
|
||||
#import "RCChatRoomEnumDefine.h"
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室信息类
|
||||
* \~english
|
||||
Chatroom information class
|
||||
*/
|
||||
@interface RCChatRoomInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室 ID
|
||||
* \~english
|
||||
Chatroom ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *targetId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
包含的成员信息类型
|
||||
* \~english
|
||||
Type of member information included
|
||||
*/
|
||||
@property (nonatomic, assign) RCChatRoomMemberOrder memberOrder;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室中的部分成员信息 RCChatRoomMemberInfo 列表
|
||||
|
||||
@discussion
|
||||
如果成员类型为 RC_ChatRoom_Member_Asc,则为最早加入的成员列表,按成员加入时间升序排列;
|
||||
如果成员类型为 RC_ChatRoom_Member_Desc,则为最晚加入的成员列表,按成员加入时间降序排列。
|
||||
|
||||
* \~english
|
||||
RCChatRoomMemberInfo list of some member information in the chatroom.
|
||||
|
||||
@ discussion
|
||||
If the member type is RC_ChatRoom_Member_Asc, it is the list of the earliest members, sorted in ascending order by the time they are added.
|
||||
If the member type is RC_ChatRoom_Member_Desc, it is the list of the latest members, sorted in descending order by the time they are added.
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray <RCChatRoomMemberInfo *> *memberInfoArray;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前聊天室的成员总数
|
||||
* \~english
|
||||
Total number of members of the current chatroom.
|
||||
*/
|
||||
@property (nonatomic, assign) int totalMemberCount;
|
||||
|
||||
@end
|
||||
@@ -1,35 +0,0 @@
|
||||
//
|
||||
// RCChatRoomMemberInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/1/10.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室成员信息类
|
||||
* \~english
|
||||
Chatroom member information class
|
||||
*/
|
||||
@interface RCChatRoomMemberInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
用户 ID
|
||||
* \~english
|
||||
User ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *userId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
用户加入聊天室时间(Unix 时间戳,毫秒)
|
||||
* \~english
|
||||
Time when the user joins the chatroom (Unix timestamp, milliseconds)
|
||||
*/
|
||||
@property (nonatomic, assign) long long joinTime;
|
||||
|
||||
@end
|
||||
@@ -1,194 +0,0 @@
|
||||
//
|
||||
// RCChatRoomProtocol.h
|
||||
// RongChatRoom
|
||||
//
|
||||
// Created by RongCloud on 2020/8/12.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef RCChatRoomProtocol_h
|
||||
#define RCChatRoomProtocol_h
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RCChatRoomDestroyType) {
|
||||
/*!
|
||||
* \~chinese
|
||||
开发者主动销毁
|
||||
* \~english
|
||||
Developers take the initiative to destroy
|
||||
*/
|
||||
RCChatRoomDestroyTypeManual = 0,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室长时间不活跃,被系统自动回收
|
||||
* \~english
|
||||
The chatroom is inactive for a long time and is automatically recycled by the system.
|
||||
*/
|
||||
RCChatRoomDestroyTypeAuto = 3
|
||||
};
|
||||
|
||||
#pragma mark - RCChatRoomStatusDelegate
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室状态的的监听器
|
||||
|
||||
@discussion
|
||||
设置IMLib的聊天室状态监听器,请参考 RCChatRoomClient 的 setChatRoomStatusDelegate: 方法。
|
||||
|
||||
* \~english
|
||||
Listeners for the status of chatrooms.
|
||||
|
||||
@ discussion
|
||||
To set the chatroom status listener of chatroom, please refer to the setChatRoomStatusDelegate: method of RCChatRoomClient.
|
||||
*/
|
||||
@protocol RCChatRoomStatusDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
开始加入聊天室的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
Callback for joining the chatroom.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomJoining:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室成功的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
Callback for successful joining of the chatroom
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomJoined:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室失败的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
@param errorCode 加入失败的错误码
|
||||
|
||||
@discussion
|
||||
如果错误码是 KICKED_FROM_CHATROOM 或 RC_CHATROOM_NOT_EXIST ,则不会自动重新加入聊天室,App需要按照自己的逻辑处理。
|
||||
|
||||
* \~english
|
||||
Callback for failed to join chatroom.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param errorCode Add a failed error code.
|
||||
|
||||
@ discussion
|
||||
If the error code is KICKED_FROM_CHATROOM or RC_CHATROOM_NOT_EXIST, it will not automatically rejoin the chatroom, App shall follow its own logic.
|
||||
*/
|
||||
- (void)onChatRoomJoinFailed:(NSString *)chatroomId errorCode:(RCErrorCode)errorCode;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室成功,但是聊天室被重置。接收到此回调后,还会收到 onChatRoomJoined:回调。
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
The chatroom is jointed successfully, but the chatroom is reset. After receiving this callback, you will also receive an onChatRoomJoined: callback.
|
||||
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomReset:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
退出聊天室成功的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
Callback for successful exit from the chatroom
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomQuited:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室被销毁的回调,用户在线的时候房间被销毁才会收到此回调。
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
@param type 聊天室销毁原因
|
||||
|
||||
* \~english
|
||||
The callback in which the chatroom is destructed. The callback will only be received when the room is destructed when the user is online.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param type Reasons for the destruction of chatrooms.
|
||||
*/
|
||||
- (void)onChatRoomDestroyed:(NSString *)chatroomId type:(RCChatRoomDestroyType)type;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#pragma mark - RCChatRoomKVStatusChangeDelegate
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 聊天室 KV 状态变化监听器
|
||||
@discussion 设置代理请参考 RCIMClient 的 setRCChatRoomKVStatusChangeDelegate: 方法。
|
||||
|
||||
* \~english
|
||||
ChatRoom ChatRoom KV Status ChangeDelegate
|
||||
@discussion Please refer to the setRCChatRoomKVStatusChangeDelegate: method of RCChatRoomClient。
|
||||
*/
|
||||
@protocol RCChatRoomKVStatusChangeDelegate <NSObject>
|
||||
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 刚加入聊天室时 KV 同步完成的回调
|
||||
|
||||
@param roomId 聊天室 Id
|
||||
|
||||
* \~english
|
||||
Callback of ChatRoom kv did sync
|
||||
@param roomId ChatRoom Id
|
||||
*/
|
||||
- (void)chatRoomKVDidSync:(NSString *)roomId;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 聊天室 KV 变化的回调
|
||||
|
||||
@param roomId 聊天室 Id
|
||||
@param entry KV 字典,如果刚进入聊天室时存在 KV,会通过此回调将所有 KV 返回,再次回调时为其他人设置或者修改 KV
|
||||
|
||||
* \~english
|
||||
Callback of Chatroom kv update
|
||||
@param roomId ChatRoom Id
|
||||
@param entry KV map,If there are KVs when you first enter the chat room, all KVs will be returned through this callback. When you call back again, you can set or modify the KVs for others
|
||||
*/
|
||||
- (void)chatRoomKVDidUpdate:(NSString *)roomId entry:(NSDictionary<NSString *, NSString *> *)entry;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 聊天室 KV 被删除的回调
|
||||
|
||||
@param roomId 聊天室 Id
|
||||
@param entry KV 字典
|
||||
|
||||
* \~english
|
||||
Callback when chat room KV is deleted
|
||||
@param roomId Chatroom Id
|
||||
@param entry KV dictionary
|
||||
*/
|
||||
- (void)chatRoomKVDidRemove:(NSString *)roomId entry:(NSDictionary<NSString *, NSString *> *)entry;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* RCChatRoomProtocol_h */
|
||||
@@ -1,113 +0,0 @@
|
||||
//
|
||||
// RCChatroomKVNotificationMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2019/10/14.
|
||||
// Copyright © 2019 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室自定义属性通知消息的类型名
|
||||
* \~english
|
||||
The type name of the custom property notification message of chatroom
|
||||
*/
|
||||
#define RCChatroomKVNotificationMessageTypeIdentifier @"RC:chrmKVNotiMsg"
|
||||
|
||||
typedef NS_ENUM(NSInteger, RCChatroomKVNotificationType) {
|
||||
/*!
|
||||
* \~chinese
|
||||
设置 KV 的操作
|
||||
* \~english
|
||||
Set the operation of KV.
|
||||
*/
|
||||
RCChatroomKVNotificationTypeSet = 1,
|
||||
/*!
|
||||
* \~chinese
|
||||
删除 KV 的操作
|
||||
* \~english
|
||||
Delete KV operation.
|
||||
*/
|
||||
RCChatroomKVNotificationTypeRemove = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
聊天室自定义属性通知消息
|
||||
|
||||
@discussion 不要随意构造此类消息发送,调用设置或者删除接口时会自动构建。
|
||||
@discussion 此消息不存储不计入未读消息数。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Custom attribute notification message of chatroom
|
||||
|
||||
@ discussion do not construct this kind of message for sending at will, which will be built automatically when you call the interface to set or delete.
|
||||
@ discussion This message is not stored and does not count as unread messages.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCChatroomKVNotificationMessage : RCMessageContent
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室操作的类型
|
||||
* \~english
|
||||
Types of chatroom operations
|
||||
*/
|
||||
@property (nonatomic, assign) RCChatroomKVNotificationType type;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室属性名称
|
||||
* \~english
|
||||
Chatroom attribute name
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *key;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室属性对应的值
|
||||
* \~english
|
||||
The value corresponding to the chatroom attribute
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *value;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
通知消息的自定义字段,最大长度 2 kb
|
||||
* \~english
|
||||
Custom field of notification message with a maximum length of 2 kb.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *extra;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化聊天室自定义属性通知消息
|
||||
|
||||
@param key 聊天室属性名称
|
||||
@param value 聊天室属性对应的值(删除 key 时不用传)
|
||||
@param extra 通知消息的自定义字段
|
||||
@return 聊天室自定义属性通知消息的对象
|
||||
|
||||
* \~english
|
||||
Initialize chatroom custom property notification message.
|
||||
|
||||
@param key Chatroom attribute name.
|
||||
@param value The value corresponding to the chatroom attribute (you need not pass it when deleting key).
|
||||
@param extra Custom fields for notification messages.
|
||||
@ return chatroom custom attribute notification message object.
|
||||
*/
|
||||
+ (instancetype)notificationWithType:(RCChatroomKVNotificationType)type
|
||||
key:(NSString *)key
|
||||
value:(NSString *_Nullable)value
|
||||
extra:(NSString *)extra;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// RongChatRoom.h
|
||||
// RongChatRoom
|
||||
//
|
||||
// Created by RongCloud on 2020/8/12.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for RongChatRoom.
|
||||
FOUNDATION_EXPORT double RongChatRoomVersionNumber;
|
||||
|
||||
//! Project version string for RongChatRoom.
|
||||
FOUNDATION_EXPORT const unsigned char RongChatRoomVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <RongChatRoom/PublicHeader.h>
|
||||
#import <RongChatRoom/RCChatRoomClient.h>
|
||||
#import <RongChatRoom/RCChatRoomProtocol.h>
|
||||
#import <RongChatRoom/RCChatRoomEnumDefine.h>
|
||||
|
||||
#import <RongChatRoom/RCChatRoomInfo.h>
|
||||
#import <RongChatRoom/RCChatroomKVNotificationMessage.h>
|
||||
#import <RongChatRoom/RCChatRoomMemberInfo.h>
|
||||
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
framework module RongChatRoom {
|
||||
umbrella header "RongChatRoom.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
Binary file not shown.
@@ -1,222 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Headers/RCChatRoomClient.h</key>
|
||||
<data>
|
||||
bHxBhPeOLXuFASnXldyeV74YCWk=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomEnumDefine.h</key>
|
||||
<data>
|
||||
zv7mAsrXxtmdM/b8sHgXZr+DLWc=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomInfo.h</key>
|
||||
<data>
|
||||
1K8y8REFfhdvDjJFhzgNfjVN5sg=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomMemberInfo.h</key>
|
||||
<data>
|
||||
JNhNMYGwCqxCgS5Vj9cYeD/G7nA=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomProtocol.h</key>
|
||||
<data>
|
||||
NDf0pCQxJTn/x946UJFvBXuaXWU=
|
||||
</data>
|
||||
<key>Headers/RCChatroomKVNotificationMessage.h</key>
|
||||
<data>
|
||||
Dm+9WpeVGhsqtwWpIhMv3KH+/f4=
|
||||
</data>
|
||||
<key>Headers/RongChatRoom.h</key>
|
||||
<data>
|
||||
sjzv/jDEnB3IJ+CLA/NTTK5qVQo=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
ybf+p1Ql7FQghQgCVUBZ3xvVv4A=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
ii0hqjTTGnemjpGIXXGYCaoB99o=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/RCChatRoomClient.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
bHxBhPeOLXuFASnXldyeV74YCWk=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
le0FCKXdsYuhyP/972BrG0UVEw8dfFPqPG176nlwMDs=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomEnumDefine.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
zv7mAsrXxtmdM/b8sHgXZr+DLWc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
vOcMDTC0WmSYFq5KODZv+d9IDCyugugAGP+cqs9Y9gU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomInfo.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
1K8y8REFfhdvDjJFhzgNfjVN5sg=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
bhnKJoKVwRtOUdXzi83mWkE8+HIsbQexj+gFh7P4vYo=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomMemberInfo.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
JNhNMYGwCqxCgS5Vj9cYeD/G7nA=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
VC37urijk9NrXd4w+mPAB7nWZXr6E3/HcCp3neA4Wnw=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomProtocol.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
NDf0pCQxJTn/x946UJFvBXuaXWU=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
pJY+fGmISI50210cnPmVwzidjkw6YxrIuus/tCcvXXA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatroomKVNotificationMessage.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Dm+9WpeVGhsqtwWpIhMv3KH+/f4=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
aoprHJOrSa8R1D3TeScNxk4wH35GXRjU+HSN+1vLzG0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RongChatRoom.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
sjzv/jDEnB3IJ+CLA/NTTK5qVQo=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
bQ1x/StpqaAd5J3zYWInTmyaOH/yzA5WdSnG6vrkbC4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
ii0hqjTTGnemjpGIXXGYCaoB99o=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
wJMy+vWcBIzIHUTDDqJsgKqxiJI3RYxErBRoeokdByQ=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,493 +0,0 @@
|
||||
//
|
||||
// RCChatRoomClient.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2020/7/28.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
#import "RCChatRoomInfo.h"
|
||||
#import "RCChatRoomProtocol.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RCChatRoomClient : NSObject
|
||||
|
||||
+ (instancetype)sharedChatRoomClient;
|
||||
|
||||
#pragma mark - Chatroom Operation
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室(如果聊天室不存在则会创建)
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50
|
||||
@param successBlock 加入聊天室成功的回调
|
||||
@param errorBlock 加入聊天室失败的回调
|
||||
[status: 加入聊天室失败的错误码]
|
||||
|
||||
@discussion
|
||||
可以通过传入的 messageCount 设置加入聊天室成功之后需要获取的历史消息数量。
|
||||
-1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50
|
||||
为具体获取的消息数量,最大值为 50。注:如果是 7.x 系统获取历史消息数量不要大于 30
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
*
|
||||
Join a chatroom (it will be created if the chatroom does not exist).
|
||||
|
||||
@param targetId Chatroom ID.
|
||||
@param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50.
|
||||
@param successBlock Callback for successful joining of the chatroom
|
||||
@param errorBlock Callback for failing to join chatroom.
|
||||
[status: Error code for failure to join chatroom].
|
||||
|
||||
@ discussion
|
||||
You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully.
|
||||
-1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50.
|
||||
For the number of messages specifically obtained, the maximum value is 50. Note: if it is a 7.x system, the number of historical messages should not be greater than 30.
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)joinChatRoom:(NSString *)targetId
|
||||
messageCount:(int)messageCount
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入已经存在的聊天室(如果聊天室不存在返回错误 23410,人数超限返回错误 23411)
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param messageCount 进入聊天室时获取历史消息的数量,-1 <= messageCount <= 50
|
||||
@param successBlock 加入聊天室成功的回调
|
||||
@param errorBlock 加入聊天室失败的回调
|
||||
[status: 加入聊天室失败的错误码]
|
||||
|
||||
@warning
|
||||
注意:使用 IMKit 库的会话页面,viewDidLoad 会自动调用 joinChatRoom 加入聊天室(聊天室不存在会自动创建)。
|
||||
如果您只想加入已存在的聊天室,需要在 push 到会话页面之前调用这个方法并且 messageCount 传 -1,成功之后 push
|
||||
到会话页面,失败需要您做相应提示处理。
|
||||
|
||||
@discussion
|
||||
可以通过传入的 messageCount 设置加入聊天室成功之后,需要获取的历史消息数量。
|
||||
-1 表示不获取任何历史消息,0 表示不特殊设置而使用SDK默认的设置(默认为获取 10 条),0 < messageCount <= 50
|
||||
为具体获取的消息数量,最大值为 50。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
*
|
||||
Join an existing chatroom (return error 23410 if there is no chatroom, and return error 23411 if the number exceeds the limit).
|
||||
|
||||
@param targetId Chatroom ID.
|
||||
@param messageCount The number of historical messages obtained when entering the chatroom,-1 < = messageCount < = 50.
|
||||
@param successBlock Callback for successful joining of the chatroom
|
||||
@param errorBlock Callback for failing to join chatroom.
|
||||
[status: Error code for failing to join chatroom].
|
||||
|
||||
@ warning
|
||||
Note: using the conversation page of the IMKit library, viewDidLoad will automatically call joinChatRoom to join the chatroom (if the chatroom does not exist, it will be created automatically).
|
||||
If you only want to join an existing chatroom, you shall call this method before push to the conversation page and messageCount-1, and push after success.
|
||||
When you go to the conversation page, you shall be prompted to deal with the failure.
|
||||
|
||||
@ discussion
|
||||
You can use the passed messageCount to set the number of historical messages that shall be obtained after joining the chatroom successfully.
|
||||
-1 means that no history messages are obtained. 0 means to use the default setting of SDK without special settings (default value is to get 10 messages). 0 < messageCount < = 50.
|
||||
For the number of messages specifically obtained, the maximum value is 50.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)joinExistChatRoom:(NSString *)targetId
|
||||
messageCount:(int)messageCount
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
退出聊天室
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param successBlock 退出聊天室成功的回调
|
||||
@param errorBlock 退出聊天室失败的回调
|
||||
[status:退出聊天室失败的错误码]
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
|
||||
Quit the chatroom.
|
||||
|
||||
@param targetId Chatroom ID.
|
||||
@param successBlock Callback for successful exit from the chatroom.
|
||||
@param errorBlock Callback for failing to exit chatroom.
|
||||
[error code for status: 's failure to exit the chatroom].
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)quitChatRoom:(NSString *)targetId
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
获取聊天室的信息(包含部分成员信息和当前聊天室中的成员总数)
|
||||
|
||||
@param targetId 聊天室 ID
|
||||
@param count 需要获取的成员信息的数量(目前获取到的聊天室信息中仅包含不多于 20 人的成员信息,即 0 <= count <=
|
||||
20,传入 0 获取到的聊天室信息将或仅包含成员总数,不包含具体的成员列表)
|
||||
@param order 需要获取的成员列表的顺序(最早加入或是最晚加入的部分成员)
|
||||
@param successBlock 获取成功的回调 [chatRoomInfo:聊天室信息]
|
||||
@param errorBlock 获取失败的回调 [status:获取失败的错误码]
|
||||
|
||||
@discussion
|
||||
因为聊天室一般成员数量巨大,权衡效率和用户体验,目前返回的聊天室信息仅包含不多于 20
|
||||
人的成员信息和当前成员总数。如果您使用 RC_ChatRoom_Member_Asc
|
||||
升序方式查询,将返回最早加入的成员信息列表,按加入时间从旧到新排列;如果您使用 RC_ChatRoom_Member_Desc
|
||||
降序方式查询,将返回最晚加入的成员信息列表,按加入时间从新到旧排列。
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
*
|
||||
Get the information of the chatroom (including some member information and the total number of members in the current chatroom).
|
||||
|
||||
@param targetId chatroom ID.
|
||||
@param count The number of member information that shall be obtained (at present, the chatroom information obtained contains only the member information of no more than 20 people, that is, 0 < = count < =.
|
||||
20. The chatroom information obtained by passing 0 will contain only the total number of members, not a specific list of members).
|
||||
@param order The order of the list of members to be obtained (the earliest or the latest to join).
|
||||
@param successBlock Callback for successful getting [chatRoomInfo: chatroom information].
|
||||
@param errorBlock Callback for failed getting [status: error code for failed getting].
|
||||
|
||||
@ discussion
|
||||
Because of the large number of chatroom members and the tradeoff between efficiency and user experience, the chatroom information returned so far contains no more than 20%.
|
||||
The member information of the person and the total number of current members. If you use RC_ChatRoom_Member_Asc.
|
||||
Query in ascending order will return a list of the earliest member information, sorted from old to new by join time; if you use RC_ChatRoom_Member_Desc.
|
||||
The query in descending order will return a list of the latest member information, sorted from new to old according to the time of joining.
|
||||
|
||||
@ remarks chatroom
|
||||
*
|
||||
*/
|
||||
- (void)getChatRoomInfo:(NSString *)targetId
|
||||
count:(int)count
|
||||
order:(RCChatRoomMemberOrder)order
|
||||
success:(void (^)(RCChatRoomInfo *chatRoomInfo))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
设置 IMLib 的聊天室状态监听器
|
||||
|
||||
@param delegate IMLib 聊天室状态监听器
|
||||
|
||||
@remarks 聊天室
|
||||
*
|
||||
* \~english
|
||||
|
||||
Set the chatroom status listener for IMLib.
|
||||
|
||||
@param delegate IMLib chatroom status listener.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)setChatRoomStatusDelegate:(id<RCChatRoomStatusDelegate>)delegate;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
从服务器端获取聊天室的历史消息
|
||||
@param targetId 聊天室ID
|
||||
@param recordTime 起始的消息发送时间戳,毫秒
|
||||
@param count 需要获取的消息数量, 0 < count <= 200
|
||||
@param order 拉取顺序,RC_Timestamp_Desc:倒序,RC_Timestamp_ASC:正序
|
||||
@param successBlock 获取成功的回调 [messages:获取到的历史消息数组, syncTime:下次拉取消息的时间戳]
|
||||
@param errorBlock 获取失败的回调 [status:获取失败的错误码]
|
||||
|
||||
@discussion
|
||||
此方法从服务器端获取聊天室的历史消息,但是必须先开通聊天室消息云存储功能。
|
||||
指定开始时间,比如20169月1日10点(1472695200000),
|
||||
默认是0(正序:从存储的第一条消息开始拉取,倒序:从存储的最后一条消息开始拉取)
|
||||
|
||||
* \~english
|
||||
|
||||
Get the historical message of the chatroom from the server side.
|
||||
@param targetId Chatroom ID.
|
||||
@param recordTime Initial message sending timestamp, millisecond.
|
||||
@param count The number of messages to be obtained. 0 < count < = 200.
|
||||
@param order Pull order, RC_Timestamp_Desc: reverse order, RC_Timestamp_ASC: positive order.
|
||||
@param successBlock Callback for successful getting [the array of historical messages obtained by messages:, and the timestamp of the next message pulled by syncTime:].
|
||||
@param errorBlock Callback for getting failure [status: Get failed error code].
|
||||
|
||||
@ discussion
|
||||
This method obtains the historical messages of chatrooms from the server, but must first activate the chatroom message cloud storage feature.
|
||||
Specify a start time, such as 10:00 on September 1, 2016 (1472695200000).
|
||||
The default value is 0 (positive order: pull from the first message stored, reverse order: pull from the last message stored).
|
||||
*/
|
||||
- (void)getRemoteChatroomHistoryMessages:(NSString *)targetId
|
||||
recordTime:(long long)recordTime
|
||||
count:(int)count
|
||||
order:(RCTimestampOrder)order
|
||||
success:(void (^)(NSArray *messages, long long syncTime))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
#pragma mark - chatroom state storage function (It must first activate the chatroom state storage function)
|
||||
/*!
|
||||
* \~chinese
|
||||
设置聊天室 KV 状态变化监听器
|
||||
|
||||
@param delegate 聊天室 KV 状态变化的监听器
|
||||
|
||||
@discussion 可以设置并实现此 delegate 来进行聊天室状态变化的监听 。SDK 会在回调中通知您聊天室状态的改变。
|
||||
|
||||
@remarks 功能设置
|
||||
|
||||
* \~english
|
||||
|
||||
Set chatroom KV status change listener.
|
||||
|
||||
@param delegate Listeners for KV status changes in chatrooms.
|
||||
|
||||
@ discussion It can set and implement this delegate to listen to chatroom state changes. SDK will notify you of the change in the status of the chatroom in the callback.
|
||||
|
||||
@ remarks function setting
|
||||
*/
|
||||
- (void)setRCChatRoomKVStatusChangeDelegate:(id<RCChatRoomKVStatusChangeDelegate>)delegate;
|
||||
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
设置聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符
|
||||
@param value 聊天室属性对应的值,最大长度 4096 个字符
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知
|
||||
@param notificationExtra 通知的自定义字段,RC:chrmKVNotiMsg 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值,且只有 key
|
||||
的创建者可以更新属性的值。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
|
||||
Set chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters.
|
||||
@param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted.
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RC:chrmKVNotiMsg notification message with a maximum length of 2 kb.
|
||||
@ param successBlock callback for success.
|
||||
@ param errorBlock callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
Set the custom attribute of the chatroom. When key does not exist, it means to add the attribute; when key already exists, it represents the value of the updated attribute, and only key.
|
||||
Can update the value of the property.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)setChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
value:(NSString *)value
|
||||
sendNotification:(BOOL)sendNotification
|
||||
autoDelete:(BOOL)autoDelete
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
强制设置聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称,Key 支持大小写英文字母、数字、部分特殊符号 + = - _ 的组合方式,最大长度 128 个字符
|
||||
@param value 聊天室属性对应的值,最大长度 4096 个字符
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param autoDelete 用户掉线或退出时,是否自动删除该 Key、Value 值;自动删除时不会发送通知
|
||||
@param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
强制设置聊天室自定义属性,当 key 不存在时,代表增加属性; 当 key 已经存在时,代表更新属性的值。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Force the setting of chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name. Key supports the combination of uppercase and lowercase letters, numbers and some special symbols + =-_. The maximum length is 128 characters.
|
||||
@param value The value corresponding to the chatroom attribute, with a maximum length of 4096 characters.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param autoDelete Whether the Key and Value values are automatically deleted when the user is dropped or exited; no notification will be sent when the user is automatically deleted.
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb.
|
||||
@param successBlock callback for success.
|
||||
@param errorBlock callback for failure
|
||||
|
||||
@discussion It must first activate the chatroom state storage function.
|
||||
Force the chatroom custom property to be set, which means to add the property when the key does not exist, or to update the value of the property when the key already exists.
|
||||
|
||||
@remarks chatroom
|
||||
*/
|
||||
- (void)forceSetChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
value:(NSString *)value
|
||||
sendNotification:(BOOL)sendNotification
|
||||
autoDelete:(BOOL)autoDelete
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
获取聊天室单个属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Get a single attribute of a chatroom.
|
||||
|
||||
@param chatroomId chatroom ID.
|
||||
@param key chatroom attribute name.
|
||||
@param successBlock Callback for success.
|
||||
@param errorBlock Callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)getChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
success:(void (^)(NSDictionary *entry))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
获取聊天室所有自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
|
||||
Get all attributes of a chatroom.
|
||||
|
||||
@param chatroomId chatroom ID.
|
||||
@param successBlock Callback for success.
|
||||
@param errorBlock Callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
|
||||
@ remarks chatroom.
|
||||
*/
|
||||
- (void)getAllChatRoomEntries:(NSString *)chatroomId
|
||||
success:(void (^)(NSDictionary *entry))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
删除聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
删除聊天室自定义属性,只有自己设置的属性可以被删除。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Delete chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb.
|
||||
@ param successBlock Callback for success
|
||||
@ param errorBlock Callback for failure
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
The custom properties of the chatroom are deleted and only the properties set by yourself can be deleted.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)removeChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
sendNotification:(BOOL)sendNotification
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
强制删除聊天室自定义属性
|
||||
|
||||
@param chatroomId 聊天室 ID
|
||||
@param key 聊天室属性名称
|
||||
@param sendNotification 是否需要发送通知,如果发送通知,聊天室中的其他用户会接收到 RCChatroomKVNotificationMessage
|
||||
通知消息,消息内容中包含操作类型(type)、属性名称(key)、属性名称对应的值(value)和自定义字段(extra)
|
||||
@param notificationExtra 通知的自定义字段,RCChatroomKVNotificationMessage 通知消息中会包含此字段,最大长度 2 kb
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
@discussion 必须先开通聊天室状态存储功能
|
||||
强制删除聊天室自定义属性。
|
||||
|
||||
@remarks 聊天室
|
||||
|
||||
* \~english
|
||||
Force deletion of chatroom custom properties.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param key Chatroom attribute name.
|
||||
@param sendNotification Do you shall send a notification? if you send a notification, other users in the chatroom will receive RCChatroomKVNotificationMessage.
|
||||
Notification message, which contains the action type (type), the attribute name (key), the value (value) corresponding to the attribute name, and the custom field (extra).
|
||||
@param notificationExtra The custom field of the notification, which will be included in the RCChatroomKVNotificationMessage notification message with a maximum length of 2 kb.
|
||||
@ param successBlock callback successfully.
|
||||
@ param errorBlock failed callback.
|
||||
|
||||
@ discussion It must first activate the chatroom state storage function.
|
||||
Force the deletion of chatroom custom properties.
|
||||
|
||||
@ remarks chatroom
|
||||
*/
|
||||
- (void)forceRemoveChatRoomEntry:(NSString *)chatroomId
|
||||
key:(NSString *)key
|
||||
sendNotification:(BOOL)sendNotification
|
||||
notificationExtra:(NSString *)notificationExtra
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,95 +0,0 @@
|
||||
//
|
||||
// RCChatRoomEnumDefine.h
|
||||
// RongChatRoom
|
||||
//
|
||||
// Created by RongCloud on 2020/8/12.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#ifndef RCChatRoomEnumDefine_h
|
||||
#define RCChatRoomEnumDefine_h
|
||||
|
||||
#pragma mark RCChatRoomStatus
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室状态码
|
||||
*
|
||||
* \~english
|
||||
* Chatroom status code
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, RCChatRoomStatus) {
|
||||
/*!
|
||||
* \~chinese
|
||||
正在加入聊天室中
|
||||
* \~english
|
||||
Joining the chatroom
|
||||
*/
|
||||
RCChatRoomStatus_Joining = 1,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室成功
|
||||
* \~english
|
||||
Join the chatroom successfully
|
||||
*/
|
||||
RCChatRoomStatus_Joined = 2,
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室失败
|
||||
* \~english
|
||||
Failed to join chatroom
|
||||
*/
|
||||
RCChatRoomStatus_JoinFailed = 3,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
退出了聊天室
|
||||
* \~english
|
||||
Quit the chatroom
|
||||
*/
|
||||
RCChatRoomStatus_Quited = 4,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室被销毁
|
||||
* \~english
|
||||
The chatroom is destroyed
|
||||
*/
|
||||
RCChatRoomStatus_Destroyed = 5,
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室被重置
|
||||
由于聊天室长时间不活跃,已经被系统回收。聊天室 KV 已经被清空,请开发者刷新界面。
|
||||
* \~english
|
||||
The chatroom is reset.
|
||||
As the chatroom has been inactive for a long time, it has been recycled by the system. The chatroom KV has been emptied, please refresh the interface.
|
||||
*/
|
||||
RCChatRoomStatus_Reset = 6,
|
||||
|
||||
};
|
||||
|
||||
#pragma mark RCChatRoomMemberOrder
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室成员的排列顺序
|
||||
* \~english
|
||||
The order of chatroom members
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger, RCChatRoomMemberOrder) {
|
||||
/*!
|
||||
* \~chinese
|
||||
升序,返回最早加入的成员列表
|
||||
* \~english
|
||||
Ascending order, return the list of the earliest members
|
||||
*/
|
||||
RC_ChatRoom_Member_Asc = 1,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
降序,返回最晚加入的成员列表
|
||||
* \~english
|
||||
Descending order, return the list of the latest members
|
||||
*/
|
||||
RC_ChatRoom_Member_Desc = 2,
|
||||
};
|
||||
#endif /* RCChatRoomEnumDefine_h */
|
||||
@@ -1,61 +0,0 @@
|
||||
//
|
||||
// RCChatRoomInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/1/11.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCChatRoomMemberInfo.h"
|
||||
#import "RCChatRoomEnumDefine.h"
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室信息类
|
||||
* \~english
|
||||
Chatroom information class
|
||||
*/
|
||||
@interface RCChatRoomInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室 ID
|
||||
* \~english
|
||||
Chatroom ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *targetId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
包含的成员信息类型
|
||||
* \~english
|
||||
Type of member information included
|
||||
*/
|
||||
@property (nonatomic, assign) RCChatRoomMemberOrder memberOrder;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室中的部分成员信息 RCChatRoomMemberInfo 列表
|
||||
|
||||
@discussion
|
||||
如果成员类型为 RC_ChatRoom_Member_Asc,则为最早加入的成员列表,按成员加入时间升序排列;
|
||||
如果成员类型为 RC_ChatRoom_Member_Desc,则为最晚加入的成员列表,按成员加入时间降序排列。
|
||||
|
||||
* \~english
|
||||
RCChatRoomMemberInfo list of some member information in the chatroom.
|
||||
|
||||
@ discussion
|
||||
If the member type is RC_ChatRoom_Member_Asc, it is the list of the earliest members, sorted in ascending order by the time they are added.
|
||||
If the member type is RC_ChatRoom_Member_Desc, it is the list of the latest members, sorted in descending order by the time they are added.
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray <RCChatRoomMemberInfo *> *memberInfoArray;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前聊天室的成员总数
|
||||
* \~english
|
||||
Total number of members of the current chatroom.
|
||||
*/
|
||||
@property (nonatomic, assign) int totalMemberCount;
|
||||
|
||||
@end
|
||||
@@ -1,35 +0,0 @@
|
||||
//
|
||||
// RCChatRoomMemberInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/1/10.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室成员信息类
|
||||
* \~english
|
||||
Chatroom member information class
|
||||
*/
|
||||
@interface RCChatRoomMemberInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
用户 ID
|
||||
* \~english
|
||||
User ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *userId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
用户加入聊天室时间(Unix 时间戳,毫秒)
|
||||
* \~english
|
||||
Time when the user joins the chatroom (Unix timestamp, milliseconds)
|
||||
*/
|
||||
@property (nonatomic, assign) long long joinTime;
|
||||
|
||||
@end
|
||||
@@ -1,194 +0,0 @@
|
||||
//
|
||||
// RCChatRoomProtocol.h
|
||||
// RongChatRoom
|
||||
//
|
||||
// Created by RongCloud on 2020/8/12.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef RCChatRoomProtocol_h
|
||||
#define RCChatRoomProtocol_h
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RCChatRoomDestroyType) {
|
||||
/*!
|
||||
* \~chinese
|
||||
开发者主动销毁
|
||||
* \~english
|
||||
Developers take the initiative to destroy
|
||||
*/
|
||||
RCChatRoomDestroyTypeManual = 0,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室长时间不活跃,被系统自动回收
|
||||
* \~english
|
||||
The chatroom is inactive for a long time and is automatically recycled by the system.
|
||||
*/
|
||||
RCChatRoomDestroyTypeAuto = 3
|
||||
};
|
||||
|
||||
#pragma mark - RCChatRoomStatusDelegate
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室状态的的监听器
|
||||
|
||||
@discussion
|
||||
设置IMLib的聊天室状态监听器,请参考 RCChatRoomClient 的 setChatRoomStatusDelegate: 方法。
|
||||
|
||||
* \~english
|
||||
Listeners for the status of chatrooms.
|
||||
|
||||
@ discussion
|
||||
To set the chatroom status listener of chatroom, please refer to the setChatRoomStatusDelegate: method of RCChatRoomClient.
|
||||
*/
|
||||
@protocol RCChatRoomStatusDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
开始加入聊天室的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
Callback for joining the chatroom.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomJoining:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室成功的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
Callback for successful joining of the chatroom
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomJoined:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室失败的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
@param errorCode 加入失败的错误码
|
||||
|
||||
@discussion
|
||||
如果错误码是 KICKED_FROM_CHATROOM 或 RC_CHATROOM_NOT_EXIST ,则不会自动重新加入聊天室,App需要按照自己的逻辑处理。
|
||||
|
||||
* \~english
|
||||
Callback for failed to join chatroom.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param errorCode Add a failed error code.
|
||||
|
||||
@ discussion
|
||||
If the error code is KICKED_FROM_CHATROOM or RC_CHATROOM_NOT_EXIST, it will not automatically rejoin the chatroom, App shall follow its own logic.
|
||||
*/
|
||||
- (void)onChatRoomJoinFailed:(NSString *)chatroomId errorCode:(RCErrorCode)errorCode;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
加入聊天室成功,但是聊天室被重置。接收到此回调后,还会收到 onChatRoomJoined:回调。
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
The chatroom is jointed successfully, but the chatroom is reset. After receiving this callback, you will also receive an onChatRoomJoined: callback.
|
||||
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomReset:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
退出聊天室成功的回调
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
|
||||
* \~english
|
||||
Callback for successful exit from the chatroom
|
||||
@param chatroomId Chatroom ID.
|
||||
*/
|
||||
- (void)onChatRoomQuited:(NSString *)chatroomId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室被销毁的回调,用户在线的时候房间被销毁才会收到此回调。
|
||||
|
||||
@param chatroomId 聊天室ID
|
||||
@param type 聊天室销毁原因
|
||||
|
||||
* \~english
|
||||
The callback in which the chatroom is destructed. The callback will only be received when the room is destructed when the user is online.
|
||||
|
||||
@param chatroomId Chatroom ID.
|
||||
@param type Reasons for the destruction of chatrooms.
|
||||
*/
|
||||
- (void)onChatRoomDestroyed:(NSString *)chatroomId type:(RCChatRoomDestroyType)type;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#pragma mark - RCChatRoomKVStatusChangeDelegate
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 聊天室 KV 状态变化监听器
|
||||
@discussion 设置代理请参考 RCIMClient 的 setRCChatRoomKVStatusChangeDelegate: 方法。
|
||||
|
||||
* \~english
|
||||
ChatRoom ChatRoom KV Status ChangeDelegate
|
||||
@discussion Please refer to the setRCChatRoomKVStatusChangeDelegate: method of RCChatRoomClient。
|
||||
*/
|
||||
@protocol RCChatRoomKVStatusChangeDelegate <NSObject>
|
||||
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 刚加入聊天室时 KV 同步完成的回调
|
||||
|
||||
@param roomId 聊天室 Id
|
||||
|
||||
* \~english
|
||||
Callback of ChatRoom kv did sync
|
||||
@param roomId ChatRoom Id
|
||||
*/
|
||||
- (void)chatRoomKVDidSync:(NSString *)roomId;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 聊天室 KV 变化的回调
|
||||
|
||||
@param roomId 聊天室 Id
|
||||
@param entry KV 字典,如果刚进入聊天室时存在 KV,会通过此回调将所有 KV 返回,再次回调时为其他人设置或者修改 KV
|
||||
|
||||
* \~english
|
||||
Callback of Chatroom kv update
|
||||
@param roomId ChatRoom Id
|
||||
@param entry KV map,If there are KVs when you first enter the chat room, all KVs will be returned through this callback. When you call back again, you can set or modify the KVs for others
|
||||
*/
|
||||
- (void)chatRoomKVDidUpdate:(NSString *)roomId entry:(NSDictionary<NSString *, NSString *> *)entry;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
ChatRoom 聊天室 KV 被删除的回调
|
||||
|
||||
@param roomId 聊天室 Id
|
||||
@param entry KV 字典
|
||||
|
||||
* \~english
|
||||
Callback when chat room KV is deleted
|
||||
@param roomId Chatroom Id
|
||||
@param entry KV dictionary
|
||||
*/
|
||||
- (void)chatRoomKVDidRemove:(NSString *)roomId entry:(NSDictionary<NSString *, NSString *> *)entry;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* RCChatRoomProtocol_h */
|
||||
@@ -1,113 +0,0 @@
|
||||
//
|
||||
// RCChatroomKVNotificationMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2019/10/14.
|
||||
// Copyright © 2019 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室自定义属性通知消息的类型名
|
||||
* \~english
|
||||
The type name of the custom property notification message of chatroom
|
||||
*/
|
||||
#define RCChatroomKVNotificationMessageTypeIdentifier @"RC:chrmKVNotiMsg"
|
||||
|
||||
typedef NS_ENUM(NSInteger, RCChatroomKVNotificationType) {
|
||||
/*!
|
||||
* \~chinese
|
||||
设置 KV 的操作
|
||||
* \~english
|
||||
Set the operation of KV.
|
||||
*/
|
||||
RCChatroomKVNotificationTypeSet = 1,
|
||||
/*!
|
||||
* \~chinese
|
||||
删除 KV 的操作
|
||||
* \~english
|
||||
Delete KV operation.
|
||||
*/
|
||||
RCChatroomKVNotificationTypeRemove = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
聊天室自定义属性通知消息
|
||||
|
||||
@discussion 不要随意构造此类消息发送,调用设置或者删除接口时会自动构建。
|
||||
@discussion 此消息不存储不计入未读消息数。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Custom attribute notification message of chatroom
|
||||
|
||||
@ discussion do not construct this kind of message for sending at will, which will be built automatically when you call the interface to set or delete.
|
||||
@ discussion This message is not stored and does not count as unread messages.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCChatroomKVNotificationMessage : RCMessageContent
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室操作的类型
|
||||
* \~english
|
||||
Types of chatroom operations
|
||||
*/
|
||||
@property (nonatomic, assign) RCChatroomKVNotificationType type;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室属性名称
|
||||
* \~english
|
||||
Chatroom attribute name
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *key;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
聊天室属性对应的值
|
||||
* \~english
|
||||
The value corresponding to the chatroom attribute
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *value;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
通知消息的自定义字段,最大长度 2 kb
|
||||
* \~english
|
||||
Custom field of notification message with a maximum length of 2 kb.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *extra;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化聊天室自定义属性通知消息
|
||||
|
||||
@param key 聊天室属性名称
|
||||
@param value 聊天室属性对应的值(删除 key 时不用传)
|
||||
@param extra 通知消息的自定义字段
|
||||
@return 聊天室自定义属性通知消息的对象
|
||||
|
||||
* \~english
|
||||
Initialize chatroom custom property notification message.
|
||||
|
||||
@param key Chatroom attribute name.
|
||||
@param value The value corresponding to the chatroom attribute (you need not pass it when deleting key).
|
||||
@param extra Custom fields for notification messages.
|
||||
@ return chatroom custom attribute notification message object.
|
||||
*/
|
||||
+ (instancetype)notificationWithType:(RCChatroomKVNotificationType)type
|
||||
key:(NSString *)key
|
||||
value:(NSString *_Nullable)value
|
||||
extra:(NSString *)extra;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// RongChatRoom.h
|
||||
// RongChatRoom
|
||||
//
|
||||
// Created by RongCloud on 2020/8/12.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//! Project version number for RongChatRoom.
|
||||
FOUNDATION_EXPORT double RongChatRoomVersionNumber;
|
||||
|
||||
//! Project version string for RongChatRoom.
|
||||
FOUNDATION_EXPORT const unsigned char RongChatRoomVersionString[];
|
||||
|
||||
// In this header, you should import all the public headers of your framework using statements like #import <RongChatRoom/PublicHeader.h>
|
||||
#import <RongChatRoom/RCChatRoomClient.h>
|
||||
#import <RongChatRoom/RCChatRoomProtocol.h>
|
||||
#import <RongChatRoom/RCChatRoomEnumDefine.h>
|
||||
|
||||
#import <RongChatRoom/RCChatRoomInfo.h>
|
||||
#import <RongChatRoom/RCChatroomKVNotificationMessage.h>
|
||||
#import <RongChatRoom/RCChatRoomMemberInfo.h>
|
||||
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
framework module RongChatRoom {
|
||||
umbrella header "RongChatRoom.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
Binary file not shown.
@@ -1,222 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict>
|
||||
<key>Headers/RCChatRoomClient.h</key>
|
||||
<data>
|
||||
bHxBhPeOLXuFASnXldyeV74YCWk=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomEnumDefine.h</key>
|
||||
<data>
|
||||
zv7mAsrXxtmdM/b8sHgXZr+DLWc=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomInfo.h</key>
|
||||
<data>
|
||||
1K8y8REFfhdvDjJFhzgNfjVN5sg=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomMemberInfo.h</key>
|
||||
<data>
|
||||
JNhNMYGwCqxCgS5Vj9cYeD/G7nA=
|
||||
</data>
|
||||
<key>Headers/RCChatRoomProtocol.h</key>
|
||||
<data>
|
||||
NDf0pCQxJTn/x946UJFvBXuaXWU=
|
||||
</data>
|
||||
<key>Headers/RCChatroomKVNotificationMessage.h</key>
|
||||
<data>
|
||||
Dm+9WpeVGhsqtwWpIhMv3KH+/f4=
|
||||
</data>
|
||||
<key>Headers/RongChatRoom.h</key>
|
||||
<data>
|
||||
sjzv/jDEnB3IJ+CLA/NTTK5qVQo=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
xKJYVFCG2/025LTd2FGcL2hfYK0=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
ii0hqjTTGnemjpGIXXGYCaoB99o=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
<dict>
|
||||
<key>Headers/RCChatRoomClient.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
bHxBhPeOLXuFASnXldyeV74YCWk=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
le0FCKXdsYuhyP/972BrG0UVEw8dfFPqPG176nlwMDs=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomEnumDefine.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
zv7mAsrXxtmdM/b8sHgXZr+DLWc=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
vOcMDTC0WmSYFq5KODZv+d9IDCyugugAGP+cqs9Y9gU=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomInfo.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
1K8y8REFfhdvDjJFhzgNfjVN5sg=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
bhnKJoKVwRtOUdXzi83mWkE8+HIsbQexj+gFh7P4vYo=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomMemberInfo.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
JNhNMYGwCqxCgS5Vj9cYeD/G7nA=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
VC37urijk9NrXd4w+mPAB7nWZXr6E3/HcCp3neA4Wnw=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatRoomProtocol.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
NDf0pCQxJTn/x946UJFvBXuaXWU=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
pJY+fGmISI50210cnPmVwzidjkw6YxrIuus/tCcvXXA=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RCChatroomKVNotificationMessage.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
Dm+9WpeVGhsqtwWpIhMv3KH+/f4=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
aoprHJOrSa8R1D3TeScNxk4wH35GXRjU+HSN+1vLzG0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/RongChatRoom.h</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
sjzv/jDEnB3IJ+CLA/NTTK5qVQo=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
bQ1x/StpqaAd5J3zYWInTmyaOH/yzA5WdSnG6vrkbC4=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<dict>
|
||||
<key>hash</key>
|
||||
<data>
|
||||
ii0hqjTTGnemjpGIXXGYCaoB99o=
|
||||
</data>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
wJMy+vWcBIzIHUTDDqJsgKqxiJI3RYxErBRoeokdByQ=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^Base\.lproj/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>1010</real>
|
||||
</dict>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-i386_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>RongIMLibCore.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>i386</string>
|
||||
<string>x86_64</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
<key>SupportedPlatformVariant</key>
|
||||
<string>simulator</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_armv7</string>
|
||||
<key>LibraryPath</key>
|
||||
<string>RongIMLibCore.framework</string>
|
||||
<key>SupportedArchitectures</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>SupportedPlatform</key>
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>XFWK</string>
|
||||
<key>XCFrameworkFormatVersion</key>
|
||||
<string>1.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,93 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCAMRDataConverter.h
|
||||
// Created by Heq.Shinoda on 14-6-17.
|
||||
|
||||
#ifndef __RCAMRDataConverter
|
||||
#define __RCAMRDataConverter
|
||||
|
||||
#include "interf_dec.h"
|
||||
#include "interf_enc.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
AMR 格式与 WAV 格式音频转换工具类
|
||||
* \~english
|
||||
AMR format and WAV format audio conversion tool class
|
||||
*/
|
||||
@interface RCAMRDataConverter : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
获取 AMR 格式与 WAV 格式音频转换工具类单例
|
||||
|
||||
@return AMR 格式与 WAV 格式音频转换工具类单例
|
||||
|
||||
* \~english
|
||||
Get a single example of the audio conversion tool class between AMR format and WAV format.
|
||||
|
||||
@ return Single example of AMR format and WAV format Audio conversion tool class.
|
||||
*/
|
||||
+ (RCAMRDataConverter *)sharedAMRDataConverter;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将 AMR 格式的音频数据转化为 WAV 格式的音频数据
|
||||
|
||||
@param data AMR 格式的音频数据,可以是 AMR-NB 或者 AMR-WB 格式
|
||||
@return WAV 格式的音频数据
|
||||
|
||||
* \~english
|
||||
Convert audio data in AMR format to audio data in WAV format.
|
||||
|
||||
@param data Audio data in AMR format, which can be AMR-NB or AMR-WB format.
|
||||
@ return WAV format audio data.
|
||||
*/
|
||||
- (NSData *)decodeAMRToWAVE:(NSData *)data;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将 AMR 格式的音频数据转化为 WAV 格式的音频数据
|
||||
|
||||
@param data AMR格式的音频数据,必须是 AMR-NB 的格式
|
||||
@return WAV格式的音频数据
|
||||
|
||||
* \~english
|
||||
Convert audio data in AMR format to audio data in WAV format.
|
||||
|
||||
@param data Audio data in AMR format, must be in AMR-NB format.
|
||||
@ return WAV format audio data.
|
||||
*/
|
||||
- (NSData *)decodeAMRToWAVEWithoutHeader:(NSData *)data;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将 WAV 格式的音频数据转化为 AMR 格式的音频数据(8KHz/16KHz 采样)
|
||||
|
||||
@param data WAV 格式的音频数据
|
||||
@return AMR-NB/AMR-WB 格式的音频数据
|
||||
@discussion 如果采样率为 8KHz 则返回 AMR-NB 格式数据,如果采样率为 16KHz 则返回 AMR-WB 格式数据。
|
||||
|
||||
* \~english
|
||||
Convert audio data in WAV format to audio data in AMR format (8KHz/16KHz sampling).
|
||||
|
||||
@param data Audio data in WAV format.
|
||||
@ return AMR-NB/AMR-WB format audio data.
|
||||
@ discussion Return data in AMR-NB format if the sampling rate is 8KHz and AMR-WB format if the sampling rate is 16KHz.
|
||||
*/
|
||||
- (NSData *)encodeWAVEToAMR:(NSData *)data;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
@@ -1,124 +0,0 @@
|
||||
//
|
||||
// RCAndroidConfig.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2020/9/17.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
华为推送消息级别
|
||||
* \~english
|
||||
Huawei push level
|
||||
*/
|
||||
typedef NSString *RCImportanceHw NS_STRING_ENUM;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
华为推送消息级别 NORMAL
|
||||
* \~english
|
||||
Huawei push level : NORMAL
|
||||
*/
|
||||
FOUNDATION_EXPORT RCImportanceHw const RCImportanceHwNormal;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
华为推送消息级别 LOW
|
||||
* \~english
|
||||
Huawei push level : LOW
|
||||
*/
|
||||
FOUNDATION_EXPORT RCImportanceHw const RCImportanceHwLow;
|
||||
|
||||
|
||||
|
||||
@interface RCAndroidConfig : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
Android 平台 Push 唯一标识
|
||||
目前支持小米、华为推送平台,默认开发者不需要进行设置,当消息产生推送时,消息的 messageUId 作为 notificationId 使用。
|
||||
|
||||
* \~english
|
||||
Unique identification of Android platform Push.
|
||||
Currently, Xiaomi and Huawei push platforms are supported. Developers need not set them by default. When a message generates a push, the messageUId of the message is used as a notificationId.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *notificationId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
小米的渠道 ID
|
||||
该条消息针对小米使用的推送渠道,如开发者集成了小米推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。
|
||||
|
||||
* \~english
|
||||
Xiaomi's channel ID.
|
||||
This message is aimed at the push channel used by Xiaomi. If the developer integrates Xiaomi push and shall specify a channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *channelIdMi;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
华为的渠道 ID
|
||||
该条消息针对华为使用的推送渠道,如开发者集成了华为推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。
|
||||
|
||||
* \~english
|
||||
Huawei's channel ID.
|
||||
This message is aimed at the push channel used by Huawei. If the developer integrates Huawei push and shall specify a channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *channelIdHW;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
OPPO 的渠道 ID
|
||||
该条消息针对 OPPO 使用的推送渠道,如开发者集成了 OPPO 推送,需要指定 channelId 时,可向 Android 端研发人员获取,channelId 由开发者自行创建。
|
||||
|
||||
* \~english
|
||||
OPPO Channel ID.
|
||||
This message is aimed at the push channel used by OPPO. For example, if the developer integrates OPPO push and shall specify the channelId, it can be obtained from the developer on the Android side, and the channelId is created by the developer.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *channelIdOPPO;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
VIVO 推送通道类型
|
||||
开发者集成了 VIVO 推送,需要指定推送类型时,可进行设置。
|
||||
目前可选值 "0"(运营消息) 和 "1"(系统消息)
|
||||
|
||||
* \~english
|
||||
VIVO push channel type.
|
||||
Developers have integrated VIVO push, which can be set when you shall specify the push type.
|
||||
Currently available values "0" (operation message) and "1" (system message)
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *typeVivo;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
FCM 通知类型推送时所使用的分组 id
|
||||
* \~english
|
||||
Packet id used in FCM notification type push
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *fcmCollapseKey;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
FCM 通知类型的推送所使用的通知图片 url
|
||||
* \~english
|
||||
Notification image url used for push of FCM notification type
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *fcmImageUrl;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
华为推送消息级别
|
||||
* \~english
|
||||
Huawei push level
|
||||
*/
|
||||
@property (nonatomic, copy) RCImportanceHw importanceHW;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,75 +0,0 @@
|
||||
//
|
||||
// RCCommandMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 15/12/2.
|
||||
// Copyright © 2015 RongCloud. All rights reserved.
|
||||
//
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令消息的类型名
|
||||
* \~english
|
||||
The type name of the command message
|
||||
*/
|
||||
#define RCCommandMessageIdentifier @"RC:CmdMsg"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令消息类
|
||||
|
||||
@discussion 命令消息类,此消息不存储不计入未读消息数。
|
||||
与 RCCommandNotificationMessage 的区别是,此消息不存储,也不会在界面上显示。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Command message class.
|
||||
|
||||
@ discussion command message class, this message is not stored and does not count as unread messages.
|
||||
Unlike RCCommandNotificationMessage, this message is not stored and will not be displayed on the interface.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCCommandMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令的名称
|
||||
* \~english
|
||||
The name of the command
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令的扩展数据
|
||||
|
||||
@discussion 命令的扩展数据,可以为任意字符串,如存放您定义的json数据。
|
||||
|
||||
* \~english
|
||||
Extended data for the command.
|
||||
|
||||
@ discussion The extended data of the command can be any string, such as storing the json data you define.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *data;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化命令消息
|
||||
|
||||
@param name 命令的名称
|
||||
@param data 命令的扩展数据
|
||||
@return 命令消息对象
|
||||
|
||||
* \~english
|
||||
Initialize command message.
|
||||
|
||||
@param name The name of the command.
|
||||
@param data Extended data for the command.
|
||||
@ return command message object.
|
||||
*/
|
||||
+ (instancetype)messageWithName:(NSString *)name data:(NSString *)data;
|
||||
|
||||
@end
|
||||
@@ -1,81 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCCommandNotificationMessage.h
|
||||
// Created by xugang on 14/11/28.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令提醒消息的类型名
|
||||
* \~english
|
||||
The type name of the command reminder message.
|
||||
*/
|
||||
#define RCCommandNotificationMessageIdentifier @"RC:CmdNtf"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令提醒消息类
|
||||
|
||||
@discussion 命令消息类,此消息会进行存储,但不计入未读消息数。
|
||||
与 RCCommandMessage 的区别是,此消息会进行存储并在界面上显示。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Command reminder message class.
|
||||
|
||||
@ discussion Command message class, which is stored but does not count as unread messages.
|
||||
Unlike RCCommandMessage, this message is stored and displayed on the interface.
|
||||
|
||||
@ remarks notification message.
|
||||
*/
|
||||
@interface RCCommandNotificationMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令提醒的名称
|
||||
|
||||
* \~english
|
||||
The name of the command reminder
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
命令提醒消息的扩展数据
|
||||
|
||||
@discussion 命令提醒消息的扩展数据,可以为任意字符串,如存放您定义的 json 数据。
|
||||
|
||||
* \~english
|
||||
Extended data for command reminder messages.
|
||||
|
||||
@ discussion The extended data of the command reminder message can be any string, such as storing the json data you defined.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *data;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化命令提醒消息
|
||||
|
||||
@param name 命令的名称
|
||||
@param data 命令的扩展数据
|
||||
@return 命令提醒消息对象
|
||||
|
||||
* \~english
|
||||
Initialization command reminder message.
|
||||
|
||||
@param name The name of the command.
|
||||
@param data Extended data for the command.
|
||||
@ return Command reminder message object.
|
||||
*/
|
||||
+ (instancetype)notificationWithName:(NSString *)name data:(NSString *)data;
|
||||
|
||||
@end
|
||||
@@ -1,143 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCContactNotificationMessage.h
|
||||
// Created by xugang on 14/11/28.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
好友请求消息的类型名
|
||||
* \~english
|
||||
The type name of the friend request message.
|
||||
*/
|
||||
#define RCContactNotificationMessageIdentifier @"RC:ContactNtf"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
请求添加好友
|
||||
* \~english
|
||||
Request to add friends.
|
||||
*/
|
||||
#define ContactNotificationMessage_ContactOperationRequest @"Request"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
同意添加好友的请求
|
||||
* \~english
|
||||
Agree to the request to add friends.
|
||||
*/
|
||||
#define ContactNotificationMessage_ContactOperationAcceptResponse @"AcceptResponse"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
拒绝添加好友的请求
|
||||
* \~english
|
||||
Reject the request to add friends
|
||||
*/
|
||||
#define ContactNotificationMessage_ContactOperationRejectResponse @"RejectResponse"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
好友请求消息类
|
||||
|
||||
@discussion 好友请求消息类,此消息会进行存储,但不计入未读消息数。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Friend request message class.
|
||||
|
||||
@ discussion friend request message class, this message is stored, but does not count as the number of unread messages.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCContactNotificationMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
好友请求的当前操作名
|
||||
|
||||
@discussion
|
||||
好友请求当前的操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。
|
||||
预定义的操作名:ContactNotificationMessage_ContactOperationRequest、ContactNotificationMessage_ContactOperationAcceptResponse、ContactNotificationMessage_ContactOperationRejectResponse。
|
||||
|
||||
* \~english
|
||||
The current operation name of the friend request.
|
||||
|
||||
@ discussion
|
||||
Friends request the name of the current operation. You can use a predefined operation name or any operation name that you define yourself.
|
||||
Predefined operation names: ContactNotificationMessage_ContactOperationRequest, ContactNotificationMessage_ContactOperationAcceptResponse, ContactNotificationMessage_ContactOperationRejectResponse.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *operation;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前操作发起用户的用户 ID
|
||||
* \~english
|
||||
User ID of the user who initiated the current operation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *sourceUserId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前操作目标用户的用户 ID
|
||||
* \~english
|
||||
The user ID of the target user for the current operation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *targetUserId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前操作的消息内容
|
||||
|
||||
@discussion 当前操作的消息内容,如同意、拒绝的理由等。
|
||||
|
||||
* \~english
|
||||
Message content of the current operation.
|
||||
|
||||
@ discussion The message content of the current operation, such as consent, reasons for rejection, etc.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *message;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化好友请求消息
|
||||
|
||||
@param operation 好友请求当前的操作名
|
||||
@param sourceUserId 当前操作发起用户的用户 ID
|
||||
@param targetUserId 当前操作目标用户的用户 ID
|
||||
@param message 当前操作的消息内容
|
||||
@param extra 当前操作的附加信息
|
||||
@return 好友请求消息对象
|
||||
|
||||
@discussion 融云不介入您的好友关系,所有的好友关系都由您的服务器自己维护。
|
||||
所以好友请求的操作名和消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好 UI 显示即可。
|
||||
|
||||
* \~english
|
||||
Initialize friend request message.
|
||||
|
||||
@param operation The name of the current operation requested by the friend.
|
||||
@param sourceUserId User ID of the user who initiates the current operation.
|
||||
@param targetUserId The user ID of the target user for the current operation.
|
||||
@param message Message content of the current operation.
|
||||
@param extra Additional information for the current operation.
|
||||
@ return friend request message object.
|
||||
|
||||
@ discussion RongCloud does not interfere in your friend relationships. All friend relationships are maintained by your server itself.
|
||||
Therefore, you can customize the operation name, message content and extended information of the friend request, as long as your sender and receiver make a good UI display of the specific field content.
|
||||
*/
|
||||
+ (instancetype)notificationWithOperation:(NSString *)operation
|
||||
sourceUserId:(NSString *)sourceUserId
|
||||
targetUserId:(NSString *)targetUserId
|
||||
message:(NSString *)message
|
||||
extra:(NSString *)extra;
|
||||
|
||||
@end
|
||||
@@ -1,228 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCConversation.h
|
||||
// Created by Heq.Shinoda on 14-6-13.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话类
|
||||
|
||||
@discussion 会话类,包含会话的所有属性。
|
||||
|
||||
* \~english
|
||||
Conversation class.
|
||||
|
||||
@ discussion Conversation class, which contains all the properties of the conversation.
|
||||
*/
|
||||
@interface RCConversation : NSObject <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话类型
|
||||
* \~english
|
||||
Conversation type
|
||||
*/
|
||||
@property (nonatomic, assign) RCConversationType conversationType;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话 ID
|
||||
* \~english
|
||||
Conversation ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *targetId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
该会话的业务标识,长度限制 20 字符
|
||||
* \~english
|
||||
The business identity of the conversation, with a length limit of 20 characters.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *channelId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话的标题
|
||||
* \~english
|
||||
Title of the conversation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *conversationTitle;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中的未读消息数量
|
||||
* \~english
|
||||
Number of unread messages in the conversation
|
||||
*/
|
||||
@property (nonatomic, assign) int unreadMessageCount;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否置顶,默认值为 NO
|
||||
|
||||
@discussion
|
||||
如果设置了置顶,在 IMKit 的 RCConversationListViewController 中会将此会话置顶显示。
|
||||
|
||||
* \~english
|
||||
Whether to set the top. default value is NO.
|
||||
|
||||
@ discussion
|
||||
If the top is set, the conversation is displayed at the top in the RCConversationListViewController of IMKit.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isTop;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的接收状态
|
||||
* \~english
|
||||
The receiving status of the last message in the conversation
|
||||
*/
|
||||
@property (nonatomic, assign) RCReceivedStatus receivedStatus;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的发送状态
|
||||
* \~english
|
||||
The sending status of the last message in the conversation
|
||||
*/
|
||||
@property (nonatomic, assign) RCSentStatus sentStatus;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的接收时间(Unix时间戳、毫秒)
|
||||
* \~english
|
||||
Time of receipt of the last message in the conversation (Unix timestamp, milliseconds)
|
||||
*/
|
||||
@property (nonatomic, assign) long long receivedTime;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的发送时间(Unix时间戳、毫秒)
|
||||
*
|
||||
* \~english
|
||||
Time when the last message in the conversation is sent (Unix timestamp, milliseconds)
|
||||
*/
|
||||
@property (nonatomic, assign) long long sentTime;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中存在的草稿
|
||||
* \~english
|
||||
Drafts that exist in the conversation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *draft;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的类型名
|
||||
* \~english
|
||||
The type name of the last message in the conversation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *objectName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的发送者用户 ID
|
||||
* \~english
|
||||
User ID, the sender of the last message in the conversation.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *senderUserId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的消息 ID
|
||||
* \~english
|
||||
Message ID of the last message in the conversation.
|
||||
*/
|
||||
@property (nonatomic, assign) long lastestMessageId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的内容
|
||||
* \~english
|
||||
The content of the last message in the conversation
|
||||
*/
|
||||
@property (nonatomic, strong) RCMessageContent *lastestMessage;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的方向
|
||||
* \~english
|
||||
The direction of the last message in the conversation
|
||||
*/
|
||||
@property (nonatomic, assign) RCMessageDirection lastestMessageDirection;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中最后一条消息的 json Dictionary
|
||||
|
||||
@discussion 此字段存放最后一条消息内容中未编码的 json 数据。
|
||||
SDK 内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为 nil。
|
||||
|
||||
* \~english
|
||||
The json Dictionary of the last message in the conversation.
|
||||
|
||||
@ discussion This field stores the unencoded json data in the content of the last message.
|
||||
The message built into SDK. If the message decoding fails, the default will store the contents of the message in this field; if the encoding and decoding are normal, this field will be set to nil.
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary *jsonDict;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
最后一条消息的全局唯一 ID
|
||||
|
||||
@discussion 服务器消息唯一 ID(在同一个Appkey下全局唯一)
|
||||
|
||||
* \~english
|
||||
Globally unique ID of the last message.
|
||||
|
||||
@ discussion Server message unique ID (globally unique under the same Appkey).
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *lastestMessageUId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中是否存在被 @ 的消息
|
||||
|
||||
@discussion 在清除会话未读数(clearMessagesUnreadStatus:targetId:)的时候,会将此状态置成 NO。
|
||||
|
||||
* \~english
|
||||
Whether there is a @ message in the conversation.
|
||||
|
||||
@ discussion set this state to NO when clearing the conversation unread (clearMessagesUnreadStatus:targetId:).
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL hasUnreadMentioned;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话中 @ 消息的个数
|
||||
|
||||
@discussion 在清除会话未读数(clearMessagesUnreadStatus:targetId:)的时候,会将此值置成 0。
|
||||
|
||||
* \~english
|
||||
The number of @ messages in the conversation.
|
||||
|
||||
@ discussion Set this value to 0 when it clears the conversation unread (clearMessagesUnreadStatus:targetId:).
|
||||
*/
|
||||
@property (nonatomic, assign) int mentionedCount;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话是否是免打扰状态
|
||||
|
||||
* \~english
|
||||
Whether the conversation is in a do not Disturb state.
|
||||
*/
|
||||
@property (nonatomic, assign) RCConversationNotificationStatus blockStatus;
|
||||
|
||||
@end
|
||||
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// RCConversationChannelProtocol.h
|
||||
// RongIMLibCore
|
||||
//
|
||||
// Created by Sin on 2021/3/5.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef RCConversationChannelProtocol_h
|
||||
#define RCConversationChannelProtocol_h
|
||||
@protocol RCConversationChannelMessageReceiptDelegate <NSObject>
|
||||
@optional
|
||||
/*!
|
||||
* \~chinese
|
||||
请求消息已读回执(收到需要阅读时发送回执的请求,收到此请求后在会话页面已经展示该 messageUId 对应的消息或者调用
|
||||
getHistoryMessages 获取消息的时候,包含此 messageUId 的消息,需要调用 sendMessageReadReceiptResponse
|
||||
接口发送消息阅读回执)
|
||||
|
||||
@param messageUId 请求已读回执的消息ID
|
||||
@param conversationType conversationType
|
||||
@param targetId targetId
|
||||
@param channelId 所属会话的业务标识
|
||||
|
||||
* \~english
|
||||
Request message read receipt (receive a request to send a receipt upon reading. After receiving this request, the corresponding message of the messageUId has been displayed on the conversation page, or when getHistoryMessages is called to get the message, the message with messageUId will call sendMessageReadReceiptResponse interface to send message tread receipt ).
|
||||
|
||||
@param messageUId Message ID requesting read receipt.
|
||||
@param conversationType ConversationType.
|
||||
@param targetId TargetId.
|
||||
@param channelId Business identity of the conversation to which it belongs.
|
||||
*/
|
||||
- (void)onMessageReceiptRequest:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
channelId:(NSString *)channelId
|
||||
messageUId:(NSString *)messageUId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数)
|
||||
@param messageUId 请求已读回执的消息ID
|
||||
@param conversationType conversationType
|
||||
@param targetId targetId
|
||||
@param channelId 所属会话的业务标识
|
||||
@param userIdList 已读userId列表
|
||||
|
||||
* \~english
|
||||
Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId).
|
||||
@param messageUId Message ID requesting read receipt.
|
||||
@param conversationType ConversationType.
|
||||
@param targetId TargetId.
|
||||
@param channelId Business identity of the conversation to which it belongs.
|
||||
@param userIdList Read userId list.
|
||||
*/
|
||||
- (void)onMessageReceiptResponse:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
channelId:(NSString *)channelId
|
||||
messageUId:(NSString *)messageUId
|
||||
readerList:(NSMutableDictionary *)userIdList;
|
||||
|
||||
@end
|
||||
|
||||
@protocol RCConversationChannelTypingStatusDelegate <NSObject>
|
||||
/*!
|
||||
* \~chinese
|
||||
用户输入状态变化的回调
|
||||
|
||||
@param conversationType 会话类型
|
||||
@param targetId 会话目标ID
|
||||
@param channelId 所属会话的业务标识
|
||||
@param userTypingStatusList 正在输入的RCUserTypingStatus列表(nil标示当前没有用户正在输入)
|
||||
|
||||
@discussion
|
||||
当客户端收到用户输入状态的变化时,会回调此接口,通知发生变化的会话以及当前正在输入的RCUserTypingStatus列表。
|
||||
|
||||
* \~english
|
||||
Callback for user input status change.
|
||||
|
||||
@param conversationType Conversation type
|
||||
@param targetId conversation destination ID.
|
||||
@param channelId Business identity of the conversation to which it belongs.
|
||||
@param userTypingStatusList List of RCUserTypingStatus being entered (nil indicates that no user is currently entering).
|
||||
|
||||
@ discussion
|
||||
When the client receives a change in the status of the user's input, it calls back this interface to notify the changed conversation and the RCUserTypingStatus list currently being entered.
|
||||
*/
|
||||
- (void)onTypingStatusChanged:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
channelId:(NSString *)channelId
|
||||
status:(NSArray *)userTypingStatusList;
|
||||
@end
|
||||
#endif /* RCConversationChannelProtocol_h */
|
||||
@@ -1,53 +0,0 @@
|
||||
//
|
||||
// RCConversationIdentifier.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2021/1/27.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCStatusDefine.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/*!
|
||||
* \~chinese
|
||||
会话标识
|
||||
* \~english
|
||||
Conversation identification
|
||||
*/
|
||||
@interface RCConversationIdentifier : NSObject
|
||||
/*!
|
||||
* \~chinese
|
||||
会话类型
|
||||
* \~english
|
||||
Conversation type
|
||||
*/
|
||||
@property (nonatomic, assign) RCConversationType type;
|
||||
/*!
|
||||
* \~chinese
|
||||
会话 ID
|
||||
* \~english
|
||||
Conversation ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *targetId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
RCConversationIdentifier 初始化方法
|
||||
|
||||
@param type 会话类型
|
||||
@param targetId 会话 id
|
||||
|
||||
* \~english
|
||||
RCConversationIdentifier initialization method.
|
||||
|
||||
@ param type conversation type.
|
||||
@ param targetId conversation id.
|
||||
*/
|
||||
|
||||
- (instancetype)initWithConversationIdentifier:(RCConversationType)type
|
||||
targetId:(NSString *)targetId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,88 +0,0 @@
|
||||
//
|
||||
// RCConversationStatusInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by liyan on 2020/5/13.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCStatusDefine.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话状态类型
|
||||
* \~english
|
||||
Conversation state type
|
||||
*/
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RCConversationStatusType) {
|
||||
/*!
|
||||
* \~chinese
|
||||
免打扰
|
||||
* \~english
|
||||
Do not disturb
|
||||
*/
|
||||
RCConversationStatusType_Mute = 1,
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
置顶
|
||||
* \~english
|
||||
Top
|
||||
*/
|
||||
RCConversationStatusType_Top = 2
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RCConversationStatusInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话类型
|
||||
* \~english
|
||||
Conversation type
|
||||
*/
|
||||
@property (nonatomic, assign) RCConversationType conversationType;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话 ID
|
||||
* \~english
|
||||
Conversation ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *targetId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
所属会话的业务标识
|
||||
* \~english
|
||||
Business identifier of the conversation to which it belongs.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *channelId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话状态改变的类型
|
||||
* \~english
|
||||
Types of conversation state changes
|
||||
*/
|
||||
@property (nonatomic, assign) RCConversationStatusType conversationStatusType;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
如果 conversationStatusType = RCConversationStatusType_Mute, conversationStatusvalue = 0
|
||||
是提醒,conversationStatusvalue = 1 是免打扰。 如果 conversationStatusType = RCConversationStatusType_Top,
|
||||
conversationStatusvalue = 0 是不置顶,conversationStatusvalue = 1 是置顶。
|
||||
|
||||
* \~english
|
||||
If conversationStatusType = RCConversationStatusType_Mute, conversationStatusvalue = 0.
|
||||
Is a reminder, conversationStatusvalue = 1 is do not disturb. If conversationStatusType = RCConversationStatusType_Top.
|
||||
ConversationStatusvalue = 0 indicates non top setting, conversationStatusvalue = 1 is the top setting.
|
||||
*/
|
||||
@property (nonatomic, assign) int conversationStatusvalue;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// ConversationTagInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2021/1/27.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCTagInfo.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/*!
|
||||
* \~chinese
|
||||
会话所属的标签信息
|
||||
* \~english
|
||||
Tag information to which the conversation belongs
|
||||
*/
|
||||
@interface RCConversationTagInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
标签信息
|
||||
|
||||
* \~english
|
||||
tag info
|
||||
*/
|
||||
@property (nonatomic, strong) RCTagInfo *tagInfo;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话是否置顶
|
||||
|
||||
* \~english
|
||||
Whether the conversation is at the top
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isTop;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,200 +0,0 @@
|
||||
//
|
||||
// RCEDownloadItem.h
|
||||
// RongEnterpriseApp
|
||||
//
|
||||
// Created by zhaobingdong on 2018/5/15.
|
||||
// Copyright © 2018 rongcloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载状态枚举
|
||||
|
||||
- RCDownloadItemStateWaiting: 等待
|
||||
- RCDownloadItemStateChecking: 正在检测是否支持 Range
|
||||
- RCDownloadItemStateRunning: 正在下载
|
||||
- RCDownloadItemStateSuspended: 暂停
|
||||
- RCDownloadItemStateCanceled: 已取消
|
||||
- RCDownloadItemStateCompleted: 完成
|
||||
- RCDownloadItemStateFailed: 失败
|
||||
|
||||
* \~english
|
||||
Download status enumeration.
|
||||
|
||||
- RCDownloadItemStateWaiting: Wait for
|
||||
- RCDownloadItemStateChecking: Testing to see if Range is supported.
|
||||
- RCDownloadItemStateRunning: Downloading.
|
||||
- RCDownloadItemStateSuspended: Suspend
|
||||
- RCDownloadItemStateCanceled: Canceled
|
||||
- RCDownloadItemStateCompleted: Complete
|
||||
- RCDownloadItemStateFailed: Failure
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger, RCDownloadItemState) {
|
||||
RCDownloadItemStateWaiting = 0,
|
||||
RCDownloadItemStateChecking,
|
||||
RCDownloadItemStateRunning,
|
||||
RCDownloadItemStateSuspended,
|
||||
RCDownloadItemStateCanceled,
|
||||
RCDownloadItemStateCompleted,
|
||||
RCDownloadItemStateFailed
|
||||
};
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class RCDownloadItem;
|
||||
@protocol RCDownloadItemDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载任务状态变化时调用
|
||||
|
||||
@param item 下载任务对象
|
||||
@param state 状态
|
||||
|
||||
* \~english
|
||||
Called when the status of the download task changes.
|
||||
|
||||
@param item Download task object.
|
||||
@param state Status.
|
||||
*/
|
||||
- (void)downloadItem:(RCDownloadItem *)item state:(RCDownloadItemState)state;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载进度上报时调用
|
||||
|
||||
@param item 下载任务
|
||||
@param progress 下载进度
|
||||
|
||||
* \~english
|
||||
Called when the download progress is reported.
|
||||
|
||||
@param item Download task.
|
||||
@param progress Download progress.
|
||||
*/
|
||||
- (void)downloadItem:(RCDownloadItem *)item progress:(float)progress;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
任务结束时调用
|
||||
|
||||
@param item 下载任务
|
||||
@param error 错误信息对象,成功时为 nil
|
||||
@param path 下载完成后文件的路径,此路径为相对路径,相对于沙盒根目录 NSHomeDirectory
|
||||
|
||||
* \~english
|
||||
Called at the end of the task.
|
||||
|
||||
@param item Download task.
|
||||
@param error Error message object, nil on success.
|
||||
@param path The path to the file after the download is completed. This path is relative to sandboxie's root directory NSHomeDirectory.
|
||||
*/
|
||||
- (void)downloadItem:(RCDownloadItem *)item didCompleteWithError:(NSError *)error filePath:(nullable NSString *)path;
|
||||
@end
|
||||
|
||||
@interface RCDownloadItem : NSObject
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载状态
|
||||
|
||||
* \~english
|
||||
Download status.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) RCDownloadItemState state;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
文件总大小 单位字节
|
||||
|
||||
* \~english
|
||||
Total file size in bytes.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) long long totalLength;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
文件当前的大小
|
||||
|
||||
* \~english
|
||||
The current size of the file.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) long long currentLength;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
文件对应的网络 URL
|
||||
|
||||
* \~english
|
||||
Network URL corresponding to the file.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSURL *URL;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
标识是否可恢复下载。 YES 表示可恢复,支持 Range。 NO 表示不支持 Range。
|
||||
|
||||
* \~english
|
||||
Identify whether the download can be resumed. YES indicates recoverable and supports Range. NO indicates that Range is not supported.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL resumable;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载任务的标识符
|
||||
|
||||
* \~english
|
||||
Identifier of the download task.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly) NSString *identify;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载任务的代理对象
|
||||
|
||||
* \~english
|
||||
Download the proxy object for the task.
|
||||
*/
|
||||
@property (nonatomic, weak) id<RCDownloadItemDelegate> delegate;
|
||||
|
||||
+ (instancetype) new NS_UNAVAILABLE;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
开始下载
|
||||
|
||||
* \~english
|
||||
Start downloading
|
||||
*/
|
||||
- (void)downLoad;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
暂停下载
|
||||
|
||||
* \~english
|
||||
Suspend download
|
||||
*/
|
||||
- (void)suspend;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
恢复下载
|
||||
|
||||
* \~english
|
||||
Resume download
|
||||
*/
|
||||
- (void)resume;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
取消下载
|
||||
|
||||
* \~english
|
||||
Cancel download
|
||||
*/
|
||||
- (void)cancel;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,96 +0,0 @@
|
||||
//
|
||||
// RCFileMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/5/23.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the file message
|
||||
*/
|
||||
#define RCFileMessageTypeIdentifier @"RC:FileMsg"
|
||||
/*!
|
||||
* \~chinese
|
||||
文件消息类
|
||||
|
||||
@discussion 文件消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
File message class.
|
||||
|
||||
@ discussion file message class, which is stored and counted as unread messages.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCFileMessage : RCMediaMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件名
|
||||
|
||||
* \~english
|
||||
File name
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件大小,单位为 Byte
|
||||
|
||||
* \~english
|
||||
File size in Byte
|
||||
*/
|
||||
@property (nonatomic, assign) long long size;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件类型
|
||||
|
||||
* \~english
|
||||
File type
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *type;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件的网络地址
|
||||
|
||||
* \~english
|
||||
The network address of the file
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *fileUrl;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件的本地路径
|
||||
|
||||
* \~english
|
||||
Local path to the file
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *localPath;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化文件消息
|
||||
|
||||
@param localPath 文件的本地路径
|
||||
@return 文件消息对象
|
||||
|
||||
* \~english
|
||||
Initialize file message.
|
||||
|
||||
@param localPath Local path to the file.
|
||||
@ return file message object.
|
||||
*/
|
||||
+ (instancetype)messageWithFile:(NSString *)localPath;
|
||||
|
||||
@end
|
||||
@@ -1,182 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCFileUtility.h
|
||||
|
||||
#ifndef __RCFileUtility
|
||||
#define __RCFileUtility
|
||||
|
||||
#import "RCStatusDefine.h"
|
||||
|
||||
@interface RCFileUtility : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
设置文件媒体类型
|
||||
|
||||
@return 文件类型
|
||||
|
||||
* \~english
|
||||
Set file media type.
|
||||
|
||||
@ return file type.
|
||||
*/
|
||||
+ (NSString *)getMimeType:(RCMediaType)fileType;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
获取上传文件名称
|
||||
|
||||
@return 文件媒体类型
|
||||
|
||||
* \~english
|
||||
Get the name of the uploaded file.
|
||||
|
||||
@ return file media type.
|
||||
*/
|
||||
+ (NSString *)generateKey:(NSString *)mimeType;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
生成下载的文件路径
|
||||
|
||||
@return 文件名称
|
||||
|
||||
* \~english
|
||||
Generate the downloaded file path.
|
||||
|
||||
@ return file name.
|
||||
*/
|
||||
+ (NSString *)getFileName:(NSString *)imgUrl
|
||||
conversationType:(RCConversationType)conversationType
|
||||
mediaType:(RCMediaType)mediaType
|
||||
targetId:(NSString *)targetId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
根据文件 URL 获取 MD5 key
|
||||
|
||||
@return key
|
||||
|
||||
* \~english
|
||||
Get MD5 key according to file URL.
|
||||
|
||||
@ return key.
|
||||
*/
|
||||
+ (NSString *)getFileKey:(NSString *)fileUri;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
根据文件类型获取文件夹名称
|
||||
|
||||
@return 文件夹名称
|
||||
|
||||
* \~english
|
||||
Gets folder name according to file type.
|
||||
|
||||
@ return folder name
|
||||
*/
|
||||
+ (NSString *)getMediaDir:(RCMediaType)fileType;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
根据会话类型获取存储的文件夹名称
|
||||
|
||||
@return 文件夹名称
|
||||
|
||||
* \~english
|
||||
Get the stored folder name based on the conversation type.
|
||||
|
||||
@ return folder name.
|
||||
*/
|
||||
+ (NSString *)getCateDir:(RCConversationType)categoryId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件是否存在
|
||||
|
||||
@return 是否存在
|
||||
|
||||
* \~english
|
||||
Whether the file exists.
|
||||
|
||||
@ return exist or not
|
||||
*/
|
||||
+ (BOOL)isFileExist:(NSString *)fileName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
存储数据到指定路径
|
||||
|
||||
@param filePath 文件存储路径
|
||||
@param content 存储数据
|
||||
@return 存储成功与否的结果
|
||||
|
||||
* \~english
|
||||
Store data to the specified path.
|
||||
|
||||
@param filePath File storage path.
|
||||
@param content Store data.
|
||||
@ return store the result of success or not.
|
||||
*/
|
||||
+ (BOOL)saveFile:(NSString *)filePath content:(NSData *)content;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文件唯一存储地址
|
||||
|
||||
* \~english
|
||||
Unique storage address of the file.
|
||||
*/
|
||||
+ (NSString *)getUniqueFileName:(NSString *)baseFileName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
根据文件名获取文件类型
|
||||
|
||||
@param fileName 文件名,需要带扩展名
|
||||
|
||||
* \~english
|
||||
Get the file type based on the file name.
|
||||
|
||||
@param fileName File name with extension name
|
||||
*/
|
||||
+ (NSString *)getTypeName:(NSString *)fileName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
根据文件 URL 获取文件本地存储路径
|
||||
|
||||
@return 文件本地存储路径
|
||||
|
||||
* \~english
|
||||
Get the local storage path of the file according to the file URL.
|
||||
|
||||
@ return file local storage path.
|
||||
*/
|
||||
+ (NSString *)getFileLocalPath:(NSString *)fileUri;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
关联文件远端 URL 和本地路径
|
||||
*
|
||||
* \~english
|
||||
Associate file remote URL and local path.
|
||||
*/
|
||||
+ (void)setFileLocalPath:(NSString *)localPath fileUri:(NSString *)fileUri;
|
||||
/*!
|
||||
* \~chinese
|
||||
获取小视频文件缓存路径
|
||||
|
||||
* \~english
|
||||
Get the cache path of small video File.
|
||||
*/
|
||||
+ (NSString *)getSightCachePath:(NSString *)sightUrl;
|
||||
@end
|
||||
#endif
|
||||
@@ -1,91 +0,0 @@
|
||||
//
|
||||
// RCFwLog.h
|
||||
// MacLogTest
|
||||
//
|
||||
// Created by ZhangLei on 26/02/2018.
|
||||
// Copyright © 2018 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define __FILE_STRING__ [NSString stringWithUTF8String:__FILE__]
|
||||
#define __GET_FILENAME__ \
|
||||
[__FILE_STRING__ substringFromIndex:[__FILE_STRING__ rangeOfString:@"/" options:NSBackwardsSearch].location + 1]
|
||||
|
||||
#define RCLogR(k, ...) \
|
||||
[[RCFwLog getInstance] write:RC_Level_R type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__]
|
||||
#define RCLogF(k, ...) \
|
||||
[[RCFwLog getInstance] write:RC_Level_F type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__]
|
||||
#define RCLogE(k, ...) \
|
||||
[[RCFwLog getInstance] write:RC_Level_E type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__]
|
||||
#define RCLogW(k, ...) \
|
||||
[[RCFwLog getInstance] write:RC_Level_W type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__]
|
||||
#define RCLogI(k, ...) \
|
||||
[[RCFwLog getInstance] write:RC_Level_I type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__]
|
||||
#define RCLogD(k, ...) \
|
||||
[[RCFwLog getInstance] write:RC_Level_D type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__]
|
||||
#define RCLogV(k, ...) \
|
||||
[[RCFwLog getInstance] write:RC_Level_V type:RC_Type_DEB tag:__GET_FILENAME__ keys:k, ##__VA_ARGS__]
|
||||
|
||||
#define FwLogR(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_R type:p tag:t keys:k, ##__VA_ARGS__]
|
||||
#define FwLogF(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_F type:p tag:t keys:k, ##__VA_ARGS__]
|
||||
#define FwLogE(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_E type:p tag:t keys:k, ##__VA_ARGS__]
|
||||
#define FwLogW(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_W type:p tag:t keys:k, ##__VA_ARGS__]
|
||||
#define FwLogI(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_I type:p tag:t keys:k, ##__VA_ARGS__]
|
||||
#define FwLogD(p, t, k, ...) [[RCFwLog getInstance] write:RC_Level_D type:p tag:t keys:k, ##__VA_ARGS__]
|
||||
|
||||
typedef NS_ENUM(NSInteger, RCFwLogLevel) {
|
||||
RC_Level_R = -1,//Record
|
||||
RC_Level_N = 0,//None
|
||||
RC_Level_F = 1,//Fatal
|
||||
RC_Level_E = 2,//Error
|
||||
RC_Level_W = 3,//Warn
|
||||
RC_Level_I = 4,//Info
|
||||
RC_Level_D = 5,//Debug
|
||||
RC_Level_V = 6//Verbose
|
||||
};
|
||||
|
||||
typedef NS_OPTIONS(NSUInteger, RCLogType) {
|
||||
RC_Type_APP = 1 << 0, // User interface.
|
||||
RC_Type_PTC = 1 << 1, // Protocol.
|
||||
RC_Type_ENV = 1 << 2,
|
||||
RC_Type_DET = 1 << 3,
|
||||
RC_Type_CON = 1 << 4,
|
||||
RC_Type_RCO = 1 << 5,
|
||||
RC_Type_CRM = 1 << 6,
|
||||
RC_Type_MSG = 1 << 7, // Message.
|
||||
RC_Type_MED = 1 << 8, // Media file.
|
||||
RC_Type_LOG = 1 << 9,
|
||||
RC_Type_DEB = 1 << 10, // Debug log.
|
||||
RC_Type_CRS = 1 << 11, // Crash stack.
|
||||
RC_Type_RTC = 1 << 12 // RTC.
|
||||
};
|
||||
|
||||
@interface RCFwLog : NSObject
|
||||
|
||||
// should be call init first, otherwise getInstance will return nil.
|
||||
+ (void)init:(NSString *)appKey sdkVer:(NSString *)sdkVer;
|
||||
+ (instancetype)getInstance;
|
||||
|
||||
+ (void)setLogMonitor:(NSInteger)value;
|
||||
+ (void)setToken:(NSString *)token;
|
||||
+ (void)setUserId:(NSString *)userId;
|
||||
+ (void)setLogListener:(void (^)(NSString *log))logBlock;
|
||||
+ (void)setConsoleLogLevel:(RCFwLogLevel)level;
|
||||
+ (NSString *)getIpWithHost:(NSString *)hostName;
|
||||
+ (void)setRcDebugLogLevel:(NSInteger)rcDebugLogLevel;
|
||||
+ (void)setRcDebugLogMaxSize:(long long)rcDebugLogMaxSize;
|
||||
+ (void)startRealTimelog;
|
||||
- (void)uploadLog:(void (^)(int code))errorBlock;
|
||||
- (void)uploadDebugLog;
|
||||
- (void)write:(RCFwLogLevel)level
|
||||
type:(RCLogType)type
|
||||
tag:(NSString *)tag
|
||||
keys:(NSString *)keys, ... NS_FORMAT_FUNCTION(4, 5);
|
||||
|
||||
- (void)write:(RCFwLogLevel)level
|
||||
type:(RCLogType)type
|
||||
tag:(NSString *)tag
|
||||
keys:(NSArray *)keys
|
||||
values:(NSArray *)vals;
|
||||
@end
|
||||
@@ -1,107 +0,0 @@
|
||||
//
|
||||
// RCGIFMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by liyan on 2018/12/20.
|
||||
// Copyright © 2018 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
GIF 消息的类型名
|
||||
|
||||
* \~english
|
||||
Type name of the GIF message
|
||||
*/
|
||||
#define RCGIFMessageTypeIdentifier @"RC:GIFMsg"
|
||||
/*!
|
||||
* \~chinese
|
||||
GIF 消息
|
||||
@discussion GIF 消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
GIF message.
|
||||
@ discussion GIF message class, which is stored and counted as unread messages.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCGIFMessage : RCMediaMessageContent
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
GIF 图的大小,单位字节
|
||||
|
||||
* \~english
|
||||
The size of the GIF graph, in bytes
|
||||
*/
|
||||
@property (nonatomic, assign) long long gifDataSize;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
GIF 图的宽
|
||||
|
||||
* \~english
|
||||
The width of GIF graphs
|
||||
*/
|
||||
@property (nonatomic, assign) long width;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
GIF 图的高
|
||||
|
||||
* \~english
|
||||
The height of GIF graph
|
||||
*/
|
||||
@property (nonatomic, assign) long height;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化 GIF 消息
|
||||
|
||||
@param gifImageData GIF 图的数据
|
||||
@param width GIF 的宽
|
||||
@param height GIF 的高
|
||||
|
||||
@return GIF 消息对象
|
||||
|
||||
* \~english
|
||||
Initialize GIF messages.
|
||||
|
||||
@param gifImageData Data of GIF diagram.
|
||||
@param width Width of GIF.
|
||||
@param height The height of GIF.
|
||||
|
||||
@ return GIF message object.
|
||||
*/
|
||||
+ (instancetype)messageWithGIFImageData:(NSData *)gifImageData width:(long)width height:(long)height;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化 GIF 消息
|
||||
|
||||
@param gifURI GIF 的本地路径
|
||||
@param width GIF 的宽
|
||||
@param height GIF 的高
|
||||
|
||||
@return GIF 消息对象
|
||||
|
||||
* \~english
|
||||
Initialize GIF messages.
|
||||
|
||||
@param gifURI Local path to GIF.
|
||||
@param width Width of GIF.
|
||||
@param height The height of GIF.
|
||||
|
||||
@ return GIF message object.
|
||||
*/
|
||||
+ (instancetype)messageWithGIFURI:(NSString *)gifURI width:(long)width height:(long)height;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCGroup.h
|
||||
// Created by Heq.Shinoda on 14-9-6.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组信息类
|
||||
|
||||
* \~english
|
||||
Group information class
|
||||
*/
|
||||
@interface RCGroup : NSObject <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组 ID
|
||||
|
||||
* \~english
|
||||
Group ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *groupId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组名称
|
||||
|
||||
* \~english
|
||||
Group name
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *groupName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组头像的 URL
|
||||
|
||||
* \~english
|
||||
URL of group portrait
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *portraitUri;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组信息的初始化方法
|
||||
|
||||
@param groupId 群组 ID
|
||||
@param groupName 群组名称
|
||||
@param portraitUri 群组头像的 URL
|
||||
@return 群组信息对象
|
||||
|
||||
* \~english
|
||||
Initialization method of group information.
|
||||
|
||||
@param groupId Group ID.
|
||||
@param groupName Group name.
|
||||
@param portraitUri URL of group portrait.
|
||||
@ return Group Information object.
|
||||
*/
|
||||
- (instancetype)initWithGroupId:(NSString *)groupId groupName:(NSString *)groupName portraitUri:(NSString *)portraitUri;
|
||||
|
||||
@end
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// RCMessageReadUser.h
|
||||
// RongIMLibCore
|
||||
//
|
||||
// Created by RongCloud on 2021/2/22.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
已读用户对象
|
||||
|
||||
* \~english
|
||||
Read user object
|
||||
*/
|
||||
@interface RCGroupMessageReaderV2 : NSObject
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
已读用户 id
|
||||
|
||||
* \~english
|
||||
Read user id
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *userId;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
已读时间
|
||||
|
||||
* \~english
|
||||
Read time
|
||||
*/
|
||||
@property (nonatomic, assign) long long readTime;
|
||||
|
||||
@end
|
||||
@@ -1,165 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCGroupNotificationMessage.h
|
||||
// Created by xugang on 14/11/24.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组通知消息的类型名
|
||||
|
||||
* \~english
|
||||
Type name of the group notification message
|
||||
*/
|
||||
#define RCGroupNotificationMessageIdentifier @"RC:GrpNtf"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
有成员加入群组的通知
|
||||
|
||||
* \~english
|
||||
Notice of members joining the group
|
||||
*/
|
||||
#define GroupNotificationMessage_GroupOperationAdd @"Add"
|
||||
/*!
|
||||
* \~chinese
|
||||
有成员退出群组的通知
|
||||
|
||||
* \~english
|
||||
Notice of exit of a member from the group
|
||||
*/
|
||||
#define GroupNotificationMessage_GroupOperationQuit @"Quit"
|
||||
/*!
|
||||
* \~chinese
|
||||
有成员被踢出群组的通知
|
||||
|
||||
* \~english
|
||||
Notice that a member has been kicked out of the group
|
||||
*/
|
||||
#define GroupNotificationMessage_GroupOperationKicked @"Kicked"
|
||||
/*!
|
||||
* \~chinese
|
||||
群组名称发生变更的通知
|
||||
|
||||
* \~english
|
||||
Notification of a change in the group name
|
||||
*/
|
||||
#define GroupNotificationMessage_GroupOperationRename @"Rename"
|
||||
/*!
|
||||
* \~chinese
|
||||
群组公告发生变更的通知
|
||||
|
||||
* \~english
|
||||
Notice of a change in the group announcement
|
||||
*/
|
||||
#define GroupNotificationMessage_GroupOperationBulletin @"Bulletin"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组通知消息类
|
||||
|
||||
@discussion 群组通知消息类,此消息会进行存储,但不计入未读消息数。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Group notification message class.
|
||||
|
||||
@ discussion group notification message class, which is stored but will not be counted as unread messages.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCGroupNotificationMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群组通知的当前操作名
|
||||
|
||||
@discussion
|
||||
群组通知的当前操作名称,您可以使用预定义好的操作名,也可以是您自己定义的任何操作名。
|
||||
预定义的操作名:GroupNotificationMessage_GroupOperationAdd、GroupNotificationMessage_GroupOperationQuit、GroupNotificationMessage_GroupOperationKicked、GroupNotificationMessage_GroupOperationRename、GroupNotificationMessage_GroupOperationBulletin。
|
||||
|
||||
* \~english
|
||||
The current operation name of the group notification.
|
||||
|
||||
@ discussion
|
||||
The current operation name of the group notification, you can use a predefined operation name, or any operation name that you define yourself.
|
||||
Predefined operation names: GroupNotificationMessage_GroupOperationAdd, GroupNotificationMessage_GroupOperationQuit, GroupNotificationMessage_GroupOperationKicked, GroupNotificationMessage_GroupOperationRename, GroupNotificationMessage_GroupOperationBulletin.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *operation;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前操作发起用户的用户 ID
|
||||
|
||||
* \~english
|
||||
User ID of the user who initiated the current operation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *operatorUserId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前操作的目标对象
|
||||
|
||||
@discussion
|
||||
当前操作的目标对象,如被当前操作目标用户的用户 ID 或变更后的群主名称等。
|
||||
|
||||
* \~english
|
||||
The target object of the current operation.
|
||||
|
||||
@ discussion
|
||||
The target object of the current operation, such as the user ID or the changed group owner name of the target user of the current operation.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *data;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
当前操作的消息内容
|
||||
|
||||
* \~english
|
||||
Message content of the current operation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *message;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化群组通知消息
|
||||
|
||||
@param operation 群组通知的当前操作名
|
||||
@param operatorUserId 当前操作发起用户的用户 ID
|
||||
@param data 当前操作的目标对象
|
||||
@param message 当前操作的消息内容
|
||||
@param extra 当前操作的附加信息
|
||||
@return 群组通知消息对象
|
||||
|
||||
@discussion 群组关系由开发者维护,所有的群组操作都由您的服务器自己管理和维护。
|
||||
所以群组通知的操作名和目标对象、消息内容、扩展信息您均可以自己定制,只要您发送方和接收方针对具体字段内容做好UI显示即可。
|
||||
|
||||
* \~english
|
||||
Initialize group notification messages.
|
||||
|
||||
@param operation The current operation name of the group notification.
|
||||
@param operatorUserId User ID of the user who initiated the current operation.
|
||||
@param data The target object of the current operation.
|
||||
@param message Message content of the current operation.
|
||||
@param extra Additional information for the current operation.
|
||||
@ return Group Notification message object.
|
||||
|
||||
@ discussion Group relationships are maintained by developers, and all group operations are managed and maintained by your server.
|
||||
Therefore, you can customize the operation name and target object, message content and extended information of the group notification, as long as your sender and receiver make a good UI display of the specific field content.
|
||||
*/
|
||||
+ (instancetype)notificationWithOperation:(NSString *)operation
|
||||
operatorUserId:(NSString *)operatorUserId
|
||||
data:(NSString *)data
|
||||
message:(NSString *)message
|
||||
extra:(NSString *)extra;
|
||||
|
||||
@end
|
||||
@@ -1,48 +0,0 @@
|
||||
//
|
||||
// RCGroupReadReceiptInfoV2.h
|
||||
// RongIMLibCore
|
||||
//
|
||||
// Created by RongCloud on 2021/3/9.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCGroupMessageReaderV2.h"
|
||||
@interface RCGroupReadReceiptInfoV2 : NSObject
|
||||
/**
|
||||
* \~chinese
|
||||
是否已经发送回执
|
||||
|
||||
* \~english
|
||||
Whether a receipt has been sent
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL hasRespond;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
发送回执的用户 ID 列表
|
||||
|
||||
* \~english
|
||||
ID list of users who send receipts
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray <RCGroupMessageReaderV2 *> *readerList;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
* 已读人数
|
||||
*
|
||||
* \~english
|
||||
* Number of people read
|
||||
*/
|
||||
@property (nonatomic, assign) int readCount;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
* 群内总人数
|
||||
*
|
||||
* \~english
|
||||
* Total number of people in the group
|
||||
*/
|
||||
@property (nonatomic, assign) int totalCount;
|
||||
|
||||
@end
|
||||
@@ -1,90 +0,0 @@
|
||||
//
|
||||
// RCGroupReadReceiptV2Manager.h
|
||||
// RongIMLibCore
|
||||
//
|
||||
// Created by RongCloud on 2021/3/9.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCGroupMessageReaderV2.h"
|
||||
#import "RCMessage.h"
|
||||
#import "RCGroupReadReceiptV2Protocol.h"
|
||||
@interface RCGroupReadReceiptV2Manager : NSObject
|
||||
/*!
|
||||
* \~chinese
|
||||
获取单例类
|
||||
|
||||
* \~english
|
||||
Get singleton class.
|
||||
*/
|
||||
+ (instancetype)sharedManager;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群已读回执代理
|
||||
|
||||
* \~english
|
||||
Group read receipt agent
|
||||
*/
|
||||
@property (nonatomic, weak) id<RCGroupReadReceiptV2Delegate> groupReadReceiptV2Delegate;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
发送阅读回执
|
||||
|
||||
@param conversationType 会话类型
|
||||
@param targetId 会话 ID
|
||||
@param channelId 所属会话的业务标识
|
||||
@param messageList 已经阅读了的消息列表
|
||||
@param successBlock 发送成功的回调
|
||||
@param errorBlock 发送失败的回调[nErrorCode: 失败的错误码]
|
||||
|
||||
@discussion 当用户阅读了需要阅读回执的消息,可以通过此接口发送阅读回执,消息的发送方即可直接知道那些人已经阅读。
|
||||
|
||||
@remarks 高级功能
|
||||
|
||||
* \~english
|
||||
Send a reading receipt.
|
||||
|
||||
@param conversationType Conversation type
|
||||
@param targetId conversation ID.
|
||||
@param channelId Business identity of the conversation to which it belongs.
|
||||
@param messageList List of messages that have been read.
|
||||
@param successBlock Callback for successful sending
|
||||
@param errorBlock Callback for failed sending [nErrorCode: Error code of failure]
|
||||
|
||||
@ discussion when a user reads a message that needs to be read, you can send a reading receipt through this interface, and the sender of the message can directly know who has read it.
|
||||
|
||||
@ remarks advanced functions
|
||||
*/
|
||||
- (void)sendReadReceiptResponse:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
channelId:(NSString *)channelId
|
||||
messageList:(NSArray<RCMessage *> *)messageList
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
获取群消息已读用户列表
|
||||
|
||||
@param message 消息体
|
||||
@param successBlock 同步成功的回调
|
||||
@param errorBlock 同步失败的回调[nErrorCode: 失败的错误码]
|
||||
|
||||
@remarks 高级功能
|
||||
|
||||
* \~english
|
||||
Get group message read user list.
|
||||
|
||||
@param message Message body.
|
||||
@param successBlock Callback for successful synchronization.
|
||||
@param errorBlock Callback for failed synchronization [nErrorCode: Error code of failure].
|
||||
|
||||
@ remarks Advanced functions
|
||||
*/
|
||||
- (void)getGroupMessageReaderList:(RCMessage *)message
|
||||
success:(void (^)(NSArray <RCGroupMessageReaderV2 *> *readerList, int totalCount))successBlock
|
||||
error:(void (^)(RCErrorCode nErrorCode))errorBlock;
|
||||
@end
|
||||
@@ -1,42 +0,0 @@
|
||||
//
|
||||
// RCGroupReadReceiptV2Protocol.h
|
||||
// RongIMLibCore
|
||||
//
|
||||
// Created by RongCloud on 2021/3/9.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef RCGroupReadReceiptV2Protocol_h
|
||||
#define RCGroupReadReceiptV2Protocol_h
|
||||
|
||||
@protocol RCGroupReadReceiptV2Delegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数)
|
||||
@param conversationType conversationType
|
||||
@param targetId targetId
|
||||
@param channelId 所属会话的业务标识
|
||||
@param messageUId 请求已读回执的消息ID
|
||||
@param readCount 已读用户数
|
||||
@param totalCount 群内总用户数
|
||||
|
||||
* \~english
|
||||
Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId).
|
||||
@param conversationType ConversationType
|
||||
@param targetId TargetId
|
||||
@param channelId Business identity of the conversation to which it belongs
|
||||
@param messageUId Message ID requesting read receipt
|
||||
@param readCount Number of read users
|
||||
@param totalCount Total number of users in the group
|
||||
*/
|
||||
- (void)onMessageReceiptResponse:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
channelId:(NSString *)channelId
|
||||
messageUId:(NSString *)messageUId
|
||||
readCount:(int)readCount
|
||||
totalCount:(int)totalCount;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* RCGroupReadReceiptV2Protocol_h */
|
||||
@@ -1,68 +0,0 @@
|
||||
//
|
||||
// RCHQVoiceMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by Zhaoqianyu on 2019/5/16.
|
||||
// Copyright © 2019 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
高清语音消息类型名
|
||||
|
||||
* \~english
|
||||
HD voice message type name
|
||||
*/
|
||||
#define RCHQVoiceMessageTypeIdentifier @"RC:HQVCMsg"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
/*!
|
||||
* \~chinese
|
||||
高清语音消息类
|
||||
|
||||
@discussion 高清语音消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
High definition voice message class.
|
||||
|
||||
@ discussion HD voice message class, which is stored and counted as unread messages.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCHQVoiceMessage : RCMediaMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
语音消息的时长,以秒为单位
|
||||
|
||||
* \~english
|
||||
The duration of the voice message, in seconds
|
||||
*/
|
||||
@property (nonatomic, assign) long duration;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化高清语音消息
|
||||
|
||||
@param localPath 语音的本地路径
|
||||
@param duration 语音时长,以秒为单位
|
||||
|
||||
@return 语音消息对象
|
||||
|
||||
* \~english
|
||||
Initialize HD voice messages.
|
||||
|
||||
@param localPath Local path of voice
|
||||
@param duration Voice duration in seconds
|
||||
|
||||
@ return voice message object
|
||||
*/
|
||||
+ (instancetype)messageWithPath:(NSString *)localPath duration:(long)duration;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,64 +0,0 @@
|
||||
//
|
||||
// RCHistoryMessageOption.h
|
||||
// RongIMLibCore
|
||||
//
|
||||
// Created by RongCloud on 2021/4/20.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
拉取顺序
|
||||
RCHistoryMessageOrderDesc - 降序
|
||||
RCHistoryMessageOrderAsc - 升序
|
||||
|
||||
* \~english
|
||||
Pull sequence.
|
||||
RCHistoryMessageOrderDesc-descending.
|
||||
RCHistoryMessageOrderAsc-ascending order.
|
||||
*/
|
||||
typedef enum : NSUInteger {
|
||||
RCHistoryMessageOrderDesc = 0,
|
||||
RCHistoryMessageOrderAsc,
|
||||
} RCHistoryMessageOrder;
|
||||
|
||||
@interface RCHistoryMessageOption : NSObject
|
||||
/**
|
||||
* \~chinese
|
||||
起始的消息发送时间戳,毫秒
|
||||
默认 0
|
||||
|
||||
* \~english
|
||||
Initial message sending timestamp, millisecond.
|
||||
Default 0.
|
||||
*/
|
||||
@property (nonatomic, assign) long long recordTime;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
需要获取的消息数量, 0 < count <= 20
|
||||
默认 0
|
||||
|
||||
* \~english
|
||||
The number of messages to be obtained, 0 < count < = 20.
|
||||
Default 0.
|
||||
*/
|
||||
@property (nonatomic, assign) NSInteger count;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
拉取顺序
|
||||
RCRemoteHistoryOrderDesc: 降序,结合传入的时间戳参数,获取 recordtime 之前的消息
|
||||
RCRemoteHistoryOrderAsc: 升序,结合传入的时间戳参数,获取 recordtime 之后的消息
|
||||
默认降序
|
||||
|
||||
* \~english
|
||||
Pull sequence.
|
||||
RCRemoteHistoryOrderDesc: Descending order, the passed timestamp parameters are combined to get the messages before recordtime.
|
||||
RCRemoteHistoryOrderAsc: Ascending order, the passed timestamp parameters are combined to get the message after recordtime
|
||||
Default descending order.
|
||||
*/
|
||||
@property (nonatomic, assign) RCHistoryMessageOrder order;
|
||||
@end
|
||||
@@ -1,529 +0,0 @@
|
||||
//
|
||||
// RCIMClientProtocol.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by LiFei on 2020/4/29.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef RCIMClientProtocol_h
|
||||
#define RCIMClientProtocol_h
|
||||
|
||||
@class RCMessage;
|
||||
@class RCConversationStatusInfo;
|
||||
|
||||
#pragma mark - RCIMClientReceiveMessageDelegate
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
IMlib消息接收的监听器
|
||||
|
||||
@discussion
|
||||
设置IMLib的消息接收监听器请参考RCIMClient的setReceiveMessageDelegate:object:方法。
|
||||
|
||||
@warning 如果您使用IMlib,可以设置并实现此Delegate监听消息接收;
|
||||
如果您使用IMKit,请使用RCIM中的RCIMReceiveMessageDelegate监听消息接收,而不要使用此监听器,否则会导致IMKit中无法自动更新UI!
|
||||
|
||||
* \~english
|
||||
Listeners for IMlib message reception.
|
||||
|
||||
@ discussion
|
||||
To set the message receiving listener for IMLib, please refer to the setReceiveMessageDelegate:object: method of RCIMClient.
|
||||
|
||||
@ warning If you use IMlib, you can set and implement this Delegate to listen to message reception.
|
||||
If you use IMKit, use RCIMReceiveMessageDelegate in RCIM to listen to message reception instead of using this listener, otherwise you will not be able to update UI automatically in IMKit!
|
||||
*/
|
||||
@protocol RCIMClientReceiveMessageDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
接收消息的回调方法
|
||||
|
||||
@param message 当前接收到的消息
|
||||
@param nLeft 还剩余的未接收的消息数,left>=0
|
||||
@param object 消息监听设置的key值
|
||||
|
||||
@discussion 如果您设置了IMlib消息监听之后,SDK在接收到消息时候会执行此方法。
|
||||
其中,left为还剩余的、还未接收的消息数量。比如刚上线一口气收到多条消息时,通过此方法,您可以获取到每条消息,left会依次递减直到0。
|
||||
您可以根据left数量来优化您的App体验和性能,比如收到大量消息时等待left为0再刷新UI。
|
||||
object为您在设置消息接收监听时的key值。
|
||||
|
||||
* \~english
|
||||
Callback method for receiving messages.
|
||||
|
||||
@param message Messages currently received.
|
||||
@param nLeft The number of unreceived messages left, left > = 0.
|
||||
@param object The key value of the message listening setting.
|
||||
|
||||
@ discussion If you have set IMlib message listening, SDK will execute this method when it receives a message.
|
||||
Where left is the number of messages that have not yet been received. For example, when you receive multiple messages upon being online, you can get each message in this way, and the left will decrease to 0 in turn.
|
||||
You can optimize your App experience and performance based on the number of left, e.g. waiting for left to be 0 before refreshing UI when you receive a large number of messages.
|
||||
Object is the key value that you set when the message is received and listeninged.
|
||||
*/
|
||||
- (void)onReceived:(RCMessage *)message left:(int)nLeft object:(id)object;
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
接收消息的回调方法
|
||||
|
||||
@param message 当前接收到的消息
|
||||
@param nLeft 还剩余的未接收的消息数,left>=0
|
||||
@param object 消息监听设置的key值
|
||||
@param offline 是否是离线消息
|
||||
@param hasPackage SDK 拉取服务器的消息以包(package)的形式批量拉取,有 package 存在就意味着远端服务器还有消息尚未被 SDK
|
||||
拉取
|
||||
@discussion 和上面的 - (void)onReceived:(RCMessage *)message left:(int)nLeft object:(id)object 功能完全一致,额外把
|
||||
offline 和 hasPackage 参数暴露,开发者可以根据 nLeft、offline、hasPackage 来决定何时的时机刷新 UI ;建议当 hasPackage=0
|
||||
并且 nLeft=0 时刷新 UI
|
||||
@warning 如果使用此方法,那么就不能再使用 RCIM 中 - (void)onReceived:(RCMessage *)message left:(int)nLeft
|
||||
object:(id)object 的使用,否则会出现重复操作的情形
|
||||
|
||||
* \~english
|
||||
Callback method for receiving messages.
|
||||
|
||||
@param message Messages currently received.
|
||||
@param nLeft The number of unreceived messages left, left > = 0.
|
||||
@param object The key value of the message listening setting.
|
||||
@param offline Is it an offline message?
|
||||
@param hasPackage Messages from the SDK pull server are pulled in batches in the form of packet (package). The presence of package means that there are still messages on the remote server that have not been SDK.
|
||||
Pull.
|
||||
@ discussion It is exactly the same as the above-(void) onReceived: (RCMessage *) message left: (int) nLeft object: (id) object function, add.
|
||||
Offline and hasPackage parameters are exposed, and developers can decide when to refresh UI based on nLeft, offline and hasPackage. It is recommended that when hasPackage=0.
|
||||
And refresh UI when nLeft=0.
|
||||
@ warning If you use this method, you can no longer use-(void) onReceived: (RCMessage *) message left: (int) nLeft in RCIM.
|
||||
The use of object: (id) object, otherwise the operation will be repeated.
|
||||
*/
|
||||
- (void)onReceived:(RCMessage *)message
|
||||
left:(int)nLeft
|
||||
object:(id)object
|
||||
offline:(BOOL)offline
|
||||
hasPackage:(BOOL)hasPackage;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息被撤回的回调方法
|
||||
|
||||
@param messageId 被撤回的消息ID
|
||||
|
||||
@discussion 被撤回的消息会变更为RCRecallNotificationMessage,App需要在UI上刷新这条消息。
|
||||
|
||||
* \~english
|
||||
Callback method for recalled message.
|
||||
|
||||
@param messageId recalled message ID.
|
||||
|
||||
@ discussion The message that is recalled will be changed to the RCrecallNotificationMessage and App shall refresh it on the UI.
|
||||
*/
|
||||
- (void)onMessageRecalled:(long)messageId __deprecated_msg("Use messageDidRecall:");;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息被撤回的回调方法
|
||||
|
||||
@param message 被撤回的消息
|
||||
|
||||
@discussion 被撤回的消息会变更为RCRecallNotificationMessage,App需要在UI上刷新这条消息。
|
||||
@discussion 和上面的 - (void)onMessageRecalled:(long)messageId 功能完全一致,只能选择其中一个使用。
|
||||
|
||||
* \~english
|
||||
Callback method in which the message is recalled.
|
||||
|
||||
@param message recalled news.
|
||||
|
||||
@ discussion The message that is recalled will be changed to the RCrecallNotificationMessage and App shall refresh this message on the UI.
|
||||
@ discussion It is exactly the same as the-(void) onMessageRecalled: (long) messageId function above, so you can only choose one to use.
|
||||
*/
|
||||
- (void)messageDidRecall:(RCMessage *)message;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
请求消息已读回执(收到需要阅读时发送回执的请求,收到此请求后在会话页面已经展示该 messageUId 对应的消息或者调用
|
||||
getHistoryMessages 获取消息的时候,包含此 messageUId 的消息,需要调用 sendMessageReadReceiptResponse
|
||||
接口发送消息阅读回执)
|
||||
|
||||
@param messageUId 请求已读回执的消息ID
|
||||
@param conversationType conversationType
|
||||
@param targetId targetId
|
||||
|
||||
* \~english
|
||||
Request message read receipt (received a request to send a receipt when you shall read, after receiving this request, the corresponding message of the messageUId has been displayed on the conversation page or called.
|
||||
When getHistoryMessages Get the message, you shall call sendMessageReadReceiptResponse to include the message of this messageUId.
|
||||
Interface to send messages to read receipt).
|
||||
|
||||
@param messageUId Message ID requesting read receipt.
|
||||
@param conversationType ConversationType.
|
||||
@param targetId TargetId.
|
||||
*/
|
||||
- (void)onMessageReceiptRequest:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
messageUId:(NSString *)messageUId;
|
||||
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息已读回执响应(收到阅读回执响应,可以按照 messageUId 更新消息的阅读数)
|
||||
@param messageUId 请求已读回执的消息ID
|
||||
@param conversationType conversationType
|
||||
@param targetId targetId
|
||||
@param userIdList 已读userId列表
|
||||
|
||||
* \~english
|
||||
Message read receipt response (if you receive the read receipt response, you can update the number of readings of the message according to messageUId).
|
||||
@param messageUId Message ID requesting read receipt.
|
||||
@param conversationType ConversationType.
|
||||
@param targetId TargetId.
|
||||
@param userIdList Read userId list.
|
||||
*/
|
||||
- (void)onMessageReceiptResponse:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
messageUId:(NSString *)messageUId
|
||||
readerList:(NSMutableDictionary *)userIdList;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCConnectionStatusChangeDelegate
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
IMLib连接状态的的监听器
|
||||
|
||||
@discussion
|
||||
设置IMLib的连接状态监听器,请参考RCIMClient的setRCConnectionStatusChangeDelegate:方法。
|
||||
|
||||
@warning 如果您使用IMLib,可以设置并实现此Delegate监听连接状态变化;
|
||||
如果您使用IMKit,请使用RCIM中的RCIMConnectionStatusDelegate监听消息接收,而不要使用此监听器,否则会导致IMKit中无法自动更新UI!
|
||||
|
||||
* \~english
|
||||
Listeners for IMLib connection status
|
||||
|
||||
@ discussion
|
||||
To set the connection status listener of IMLib, please refer to the setRCConnectionStatusChangeDelegate: method of RCIMClient.
|
||||
|
||||
@ warning If you use IMLib, you can set and implement this Delegate to listen to connection status changes.
|
||||
If you use IMKit, use RCIMConnectionStatusDelegate in RCIM to listen to message reception instead of using this listener, otherwise you will not be able to update UI automatically in IMKit!
|
||||
*/
|
||||
@protocol RCConnectionStatusChangeDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
IMLib连接状态的的监听器
|
||||
|
||||
@param status SDK与融云服务器的连接状态
|
||||
|
||||
@discussion 如果您设置了IMLib消息监听之后,当SDK与融云服务器的连接状态发生变化时,会回调此方法。
|
||||
|
||||
* \~english
|
||||
Listeners for IMLib connection status
|
||||
|
||||
@param status Connection status between SDK and CVM.
|
||||
|
||||
@ discussion If you set IMLib message listening, this method will be called back when the connection status between SDK and the cloud server changes.
|
||||
*/
|
||||
- (void)onConnectionStatusChanged:(RCConnectionStatus)status;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCTypingStatusDelegate
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
IMLib输入状态的的监听器
|
||||
|
||||
@discussion 设置IMLib的输入状态监听器,请参考RCIMClient的 setRCTypingStatusDelegate:方法。
|
||||
|
||||
@warning
|
||||
如果您使用IMLib,可以设置并实现此Delegate监听消息输入状态;如果您使用IMKit,请直接设置RCIM中的
|
||||
enableTypingStatus,而不要使用此监听器,否则会导致IMKit中无法自动更新UI!
|
||||
|
||||
* \~english
|
||||
Listeners for IMLib input status
|
||||
|
||||
@ discussion Set the input status listener of IMLib. Please refer to the setRCTypingStatusDelegate: method of RCIMClient.
|
||||
|
||||
@ warning
|
||||
If you use IMLib, you can set and implement this Delegate listening message input status; if you use IMKit, please directly set the.
|
||||
EnableTypingStatus, instead of using this listener, otherwise the UI cannot be updated automatically in IMKit!
|
||||
*/
|
||||
@protocol RCTypingStatusDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
用户输入状态变化的回调
|
||||
|
||||
@param conversationType 会话类型
|
||||
@param targetId 会话目标ID
|
||||
@param userTypingStatusList 正在输入的RCUserTypingStatus列表(nil标示当前没有用户正在输入)
|
||||
|
||||
@discussion
|
||||
当客户端收到用户输入状态的变化时,会回调此接口,通知发生变化的会话以及当前正在输入的RCUserTypingStatus列表。
|
||||
|
||||
@warning 目前仅支持单聊。
|
||||
|
||||
* \~english
|
||||
Callback for user input status change.
|
||||
|
||||
@param conversationType Conversation type
|
||||
@param targetId conversation destination ID.
|
||||
@param userTypingStatusList List of RCUserTypingStatus being entered (nil indicates that no user is currently entering).
|
||||
|
||||
@ discussion
|
||||
When the client receives a change in the status of the user's input, it calls back this interface to notify the changed conversation and the RCUserTypingStatus list currently being entered.
|
||||
|
||||
@ warning Currently only support single chat.
|
||||
*/
|
||||
- (void)onTypingStatusChanged:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
status:(NSArray *)userTypingStatusList;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCLogInfoDelegate
|
||||
/*!
|
||||
* \~chinese
|
||||
IMLib日志的监听器
|
||||
|
||||
@discussion
|
||||
设置IMLib日志的监听器,请参考RCIMClient的setRCLogInfoDelegate:方法。
|
||||
|
||||
@discussion 您可以通过logLevel来控制日志的级别。
|
||||
|
||||
* \~english
|
||||
Listeners for IMLib logs.
|
||||
|
||||
@ discussion
|
||||
To set the listener for IMLib logs, please refer to the setRCLogInfoDelegate: method of RCIMClient.
|
||||
|
||||
@ discussion You can control the level of logs through logLevel.
|
||||
*/
|
||||
@protocol RCLogInfoDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
IMLib日志的回调
|
||||
|
||||
@param logInfo 日志信息
|
||||
|
||||
* \~english
|
||||
Callback for IMLib log.
|
||||
|
||||
@param logInfo Log information.
|
||||
*/
|
||||
- (void)didOccurLog:(NSString *)logInfo;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCMessageDestructDelegate
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
IMLib阅后即焚监听器
|
||||
@discussion 设置代理请参考 RCIMClient 的 setRCMessageDestructDelegate: 方法。
|
||||
|
||||
* \~english
|
||||
IMLib burns listener after reading.
|
||||
@ discussion Set the proxy. Please refer to RCIMClient's setRCMessageDestructDelegate:. Method.
|
||||
*/
|
||||
@protocol RCMessageDestructDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
消息正在焚烧
|
||||
|
||||
@param message 消息对象
|
||||
@param remainDuration 剩余焚烧时间
|
||||
|
||||
* \~english
|
||||
The news is burning.
|
||||
|
||||
@param message Message object.
|
||||
@param remainDuration Remaining burning time.
|
||||
*/
|
||||
- (void)onMessageDestructing:(RCMessage *)message remainDuration:(long long)remainDuration;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCConversationDelegate
|
||||
|
||||
@protocol RCConversationDelegate <NSObject>
|
||||
|
||||
- (void)conversationDidSync;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCConversationStatusChangeDelegate
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
IMLib 会话状态同步监听器
|
||||
@discussion 设置代理请参考 RCIMClient 的 setRCConversationStatusChangeDelegate: 方法。
|
||||
|
||||
* \~english
|
||||
IMLib conversation state synchronization listener.
|
||||
@ discussion For proxy setting, please refer to RCIMClient's setRCConversationStatusChangeDelegate:. Method.
|
||||
*/
|
||||
@protocol RCConversationStatusChangeDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
IMLib 会话状态同步的回调
|
||||
|
||||
@param conversationStatusInfos 改变过的会话状态的数组
|
||||
|
||||
* \~english
|
||||
Callback for IMLib conversation state synchronization.
|
||||
|
||||
@param conversationStatusInfos An array of changed conversation states.
|
||||
*/
|
||||
- (void)conversationStatusDidChange:(NSArray<RCConversationStatusInfo *> *)conversationStatusInfos;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCMessageExpansionDelegate
|
||||
/**
|
||||
* \~chinese
|
||||
消息扩展内容变化回调
|
||||
@discussion 设置代理请参考 RCIMClient 的 messageExpansionDelegate 方法
|
||||
@discussion 代理回调在非主线程
|
||||
|
||||
* \~english
|
||||
Callback for message extension content change.
|
||||
@ discussion To set the proxy, please refer to the messageExpansionDelegate method of RCIMClient.
|
||||
@ discussion Proxy callback on non-main thread.
|
||||
*/
|
||||
@protocol RCMessageExpansionDelegate <NSObject>
|
||||
/**
|
||||
* \~chinese
|
||||
消息扩展信息更改的回调
|
||||
|
||||
@param expansionDic 消息扩展信息中更新的键值对
|
||||
@param message 消息
|
||||
|
||||
@discussion expansionDic 只包含更新的键值对,不是全部的数据。如果想获取全部的键值对,请使用 message 的 expansionDic 属性。
|
||||
|
||||
* \~english
|
||||
Callback for message extension information change.
|
||||
|
||||
@param expansionDic Updated key-value pairs in message extension information.
|
||||
@param message Message.
|
||||
|
||||
@ discussion expansionDic contains only updated key-value pairs, not all data. If you want to get all the key-value pairs, use the expansionDic property of message.
|
||||
*/
|
||||
- (void)messageExpansionDidUpdate:(NSDictionary<NSString *, NSString *> *)expansionDic
|
||||
message:(RCMessage *)message;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
消息扩展信息删除的回调
|
||||
|
||||
@param keyArray 消息扩展信息中删除的键值对 key 列表
|
||||
@param message 消息
|
||||
|
||||
* \~english
|
||||
Callback for message extension information deletion.
|
||||
|
||||
@param keyArray The key list of key-value pairs deleted in the message extension information.
|
||||
@param message Message.
|
||||
*/
|
||||
- (void)messageExpansionDidRemove:(NSArray<NSString *> *)keyArray
|
||||
message:(RCMessage *)message;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCMessageInterceptor
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
消息拦截器
|
||||
|
||||
* \~english
|
||||
Message interceptor
|
||||
*/
|
||||
@protocol RCMessageInterceptor <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
上传多媒体内容之前的回调
|
||||
|
||||
@param message 待上传的多媒体消息
|
||||
@return 处理后的消息
|
||||
@discussion 如果返回的 message 或 message.content 为 nil,该条消息不会上传到服务,状态设置为 SentStatus_FAILED, 并回调失败
|
||||
|
||||
* \~english
|
||||
Callback before uploading multimedia content.
|
||||
|
||||
@param message Multimedia messages to be uploaded.
|
||||
@ return processed message.
|
||||
@ discussion If the returned message or message.content is nil, the message will not be uploaded to the service, the status is set to SentStatus_FAILED, and the callback fails.
|
||||
*/
|
||||
- (RCMessage *)mediaMessageWillUpload:(RCMessage *)message;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
消息保存到数据库,发送到服务前调用此回调
|
||||
|
||||
@param message 待发送的消息
|
||||
@return 处理后的消息
|
||||
@discussion 如果返回的 message 或 message.content 为 nil,该条消息不会上传到服务,状态设置为 SentStatus_FAILED, 并回调失败
|
||||
|
||||
* \~english
|
||||
The message is saved to the database and this callback is called before it is sent to the service.
|
||||
|
||||
@param message Messages to be sent.
|
||||
@ return processed message.
|
||||
@ discussion If the returned message or message.content is nil, the message will not be uploaded to the service, the status is set to SentStatus_FAILED, and the callback fails.
|
||||
*/
|
||||
- (RCMessage *)messageWillSendAfterDB:(RCMessage *)message;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
接收到消息准备入库前的回调,开发者可以通过此回调对消息进行自定义处理。
|
||||
|
||||
@param message 待入库的消息
|
||||
@return 处理后的消息,SDK 会将返回的消息入库并通过 RCIMClientReceiveMessageDelegate 的 onReceived 方法回调给上层
|
||||
@discussion 如果返回的 message 或 message.content 为 nil, RCIMClientReceiveMessageDelegate 的 onReceived 方法会将待入库的消息回调给上层
|
||||
|
||||
* \~english
|
||||
After receiving the callback before the message is ready for storage, the developer can customize the processing of the message through this callback.
|
||||
|
||||
@param message Messages waiting for storage.
|
||||
@ return For the processed messages, SDK will store the returned messages into the library and call back to the upper layer through the onReceived method of RCIMClientReceiveMessageDelegate.
|
||||
@ discussion If the returned message or the onReceived method whose message.content is nil, RCIMClientReceiveMessageDelegate will call back the message to be stored in the upper layer.
|
||||
*/
|
||||
- (RCMessage *)messageDidReceiveBeforeDB:(RCMessage *)message;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - RCDownloadInterceptor
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
媒体文件下载拦截器
|
||||
|
||||
* \~english
|
||||
Media file download interceptor
|
||||
*/
|
||||
@protocol RCDownloadInterceptor <NSObject>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载前的回调
|
||||
|
||||
@param request request 请求
|
||||
@return request 请求,返回值不能为 nil,否则无法正常下载
|
||||
|
||||
* \~english
|
||||
Callback before download.
|
||||
|
||||
@param request Request request.
|
||||
@ return request, the returned value cannot be nil, otherwise it cannot be downloaded normally.
|
||||
*/
|
||||
- (NSMutableURLRequest *)onDownloadRequest:(NSMutableURLRequest *)request;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* RCIMClientProtocol_h */
|
||||
@@ -1,45 +0,0 @@
|
||||
//
|
||||
// RCImageCompressConfig.h
|
||||
// RongIMLibCore
|
||||
//
|
||||
// Created by liyan on 2021/3/9.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RCImageCompressConfig : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
缩略图最大尺寸
|
||||
|
||||
* \~english
|
||||
Maximum size of thumbnail
|
||||
*/
|
||||
@property (nonatomic, assign) CGFloat maxSize;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
缩略图最小尺寸
|
||||
|
||||
* \~english
|
||||
Minimum size of thumbnail
|
||||
*/
|
||||
@property (nonatomic, assign) CGFloat minSize;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
缩略图质量压缩比
|
||||
*
|
||||
* \~english
|
||||
Thumbnail mass compression ratio
|
||||
*/
|
||||
@property (nonatomic, assign) CGFloat quality;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,174 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCImageMessage.h
|
||||
// Created by Heq.Shinoda on 14-6-13.
|
||||
|
||||
#import "RCMediaMessageContent.h"
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the image message
|
||||
*/
|
||||
#define RCImageMessageTypeIdentifier @"RC:ImgMsg"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片消息类
|
||||
|
||||
@discussion 图片消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@discussion 如果想发送原图,请设置属性 full 为 YES。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
Image message class.
|
||||
|
||||
@ discussion image message class, which is stored and counted as unread messages.
|
||||
|
||||
@ discussion If you want to send the original image, set the property full to YES.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCImageMessage : RCMediaMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片消息的 URL 地址
|
||||
|
||||
@discussion 发送方此字段为图片的本地路径,接收方此字段为网络 URL 地址。
|
||||
|
||||
* \~english
|
||||
URL address of the image message.
|
||||
|
||||
@ discussion sender this field is the local path of the image, and receiver this field is the network URL address.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *imageUrl;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片的本地路径
|
||||
|
||||
* \~english
|
||||
The local path of the image.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *localPath;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片消息的缩略图
|
||||
|
||||
* \~english
|
||||
A thumbnail of a image message.
|
||||
*/
|
||||
@property (nonatomic, strong) UIImage *thumbnailImage;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否发送原图
|
||||
|
||||
@discussion 在发送图片的时候,是否发送原图,默认值为 NO。
|
||||
|
||||
* \~english
|
||||
Whether to send the original image or not.
|
||||
|
||||
@ discussion Whether to send the original image or not when sending the image. The default value is NO.
|
||||
*/
|
||||
@property (nonatomic, getter=isFull) BOOL full;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片消息的附加信息
|
||||
|
||||
* \~english
|
||||
Additional information for image messages.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *extra;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片消息的原始图片信息
|
||||
|
||||
* \~english
|
||||
The original image information of the image message.
|
||||
*/
|
||||
@property (nonatomic, strong) UIImage *originalImage;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片消息的原始图片信息
|
||||
|
||||
* \~english
|
||||
The original image information of the image message.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) NSData *originalImageData;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化图片消息
|
||||
|
||||
@discussion 如果想发送原图,请设置属性 full 为 YES。
|
||||
|
||||
@param image 原始图片
|
||||
@return 图片消息对象
|
||||
|
||||
* \~english
|
||||
Initialize image message.
|
||||
|
||||
@ discussion If you want to send the original image, set the property full to YES.
|
||||
|
||||
@param image Original image.
|
||||
@ return image message object.
|
||||
*/
|
||||
+ (instancetype)messageWithImage:(UIImage *)image;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化图片消息
|
||||
|
||||
@discussion 如果想发送原图,请设置属性 full 为 YES。
|
||||
|
||||
@param imageURI 图片的本地路径
|
||||
@return 图片消息对象
|
||||
|
||||
* \~english
|
||||
Initialize image message.
|
||||
|
||||
@ discussion If you want to send the original image, set the property full to YES.
|
||||
|
||||
@param imageURI The local path of the image.
|
||||
@ return image message object.
|
||||
*/
|
||||
+ (instancetype)messageWithImageURI:(NSString *)imageURI;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化图片消息
|
||||
|
||||
@discussion 如果想发送原图,请设置属性 full 为 YES。
|
||||
|
||||
@param imageData 图片的原始数据
|
||||
@return 图片消息对象
|
||||
|
||||
* \~english
|
||||
Initialize image message.
|
||||
|
||||
@ discussion If you want to send the original image, set the property full to YES.
|
||||
|
||||
@param imageData The original data of the image.
|
||||
@ return image message object
|
||||
*/
|
||||
+ (instancetype)messageWithImageData:(NSData *)imageData;
|
||||
|
||||
@end
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCInformationNotificationMessage.h
|
||||
// Created by xugang on 14/12/4.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
通知消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the notification message
|
||||
*/
|
||||
#define RCInformationNotificationMessageIdentifier @"RC:InfoNtf"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
通知消息类
|
||||
|
||||
@discussion 通知消息类,此消息会进行存储,但不计入未读消息数。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Notification message class.
|
||||
|
||||
@ discussion notification message class that this message is stored but does not count as the number of unread messages.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCInformationNotificationMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
通知的内容
|
||||
|
||||
* \~english
|
||||
The content of the notice
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *message;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化通知消息
|
||||
|
||||
@param message 通知的内容
|
||||
@param extra 通知的附加信息
|
||||
@return 通知消息对象
|
||||
|
||||
* \~english
|
||||
Initialize notification message.
|
||||
|
||||
@param message The content of the notice.
|
||||
@param extra Additional information for notification.
|
||||
@ return Notification message object.
|
||||
*/
|
||||
+ (instancetype)notificationWithMessage:(NSString *)message extra:(NSString *)extra;
|
||||
|
||||
@end
|
||||
@@ -1,56 +0,0 @@
|
||||
//
|
||||
// RCMediaMessageContent.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by lichenfeng on 2018/11/22.
|
||||
// Copyright © 2018 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
媒体类型消息的父类
|
||||
|
||||
@discussion
|
||||
SDK 中所有媒体类型消息(图片、文件等)均继承此类。
|
||||
开发者如需将自定义的媒体类型消息上传到融云默认的服务器时必须继承此类 ( SDK 负责媒体消息的上传及上传成功后的发送,开发者自行处理消息接收后的展示) 。
|
||||
以下属性需要子类在 encode、decode 方法中和扩展的属性一同进行处理
|
||||
|
||||
* \~english
|
||||
The parent class of the media type message.
|
||||
|
||||
@ discussion
|
||||
All media type messages (images, files, and so on) in SDK inherit this class.
|
||||
Developers who shall upload custom media type messages to RongCloud's default server must inherit this class (SDK is responsible for uploading and sending media messages successfully, and developers handle the display after receiving messages).
|
||||
The following properties shall be processed by subclasses in the encode and decode methods along with the extended properties.
|
||||
*/
|
||||
@interface RCMediaMessageContent : RCMessageContent
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
媒体内容的本地路径(此属性必须有值)
|
||||
|
||||
* \~english
|
||||
The local path to the media content (this property must have a value).
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *localPath;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
媒体内容上传服务器后的网络地址(上传成功后 SDK 会为该属性赋值)
|
||||
|
||||
* \~english
|
||||
The network address after the media content is uploaded to the server (SDK will assign a value to this attribute after the upload is successful).
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *remoteUrl;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
媒体内容的文件名(如不传使用 SDK 中 downloadMediaMessage 方法下载后会默认生成一个名称)
|
||||
|
||||
* \~english
|
||||
The file name of the media content (if not passed, a name will be generated by default after downloading using the downloadMediaMessage method in SDK).
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
@end
|
||||
@@ -1,84 +0,0 @@
|
||||
//
|
||||
// RCMentionedInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/7/6.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCStatusDefine.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息中的 @ 提醒信息对象
|
||||
|
||||
* \~english
|
||||
@ reminder information object in message
|
||||
*/
|
||||
@interface RCMentionedInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
@ 提醒的类型
|
||||
|
||||
* \~english
|
||||
@ Type of reminder
|
||||
*/
|
||||
@property (nonatomic, assign) RCMentionedType type;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
@ 的用户 ID 列表
|
||||
|
||||
@discussion 如果 type 是 @ 所有人,则可以传 nil
|
||||
|
||||
* \~english
|
||||
@ user ID list.
|
||||
|
||||
@ discussion If type is @ all, you can pass nil.
|
||||
*/
|
||||
@property (nonatomic, strong) NSArray<NSString *> *userIdList;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
包含 @ 提醒的消息,本地通知和远程推送显示的内容
|
||||
|
||||
* \~english
|
||||
Message containing @ reminder, local notifications, and content displayed by remote push.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *mentionedContent;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否 @ 了我
|
||||
|
||||
* \~english
|
||||
Do you @ me?
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL isMentionedMe;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化 @ 提醒信息
|
||||
|
||||
@param type @ 提醒的类型
|
||||
@param userIdList @ 的用户 ID 列表
|
||||
@param mentionedContent @ Push 内容
|
||||
|
||||
@return @ 提醒信息的对象
|
||||
|
||||
* \~english
|
||||
Initialize @ reminder message.
|
||||
|
||||
@param type @ Type of reminder
|
||||
@param userIdList @ user ID list
|
||||
@param mentionedContent @ Push content
|
||||
|
||||
@ return @ the object of the reminder message
|
||||
*/
|
||||
- (instancetype)initWithMentionedType:(RCMentionedType)type
|
||||
userIdList:(NSArray *)userIdList
|
||||
mentionedContent:(NSString *)mentionedContent;
|
||||
|
||||
@end
|
||||
@@ -1,296 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCMessage.h
|
||||
// Created by Heq.Shinoda on 14-6-13.
|
||||
|
||||
#ifndef __RCMessage
|
||||
#define __RCMessage
|
||||
#import "RCMessageContent.h"
|
||||
#import "RCReadReceiptInfo.h"
|
||||
#import "RCStatusDefine.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCMessageConfig.h"
|
||||
#import "RCMessagePushConfig.h"
|
||||
#import "RCGroupReadReceiptInfoV2.h"
|
||||
/*!
|
||||
* \~chinese
|
||||
消息实体类
|
||||
|
||||
@discussion 消息实体类,包含消息的所有属性。
|
||||
|
||||
* \~english
|
||||
Message entity class.
|
||||
|
||||
@ discussion message entity class, which contains all the properties of the message.
|
||||
*/
|
||||
@interface RCMessage : NSObject <NSCopying, NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话类型
|
||||
|
||||
* \~english
|
||||
Conversation type
|
||||
*/
|
||||
@property (nonatomic, assign) RCConversationType conversationType;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话 ID
|
||||
|
||||
* \~english
|
||||
Conversation ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *targetId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
所属会话的业务标识,长度限制 20 字符
|
||||
|
||||
* \~english
|
||||
Business identification of the conversation to which it belongs, with a length limit of 20 characters.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *channelId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的 ID
|
||||
|
||||
@discussion 本地存储的消息的唯一值(数据库索引唯一值)
|
||||
|
||||
* \~english
|
||||
ID of the message.
|
||||
|
||||
@ discussion Unique value of locally stored message (unique value of database index).
|
||||
*/
|
||||
@property (nonatomic, assign) long messageId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的方向
|
||||
|
||||
* \~english
|
||||
The direction of the message.
|
||||
*/
|
||||
@property (nonatomic, assign) RCMessageDirection messageDirection;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的发送者 ID
|
||||
|
||||
* \~english
|
||||
The sender ID of the message
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *senderUserId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的接收状态
|
||||
|
||||
* \~english
|
||||
The receiving status of the message
|
||||
*/
|
||||
@property (nonatomic, assign) RCReceivedStatus receivedStatus;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的发送状态
|
||||
|
||||
* \~english
|
||||
The sending status of the message
|
||||
*/
|
||||
@property (nonatomic, assign) RCSentStatus sentStatus;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的接收时间(Unix 时间戳、毫秒)
|
||||
|
||||
* \~english
|
||||
The time the message is received (Unix timestamp, milliseconds)
|
||||
*/
|
||||
@property (nonatomic, assign) long long receivedTime;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的发送时间(Unix 时间戳、毫秒)
|
||||
|
||||
* \~english
|
||||
The time the message is sent (Unix timestamp, milliseconds)
|
||||
*/
|
||||
@property (nonatomic, assign) long long sentTime;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the message
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *objectName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的内容
|
||||
|
||||
* \~english
|
||||
The content of the message
|
||||
*/
|
||||
@property (nonatomic, strong) RCMessageContent *content;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的附加字段
|
||||
|
||||
* \~english
|
||||
Additional fields of the message
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *extra;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
全局唯一 ID
|
||||
|
||||
@discussion 服务器消息唯一 ID(在同一个 Appkey 下全局唯一)
|
||||
|
||||
* \~english
|
||||
Globally unique ID.
|
||||
|
||||
@ discussion server message unique ID (globally unique under the same Appkey).
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *messageUId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
阅读回执状态
|
||||
|
||||
* \~english
|
||||
Reading receipt status
|
||||
*/
|
||||
@property (nonatomic, strong) RCReadReceiptInfo *readReceiptInfo;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
群阅读回执状态
|
||||
@discussion 如果是调用 RCGroupReadReceiptV2Manager 中方法实现群已读回执功能,此参数才有效,否则请使用 readReceiptInfo 属性获取阅读回执状态
|
||||
@discussion 如果使用 IMKit,请用 readReceiptInfo 属性
|
||||
|
||||
* \~english
|
||||
Group reading receipt status.
|
||||
@ discussion This parameter is valid only if you call the method in RCGroupReadReceiptV2Manager to implement the group read receipt function. Otherwise, use the readReceiptInfo attribute to obtain the read receipt status.
|
||||
@ discussion use the readReceiptInfo attribute if you use IMKit,
|
||||
*/
|
||||
@property (nonatomic, strong) RCGroupReadReceiptInfoV2 *groupReadReceiptInfoV2;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息配置
|
||||
|
||||
* \~english
|
||||
Message configuration
|
||||
*/
|
||||
@property (nonatomic, strong) RCMessageConfig *messageConfig;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息推送配置
|
||||
|
||||
* \~english
|
||||
Message push configuration
|
||||
*/
|
||||
@property (nonatomic, strong) RCMessagePushConfig *messagePushConfig;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否是离线消息,只在接收消息的回调方法中有效,如果消息为离线消息,则为 YES ,其他情况均为 NO
|
||||
|
||||
* \~english
|
||||
Whether it is an offline message is only valid in the callback method that receives the message. If the message is offline, it is YES. Otherwise, it is NO.
|
||||
*/
|
||||
@property(nonatomic, assign) BOOL isOffLine;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息是否可以包含扩展信息
|
||||
|
||||
@discussion 该属性在消息发送时确定,发送之后不能再做修改
|
||||
@discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息
|
||||
|
||||
* \~english
|
||||
Whether the message can contain extended information.
|
||||
|
||||
@ discussion This property is determined when the message is sent and cannot be modified after it is sent.
|
||||
@ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL canIncludeExpansion;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息扩展信息列表
|
||||
|
||||
@discussion 扩展信息只支持单聊和群组,其它会话类型不能设置扩展信息
|
||||
@discussion 默认消息扩展字典 key 长度不超过 32 ,value 长度不超过 64 ,单次设置扩展数量最大为 20,消息的扩展总数不能超过 300
|
||||
|
||||
* \~english
|
||||
Message extension information list.
|
||||
|
||||
@ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information.
|
||||
@ discussion Default message extension dictionary key length does not exceed 32, value length does not exceed 64, the maximum number of extensions for a single setting is 20, and the total number of message extensions cannot exceed 300.
|
||||
*/
|
||||
@property (nonatomic, strong) NSDictionary<NSString *, NSString *> *expansionDic;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
RCMessage初始化方法
|
||||
|
||||
@param conversationType 会话类型
|
||||
@param targetId 会话 ID
|
||||
@param messageDirection 消息的方向
|
||||
@param content 消息的内容
|
||||
|
||||
* \~english
|
||||
RCMessage initialization method.
|
||||
|
||||
@ param conversationType conversation type.
|
||||
@ param targetId conversation ID.
|
||||
@ param messageDirection message direction
|
||||
@ param content message content.
|
||||
*/
|
||||
- (instancetype)initWithType:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
direction:(RCMessageDirection)messageDirection
|
||||
content:(RCMessageContent *)content;
|
||||
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
RCMessage初始化方法(已废弃,请不要使用该接口构造消息发送)
|
||||
|
||||
@param conversationType 会话类型
|
||||
@param targetId 会话 ID
|
||||
@param messageDirection 消息的方向
|
||||
@param messageId 消息的 ID(如果是发送该消息初始值请设置为 -1)
|
||||
@param content 消息的内容
|
||||
|
||||
* \~english
|
||||
RCMessage initialization method.
|
||||
|
||||
@ param conversationType conversation type.
|
||||
@ param targetId conversation ID.
|
||||
@ param messageDirection message direction
|
||||
@ param messageId message ID
|
||||
@ param content message content.
|
||||
*/
|
||||
- (instancetype)initWithType:(RCConversationType)conversationType
|
||||
targetId:(NSString *)targetId
|
||||
direction:(RCMessageDirection)messageDirection
|
||||
messageId:(long)messageId
|
||||
content:(RCMessageContent *)content __deprecated_msg("Use initWithType:targetId:direction:content:");
|
||||
@end
|
||||
#endif
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// RCMessageConfig.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2020/6/29.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface RCMessageConfig : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否关闭通知
|
||||
YES: 关闭通知(不发送通知)
|
||||
NO: 不关闭通知(发送通知)
|
||||
默认 NO
|
||||
|
||||
* \~english
|
||||
Whether to turn off notification.
|
||||
YES: Turn off notifications (do not send notifications).
|
||||
NO: Do not turn off notification (send notification).
|
||||
Default NO
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL disableNotification;
|
||||
|
||||
@end
|
||||
|
||||
@@ -1,316 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCMessageContent.h
|
||||
// Created by Heq.Shinoda on 14-6-13.
|
||||
|
||||
#ifndef __RCMessageContent
|
||||
#define __RCMessageContent
|
||||
|
||||
#import "RCMentionedInfo.h"
|
||||
#import "RCStatusDefine.h"
|
||||
#import "RCUserInfo.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息内容的编解码协议
|
||||
|
||||
@discussion 用于标示消息内容的类型,进行消息的编码和解码。
|
||||
所有自定义消息必须实现此协议,否则将无法正常传输和使用。
|
||||
|
||||
* \~english
|
||||
Codec protocol for message content.
|
||||
|
||||
@ discussion It is used to identify the type of message content and to encode and decode the message.
|
||||
All custom messages must implement this protocol, otherwise they will not be transmitted and used properly.
|
||||
*/
|
||||
@protocol RCMessageCoding <NSObject>
|
||||
@required
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将消息内容序列化,编码成为可传输的json数据
|
||||
|
||||
@discussion
|
||||
消息内容通过此方法,将消息中的所有数据,编码成为json数据,返回的json数据将用于网络传输。
|
||||
|
||||
* \~english
|
||||
Serialize the message content and encode it into transportable json data.
|
||||
|
||||
@ discussion
|
||||
Through this method, the message content encodes all the data in the message into json data, and the returned json data will be used for network transmission.
|
||||
*/
|
||||
- (NSData *)encode;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将json数据的内容反序列化,解码生成可用的消息内容
|
||||
|
||||
@param data 消息中的原始json数据
|
||||
|
||||
@discussion
|
||||
网络传输的json数据,会通过此方法解码,获取消息内容中的所有数据,生成有效的消息内容。
|
||||
|
||||
* \~english
|
||||
Deserialize the contents of json data and decode them to generate available message content.
|
||||
|
||||
@param data Raw json data in the message.
|
||||
|
||||
@ discussion
|
||||
The json data transmitted over the network will be decoded by this method, all the data in the message content will be obtained, and the valid message content will be generated.
|
||||
*/
|
||||
- (void)decodeWithData:(NSData *)data;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
返回消息的类型名
|
||||
|
||||
@return 消息的类型名
|
||||
|
||||
@discussion 您定义的消息类型名,需要在各个平台上保持一致,以保证消息互通。
|
||||
|
||||
@warning 请勿使用@"RC:"开头的类型名,以免和SDK默认的消息名称冲突
|
||||
|
||||
* \~english
|
||||
Return the type name of the message.
|
||||
|
||||
@ return Type name of message.
|
||||
|
||||
@ discussion The name of the message type you defined shall be consistent across platforms to ensure message interoperability.
|
||||
|
||||
@ warning Do not use a type name that begins with @ "RC:", so as not to conflict with the default message name of SDK.
|
||||
*/
|
||||
+ (NSString *)getObjectName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
返回可搜索的关键内容列表
|
||||
|
||||
@return 返回可搜索的关键内容列表
|
||||
|
||||
@discussion 这里返回的关键内容列表将用于消息搜索,自定义消息必须要实现此接口才能进行搜索。
|
||||
|
||||
* \~english
|
||||
Return a list of searchable key content.
|
||||
|
||||
@ return Return a list of key content that can be searched.
|
||||
|
||||
@ discussion The list of key content returned here will be used for message search, and custom messages must implement this interface before searching.
|
||||
*/
|
||||
- (NSArray<NSString *> *)getSearchableWords;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息内容的存储协议
|
||||
|
||||
@discussion 用于确定消息内容的存储策略。
|
||||
所有自定义消息必须实现此协议,否则将无法正常存储和使用。
|
||||
|
||||
* \~english
|
||||
Storage protocol for message content.
|
||||
|
||||
@ discussion It is used to determine the storage policy for the content of the message.
|
||||
All custom messages must implement this protocol, otherwise they will not be stored and used properly.
|
||||
*/
|
||||
@protocol RCMessagePersistentCompatible <NSObject>
|
||||
@required
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
返回消息的存储策略
|
||||
|
||||
@return 消息的存储策略
|
||||
|
||||
@discussion 指明此消息类型在本地是否存储、是否计入未读消息数。
|
||||
|
||||
* \~english
|
||||
Return the storage policy of the message.
|
||||
|
||||
@ return Storage policy for messages.
|
||||
|
||||
@ discussion It indicates whether this message type is stored locally and counted as unread messages.
|
||||
*/
|
||||
+ (RCMessagePersistent)persistentFlag;
|
||||
@end
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息内容摘要的协议
|
||||
|
||||
@discussion 用于在会话列表和本地通知中显示消息的摘要。
|
||||
|
||||
* \~english
|
||||
Protocol for message content digest.
|
||||
|
||||
@ discussion It is used to display a digest of messages in the conversation list and in local notifications.
|
||||
*/
|
||||
@protocol RCMessageContentView
|
||||
@optional
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
返回在会话列表和本地通知中显示的消息内容摘要
|
||||
|
||||
@return 会话列表和本地通知中显示的消息内容摘要
|
||||
|
||||
@discussion
|
||||
如果您使用IMKit,当会话的最后一条消息为自定义消息时,需要通过此方法获取在会话列表展现的内容摘要;
|
||||
当App在后台收到消息时,需要通过此方法获取在本地通知中展现的内容摘要。
|
||||
|
||||
* \~english
|
||||
Return a digest of the message contents displayed in the conversation list and local notifications.
|
||||
|
||||
@ return conversation list and digest of messages displayed in local notifications.
|
||||
|
||||
@ discussion
|
||||
If you use IMKit, when the last message of the conversation is a custom message, you shall use this method to get the digest of the content displayed in the conversation list.
|
||||
When App receives a message in the background, it uses this method to obtain a digest of the content presented in the local notification.
|
||||
*/
|
||||
- (NSString *)conversationDigest;
|
||||
|
||||
@end
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息内容的基类
|
||||
|
||||
@discussion 此类为消息实体类 RCMessage 中的消息内容 content 的基类。
|
||||
所有的消息内容均为此类的子类,包括 SDK 自带的消息(如 RCTextMessage、RCImageMessage 等)和用户自定义的消息。
|
||||
所有的自定义消息必须继承此类,并实现 RCMessageCoding 和 RCMessagePersistentCompatible、RCMessageContentView 协议。
|
||||
|
||||
* \~english
|
||||
The base class of the message content.
|
||||
|
||||
@ discussion This class is the base class for the message content in the message entity class RCMessage.
|
||||
All message contents are subclasses of this class, including messages that come with SDK (such as RCTextMessage, RCImageMessage, etc.) and user-defined messages.
|
||||
All custom messages must inherit this class and implement the RCMessageCoding and RCMessagePersistentCompatible, RCMessageContentView protocols.
|
||||
*/
|
||||
@interface RCMessageContent : NSObject <RCMessageCoding, RCMessagePersistentCompatible, RCMessageContentView>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息内容中携带的发送者的用户信息
|
||||
|
||||
@discussion
|
||||
如果您使用IMKit,可以通过RCIM的enableMessageAttachUserInfo属性设置在每次发送消息中携带发送者的用户信息。
|
||||
|
||||
* \~english
|
||||
User information of the sender carried in the message content.
|
||||
|
||||
@ discussion
|
||||
If you use IMKit, you can set the enableMessageAttachUserInfo property of RCIM to carry the sender's user information in each message sent.
|
||||
*/
|
||||
@property (nonatomic, strong) RCUserInfo *senderUserInfo;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息中的 @ 提醒信息
|
||||
|
||||
* \~english
|
||||
@ reminder message in message.
|
||||
*/
|
||||
@property (nonatomic, strong) RCMentionedInfo *mentionedInfo;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
设置焚烧时间
|
||||
|
||||
@discussion 默认是 0,0 代表该消息非阅后即焚消息。
|
||||
|
||||
* \~english
|
||||
Set burning time.
|
||||
|
||||
@ discussion The default value is 0, which means that the message will be burned immediately after it is read.
|
||||
*/
|
||||
@property (nonatomic, assign) NSUInteger destructDuration;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息的附加信息
|
||||
|
||||
* \~english
|
||||
Additional information for messages.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *extra;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
将用户信息编码到字典中
|
||||
|
||||
@param userInfo 要编码的用户信息
|
||||
@return 存有用户信息的 Dictionary
|
||||
|
||||
* \~english
|
||||
Encode user information into a dictionary.
|
||||
|
||||
@param userInfo User information to be encoded.
|
||||
@ return Dictionary with user information.
|
||||
*/
|
||||
- (NSDictionary *)encodeUserInfo:(RCUserInfo *)userInfo;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将消息内容中携带的用户信息解码
|
||||
|
||||
@param dictionary 用户信息的Dictionary
|
||||
|
||||
* \~english
|
||||
Decode the user information carried in the message content.
|
||||
|
||||
@param dictionary Dictionary of user information.
|
||||
*/
|
||||
- (void)decodeUserInfo:(NSDictionary *)dictionary;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
将@提醒信息编码到字典中
|
||||
|
||||
@param mentionedInfo 要编码的@信息
|
||||
@return 存有@信息的 Dictionary
|
||||
|
||||
* \~english
|
||||
Encode @ reminder information into the dictionary.
|
||||
|
||||
@param mentionedInfo @ information to be encoded.
|
||||
@ return Dictionary with @ information.
|
||||
*/
|
||||
- (NSDictionary *)encodeMentionedInfo:(RCMentionedInfo *)mentionedInfo;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将消息内容中携带的@提醒信息解码
|
||||
|
||||
@param dictionary @提醒信息的Dictionary
|
||||
|
||||
* \~english
|
||||
Decode the @ reminder information carried in the message content.
|
||||
|
||||
@param dictionary @ Dictionary of reminder messages.
|
||||
*/
|
||||
- (void)decodeMentionedInfo:(NSDictionary *)dictionary;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
消息内容的原始json数据
|
||||
|
||||
@discussion 此字段存放消息内容中未编码的json数据。
|
||||
SDK内置的消息,如果消息解码失败,默认会将消息的内容存放到此字段;如果编码和解码正常,此字段会置为nil。
|
||||
|
||||
* \~english
|
||||
The original json data of the message content.
|
||||
|
||||
@ discussion This field stores unencoded json data in the message content.
|
||||
The message built into SDK. If the message decoding fails, the default will store the contents of the message in this field; if the encoding and decoding are normal, this field will be set to nil.
|
||||
*/
|
||||
@property (nonatomic, strong, setter=setRawJSONData:) NSData *rawJSONData;
|
||||
|
||||
@end
|
||||
#endif
|
||||
@@ -1,135 +0,0 @@
|
||||
//
|
||||
// RCMessagePushConfig.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2020/9/15.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCiOSConfig.h"
|
||||
#import "RCAndroidConfig.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RCMessagePushConfig : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否屏蔽通知标题
|
||||
YES: 不显示通知标题
|
||||
NO: 显示通知标题
|
||||
|
||||
@discussion 默认情况下融云单聊消息通知标题为用户名、群聊消息为群名称,设置后不会再显示通知标题。
|
||||
@discussion 此属性只针目标用户为 iOS 平台时有效,Android 第三方推送平台的通知标题为必填项,所以暂不支持。
|
||||
|
||||
* \~english
|
||||
Whether to block the notification title.
|
||||
YES: Do not display notification title.
|
||||
NO: Show notification title.
|
||||
|
||||
@ discussion By default, the notification title of RongCloud single chat message is user name, and the group chat message is group name. After setting, the notification title will no longer be displayed.
|
||||
@ discussion This attribute is valid only when the target user is iOS platform. The notification title of Android third-party push platform is required, so it is not supported for the time being.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL disablePushTitle;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
推送标题
|
||||
如果没有设置,会使用下面的默认标题显示规则
|
||||
默认标题显示规则:
|
||||
内置消息:单聊通知标题显示为发送者名称,群聊通知标题显示为群名称。
|
||||
自定义消息:默认不显示标题。
|
||||
|
||||
* \~english
|
||||
Push title.
|
||||
If it is not set, the following default title is used to display the rule.
|
||||
The default title display rules:
|
||||
Built-in message: The single chat notification title is displayed as the sender name, and the group chat notification title is displayed as the group name.
|
||||
Custom message: the title is not displayed by default.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *pushTitle;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
推送内容
|
||||
优先使用 MessagePushConfig 的 pushContent,如果没有,则使用 sendMessage 或者 sendMediaMessage 的 pushContent。
|
||||
|
||||
* \~english
|
||||
Push content
|
||||
Give priority to pushContent for MessagePushConfig, if not, use pushContent for sendMessage or sendMediaMessage.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *pushContent;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
远程推送附加信息
|
||||
优先使用 MessagePushConfig 的 pushData,如果没有,则使用 sendMessage 或者 sendMediaMessage 的 pushData。
|
||||
|
||||
* \~english
|
||||
Remotely push additional information.
|
||||
Give priority to pushData for MessagePushConfig, if not, use pushData for sendMessage or sendMediaMessage.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *pushData;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否强制显示通知详情
|
||||
当目标用户通过 RCPushProfile 中的 updateShowPushContentStatus 设置推送不显示消息详情时,可通过此参数,强制设置该条消息显示推送详情。
|
||||
|
||||
* \~english
|
||||
Whether to force the display of notification details.
|
||||
When the target user does not display the message details through the updateShowPushContentStatus setting in RCPushProfile, you can use this parameter to force the message to display the push details.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL forceShowDetailContent;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
推送模板 ID,设置后根据目标用户通过 SDK RCPushProfile 中的 setPushLauguageCode 设置的语言环境,匹配模板中设置的语言内容进行推送,未匹配成功时使用默认内容进行推送,模板内容在“开发者后台-自定义推送文案”中进行设置。
|
||||
注:RCMessagePushConfig 中的 Title 和 PushContent 优先级高于模板 ID(templateId)中对应的标题和推送内容。
|
||||
|
||||
* \~english
|
||||
After the ID of the push template is set, the language content set in the template is matched according to the locale set by the target user through the setPushLauguageCode in SDK RCPushProfile. If the match is not successful, the default content is pushed. The template content is set in "developer backend-Custom push copy".
|
||||
Note: The Title and PushContent in RCMessagePushConfig take precedence over the corresponding title and push content in the template ID (templateId).
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *templateId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
iOS 平台相关配置
|
||||
|
||||
* \~english
|
||||
Configuration related to iOS platform
|
||||
*/
|
||||
@property (nonatomic, strong) RCiOSConfig *iOSConfig;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
Android 平台相关配置
|
||||
|
||||
* \~english
|
||||
Configuration related to Android platform
|
||||
*/
|
||||
@property (nonatomic, strong) RCAndroidConfig *androidConfig;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将数组转成 messagePushConfig 的 iOSConfig 和 AndroidConfig
|
||||
|
||||
* \~english
|
||||
Convert arrays to iOSConfig and AndroidConfig of messagePushConfig.
|
||||
*/
|
||||
- (instancetype)arrayToConfig:(NSArray *)array;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
将 iOSConfig 和 AndroidConfig 转成数组
|
||||
|
||||
* \~english
|
||||
Convert iOSConfig and AndroidConfig to an array.
|
||||
*/
|
||||
- (NSArray *)encodeIOSAndAndroidConfig;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,78 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCProfileNotificationMessage.h
|
||||
// Created by xugang on 14/11/28.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
公众服务账号信息变更消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the public service account information change message.
|
||||
*/
|
||||
#define RCProfileNotificationMessageIdentifier @"RC:ProfileNtf"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
公众服务账号信息变更消息类
|
||||
|
||||
@discussion 公众服务账号信息变更消息类,此消息会进行存储,但不计入未读消息数。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Public service account information change message class.
|
||||
|
||||
@ discussion public service account information change message class, which will be stored, but will not be counted as the number of unread messages.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCProfileNotificationMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
公众服务账号信息变更的操作名
|
||||
|
||||
* \~english
|
||||
The operation name of the change of public service account information.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *operation;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
信息变更的数据,可以为任意格式,如 json 数据。
|
||||
|
||||
* \~english
|
||||
Data with changed information, which can be in any format, e.g. json data.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *data;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化公众服务账号信息变更消息
|
||||
|
||||
@param operation 信息变更的操作名
|
||||
@param data 信息变更的数据
|
||||
@param extra 信息变更的附加信息
|
||||
@return 公众服务账号信息变更消息的对象
|
||||
|
||||
* \~english
|
||||
Initialize public service account information change message.
|
||||
|
||||
@param operation Operation name of information change.
|
||||
@param data Information changed data.
|
||||
@param extra Additional information for information changes.
|
||||
@ return the object of the change message for the account information of the public service.
|
||||
*/
|
||||
+ (instancetype)notificationWithOperation:(NSString *)operation data:(NSString *)data extra:(NSString *)extra;
|
||||
|
||||
@end
|
||||
@@ -1,118 +0,0 @@
|
||||
//
|
||||
// RCPushProfile.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/12/26.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCStatusDefine.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface RCPushProfile : NSObject
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
是否显示远程推送的内容
|
||||
|
||||
* \~english
|
||||
Whether to display the content of remote push
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL isShowPushContent;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
远程推送的语言
|
||||
|
||||
* \~english
|
||||
The language of remote push
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) RCPushLauguage pushLauguage;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
其他端在线时,手机是否接收远程推送(多个手机端登录,最后一个会接收)
|
||||
|
||||
* \~english
|
||||
Whether the mobile phone receives remote push when the other end is online (multiple mobile phones log in, the last one will receive it)
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL receiveStatus;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
设置是否显示远程推送的内容
|
||||
|
||||
@param isShowPushContent 是否显示推送的具体内容( YES 显示 NO 不显示)
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
* \~english
|
||||
Set whether to display the contents of remote push.
|
||||
|
||||
@param isShowPushContent Whether to display the specific content of the push (YES display NO does not display).
|
||||
@param successBlock Callback for success
|
||||
@param errorBlock Callback for failure
|
||||
*/
|
||||
- (void)updateShowPushContentStatus:(BOOL)isShowPushContent
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
设置推送内容的自然语言
|
||||
|
||||
@param pushLauguage 设置推送内容的自然语言
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
* \~english
|
||||
Set the natural language of push content.
|
||||
|
||||
@param pushLauguage Set the natural language of push content.
|
||||
@param successBlock Callback for success
|
||||
@param errorBlock Callback for failure
|
||||
*/
|
||||
- (void)setPushLauguage:(RCPushLauguage)pushLauguage
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock __deprecated_msg("Use setPushLauguageCode:success:error");
|
||||
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
设置推送内容的自然语言
|
||||
|
||||
@param lauguage 通过 SDK 设置的语言环境,语言缩写内容格式为 (ISO-639 Language Code)_(ISO-3166 Country Codes),如:zh_CN。目前融云支持的内置推送语言为 zh_CN、en_US、ar_SA
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
* \~english
|
||||
Set the natural language of push content.
|
||||
|
||||
@param lauguage Through the locale set by SDK, the format of the language abbreviation content is (ISO-639 Language Code) _ (ISO-3166 Country Codes),) such as: zh_CN. Currently, the built-in push languages supported by RongCloud are zh_CN, en_US and ar_SA.
|
||||
@param successBlock Callback for success
|
||||
@param errorBlock Callback for failure
|
||||
*/
|
||||
- (void)setPushLauguageCode:(NSString *)lauguage
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
设置 Web 端在线时,手机端是否接收推送
|
||||
|
||||
@param receiveStatus 是否接收推送( YES 接收 NO 不接收)
|
||||
@param successBlock 成功回调
|
||||
@param errorBlock 失败回调
|
||||
|
||||
* \~english
|
||||
Set whether the mobile phone will receive push when the Web terminal is online.
|
||||
|
||||
@param receiveStatus Whether to receive push or not (YES receive NO does not receive).
|
||||
@param successBlock Callback for success
|
||||
@param errorBlock Callback for failure
|
||||
*/
|
||||
- (void)setPushReceiveStatus:(BOOL)receiveStatus
|
||||
success:(void (^)(void))successBlock
|
||||
error:(void (^)(RCErrorCode status))errorBlock;
|
||||
|
||||
@end
|
||||
@@ -1,40 +0,0 @@
|
||||
//
|
||||
// RCReadReceiptInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/8/29.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
#import "RCStatusDefine.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface RCReadReceiptInfo : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否需要回执消息
|
||||
|
||||
* \~english
|
||||
Do you need a receipt message?
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isReceiptRequestMessage;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
是否已经发送回执
|
||||
|
||||
* \~english
|
||||
Whether a receipt has been sent
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL hasRespond;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
发送回执的用户 ID 列表
|
||||
|
||||
* \~english
|
||||
ID list of users who send receipts
|
||||
*/
|
||||
@property (nonatomic, strong) NSMutableDictionary *userIdList;
|
||||
|
||||
@end
|
||||
@@ -1,89 +0,0 @@
|
||||
//
|
||||
// RCRecallNotificationMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by litao on 16/7/15.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
撤回通知消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the recall notification message
|
||||
*/
|
||||
#define RCRecallNotificationMessageIdentifier @"RC:RcNtf"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
撤回通知消息类
|
||||
@discussion 撤回通知消息,此消息会进行本地存储,但不计入未读消息数。
|
||||
|
||||
@remarks 通知类消息
|
||||
|
||||
* \~english
|
||||
Recall notification message class
|
||||
@ discussion Recall notification message, which is stored locally, but does not count as the number of unread messages.
|
||||
|
||||
@ remarks notification message
|
||||
*/
|
||||
@interface RCRecallNotificationMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
发起撤回操作的用户 ID
|
||||
|
||||
* \~english
|
||||
ID of the user who initiates the recall operation
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *operatorId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
撤回的时间(毫秒)
|
||||
|
||||
* \~english
|
||||
Time to recall (milliseconds)
|
||||
*/
|
||||
@property (nonatomic, assign) long long recallTime;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
原消息的消息类型名
|
||||
|
||||
* \~english
|
||||
Message type name of the original message
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *originalObjectName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
是否是管理员操作
|
||||
|
||||
* \~english
|
||||
Whether it is an administrator operation
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isAdmin;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
撤回的文本消息的内容
|
||||
|
||||
* \~english
|
||||
The contents of the recalled text message
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *recallContent;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
撤回动作的时间(毫秒)
|
||||
|
||||
* \~english
|
||||
Time to recall the action (milliseconds).
|
||||
*/
|
||||
@property (nonatomic, assign) long long recallActionTime;
|
||||
|
||||
@end
|
||||
@@ -1,69 +0,0 @@
|
||||
//
|
||||
// RCReferenceMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2020/2/26.
|
||||
// Copyright © 2020 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
/*!
|
||||
* \~chinese
|
||||
引用消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the reference message
|
||||
*/
|
||||
#define RCReferenceMessageTypeIdentifier @"RC:ReferenceMsg"
|
||||
/*!
|
||||
* \~chinese
|
||||
引用消息类
|
||||
|
||||
@discussion 引用消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
Reference message class.
|
||||
|
||||
@ discussion reference message class, which is stored and counted as unread messages.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCReferenceMessage : RCMessageContent
|
||||
/*!
|
||||
* \~chinese
|
||||
引用文本
|
||||
|
||||
* \~english
|
||||
Reference text
|
||||
*/
|
||||
@property (nonatomic, strong) NSString *content;
|
||||
/*!
|
||||
* \~chinese
|
||||
被引用消息的发送者 ID
|
||||
|
||||
* \~english
|
||||
ID of the sender of the referenced message
|
||||
*/
|
||||
@property (nonatomic, strong) NSString *referMsgUserId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
被引用消息体
|
||||
|
||||
* \~english
|
||||
Referenced message body
|
||||
*/
|
||||
@property (nonatomic, strong) RCMessageContent *referMsg;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
被引用消息的 messageUId。服务器消息唯一 ID(在同一个 Appkey 下全局唯一)
|
||||
|
||||
* \~english
|
||||
messageUId of refered
|
||||
*/
|
||||
@property (nonatomic, strong) NSString *referMsgUid;
|
||||
|
||||
@end
|
||||
@@ -1,93 +0,0 @@
|
||||
//
|
||||
// RCRemoteHistoryMsgOption.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by Zhaoqianyu on 2019/7/31.
|
||||
// Copyright © 2019 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
拉取顺序
|
||||
RCRemoteHistoryOrderDesc - 降序
|
||||
RCRemoteHistoryOrderAsc - 升序
|
||||
|
||||
* \~english
|
||||
Pull sequence.
|
||||
RCRemoteHistoryOrderDesc-descending.
|
||||
RCRemoteHistoryOrderAsc-ascending order.
|
||||
*/
|
||||
typedef enum : NSUInteger {
|
||||
RCRemoteHistoryOrderDesc = 0,
|
||||
RCRemoteHistoryOrderAsc,
|
||||
} RCRemoteHistoryOrder;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
RCIMClient - getRemoteHistoryMessage 接口对应的参数选项
|
||||
|
||||
* \~english
|
||||
Parameter options for RCIMClient-getRemoteHistoryMessage interface.
|
||||
*/
|
||||
@interface RCRemoteHistoryMsgOption : NSObject
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
起始的消息发送时间戳,毫秒
|
||||
默认 0
|
||||
|
||||
* \~english
|
||||
Initial message sending timestamp, millisecond.
|
||||
Default 0.
|
||||
*/
|
||||
@property (nonatomic, assign) long long recordTime;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
需要获取的消息数量, 0 < count <= 20
|
||||
默认 0
|
||||
|
||||
* \~english
|
||||
The number of messages to be obtained, 0 < count < = 20.
|
||||
Default 0.
|
||||
*/
|
||||
@property (nonatomic, assign) NSInteger count;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
拉取顺序
|
||||
RCRemoteHistoryOrderDesc: 降序,结合传入的时间戳参数,获取发送时间递增的消息
|
||||
RCRemoteHistoryOrderAsc: 升序,结合传入的时间戳参数,获取发送时间递减的消息
|
||||
默认降序
|
||||
|
||||
* \~english
|
||||
Pull sequence.
|
||||
RCRemoteHistoryOrderDesc: Descending order, the passed timestamp parameters are combined to get messages with an increasing sending time.
|
||||
RCRemoteHistoryOrderAsc:
|
||||
Ascending order, the passed timestamp parameters are combiend to get the message with decreasing sending time.
|
||||
Default descending order.
|
||||
*/
|
||||
@property (nonatomic, assign) RCRemoteHistoryOrder order;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
是否需要排重
|
||||
YES: 拉取回来的消息全部返回
|
||||
NO: 拉取回来的消息只返回本地数据库中不存在的
|
||||
默认 NO
|
||||
|
||||
* \~english
|
||||
Does it shall be weighed?
|
||||
YES: All the messages pulled back are returned.
|
||||
NO: The pulled messages only return messages that do not exist in the local database.
|
||||
Default NO
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL includeLocalExistMessage;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,107 +0,0 @@
|
||||
//
|
||||
// RCEResumeableDownloader.h
|
||||
// RongEnterpriseApp
|
||||
//
|
||||
// Created by zhaobingdong on 2018/5/15.
|
||||
// Copyright © 2018 rongcloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RCDownloadItem.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class RCMessage;
|
||||
@protocol RCResumeableDownloaderDelegate <NSObject>
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
下载完成后调用
|
||||
|
||||
@param item 下载任务实例
|
||||
@param path 下载任务完成后的文件路径
|
||||
@discussion 通过 itemWithMessageId: 方法获取到写下载项,不会调用该方法
|
||||
|
||||
* \~english
|
||||
Called after the download is complete.
|
||||
|
||||
@param item Download task instance.
|
||||
@param path The file path after the download task is completed.
|
||||
@ discussion through itemWithMessageId: Method Get the write download and will not call the method.
|
||||
*/
|
||||
- (void)downloadItem:(RCDownloadItem *)item filePath:(NSString *)path;
|
||||
|
||||
@end
|
||||
|
||||
@interface RCResumeableDownloader : NSObject
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
创建 RCResumeableDownloader 实例
|
||||
|
||||
@return 返回 RCResumeableDownloader 实例
|
||||
|
||||
* \~english
|
||||
Create a RCResumeableDownloader instance.
|
||||
|
||||
@return return RCResumeableDownloader instance.
|
||||
*/
|
||||
+ (instancetype)defaultInstance;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
销毁 RCResumeableDownloader 实例
|
||||
@discussion 切换用户时调用,退出登录时调用。
|
||||
|
||||
* \~english
|
||||
Destroy RCResumeableDownloader instance.
|
||||
@ discussion It is called when you switch users and when you log out.
|
||||
*/
|
||||
+ (void)free;
|
||||
|
||||
@property (nonatomic, weak) id<RCResumeableDownloaderDelegate> delegate;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
根据消息id 获取 RCDownloadItem 实例
|
||||
|
||||
@param msgId 消息id
|
||||
@return 返回 RCDownloadItem 实例
|
||||
@discussion 仅支持文件消息,文件消息下载完成后,会自动更新消息的 content
|
||||
*
|
||||
* \~english
|
||||
Get RCDownloadItem instance based on message id.
|
||||
|
||||
@param msgId Message id.
|
||||
@ return returns RCDownloadItem instance.
|
||||
@ discussion Only file messages are supported. After the file messages are downloaded, the content of the messages will be updated automatically.
|
||||
*/
|
||||
- (RCDownloadItem *)itemWithMessageId:(long)msgId;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
根据开发者指定的标识符来获取 RCDownloadItem 实例
|
||||
|
||||
@param identify 标识符
|
||||
@param url 下载地址
|
||||
@param name 文件名
|
||||
@return 返回 RCDownloadItem 的实例
|
||||
@discussion 开发者需要保证该标识符 identify 的唯一性,确保每一个存活的下载任务的标识符是不同的
|
||||
实际下载后文件名可能会与不一致,如果存储下载文件目录下已有该文件,会在文件名后添加(1)。
|
||||
例如 a.txt 最终下载的文件名会变为 a(1).txt 或者 a(2).txt
|
||||
|
||||
* \~english
|
||||
Get the RCDownloadItem instance according to the identifier specified by the developer.
|
||||
|
||||
@param identify Identifier.
|
||||
@param url Download address.
|
||||
@param name File name.
|
||||
@ return returns the instance of RCDownloadItem.
|
||||
@ discussion Developers shall ensure that the identifier identify is unique and that the identifier for each surviving download task is different.
|
||||
The file name may not match after the actual download. If the file already exists in the directory where the download file is stored, it will be added (1) after the file name.
|
||||
For example, the file name downloaded by a.txt will change to a (1). Txt or a (2). Txt).
|
||||
*/
|
||||
- (RCDownloadItem *)itemWithIdentify:(NSString *)identify url:(NSString *)url fileName:(NSString *)name;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,129 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCRichContentMessage.h
|
||||
// Created by Gang Li on 10/17/14.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图文消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the image and text message.
|
||||
*/
|
||||
#define RCRichContentMessageTypeIdentifier @"RC:ImgTextMsg"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图文消息类
|
||||
|
||||
@discussion 图文消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
Image and text message class.
|
||||
|
||||
@ discussion image and text message class, which is stored and counted as unread messages.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCRichContentMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图文消息的标题
|
||||
|
||||
* \~english
|
||||
The title of the image-text message.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *title;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图文消息的内容摘要
|
||||
|
||||
* \~english
|
||||
Content digest of image and text messages
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *digest;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图文消息图片 URL
|
||||
|
||||
* \~english
|
||||
Image URL of image
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *imageURL;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图文消息中包含的需要跳转到的URL
|
||||
|
||||
* \~english
|
||||
The URL contained in the image and text message to which you shall jump to.
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *url;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化图文消息
|
||||
|
||||
@param title 图文消息的标题
|
||||
@param digest 图文消息的内容摘要
|
||||
@param imageURL 图文消息的图片URL
|
||||
@param extra 图文消息的扩展信息
|
||||
@return 图文消息对象
|
||||
|
||||
* \~english
|
||||
Initialize the image and text message.
|
||||
|
||||
@param title The title of the image-text message.
|
||||
@param digest Content digest of image and text messages.
|
||||
@param imageURL image URL of image and text messages.
|
||||
@param extra Extended information of image and text messages.
|
||||
@ return Teletext message object.
|
||||
*/
|
||||
+ (instancetype)messageWithTitle:(NSString *)title
|
||||
digest:(NSString *)digest
|
||||
imageURL:(NSString *)imageURL
|
||||
extra:(NSString *)extra;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化图文消息
|
||||
|
||||
@param title 图文消息的标题
|
||||
@param digest 图文消息的内容摘要
|
||||
@param imageURL 图文消息的图片URL
|
||||
@param url 图文消息中包含的需要跳转到的URL
|
||||
@param extra 图文消息的扩展信息
|
||||
@return 图文消息对象
|
||||
|
||||
* \~english
|
||||
Initialize the image and text message.
|
||||
|
||||
@param title The title of the image-text message.
|
||||
@param digest Content digest of image and text messages.
|
||||
@param imageURL image URL of image and text messages.
|
||||
@param url The URL contained in the image and text message to which you shall jump to.
|
||||
@param extra Extended information of image and text messages.
|
||||
@ return Teletext message object.
|
||||
*/
|
||||
+ (instancetype)messageWithTitle:(NSString *)title
|
||||
digest:(NSString *)digest
|
||||
imageURL:(NSString *)imageURL
|
||||
url:(NSString *)url
|
||||
extra:(NSString *)extra;
|
||||
|
||||
@end
|
||||
@@ -1,38 +0,0 @@
|
||||
//
|
||||
// RCSearchConversationResult.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 16/9/29.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCConversation.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
搜索的会话结果
|
||||
|
||||
* \~english
|
||||
conversation results of the search
|
||||
*/
|
||||
@interface RCSearchConversationResult : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
匹配的会话对象
|
||||
|
||||
* \~english
|
||||
Matching conversation object.
|
||||
*/
|
||||
@property (nonatomic, strong) RCConversation *conversation;
|
||||
|
||||
/*
|
||||
* \~chinese
|
||||
会话匹配的消息条数
|
||||
|
||||
* \~english
|
||||
Number of messages matched by the conversation
|
||||
*/
|
||||
@property (nonatomic, assign) int matchCount;
|
||||
@end
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// RCSendMessageOption.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by liyan on 2019/4/29.
|
||||
// Copyright © 2019 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RCSendMessageOption : NSObject
|
||||
|
||||
/*
|
||||
* \~chinese
|
||||
发送的消息,是否走 VOIP 推送
|
||||
|
||||
* \~english
|
||||
The message sent, whether to use VOIP push or not
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isVoIPPush;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -1,111 +0,0 @@
|
||||
//
|
||||
// RCSightMessage.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by LiFei on 2016/12/1.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <RongIMLibCore/RongIMLibCore.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
小视频消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the small video message.
|
||||
*/
|
||||
#define RCSightMessageTypeIdentifier @"RC:SightMsg"
|
||||
@class AVAsset;
|
||||
/**
|
||||
* \~chinese
|
||||
小视频消息类
|
||||
|
||||
@discussion 小视频消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
Small video message class.
|
||||
|
||||
@ discussion small video message class, which is stored and counted as unread messages.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCSightMessage : RCMediaMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
本地 URL 地址
|
||||
|
||||
* \~english
|
||||
Local URL address
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *localPath;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
网络 URL 地址
|
||||
|
||||
* \~english
|
||||
Network URL address
|
||||
*/
|
||||
@property (nonatomic, readonly) NSString *sightUrl;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
视频时长,以秒为单位
|
||||
|
||||
* \~english
|
||||
Video duration (in seconds)
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) NSUInteger duration;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
小视频文件名
|
||||
|
||||
* \~english
|
||||
Small video file name
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *name;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
文件大小
|
||||
|
||||
* \~english
|
||||
File size
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) long long size;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
缩略图
|
||||
|
||||
* \~english
|
||||
Thumbnail image
|
||||
*/
|
||||
@property (nonatomic, strong, readonly) UIImage *thumbnailImage;
|
||||
|
||||
/**
|
||||
* \~chinese
|
||||
创建小视频消息的便利构造方法
|
||||
|
||||
@param path 视频文件本地路径
|
||||
@param image 视频首帧缩略图
|
||||
@param duration 视频时长, 以秒为单位
|
||||
@return 视频消息实例变量
|
||||
|
||||
* \~english
|
||||
A convenient construction method for creating small video messages.
|
||||
|
||||
@param path Local path of video file.
|
||||
@param image Thumbnail of the first frame of the video.
|
||||
@param duration Video duration (in seconds).
|
||||
@ return video message instance variable.
|
||||
*/
|
||||
+ (instancetype)messageWithLocalPath:(NSString *)path thumbnail:(UIImage *)image duration:(NSUInteger)duration;
|
||||
|
||||
@end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCStatusMessage.h
|
||||
// Created by Heq.Shinoda on 14-6-13.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
/**
|
||||
* \~chinese
|
||||
状态消息的抽象基类,表示某种状态,不会存入消息历史记录。
|
||||
此类消息不保证一定到达接收方(但只是理论上存在丢失的可能),但是速度最快,所以通常用来传递状态信息。
|
||||
|
||||
* \~english
|
||||
The abstract base class of a status message that represents a state and is not stored in the message history.
|
||||
Such messages are not guaranteed to reach the receiver (but there is only the possibility of loss in theory), but they are the fastest, so they are usually used to convey status information.
|
||||
*/
|
||||
@interface RCStatusMessage : RCMessageContent
|
||||
|
||||
@end
|
||||
@@ -1,13 +0,0 @@
|
||||
//
|
||||
// RCTSMutableDictionary.h
|
||||
// RongIMKit
|
||||
//
|
||||
// Created by RongCloud on 16/5/12.
|
||||
// Copyright © 2016 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface RCTSMutableDictionary : NSMutableDictionary <NSLocking>
|
||||
|
||||
@end
|
||||
@@ -1,69 +0,0 @@
|
||||
//
|
||||
// RCTagInfo.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2021/1/27.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
/*!
|
||||
* \~chinese
|
||||
标签信息
|
||||
|
||||
* \~english
|
||||
Tag information
|
||||
*/
|
||||
@interface RCTagInfo : NSObject
|
||||
/*!
|
||||
* \~chinese
|
||||
标签 ID
|
||||
|
||||
* \~english
|
||||
tag ID
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *tagId;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
标签名称
|
||||
|
||||
* \~english
|
||||
Tag name
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *tagName;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
该标签下的会话个数
|
||||
|
||||
* \~english
|
||||
The number of conversations under this tag
|
||||
*/
|
||||
@property (nonatomic, assign) NSInteger count;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
标签创建时间
|
||||
|
||||
* \~english
|
||||
Tag creation time
|
||||
*/
|
||||
@property (nonatomic, assign) long long timestamp;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
RCTagInfo 初始化方法
|
||||
|
||||
@param tagId 标签 id
|
||||
@param tagName 标签名称
|
||||
|
||||
* \~english
|
||||
RCTagInfo initialization method.
|
||||
|
||||
@ param tagId tag id.
|
||||
@ param tagName tag name.
|
||||
*/
|
||||
- (instancetype)initWithTagInfo:(NSString *)tagId
|
||||
tagName:(NSString *)tagName;
|
||||
@end
|
||||
@@ -1,47 +0,0 @@
|
||||
//
|
||||
// RCTagProtocol.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by RongCloud on 2021/1/27.
|
||||
// Copyright © 2021 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef RCTagProtocol_h
|
||||
#define RCTagProtocol_h
|
||||
|
||||
@protocol RCTagDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
标签变化
|
||||
|
||||
@discussion 本端添加删除更新标签,不会触发不会触发此回调方法,在相关调用方法的 block 块直接回调
|
||||
|
||||
* \~english
|
||||
Tag change.
|
||||
|
||||
@ discussion Local label addition, deletion and update will not trigger or trigger this callback method, which will be called back directly in the block of the relevant calling method.
|
||||
*/
|
||||
- (void)onTagChanged;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@protocol RCConversationTagDelegate <NSObject>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
会话标签变化
|
||||
|
||||
@discussion 本端添加删除更新会话标签,不会触发此回调方法,在相关调用方法的 block 块直接回调
|
||||
|
||||
* \~english
|
||||
Conversation tag change.
|
||||
|
||||
@ discussion Local addition, deletion and update of conversation tag will not trigger this callback method, and will be called back directly in the block of the relevant calling method.
|
||||
*/
|
||||
|
||||
- (void)onConversationTagChanged;
|
||||
|
||||
@end
|
||||
#endif /* RCTagProtocol_h */
|
||||
@@ -1,65 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCTextMessage.h
|
||||
// Created by Heq.Shinoda on 14-6-13.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文本消息的类型名
|
||||
|
||||
* \~english
|
||||
The type name of the text message
|
||||
*/
|
||||
#define RCTextMessageTypeIdentifier @"RC:TxtMsg"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文本消息类
|
||||
|
||||
@discussion 文本消息类,此消息会进行存储并计入未读消息数。
|
||||
|
||||
@remarks 内容类消息
|
||||
|
||||
* \~english
|
||||
Text message class.
|
||||
|
||||
@ discussion Text message class, which is stored and counted as unread messages.
|
||||
|
||||
@ remarks content class message.
|
||||
*/
|
||||
@interface RCTextMessage : RCMessageContent <NSCoding>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
文本消息的内容
|
||||
|
||||
* \~english
|
||||
The content of a text message
|
||||
*/
|
||||
@property (nonatomic, copy) NSString *content;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化文本消息
|
||||
|
||||
@param content 文本消息的内容
|
||||
@return 文本消息对象
|
||||
|
||||
* \~english
|
||||
Initialize text message.
|
||||
|
||||
@param content The content of a text message.
|
||||
@ return text message object.
|
||||
*/
|
||||
+ (instancetype)messageWithContent:(NSString *)content;
|
||||
|
||||
@end
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2014-2015, RongCloud.
|
||||
* All rights reserved.
|
||||
*
|
||||
* All the contents are the copyright of RongCloud Network Technology Co.Ltd.
|
||||
* Unless otherwise credited. http://rongcloud.cn
|
||||
*
|
||||
*/
|
||||
|
||||
// RCUnknownMessage.h
|
||||
// Created by xugang on 15/1/24.
|
||||
|
||||
#import "RCMessageContent.h"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
未知消息的类型名
|
||||
|
||||
* \~english
|
||||
Type name of unknown message
|
||||
*/
|
||||
#define RCUnknownMessageTypeIdentifier @"RC:UnknownMsg"
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
未知消息类
|
||||
|
||||
@discussion 所有未注册的消息类型,在 IMKit 中都会作为此类消息处理和显示。
|
||||
|
||||
* \~english
|
||||
Unknown message class.
|
||||
|
||||
@ discussion All unregistered message types are processed and displayed as such messages in IMKit.
|
||||
*/
|
||||
@interface RCUnknownMessage : RCMessageContent <NSCoding>
|
||||
|
||||
@end
|
||||
@@ -1,90 +0,0 @@
|
||||
//
|
||||
// RCUploadImageStatusListener.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by litao on 15/8/28.
|
||||
// Copyright (c) 2015 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCMessage.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
图片上传进度更新的IMKit监听
|
||||
|
||||
@discussion 此监听用于 IMKit 发送图片消息(上传到指定服务器)。
|
||||
App 在上传图片时,需要在监听中调用 updateBlock、successBlock 与 errorBlock,通知 IMKit
|
||||
SDK 当前上传图片的进度和状态,SDK 会更新 UI。
|
||||
|
||||
* \~english
|
||||
IMKit listening of image upload progress update.
|
||||
|
||||
@ discussion This listening is used for IMKit to send image messages (uploaded to the specified server).
|
||||
When uploading images, App shall call updateBlock, successBlock and errorBlock to notify IMKit SDK to upload the progress and status of the image during listening and SDK will update the UI.
|
||||
*/
|
||||
@interface RCUploadImageStatusListener : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
上传的图片消息的消息实体
|
||||
|
||||
* \~english
|
||||
The message entity of the uploaded image message
|
||||
*/
|
||||
@property (nonatomic, strong) RCMessage *currentMessage;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
更新上传进度需要调用的 block [progress:当前上传的进度,0 <= progress < 100]
|
||||
|
||||
* \~english
|
||||
The block that shall be called to update the upload progress [progress: current upload progress, 0 < = progress < 100].
|
||||
*/
|
||||
@property (nonatomic, strong) void (^updateBlock)(int progress);
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
上传成功需要调用的 block [imageUrl:图片的网络 URL]
|
||||
|
||||
* \~english
|
||||
Block to be called for successful upload [imageUrl:network URL of image]
|
||||
*/
|
||||
@property (nonatomic, strong) void (^successBlock)(NSString *imageUrl);
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
上传成功需要调用的 block [errorCode:上传失败的错误码,非 0 整数]
|
||||
|
||||
* \~english
|
||||
Block to be called for successful upload [errorCode: error code for failed upload, non-0 integer].
|
||||
*/
|
||||
@property (nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode);
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化图片上传进度更新的IMKit监听
|
||||
|
||||
@param message 图片消息的消息实体
|
||||
@param progressBlock 更新上传进度需要调用的 block
|
||||
@param successBlock 上传成功需要调用的 block
|
||||
@param errorBlock 上传失败需要调用的 block
|
||||
|
||||
@return 图片上传进度更新的 IMKit 监听对象
|
||||
|
||||
* \~english
|
||||
Initialize IMKit listening for image upload progress updates.
|
||||
|
||||
@param message The message entity of the image message.
|
||||
@param message The block that shall be called to update the upload progress.
|
||||
@param message The block to be called for successful upload.
|
||||
@param message The block that shall be called for upload failure.
|
||||
|
||||
@ return IMKit listener object for update of image upload progress.
|
||||
*/
|
||||
- (instancetype)initWithMessage:(RCMessage *)message
|
||||
uploadProgress:(void (^)(int progress))progressBlock
|
||||
uploadSuccess:(void (^)(NSString *imageUrl))successBlock
|
||||
uploadError:(void (^)(RCErrorCode errorCode))errorBlock;
|
||||
|
||||
@end
|
||||
@@ -1,146 +0,0 @@
|
||||
//
|
||||
// RCUploadMediaStatusListener.h
|
||||
// RongIMLib
|
||||
//
|
||||
// Created by litao on 15/8/28.
|
||||
// Copyright (c) 2015 RongCloud. All rights reserved.
|
||||
//
|
||||
|
||||
#import "RCMessage.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
媒体文件上传进度更新的 IMKit 监听
|
||||
|
||||
@discussion 此监听用于 IMKit 发送媒体文件消息(上传到指定服务器)。
|
||||
App 在上传媒体文件时,需要在监听中调用 updateBlock、successBlock 与 errorBlock,通知 IMKit
|
||||
SDK 当前上传媒体文件的进度和状态,SDK 会更新 UI。
|
||||
|
||||
* \~english
|
||||
IMKit listening of media file upload progress updates.
|
||||
|
||||
@ discussion This listening is used for IMKit to send media file messages (uploaded to the specified server).
|
||||
When uploading media files, App shall call updateBlock, successBlock and errorBlock to notify IMKit
|
||||
SDK of the progress and status of the media file currently uploaded during listening and SDK will update the UI.
|
||||
*/
|
||||
@interface RCUploadMediaStatusListener : NSObject
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
上传的媒体文件消息的消息实体
|
||||
|
||||
* \~english
|
||||
The message entity of the uploaded media file message.
|
||||
*/
|
||||
@property (nonatomic, strong) RCMessage *currentMessage;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
更新上传进度需要调用的 block [progress:当前上传的进度,0 <= progress < 100]
|
||||
|
||||
* \~english
|
||||
The block that shall be called to update the upload progress [progress: current upload progress, 0 < = progress < 100].
|
||||
*/
|
||||
@property (nonatomic, strong) void (^updateBlock)(int progress);
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
上传成功需要调用的 block。
|
||||
content:上传成功之后,需要发送的消息内容。
|
||||
您可以使用 currentMessage,把其中content属性对应的 url 字段设置成您上传成功的网络 URL。
|
||||
请参考下面代码。
|
||||
|
||||
升级说明:如果您之前使用了此接口,请参考下面代码把参数从 url 替换成 message。
|
||||
if ([currentMessage.content isKindOfClass:[RCImageMessage class]]) {
|
||||
RCImageMessage *content = (RCImageMessage *)currentMessage.content;
|
||||
content.imageUrl = remoteUrl;
|
||||
successBlock(content);
|
||||
} else if ([currentMessage.content isKindOfClass:[RCFileMessage class]]) {
|
||||
RCFileMessage *content = (RCFilemessage *)currentMessage.content;
|
||||
content.fileUrl = remoteUrl;
|
||||
successBlock(content);
|
||||
}
|
||||
|
||||
* \~english
|
||||
The block that shall be called for successful upload.
|
||||
The content of the message to be sent after the content: is uploaded successfully.
|
||||
You can use currentMessage to set the url field corresponding to the content attribute to the network URL that you successfully upload.
|
||||
Please refer to the following code.
|
||||
|
||||
Upgrade instructions: If you used this interface before, please refer to the following code to replace the parameter from url to message.
|
||||
if ([currentMessage.content isKindOfClass:[RCImageMessage class]]) {
|
||||
RCImageMessage *content = (RCImageMessage *)currentMessage.content;
|
||||
content.imageUrl = remoteUrl;
|
||||
successBlock(content);
|
||||
} else if ([currentMessage.content isKindOfClass:[RCFileMessage class]]) {
|
||||
RCFileMessage *content = (RCFilemessage *)currentMessage.content;
|
||||
content.fileUrl = remoteUrl;
|
||||
successBlock(content);
|
||||
}
|
||||
*/
|
||||
@property (nonatomic, strong) void (^successBlock)(RCMessageContent *content);
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
上传成功需要调用的 block [errorCode:上传失败的错误码,非 0 整数]
|
||||
|
||||
* \~english
|
||||
Block to be called for successful upload [errorCode: error code for failed upload, non-0 integer].
|
||||
*/
|
||||
@property (nonatomic, strong) void (^errorBlock)(RCErrorCode errorCode);
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
上传取消需要调用的 block
|
||||
|
||||
* \~english
|
||||
The block that shall be called to cancel upload
|
||||
*/
|
||||
@property (nonatomic, strong) void (^cancelBlock)(void);
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
初始化媒体文件上传进度更新的 IMKit 监听
|
||||
|
||||
@param message 媒体文件消息的消息实体
|
||||
@param progressBlock 更新上传进度需要调用的 block
|
||||
@param successBlock 上传成功需要调用的 block
|
||||
@param errorBlock 上传失败需要调用的 block
|
||||
@param cancelBlock 上传取消需要调用的 block( 如果未实现,传 nil 即可)
|
||||
|
||||
@return 媒体文件上传进度更新的 IMKit 监听对象
|
||||
|
||||
* \~english
|
||||
Initialize IMKit listening for media file upload progress updates.
|
||||
|
||||
@param message The message entity of the media file message.
|
||||
@param progressBlock The block that shall be called to update the upload progress.
|
||||
@param successBlock Block to be called for successful upload.
|
||||
@param errorBlock The block that shall be called for upload failure.
|
||||
@param cancelBlock The block that shall be called to cancel upload (if it is not implemented, you can send it to nil).
|
||||
|
||||
@ return IMKit listener object for media file upload progress updates.
|
||||
*/
|
||||
- (instancetype)initWithMessage:(RCMessage *)message
|
||||
uploadProgress:(void (^)(int progress))progressBlock
|
||||
uploadSuccess:(void (^)(RCMessageContent *content))successBlock
|
||||
uploadError:(void (^)(RCErrorCode errorCode))errorBlock
|
||||
uploadCancel:(void (^)(void))cancelBlock;
|
||||
|
||||
/*!
|
||||
* \~chinese
|
||||
取消当前上传
|
||||
|
||||
@discussion 如果您实现取消正在上传的媒体消息功能,则必须实现此回调。
|
||||
您需要在取消成功之后,调用 cancelBlock 通知 SDK,SDK 会自动更新 UI。
|
||||
|
||||
* \~english
|
||||
Cancel the current upload.
|
||||
|
||||
@ discussion If you implement the ability to cancel media messages being uploaded, you must implement this callback.
|
||||
You shall call cancelBlock to notify SDK and SDK will update automatically UI after the cancellation is successful.
|
||||
*/
|
||||
- (void)cancelUpload;
|
||||
|
||||
@end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user