Classified ads
Classes | Public Types | Public Member Functions | List of all members
MVoiceCallEngine Class Referenceabstract

Pure-virtual interface for voice call engine. More...

#include <mvoicecallengine.h>

Inheritance diagram for MVoiceCallEngine:
Inheritance graph
[legend]

Classes

class  CallData
 
class  MCallStatusObserver
 

Public Types

enum  CallState {
  Initial, Incoming, Open, Closing,
  Closed, Error, NoCall
}
 
enum  PayloadType { Audio =1, Control =2 }
 

Public Member Functions

virtual void installObserver (MCallStatusObserver *aObserver)=0
 
virtual void removeObserver (MCallStatusObserver *aObserver)=0
 
virtual void insertCallData (quint32 aCallId, quint32 aSeqNo, PayloadType aPayloadType, const QByteArray &aPayload, const Hash &aSendingNode)=0
 
virtual void insertCallStatusData (const VoiceCall &aCallStatus, const Hash &aSendingNode)=0
 
virtual QList< quint32 > onGoingCalls () const =0
 
virtual CallState callStatus (quint32 aCallId) const =0
 
virtual void closeCall (quint32 aCallId)=0
 
virtual void acceptCall (quint32 aCallId)=0
 

Detailed Description

Pure-virtual interface for voice call engine.

This is interface to VoiceCallEngine class. This has methods that public is supposed to access to create and control calls.

Member Enumeration Documentation

Enum for different voice call states

Enumerator
Initial 

Call initiated

Incoming 

Call received, acceptance by user expected

Open 

Handshake done, audio open

Closing 

Disconnection has been asked

Closed 

"normal" final state, after this the call is no more

Error 

Connection itself reports an error

NoCall 

Engine may report that there is no call

Enum for different payload types inside voicecall RT-stream

Enumerator
Audio 

Audio data

Control 

Call control data

Member Function Documentation

virtual void MVoiceCallEngine::acceptCall ( quint32  aCallId)
pure virtual

Method called as result UI-action. This accpets an incoming call.

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.

virtual CallState MVoiceCallEngine::callStatus ( quint32  aCallId) const
pure virtual

method for getting status of a call

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.

virtual void MVoiceCallEngine::closeCall ( quint32  aCallId)
pure virtual

Method called as result UI-action. This terminates ongoing call.

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.

virtual void MVoiceCallEngine::insertCallData ( quint32  aCallId,
quint32  aSeqNo,
PayloadType  aPayloadType,
const QByteArray &  aPayload,
const Hash aSendingNode 
)
pure virtual

Method for reception of call real-time data. This is called from network-parts that receive the data packet over some protocol and then feed it here to make it heard.

Called from protocol parser. Parser does not lock datamodel prior to call.

Parameters
aCallIdis call ( stream ) identifier
aSeqNois sequence number of rt data in stream
aPayloadTypetells what kind of payload it is
aPayloadactual bytes
aSendingNodenode what sent the data package

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.

virtual void MVoiceCallEngine::insertCallStatusData ( const VoiceCall aCallStatus,
const Hash aSendingNode 
)
pure virtual

Method for reception of call status data. This is called from network-parts that receive the data packet over some protocol and then feed it here to move the call engine to some direction

Note that the call data inserted via this method may be call that this node originally made and at the receiving end this same method is used to inject the new incoming call into the engine.

Another note to take into consideration is the handling if node-data in aCallStatus. Call status is passed as reference so the ownership of the call data object instance is not tranferred into voice call engine. Inside call data there are 2 pointers to originating and destination nodes. Ownership of content of those pointers is not tranferred either. VoiceCallEngine will make local copies (if it sees that necessary) of the node-pointer contents and caller of this method will be responsible for deleting the node-objects in call-data if they were created only for the purpose of making a voice call.

DataModel.lock() should be called before calling this method

Parameters
aCallStatuscontains information about a call.
aSendingNodeis fingerprint of the node where the DTO is coming from. May be local node also.

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.

virtual void MVoiceCallEngine::installObserver ( MCallStatusObserver aObserver)
pure virtual

Method for installing call state observer

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.

virtual QList<quint32> MVoiceCallEngine::onGoingCalls ( ) const
pure virtual

method for getting identifiers of ongoing calls

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.

virtual void MVoiceCallEngine::removeObserver ( MCallStatusObserver aObserver)
pure virtual

Method for removing call state observer

Implemented in VoiceCallEngine, and MockUpVoiceCallEngine.


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