Classified ads
Public Member Functions | Public Attributes | List of all members
MockUpVoiceCallEngine Class Reference

#include <mockup_voicecallengine.h>

Inheritance diagram for MockUpVoiceCallEngine:
Inheritance graph
[legend]
Collaboration diagram for MockUpVoiceCallEngine:
Collaboration graph
[legend]

Public Member Functions

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

Public Attributes

QList< MCallStatusObserver * > iObservers
 
quint32 iCallId
 
quint32 iCallIdOfReceivedRtData
 
QByteArray iCalldata
 

Additional Inherited Members

- Public Types inherited from MVoiceCallEngine
enum  CallState {
  Initial, Incoming, Open, Closing,
  Closed, Error, NoCall
}
 
enum  PayloadType { Audio =1, Control =2 }
 

Constructor & Destructor Documentation

MockUpVoiceCallEngine::MockUpVoiceCallEngine ( )
MockUpVoiceCallEngine::~MockUpVoiceCallEngine ( )

Member Function Documentation

virtual void MockUpVoiceCallEngine::acceptCall ( quint32  aCallId)
virtual

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

Implements MVoiceCallEngine.

virtual CallState MockUpVoiceCallEngine::callStatus ( quint32  aCallId) const
virtual

method for getting status of a call

Implements MVoiceCallEngine.

virtual void MockUpVoiceCallEngine::closeCall ( quint32  aCallId)
virtual

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

Implements MVoiceCallEngine.

virtual void MockUpVoiceCallEngine::insertCallData ( quint32  aCallId,
quint32  aSeqNo,
PayloadType  aPayloadType,
const QByteArray &  aPayload,
const Hash aSendingNode 
)
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

Implements MVoiceCallEngine.

virtual void MockUpVoiceCallEngine::insertCallStatusData ( const VoiceCall aCallStatus,
const Hash aSendingNode 
)
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.

Implements MVoiceCallEngine.

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

Method for installing call state observer

Implements MVoiceCallEngine.

virtual QList<quint32> MockUpVoiceCallEngine::onGoingCalls ( ) const
virtual

method for getting identifiers of ongoing calls

Implements MVoiceCallEngine.

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

Method for removing call state observer

Implements MVoiceCallEngine.

Member Data Documentation

QByteArray MockUpVoiceCallEngine::iCalldata
quint32 MockUpVoiceCallEngine::iCallId
quint32 MockUpVoiceCallEngine::iCallIdOfReceivedRtData
QList<MCallStatusObserver*> MockUpVoiceCallEngine::iObservers

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