Rabbit Remote Control 0.0.30
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
CChannelIce Class Reference

The ICE channel interface class. More...

#include <ChannelIce.h>

Inheritance diagram for CChannelIce:
CChannel

Public Member Functions

 CChannelIce (CIceSignal *pSignal, QObject *parent=nullptr)
 
int SetConfigure (const rtc::Configuration &config)
 
virtual bool open (const QString &user, const QString &peer, bool bChannelId)
 Open channel. for activating calls.
 
virtual bool open (const QString &fromUser, const QString &toUser, const QString &channelId, const QString &type, const QString &sdp)
 Open channel. For passive receivers.
 
virtual void close ()
 
QString GetUser ()
 
QString GetPeerUser ()
 
QString GetChannelId ()
 
- Public Member Functions inherited from CChannel
 CChannel (QTcpSocket *pSocket, QObject *parent=nullptr)
 CChannel.
 
virtual bool open (OpenMode mode) override
 
virtual QString GetDetails ()
 

Protected Member Functions

bool isSequential () const
 
qint64 writeData (const char *data, qint64 len)
 
qint64 readData (char *data, qint64 maxlen)
 
- Protected Member Functions inherited from CChannel
 CChannel (QObject *parent=nullptr)
 

Private Slots

virtual void slotSignalConnected ()
 
virtual void slotSignalDisconnected ()
 
virtual void slotSignalReceiverCandidate (const QString &fromUser, const QString &toUser, const QString &channelId, const QString &mid, const QString &sdp)
 
virtual void slotSignalError (int error, const QString &szError)
 
virtual void slotSignalReceiverDescription (const QString &fromUser, const QString &toUser, const QString &channelId, const QString &type, const QString &sdp)
 

Private Member Functions

 CChannelIce (QObject *parent=nullptr)
 
virtual int SetSignal (CIceSignal *signal)
 
virtual int SetDataChannel (std::shared_ptr< rtc::DataChannel >)
 
virtual int CreateDataChannel (bool bDataChannel)
 
QString GenerateID (const QString &label=QString())
 

Private Attributes

CIceSignalm_pSignal
 
QString m_szUser
 
QString m_szPeerUser
 
QString m_szChannelId
 
rtc::Configuration m_Config
 
std::shared_ptr< rtc::PeerConnection > m_peerConnection
 
std::shared_ptr< rtc::DataChannel > m_dataChannel
 
QByteArray m_data
 
QMutex m_MutexData
 
QLoggingCategory m_Log
 

Additional Inherited Members

- Signals inherited from CChannel
void sigConnected ()
 emit when the channel is connected.
 
void sigDisconnected ()
 emit when the channel is disconnected
 
void sigError (int nErr, const QString &szErr)
 emit when the channel is error
 
- Static Public Member Functions inherited from CChannel
static int InitTranslation ()
 
static int RemoveTranslation ()
 

Detailed Description

The ICE channel interface class.

Author
Kang Lin kl222.nosp@m.@126.nosp@m..com

This class implements a ICE channel.

See also
CIceSignal

Definition at line 26 of file ChannelIce.h.

Constructor & Destructor Documentation

◆ CChannelIce() [1/2]

CChannelIce::CChannelIce ( CIceSignal pSignal,
QObject *  parent = nullptr 
)
explicit

Definition at line 53 of file ChannelIce.cpp.

◆ ~CChannelIce()

CChannelIce::~CChannelIce ( )
virtual

Definition at line 61 of file ChannelIce.cpp.

◆ CChannelIce() [2/2]

CChannelIce::CChannelIce ( QObject *  parent = nullptr)
private

Definition at line 49 of file ChannelIce.cpp.

Member Function Documentation

◆ close()

void CChannelIce::close ( )
virtual

Reimplemented from CChannel.

Definition at line 278 of file ChannelIce.cpp.

◆ CreateDataChannel()

int CChannelIce::CreateDataChannel ( bool  bDataChannel)
privatevirtual

Definition at line 185 of file ChannelIce.cpp.

◆ GenerateID()

QString CChannelIce::GenerateID ( const QString &  label = QString())
private

Definition at line 433 of file ChannelIce.cpp.

◆ GetChannelId()

QString CChannelIce::GetChannelId ( )

Definition at line 121 of file ChannelIce.cpp.

◆ GetPeerUser()

QString CChannelIce::GetPeerUser ( )

Definition at line 116 of file ChannelIce.cpp.

◆ GetUser()

