public final class QBRTCClient
extends BaseClient
QBRTCSession
Also this class responsible for storrng listeners which implements interfaces below:
org.webrtc.PeerConnection lifecycleQBRTCSession in case of opponent call to you| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,QBRTCSession> |
sessions |
static java.lang.String |
TAG |
| Modifier and Type | Method and Description |
|---|---|
void |
addRTCSignallingMessageProcessorCallbackListener(RTCSignallingMessageProcessorCallback callback)
Adds the QBRTCSmackMessageProcessorListener implementation to the list of observers
|
void |
addSessionCallbacksListener(QBRTCSessionEventsCallback callback)
Adds the QBRTCClientSessionCallbacks implementation to the list of observers
|
void |
addSignaling(QBSignaling signaling) |
QBRTCSession |
createNewSessionWithOpponents(java.util.List<java.lang.Integer> userIds,
QBRTCTypes.QBConferenceType qbConferenceType)
Use
QBRTCMediaConfig to set audio and video constraints before creating QBRTCSession. |
void |
destroy() |
static QBRTCClient |
getInstance(Context context)
Returns
QBRTCClient instance, which must be initiated before
any actions |
QBRTCSession |
getSession(java.lang.String sessionId) |
boolean |
isLastActiveSession() |
void |
onAddUserNeed(java.lang.Integer userToAdd,
QBRTCSessionDescription sessionDescription) |
void |
onReceiveAcceptFromUser(java.lang.Integer from,
QBRTCSessionDescription sessionDescription,
SessionDescription sdp) |
void |
onReceiveCallFromUser(java.lang.Integer from,
QBRTCSessionDescription sessionDescription,
SessionDescription sdp)
Returns is client ready to process income call or start new one
|
void |
onReceiveIceCandidatesFromUser(java.util.List<IceCandidate> iceCandidates,
java.lang.Integer from,
QBRTCSessionDescription sessionDescription) |
void |
onReceiveRejectFromUser(java.lang.Integer opponentID,
QBRTCSessionDescription sessionDescription) |
void |
onReceiveUserHungUpCall(java.lang.Integer opponentID,
QBRTCSessionDescription sessionDescription) |
void |
prepareToProcessCalls()
Adds this instance in xmppRTCMessageProcessor's callbacks list
and set
Context instance for org.webrtc.PeerConnectionFactory initiation |
void |
removeRTCSignallingMessageProcessorCallbackListener(RTCSignallingMessageProcessorCallback callback)
Removes the QBRTCSmackMessageProcessorListener implementation from the list of observers
|
void |
removeSessionsCallbacksListener(QBRTCSessionEventsCallback callback)
Removes the QBRTCClientSessionCallbacks implementation from the list of observers
|
void |
stopProcessCalls()
Stopping receiving any session packets
|
public static final java.lang.String TAG
protected final java.util.Map<java.lang.String,QBRTCSession> sessions
public static QBRTCClient getInstance(Context context)
QBRTCClient instance, which must be initiated before
any actionspublic QBRTCSession createNewSessionWithOpponents(java.util.List<java.lang.Integer> userIds, QBRTCTypes.QBConferenceType qbConferenceType) throws java.lang.IllegalStateException
Use QBRTCMediaConfig to set audio and video constraints before creating QBRTCSession.
userIds - - list of call participant id'sqbConferenceType - - current conference typejava.lang.IllegalStateExceptionpublic void addSignaling(QBSignaling signaling)
public boolean isLastActiveSession()
public QBRTCSession getSession(java.lang.String sessionId)
public void prepareToProcessCalls()
Context instance for org.webrtc.PeerConnectionFactory initiationpublic void stopProcessCalls()
public void addSessionCallbacksListener(QBRTCSessionEventsCallback callback)
callback - - WEBRTC calback for call processingpublic void removeSessionsCallbacksListener(QBRTCSessionEventsCallback callback)
callback - - WEBRTC calback for call processingpublic void addRTCSignallingMessageProcessorCallbackListener(RTCSignallingMessageProcessorCallback callback)
callback - - Smack signalling callback for call processingpublic void removeRTCSignallingMessageProcessorCallbackListener(RTCSignallingMessageProcessorCallback callback)
callback - - Smack signalling callback for call processingpublic void onReceiveCallFromUser(java.lang.Integer from,
QBRTCSessionDescription sessionDescription,
SessionDescription sdp)
from - sender idsessionDescription - current session descriptionsdp - Protocol of session description according to RFC 4566.public void onReceiveAcceptFromUser(java.lang.Integer from,
QBRTCSessionDescription sessionDescription,
SessionDescription sdp)
public void onReceiveRejectFromUser(java.lang.Integer opponentID,
QBRTCSessionDescription sessionDescription)
public void onReceiveIceCandidatesFromUser(java.util.List<IceCandidate> iceCandidates,
java.lang.Integer from,
QBRTCSessionDescription sessionDescription)
public void onReceiveUserHungUpCall(java.lang.Integer opponentID,
QBRTCSessionDescription sessionDescription)
public void onAddUserNeed(java.lang.Integer userToAdd,
QBRTCSessionDescription sessionDescription)
public void destroy()