13 * |
13 * |
14 * Description: Telephony Multimedia Service |
14 * Description: Telephony Multimedia Service |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef __CALLIPADAPT_H |
18 #ifndef CALLIPADAPT_H |
19 #define __CALLIPADAPT_H |
19 #define CALLIPADAPT_H |
20 |
20 |
21 // INCLUDES |
21 // INCLUDES |
22 #include <e32msgqueue.h> |
22 #include <e32msgqueue.h> |
23 #include <mmcccodecinformation.h> |
23 #include <mmcccodecinformation.h> |
24 #include "tmsclientserver.h" |
24 #include "tmsclientserver.h" |
25 #include "tmsshared.h" |
25 #include "tmsshared.h" |
26 #include "tmscalladpt.h" |
26 #include "tmscalladpt.h" |
|
27 #include "tmsipcallstream.h" |
27 #include "tmsdtmftoneplayer.h" |
28 #include "tmsdtmftoneplayer.h" |
28 #include "tmsdtmfnotifier.h" |
29 #include "tmsdtmfnotifier.h" |
29 |
30 |
30 namespace TMS { |
31 namespace TMS { |
31 |
32 |
32 // FORWARD DECLARATIONS |
33 // FORWARD DECLARATIONS |
33 class TMSIPDownlink; |
34 class TMSIPDownlink; |
34 class TMSIPUplink; |
35 class TMSIPUplink; |
35 |
36 |
36 // TMSCallIPAdpt class |
37 /* |
|
38 * TMSCallIPAdpt class |
|
39 */ |
37 class TMSCallIPAdpt : public TMSCallAdpt, |
40 class TMSCallIPAdpt : public TMSCallAdpt, |
|
41 public TMSIPDevSoundObserver, |
38 public TMSDTMFTonePlayerObserver |
42 public TMSDTMFTonePlayerObserver |
39 { |
43 { |
40 public: |
44 public: |
41 // Constractor |
|
42 static TMSCallIPAdpt* NewL(); |
45 static TMSCallIPAdpt* NewL(); |
43 virtual ~TMSCallIPAdpt(); |
46 virtual ~TMSCallIPAdpt(); |
44 virtual gint PostConstruct(); |
47 virtual gint PostConstruct(); |
45 |
48 |
46 // From TMSStream |
49 // From TMSStream |
47 virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType, |
50 virtual gint CreateStream(const TMSCallType callType, |
48 gint& outStrmId); |
51 const TMSStreamType strmType, gint& outStrmId); |
49 virtual gint InitStream(TMSCallType callType, TMSStreamType strmType, |
52 virtual gint InitStream(const TMSCallType callType, |
50 gint strmId, TMSFormatType frmtType, const RMessage2& message); |
53 const TMSStreamType strmType, const gint strmId, |
51 virtual gint StartStream(TMSCallType callType, TMSStreamType strmType, |
54 const TMSFormatType frmtType, const gint retryTime, |
52 gint strmId); |
55 const RMessage2& message); |
53 virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType, |
56 virtual gint StartStream(const TMSCallType callType, |
54 gint strmId); |
57 const TMSStreamType strmType, const gint strmId, |
55 virtual gint StopStream(TMSCallType callType, TMSStreamType strmType, |
58 const gint retrytime); |
56 gint strmId); |
59 virtual gint PauseStream(const TMSCallType callType, |
57 virtual gint DeinitStream(TMSCallType callType, TMSStreamType strmType, |
60 const TMSStreamType strmType, const gint strmId); |
58 gint strmId); |
61 virtual gint StopStream(const TMSCallType callType, |
59 virtual gint DeleteStream(TMSCallType callType, TMSStreamType strmType, |
62 const TMSStreamType strmType, const gint strmId); |
60 gint strmId); |
63 virtual gint DeinitStream(const TMSCallType callType, |
61 virtual gint DataXferBufferEmptied(TMSCallType callType, |
64 const TMSStreamType strmType, const gint strmId); |
62 TMSStreamType strmType, gint strmId); |
65 virtual gint DeleteStream(const TMSCallType callType, |
63 virtual gint DataXferBufferFilled(TMSCallType callType, |
66 const TMSStreamType strmType, const gint strmId); |
64 TMSStreamType strmType, gint strmId, guint datasize); |
67 virtual gint DataXferBufferEmptied(const TMSCallType callType, |
|
68 const TMSStreamType strmType, const gint strmId); |
|
69 virtual gint DataXferBufferFilled(const TMSCallType callType, |
|
70 const TMSStreamType strmType, const gint strmId, |
|
71 const guint datasize); |
65 virtual gint GetDataXferBufferHndl(const TMSCallType callType, |
72 virtual gint GetDataXferBufferHndl(const TMSCallType callType, |
66 const TMSStreamType strmType, const gint strmId, |
73 const TMSStreamType strmType, const gint strmId, |
67 const guint32 key, RChunk& chunk); |
74 const guint32 key, RChunk& chunk); |
68 |
75 |
69 // From TMS effects |
76 // From TMS effects |
94 virtual gint GetCNG(const TMSFormatType fmttype, gboolean& cng); |
101 virtual gint GetCNG(const TMSFormatType fmttype, gboolean& cng); |
95 virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng); |
102 virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng); |
96 virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc); |
103 virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc); |
97 virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc); |
104 virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc); |
98 |
105 |
99 // From TMS audio output |
106 // From TMS audio routing |
100 virtual gint SetOutput(TMSAudioOutput output); |
107 virtual gint SetOutput(const TMSAudioOutput output); |
101 virtual gint GetOutput(TMSAudioOutput& output); |
108 virtual gint GetOutput(TMSAudioOutput& output); |
102 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
109 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
103 virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer); |
110 virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf); |
104 |
111 |
105 // From TMSDTMF |
112 // From TMSDTMF |
106 virtual gint StartDTMF(TMSStreamType streamtype, TDes& dtmfstring); |
113 virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr); |
107 virtual gint StopDTMF(TMSStreamType streamtype); |
114 virtual gint StopDTMF(const TMSStreamType streamtype); |
108 virtual gint ContinueDTMF(gboolean continuesending); |
115 virtual gint ContinueDTMF(const gboolean sending); |
109 |
116 |
110 // From TMS codec formats |
117 // From TMS codec formats |
111 gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype); |
118 gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype); |
112 gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype); |
119 gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype); |
113 gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype); |
120 gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype); |
116 gint SetFrameMode(const gboolean frmode); |
123 gint SetFrameMode(const gboolean frmode); |
117 gint GetFrameMode(gboolean& frmode); |
124 gint GetFrameMode(gboolean& frmode); |
118 gint ConcealErrorForNextBuffer(); |
125 gint ConcealErrorForNextBuffer(); |
119 gint BadLsfNextBuffer(); |
126 gint BadLsfNextBuffer(); |
120 |
127 |
121 gint OpenDownlinkL(const RMessage2& message); |
|
122 gint OpenUplinkL(const RMessage2& message); |
|
123 void SetFormat(const gint strmId, const guint32 aFormat); |
128 void SetFormat(const gint strmId, const guint32 aFormat); |
124 |
129 |
125 void BufferFilledL(guint dataSize); |
130 void BufferFilledL(guint dataSize); |
126 void BufferEmptiedL(); |
131 void BufferEmptiedL(); |
127 gint GetDataXferChunkHndl(const TMSStreamType strmType, |
132 gint GetDataXferChunkHndl(const TMSStreamType strmType, |
128 const guint32 key, RChunk& chunk); |
133 const guint32 key, RChunk& chunk); |
129 |
134 |
130 //From DTMFTonePlayerObserver |
135 //From TMSIPDevSoundObserver |
131 void DTMFInitCompleted(gint error); |
136 void DownlinkInitCompleted(gint status); |
132 void DTMFToneFinished(gint error); |
137 void UplinkInitCompleted(gint status); |
|
138 void DownlinkStarted(gint status); |
|
139 void UplinkStarted(gint status); |
|
140 |
|
141 //From TMSDTMFTonePlayerObserver |
|
142 void DTMFInitCompleted(gint status); |
|
143 void DTMFToneFinished(gint status); |
133 |
144 |
134 private: |
145 private: |
|
146 TMSCallIPAdpt(); |
135 void ConstructL(); |
147 void ConstructL(); |
136 TMSCallIPAdpt(); |
148 |
|
149 gint OpenDownlink(const RMessage2& message, const gint retrytime); |
|
150 gint OpenUplink(const RMessage2& message, const gint retrytime); |
137 |
151 |
138 gint InitDTMF(TMSStreamType strmtype); |
152 gint InitDTMF(TMSStreamType strmtype); |
139 void NotifyClient(const gint strmId, const gint aCommand, |
|
140 const gint aStatus = KErrNone, const gint64 aInt64 = gint64(0)); |
|
141 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
153 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
|
154 void NotifyClient(const gint strmId, const gint command, |
|
155 const gint status = KErrNone, const gint64 int64 = TInt64(0)); |
142 |
156 |
143 private: |
157 private: |
144 gint iNextStreamId; |
158 gint iNextStreamId; |
|
159 TMSIPUplink* iIPUplink; |
|
160 TMSIPDownlink* iIPDownlink; |
|
161 TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer; |
|
162 TMSDtmfNotifier* iDTMFNotifier; |
|
163 TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer; |
|
164 // Message queues for communication and data transfer back to the client |
|
165 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
|
166 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
|
167 TmsMsgBuf iMsgBuffer; |
|
168 |
145 gboolean iUplinkInitialized; |
169 gboolean iUplinkInitialized; |
146 gint iUplinkStreamId; |
170 gint iUplinkStreamId; |
147 gboolean iDnlinkInitialized; |
171 gboolean iDnlinkInitialized; |
148 gint iDnlinkStreamId; |
172 gint iDnlinkStreamId; |
149 |
173 |
150 TMSIPDownlink* iIPDownlink; |
|
151 TMSIPUplink* iIPUplink; |
|
152 |
|
153 // Message queues for communication and data transfer back to the client |
|
154 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
|
155 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
|
156 |
|
157 TmsMsgBuf iMsgBuffer; |
|
158 TMMFPrioritySettings iPriority; |
174 TMMFPrioritySettings iPriority; |
159 guint32 iUpFourCC; |
175 guint32 iUpFourCC; |
160 guint32 iDnFourCC; |
176 guint32 iDnFourCC; |
161 gint iMaxVolume; |
177 gint iMaxVolume; |
162 gint iMaxGain; |
178 gint iMaxGain; |
163 RArray<guint> iArrBitrates; |
179 RArray<guint> iArrBitrates; |
164 RArray<TFourCC> iCodecs; |
180 RArray<TFourCC> iCodecs; |
165 gint iCodecsCount; |
181 gint iCodecsCount; |
166 |
|
167 TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer; |
|
168 TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer; |
|
169 TMSDtmfNotifier* iDTMFNotifier; |
|
170 }; |
182 }; |
171 |
183 |
172 } //namespace TMS |
184 } //namespace TMS |
173 |
185 |
174 #endif //__CALLIPADAPT_H |
186 #endif //CALLIPADPT_H |
175 |
187 |
176 // End of file |
188 // End of file |