QString CChannelIce::GetUser ( )

Definition at line 111 of file ChannelIce.cpp.

◆ isSequential()

bool CChannelIce::isSequential ( ) const
protectedvirtual

Reimplemented from CChannel.

Definition at line 368 of file ChannelIce.cpp.

◆ open() [1/2]

bool CChannelIce::open ( const QString &  fromUser,
const QString &  toUser,
const QString &  channelId,
const QString &  type,
const QString &  sdp 
)
virtual

Open channel. For passive receivers.

Note
Called by service. Must call SetConfigure set the service properties before calling it.

Definition at line 267 of file ChannelIce.cpp.

◆ open() [2/2]

bool CChannelIce::open ( const QString &  user,
const QString &  peer,
bool  bChannelId 
)
virtual

Open channel. for activating calls.

Returns
true: open data channel false: don't open data channel
Note
Called by client. Must call SetConfigure set the service properties before calling it.

Definition at line 255 of file ChannelIce.cpp.

◆ readData()

qint64 CChannelIce::readData ( char *  data,
qint64  maxlen 
)
protectedvirtual

Reimplemented from CChannel.

Definition at line 348 of file ChannelIce.cpp.

◆ SetConfigure()

int CChannelIce::SetConfigure ( const rtc::Configuration &  config)
Note
These properties must be set before calling Open

Definition at line 126 of file ChannelIce.cpp.

◆ SetDataChannel()

int CChannelIce::SetDataChannel ( std::shared_ptr< rtc::DataChannel >  dc)
privatevirtual

Definition at line 132 of file ChannelIce.cpp.

◆ SetSignal()

int CChannelIce::SetSignal ( CIceSignal signal)
privatevirtual

Definition at line 66 of file ChannelIce.cpp.

◆ slotSignalConnected

void CChannelIce::slotSignalConnected ( )
privatevirtualslot

Definition at line 373 of file ChannelIce.cpp.

◆ slotSignalDisconnected

void CChannelIce::slotSignalDisconnected ( )
privatevirtualslot

Definition at line 377 of file ChannelIce.cpp.

◆ slotSignalError

void CChannelIce::slotSignalError ( int  error,
const QString &  szError 
)
privatevirtualslot

Definition at line 428 of file ChannelIce.cpp.

◆ slotSignalReceiverCandidate

void CChannelIce::slotSignalReceiverCandidate ( const QString &  fromUser,
const QString &  toUser,
const QString &  channelId,
const QString &  mid,
const QString &  sdp 
)
privatevirtualslot

Definition at line 382 of file ChannelIce.cpp.

◆ slotSignalReceiverDescription

void CChannelIce::slotSignalReceiverDescription ( const QString &  fromUser,
const QString &  toUser,
const QString &  channelId,
const QString &  type,
const QString &  sdp 
)
privatevirtualslot

Definition at line 404 of file ChannelIce.cpp.

◆ writeData()

qint64 CChannelIce::writeData ( const char *  data,
qint64  len 
)
protectedvirtual

Reimplemented from CChannel.

Definition at line 300 of file ChannelIce.cpp.

Member Data Documentation

◆ m_Config

rtc::Configuration CChannelIce::m_Config
private

Definition at line 101 of file ChannelIce.h.

◆ m_data

QByteArray CChannelIce::m_data
private

Definition at line 105 of file ChannelIce.h.

◆ m_dataChannel

std::shared_ptr<rtc::DataChannel> CChannelIce::m_dataChannel
private

Definition at line 103 of file ChannelIce.h.

◆ m_Log

QLoggingCategory CChannelIce::m_Log
private

Definition at line 107 of file ChannelIce.h.

◆ m_MutexData

QMutex CChannelIce::m_MutexData
private

Definition at line 106 of file ChannelIce.h.

◆ m_peerConnection

std::shared_ptr<rtc::PeerConnection> CChannelIce::m_peerConnection
private

Definition at line 102 of file ChannelIce.h.

◆ m_pSignal

CIceSignal* CChannelIce::m_pSignal
private

Definition at line 97 of file ChannelIce.h.

◆ m_szChannelId

QString CChannelIce::m_szChannelId
private

Definition at line 100 of file ChannelIce.h.

◆ m_szPeerUser

QString CChannelIce::m_szPeerUser
private

Definition at line 99 of file ChannelIce.h.

◆ m_szUser

QString CChannelIce::m_szUser
private

Definition at line 98 of file ChannelIce.h.


The documentation for this class was generated from the following files: