You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.4 KiB

//
// JCMediaChannelCallback.h
// JCSDK-OC
//
// Created by maikireton on 2017/8/11.
// Copyright © 2017年 juphoon. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JCMediaChannelParticipant.h"
#import "JCMediaChannelConstants.h"
#import "JCMediaChannelQueryInfo.h"
#import "JCMediaChannelParticipant.h"
/**
* @addtogroup
* @{
*/
@class JCMediaChannelPropChangeParam;
/**
* JCMediaChannel
*/
@protocol JCMediaChannelCallback <NSObject>
/**
*
*
*
* - @ref JCMediaChannelStateIdle :
* - @ref JCMediaChannelStateJoining :
* - @ref JCMediaChannelStateJoined :
* - @ref JCMediaChannelStateLeaving :
*
* @param state
* @param oldState
*/
-(void)onMediaChannelStateChange:(JCMediaChannelState)state oldState:(JCMediaChannelState)oldState;
/**
*
*
* @param changeParam JCMediaChannelPropChangeParam
*/
-(void)onMediaChannelPropertyChange:(JCMediaChannelPropChangeParam *)changeParam;
/**
*
*
* @param result
* - true
* - false
* @param reason result false @ref JCMediaChannelReason "错误码"
* @param channelId
*/
-(void)onJoin:(bool)result reason:(JCMediaChannelReason)reason channelId:(NSString*)channelId;
/**
*
*
* @param reason @ref JCMediaChannelReason "离开原因"
* @param channelId
*/
-(void)onLeave:(JCMediaChannelReason)reason channelId:(NSString*)channelId;
/**
*
*
* @param result
* - true
* - false
* @param reason result false @ref JCMediaChannelReason "JCMediaChannel 失败原因"
*/
-(void)onStop:(bool)result reason:(JCMediaChannelReason)reason;
/**
*
*
* @param operationId id {@link JCMediaChannel#query: query}
* @param result
* - true
* - false
* @param reason result false @ref JCMediaChannelReason "JCMediaChannel 错误码"
* @param queryInfo JCMediaChannelQueryInfo @ref JCMediaChannelQueryInfo.channelId "channelId"
*/
-(void)onQuery:(int)operationId result:(bool)result reason:(JCMediaChannelReason)reason queryInfo:(JCMediaChannelQueryInfo*)queryInfo;
/**
*
*
* @param participant JCMediaChannelParticipant
*/
-(void)onParticipantJoin:(JCMediaChannelParticipant*)participant;
/**
*
*
* @param participant JCMediaChannelParticipant
*/
-(void)onParticipantLeft:(JCMediaChannelParticipant*)participant;
/**
*
*
* @param participant JCMediaChannelParticipant
* @param changeParam JCMediaChannelParticipantChangeParam
*/
-(void)onParticipantUpdate:(JCMediaChannelParticipant*)participant participantChangeParam:(JCMediaChannelParticipantChangeParam *)participantChangeParam;
/**
*
*
* @param type {@link JCMediaChannel#sendMessage:content:toUserId: sendMessage} type
* @param content {@link JCMediaChannel#sendMessage:content:toUserId: sendMessage} content
* @param fromUserId userId
*/
-(void)onMessageReceive:(NSString *)type content:(NSString *)content fromUserId:(NSString *)fromUserId;
/**
* Sip用户操作结果回调
*
* @param operationId id
* @param result
* - true {@link JCMediaChannelCallback#onParticipantJoin: onParticipantJoin}
* - false
* @param reason result false @ref JCMediaChannelReason "失败原因"
*/
-(void)onInviteSipUserResult:(int)operationId result:(bool)result reason:(int)reason;
/**
*
*
* @param participant JCMediaChannelParticipant
*/
-(void)onParticipantVolumeChange:(JCMediaChannelParticipant*)participant;
@end
/**
* @}
*/