ShengwangChatSDK 1.3.2
构造函数 | 所有成员列表
<IAgoraChatPresenceManager>协议 参考

#import <IAgoraChatPresenceManager.h>

类 <IAgoraChatPresenceManager> 继承关系图:

构造函数

(void) - publishPresenceWithDescription:completion:
 
(void) - subscribe:expiry:completion:
 
(void) - unsubscribe:completion:
 
(void) - fetchSubscribedMembersWithPageNum:pageSize:Completion:
 
(void) - fetchPresenceStatus:completion:
 
(void) - addDelegate:delegateQueue:
 
(void) - removeDelegate:
 

详细描述

@header IAgoraChatPresenceManager.h @abstract The presence management class, responsible for publishing a custom presence state, managing presence subscriptions, querying the current presence state of a user, and adding and removing a delegate.

作者
Hyphenate
版本
3.00

The presence management protocol that defines how to manage presence states.

函数文档

◆ addDelegate:delegateQueue:

- (void) addDelegate: (id< AgoraChatPresenceManagerDelegate > _Nonnull)  aDelegate
delegateQueue: (dispatch_queue_t _Nullable)  aQueue 

Adds a delegate.

参数
aDelegateThe delegate to be added.
aQueue(optional) The queue of calling delegate methods. If you want to run the app on the main thread, set this parameter as nil.

◆ fetchPresenceStatus:completion:

- (void) fetchPresenceStatus: (NSArray< NSString * > *_Nonnull)  members
completion: (void(^)(NSArray< AgoraChatPresence * > *_Nullable presences, AgoraChatError *_Nullable error))  aCompletion 

Gets the current presence state of users.

参数
membersThe array of IDs of users whose current presence state you want to check.
aCompletionThe completion block, which contains the users whose presence state you have subscribed to.

◆ fetchSubscribedMembersWithPageNum:pageSize:Completion:

- (void) fetchSubscribedMembersWithPageNum: (NSUInteger)  pageNum
pageSize: (NSUInteger)  pageSize
Completion: (void(^)(NSArray< NSString * > *_Nullable members, AgoraChatError *_Nullable error))  aCompletion 

Uses pagination to get a list of users whose presence states you have subscribed to.

参数
pageNumThe current page number, starting from 1.
pageSizeThe number of subscribed users on each page.
aCompletionThe completion block, which contains IDs of users whose presence states you have subscribed to. Returns nil if you subscribe to no user's presence state.

◆ publishPresenceWithDescription:completion:

- (void) publishPresenceWithDescription: (NSString *_Nullable)  aDescription
completion: (void(^)(AgoraChatError *_Nullable error))  aCompletion 

Publishes a custom presence state.

参数
aDescriptionThe extension information of the presence state. It can be set as nil.
aCompletionThe completion block, which contains the error message if this method fails.

◆ removeDelegate:

- (void) removeDelegate: (id< AgoraChatPresenceManagerDelegate > _Nonnull)  aDelegate

Removes a delegate.

参数
aDelegateThe delegate to be removed.

◆ subscribe:expiry:completion:

- (void) subscribe: (NSArray< NSString * > *_Nonnull)  members
expiry: (NSInteger)  expiry
completion: (void(^)(NSArray< AgoraChatPresence * > *_Nullable presences, AgoraChatError *_Nullable error))  aCompletion 

Subscribes to a user's presence states. If the subscription succeeds, the subscriber will receive the callback when the user's presence state changes.

参数
membersThe array of IDs of users whose presence states you want to subscribe to.
expiryThe expiration time of the presence subscription.
aCompletionThe completion block, which contains the error message if the method fails.

◆ unsubscribe:completion:

- (void) unsubscribe: (NSArray< NSString * > *_Nonnull)  members
completion: (void(^)(AgoraChatError *_Nullable error))  aCompletion 

Unsubscribes from a user's presence states.

参数
membersThe array of IDs of users whose presence states you want to unsubscribe from.
aCompletionThe completion block, which contains the error message if the method fails.

该协议的文档由以下文件生成: