diff -r b67dd1fc57c5 -r 2ed61feeead6 mmserv/tms/tmscallserver/inc/tmscallcsadpt.h --- a/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h Fri May 14 18:19:45 2010 -0500 +++ b/mmserv/tms/tmscallserver/inc/tmscallcsadpt.h Fri May 28 19:26:28 2010 -0500 @@ -18,6 +18,7 @@ #ifndef CALLCSADPT_H #define CALLCSADPT_H +// INCLUDES #include #include #include @@ -40,37 +41,42 @@ class TMSDtmfNotifier; /* - * CallCSAdapt class + * TMSCallCSAdpt class */ class TMSCallCSAdpt : public TMSCallAdpt, - public TMSCSPDevSoundObserver, + public TMSCSDevSoundObserver, public MTelephonyAudioRoutingObserver, public TMSDTMFTonePlayerObserver, public TMSDTMFObserver { public: - TMSCallCSAdpt(); + static TMSCallCSAdpt* NewL(); virtual ~TMSCallCSAdpt(); virtual gint PostConstruct(); - virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType, - gint& outStrmId); - virtual gint InitStream(TMSCallType callType, TMSStreamType strmType, - gint strmId, TMSFormatType frmtType, const RMessage2& message); - virtual gint StartStream(TMSCallType callType, TMSStreamType strmType, - gint strmId); - virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType, - gint strmId); - virtual gint StopStream(TMSCallType callType, TMSStreamType strmType, - gint strmId); - virtual gint DeinitStream(TMSCallType callType, TMSStreamType strmType, - gint strmId); - virtual gint DeleteStream(TMSCallType callType, TMSStreamType strmType, - gint strmId); - virtual gint DataXferBufferEmptied(TMSCallType callType, - TMSStreamType strmType, gint strmId); - virtual gint DataXferBufferFilled(TMSCallType callType, - TMSStreamType strmType, gint strmId, guint datasize); + // From TMSStream + virtual gint CreateStream(const TMSCallType callType, + const TMSStreamType strmType, gint& outStrmId); + virtual gint InitStream(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId, + const TMSFormatType frmtType, const gint retryTime, + const RMessage2& message); + virtual gint StartStream(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId, + const gint retrytime); + virtual gint PauseStream(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId); + virtual gint StopStream(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId); + virtual gint DeinitStream(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId); + virtual gint DeleteStream(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId); + virtual gint DataXferBufferEmptied(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId); + virtual gint DataXferBufferFilled(const TMSCallType callType, + const TMSStreamType strmType, const gint strmId, + const guint datasize); virtual gint GetDataXferBufferHndl(const TMSCallType callType, const TMSStreamType strmType, const gint strmId, const guint32 key, RChunk& chunk); @@ -106,45 +112,47 @@ virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc); // From TMS audio routing - virtual gint SetOutput(TMSAudioOutput output); + virtual gint SetOutput(const TMSAudioOutput output); virtual gint GetOutput(TMSAudioOutput& output); virtual gint GetPreviousOutput(TMSAudioOutput& output); - virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer); - + virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf); + // From TMSDTMF - virtual gint StartDTMF(TMSStreamType streamtype, TDes& dtmfstring); - virtual gint StopDTMF(TMSStreamType streamtype); - virtual gint ContinueDTMF(TBool continuesending); + virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr); + virtual gint StopDTMF(const TMSStreamType streamtype); + virtual gint ContinueDTMF(const gboolean sending); - //From TMSCSPDevSoundObserver - void DownlinkInitCompleted(TInt status); - void UplinkInitCompleted(TInt status); - void UplinkActivatedSuccessfully(); - void DownlinkActivatedSuccessfully(); - void UplinkActivationFailed(); - void DownlinkActivationFailed(); + //From TMSCSDevSoundObserver + void DownlinkInitCompleted(gint status); + void UplinkInitCompleted(gint status); + void DownlinkActivationCompleted(gint status); + void UplinkActivationCompleted(gint status); - //From DTMFTonePlayerObserver - void DTMFInitCompleted(TInt error); - void DTMFToneFinished(TInt error); + //From TMSDTMFTonePlayerObserver + void DTMFInitCompleted(gint status); + void DTMFToneFinished(gint status); //From TMSDTMFObserver - void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent aEvent, - const TInt aError, const TChar aTone); + void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event, + const gint status, const TChar tone); private: + TMSCallCSAdpt(); + void ConstructL(); + + gint InitUplink(const gint retrytime); + gint InitDownlink(const gint retrytime); void AvailableOutputsChanged( CTelephonyAudioRouting& aTelephonyAudioRouting); void OutputChanged(CTelephonyAudioRouting& aTelephonyAudioRouting); void SetOutputComplete(CTelephonyAudioRouting& aTelephonyAudioRouting, - gint aError); + gint status); void GetSupportedBitRatesL(CBufFlat*& brbuffer); void NotifyClient(const gint strmId, const gint command, const gint status = KErrNone, const gint64 int64 = TInt64(0)); private: gint iNextStreamId; - TMSCSUplink* iCSUplink; TMSCSDownlink* iCSDownlink; CTelephonyAudioRouting* iRouting; @@ -152,8 +160,8 @@ TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer; TMSDtmfNotifier* iDTMFNotifier; TMSDTMFProvider* iDTMFUplinkPlayer; - TMSStreamType iStrmtype; + // Message queues for communication and data transfer back to the client RMsgQueue iMsgQueueUp; RMsgQueue iMsgQueueDn; TmsMsgBuf iMsgBuffer;