21 #ifndef VOICECALL_ENG_H 22 #define VOICECALL_ENG_H 25 #include <QAbstractTableModel> 27 #include "../datamodel/model.h" 28 #include "../datamodel/voicecall.h" 29 #include "../call/audiodecoder.h" 30 #include "../call/audioencoder.h" 98 const QByteArray& aPayload,
131 const Hash& aSendingNode) ;
143 virtual void closeCall(quint32 aCallId) ;
164 virtual int rowCount(
const QModelIndex & parent = QModelIndex())
const ;
169 virtual int columnCount(
const QModelIndex & parent = QModelIndex())
const ;
174 virtual QVariant
data(
const QModelIndex & index,
175 int role = Qt::DisplayRole)
const ;
181 Qt::Orientation orientation,
182 int role = Qt::DisplayRole )
const ;
190 const Hash aHashOfAttemptedNode );
201 const QByteArray& aEncodedVoice,
218 const QByteArray& aRawAudio,
240 void error(QTcpSocket::SocketError socketError);
283 const Hash& aSendingNode)
const ;
AudioEncoder * iEncoder
Definition: voicecallengine.h:344
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
class for de-compressing audio received from network
Definition: audiodecoder.h:33
opposite of audiosink.
Definition: audiosource.h:41
AudioSource * iAudioSource
Definition: voicecallengine.h:357
Pure-virtual interface for voice call engine.
Definition: mvoicecallengine.h:33
Hash callPeerFingerPrint(const VoiceCall &aCall) const
CallState iOnGoingCallState
Definition: voicecallengine.h:328
QString excuseForCallCreation(const Hash &aOperator, const Hash &aNode=KNullHash) const
void startProcessCallData()
void callStateChanged(quint32 aCallId, VoiceCallEngine::CallState aState)
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
void setOutputLevel(float aOutputLevel)
VoiceCallEngine(MController &aController, Model &aModel)
QString iPeerNodeAddress
Definition: voicecallengine.h:332
virtual void insertCallStatusData(const VoiceCall &aCallStatus, const Hash &aSendingNode)
Class for playback of audio stream, via speaker or other audio dev.
Definition: audioplayer.h:38
Class for mixing together 0-n audio streams.
Definition: audiomixer.h:45
void addCallToArray(VoiceCallExtension &aCall)
virtual void removeObserver(MCallStatusObserver *aObserver)
virtual void closeCall(quint32 aCallId)
MController & iController
Definition: voicecallengine.h:346
class for compressing audio to be sent over network
Definition: audioencoder.h:35
AudioDecoder * iDecoder
Definition: voicecallengine.h:338
bool removeCallFromMixer(const VoiceCallExtension &aCall)
Carrier-class handling audio negotiation setup and data.
Definition: voicecall.h:40
void removeCallFromArray(VoiceCallExtension &aCall)
void sendCallStatusUpdateToRemote(const VoiceCall &aCall, bool aDoSign=true)
Hash is class that carries 160-bit digest.
Definition: hash.h:38
QByteArray asJSon() const
ConnectionState
Definition: connection.h:47
QString iPeerOperatorHash
Definition: voicecallengine.h:330
~VoiceCallExtension()
Definition: voicecallengine.h:317
virtual void acceptCall(quint32 aCallId)
void frameReady(quint32 aCallId, quint32 aSeqNo, const QByteArray &aRawAudio, Hash aForNode)
AudioMixer * iMixer
Definition: voicecallengine.h:356
bool setupNewIncomingCall(VoiceCallExtension &aCall)
virtual void installObserver(MCallStatusObserver *aObserver)
void error(QTcpSocket::SocketError socketError)
virtual CallState callStatus(quint32 aCallId) const
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:48
PayloadType
Definition: mvoicecallengine.h:63
QList< VoiceCallExtension > iOnGoingCalls
Definition: voicecallengine.h:349
bool addCallToMixer(const VoiceCallExtension &aCall)
bool fromJSon(const QByteArray &aJSonBytes)
Model & iModel
Definition: voicecallengine.h:347
M of the MVC pattern. Handles permanent storage.
Definition: model.h:50
Definition: mvoicecallengine.h:52
virtual QList< quint32 > onGoingCalls() const
CallState
Definition: mvoicecallengine.h:38
void setInputLevel(float aInputLevel)
bool setupNewOutgoingCall(VoiceCallExtension &aCall)
void inputLevel(float aInputLevel)
VoiceCallExtension(const VoiceCall &aInitialData)
Definition: voicecallengine.h:312
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
void nodeConnectionAttemptStatus(Connection::ConnectionState aStatus, const Hash aHashOfAttemptedNode)
QString callStatusString(const VoiceCallExtension &aCall) const
QList< QPair< VoiceCall, Hash > > iCallDataPendingProcessing
Definition: voicecallengine.h:359
AudioPlayer * iAudioPlayer
Definition: voicecallengine.h:358
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
QList< MCallStatusObserver * > iCallObservers
Definition: voicecallengine.h:348
bool setupAudioOutput(VoiceCallExtension &aCall)
void outputLevel(float aOutputLevel)
virtual void insertCallData(quint32 aCallId, quint32 aSeqNo, PayloadType aPayloadType, const QByteArray &aPayload, Hash &aSendingNode)
bool checkForNodeValidity(const VoiceCall &aCallStatus, const Hash &aSendingNode) const
Definition: voicecallengine.h:309
void sendCallStatusUpdates(quint32 aCallId, CallState aState)
Network-related logic for handling voice channel between nodes.
Definition: voicecallengine.h:54
void audioFrameEncoded(quint32 aCallId, quint32 aSeqNo, const QByteArray &aEncodedVoice, Hash aForNode)
bool setupLocalAudioCapture(VoiceCallExtension &aCall)