Agora RTC Objective-C API Reference  Refactor
Instance Methods
AgoraRtmStorage Class Reference

Inherits <NSObject>.

Instance Methods

(void) - setChannelMetadata:channelType:data:options:lock:completion:
 
(void) - updateChannelMetadata:channelType:data:options:lock:completion:
 
(void) - removeChannelMetadata:channelType:data:options:lock:completion:
 
(void) - getChannelMetadata:channelType:completion:
 
(void) - setUserMetadata:data:options:completion:
 
(void) - updateUserMetadata:data:options:completion:
 
(void) - removeUserMetadata:data:options:completion:
 
(void) - getUserMetadata:completion:
 
(void) - subscribeUserMetadata:completion:
 
(void) - unsubscribeUserMetadata:completion:
 

Method Documentation

◆ NS_UNAVAILABLE

- (instancetype _Nullable) NS_UNAVAILABLE

◆ setChannelMetadata:channelType:data:options:lock:completion:

- (void) setChannelMetadata: (NSString *_Nonnull)  channelName
channelType: (AgoraRtmChannelType channelType
data: (AgoraRtmMetadata *_Nonnull)  data
options: (AgoraRtmMetadataOptions *_Nullable)  options
lock: (NSString *_Nullable)  lock
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

Set the metadata of a specified channel.

Parameters
channelNameThe name of the channel.
channelTypeWhich channel type, AgoraRtmChannelTypeStream or AgoraRtmChannelTypeMessage.
dataMetadata data.
optionsThe options of operate metadata.
locklock for operate channel metadata.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ updateChannelMetadata:channelType:data:options:lock:completion:

- (void) updateChannelMetadata: (NSString *_Nonnull)  channelName
channelType: (AgoraRtmChannelType channelType
data: (AgoraRtmMetadata *_Nonnull)  data
options: (AgoraRtmMetadataOptions *_Nullable)  options
lock: (NSString *_Nullable)  lock
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

Update the metadata of a specified channel.

Parameters
channelNameThe channel Name of the specified channel.
channelTypeWhich channel type, AgoraRtmChannelTypeStream or AgoraRtmChannelTypeMessage.
dataMetadata data.
optionsThe options of operate metadata.
locklock for operate channel metadata.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ removeChannelMetadata:channelType:data:options:lock:completion:

- (void) removeChannelMetadata: (NSString *_Nonnull)  channelName
channelType: (AgoraRtmChannelType channelType
data: (AgoraRtmMetadata *_Nonnull)  data
options: (AgoraRtmMetadataOptions *_Nullable)  options
lock: (NSString *_Nullable)  lock
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

Remove the metadata of a specified channel.

Parameters
channelNameThe channel Name of the specified channel.
channelTypeWhich channel type, AgoraRtmChannelTypeStream or AgoraRtmChannelTypeMessage.
dataMetadata data.
optionsThe options of operate metadata.
locklock for operate channel metadata.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ getChannelMetadata:channelType:completion:

- (void) getChannelMetadata: (NSString *_Nonnull)  channelName
channelType: (AgoraRtmChannelType channelType
completion: (AgoraRtmGetMetadataBlock _Nullable)  completionBlock 

Get the metadata of a specified channel.

Parameters
channelNameThe channel Name of the specified channel.
channelTypeWhich channel type, AgoraRtmChannelTypeStream or AgoraRtmChannelTypeMessage.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ setUserMetadata:data:options:completion:

- (void) setUserMetadata: (NSString *_Nonnull)  userId
data: (AgoraRtmMetadata *_Nonnull)  data
options: (AgoraRtmMetadataOptions *_Nullable)  options
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

Set the metadata of a specified user.

Parameters
userIdThe user ID of the specified user.
dataMetadata data.
optionsThe options of operate metadata.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ updateUserMetadata:data:options:completion:

- (void) updateUserMetadata: (NSString *_Nonnull)  userId
data: (AgoraRtmMetadata *_Nonnull)  data
options: (AgoraRtmMetadataOptions *_Nullable)  options
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

Update the metadata of a specified user.

Parameters
userIdThe user ID of the specified user.
dataMetadata data.
optionsThe options of operate metadata.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ removeUserMetadata:data:options:completion:

- (void) removeUserMetadata: (NSString *_Nonnull)  userId
data: (AgoraRtmMetadata *_Nonnull)  data
options: (AgoraRtmMetadataOptions *_Nullable)  options
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

Remove the metadata of a specified user.

Parameters
userIdThe user ID of the specified user.
dataMetadata data.
optionsThe options of operate metadata.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ getUserMetadata:completion:

- (void) getUserMetadata: (NSString *_Nonnull)  userId
completion: (AgoraRtmGetMetadataBlock _Nullable)  completionBlock 

Get the metadata of a specified user.

Parameters
userIdThe user ID of the specified user.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ subscribeUserMetadata:completion:

- (void) subscribeUserMetadata: (NSString *_Nonnull)  userId
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

Subscribe the metadata update event of a specified user.

Parameters
userIdThe user ID of the specified user.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.

◆ unsubscribeUserMetadata:completion:

- (void) unsubscribeUserMetadata: (NSString *_Nonnull)  userId
completion: (AgoraRtmOperationBlock _Nullable)  completionBlock 

unsubscribe the metadata update event of a specified user.

Parameters
userIdThe user ID of the specified user.
completionBlockThe operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo.