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 |
28 |
28 namespace TMS { |
29 namespace TMS { |
29 |
30 |
30 // FORWARD DECLARATIONS |
31 // FORWARD DECLARATIONS |
31 class TMSIPDownlink; |
32 class TMSIPDownlink; |
32 class TMSIPUplink; |
33 class TMSIPUplink; |
33 |
34 |
34 // TMSCallIPAdpt class |
35 /* |
35 class TMSCallIPAdpt : public TMSCallAdpt |
36 * TMSCallIPAdpt class |
|
37 */ |
|
38 class TMSCallIPAdpt : public TMSCallAdpt, |
|
39 public TMSIPDevSoundObserver |
36 { |
40 { |
37 public: |
41 public: |
38 // Constractor |
|
39 static TMSCallIPAdpt* NewL(); |
42 static TMSCallIPAdpt* NewL(); |
40 virtual ~TMSCallIPAdpt(); |
43 virtual ~TMSCallIPAdpt(); |
41 virtual gint PostConstruct(); |
44 virtual gint PostConstruct(); |
42 |
45 |
43 // From TMSStream |
46 // From TMSStream |
44 virtual gint CreateStream(TMSCallType callType, TMSStreamType strmType, |
47 virtual gint CreateStream(const TMSCallType callType, |
45 gint& outStrmId); |
48 const TMSStreamType strmType, gint& outStrmId); |
46 virtual gint InitStream(TMSCallType callType, TMSStreamType strmType, |
49 virtual gint InitStream(const TMSCallType callType, |
47 gint strmId, TMSFormatType frmtType, const RMessage2& message); |
50 const TMSStreamType strmType, const gint strmId, |
48 virtual gint StartStream(TMSCallType callType, TMSStreamType strmType, |
51 const TMSFormatType frmtType, const RMessage2& message); |
49 gint strmId); |
52 virtual gint StartStream(const TMSCallType callType, |
50 virtual gint PauseStream(TMSCallType callType, TMSStreamType strmType, |
53 const TMSStreamType strmType, const gint strmId); |
51 gint strmId); |
54 virtual gint PauseStream(const TMSCallType callType, |
52 virtual gint StopStream(TMSCallType callType, TMSStreamType strmType, |
55 const TMSStreamType strmType, const gint strmId); |
53 gint strmId); |
56 virtual gint StopStream(const TMSCallType callType, |
54 virtual gint DeinitStream(TMSCallType callType, TMSStreamType strmType, |
57 const TMSStreamType strmType, const gint strmId); |
55 gint strmId); |
58 virtual gint DeinitStream(const TMSCallType callType, |
56 virtual gint DeleteStream(TMSCallType callType, TMSStreamType strmType, |
59 const TMSStreamType strmType, const gint strmId); |
57 gint strmId); |
60 virtual gint DeleteStream(const TMSCallType callType, |
58 virtual gint DataXferBufferEmptied(TMSCallType callType, |
61 const TMSStreamType strmType, const gint strmId); |
59 TMSStreamType strmType, gint strmId); |
62 virtual gint DataXferBufferEmptied(const TMSCallType callType, |
60 virtual gint DataXferBufferFilled(TMSCallType callType, |
63 const TMSStreamType strmType, const gint strmId); |
61 TMSStreamType strmType, gint strmId, guint datasize); |
64 virtual gint DataXferBufferFilled(const TMSCallType callType, |
|
65 const TMSStreamType strmType, const gint strmId, |
|
66 const guint datasize); |
62 virtual gint GetDataXferBufferHndl(const TMSCallType callType, |
67 virtual gint GetDataXferBufferHndl(const TMSCallType callType, |
63 const TMSStreamType strmType, const gint strmId, |
68 const TMSStreamType strmType, const gint strmId, |
64 const guint32 key, RChunk& chunk); |
69 const guint32 key, RChunk& chunk); |
65 |
70 |
66 // From TMS effects |
71 // From TMS effects |
91 virtual gint GetCNG(const TMSFormatType fmttype, gboolean& cng); |
96 virtual gint GetCNG(const TMSFormatType fmttype, gboolean& cng); |
92 virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng); |
97 virtual gint SetCNG(const TMSFormatType fmttype, const gboolean cng); |
93 virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc); |
98 virtual gint GetPlc(const TMSFormatType fmttype, gboolean& plc); |
94 virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc); |
99 virtual gint SetPlc(const TMSFormatType fmttype, const gboolean plc); |
95 |
100 |
96 // From TMS audio output |
101 // From TMS audio routing |
97 virtual gint SetOutput(TMSAudioOutput output); |
102 virtual gint SetOutput(const TMSAudioOutput output); |
98 virtual gint GetOutput(TMSAudioOutput& output); |
103 virtual gint GetOutput(TMSAudioOutput& output); |
99 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
104 virtual gint GetPreviousOutput(TMSAudioOutput& output); |
100 virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuffer); |
105 virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf); |
101 |
106 |
102 // From TMS codec formats |
107 // From TMS codec formats |
103 gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype); |
108 gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype); |
104 gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype); |
109 gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype); |
105 gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype); |
110 gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype); |
108 gint SetFrameMode(const gboolean frmode); |
113 gint SetFrameMode(const gboolean frmode); |
109 gint GetFrameMode(gboolean& frmode); |
114 gint GetFrameMode(gboolean& frmode); |
110 gint ConcealErrorForNextBuffer(); |
115 gint ConcealErrorForNextBuffer(); |
111 gint BadLsfNextBuffer(); |
116 gint BadLsfNextBuffer(); |
112 |
117 |
113 gint OpenDownlinkL(const RMessage2& message); |
|
114 gint OpenUplinkL(const RMessage2& message); |
|
115 void SetFormat(const gint strmId, const guint32 aFormat); |
118 void SetFormat(const gint strmId, const guint32 aFormat); |
116 |
119 |
117 void BufferFilledL(guint dataSize); |
120 void BufferFilledL(guint dataSize); |
118 void BufferEmptiedL(); |
121 void BufferEmptiedL(); |
119 gint GetDataXferChunkHndl(const TMSStreamType strmType, |
122 gint GetDataXferChunkHndl(const TMSStreamType strmType, |
120 const guint32 key, RChunk& chunk); |
123 const guint32 key, RChunk& chunk); |
121 |
124 |
|
125 //From TMSIPDevSoundObserver |
|
126 void DownlinkInitCompleted(gint status); |
|
127 void UplinkInitCompleted(gint status); |
|
128 void DownlinkStarted(gint status); |
|
129 void UplinkStarted(gint status); |
|
130 |
122 private: |
131 private: |
|
132 TMSCallIPAdpt(); |
123 void ConstructL(); |
133 void ConstructL(); |
124 TMSCallIPAdpt(); |
|
125 |
134 |
126 void NotifyClient(const gint strmId, const gint aCommand, |
135 gint OpenDownlink(const RMessage2& message); |
127 const gint aStatus = KErrNone, const gint64 aInt64 = gint64(0)); |
136 gint OpenUplink(const RMessage2& message); |
|
137 |
|
138 gint InitDTMF(TMSStreamType strmtype); |
128 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
139 void GetSupportedBitRatesL(CBufFlat*& brbuffer); |
|
140 void NotifyClient(const gint strmId, const gint command, |
|
141 const gint status = KErrNone, const gint64 int64 = TInt64(0)); |
129 |
142 |
130 private: |
143 private: |
131 gint iNextStreamId; |
144 gint iNextStreamId; |
|
145 TMSIPUplink* iIPUplink; |
|
146 TMSIPDownlink* iIPDownlink; |
|
147 |
|
148 // Message queues for communication and data transfer back to the client |
|
149 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
|
150 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
|
151 TmsMsgBuf iMsgBuffer; |
|
152 |
132 gboolean iUplinkInitialized; |
153 gboolean iUplinkInitialized; |
133 gint iUplinkStreamId; |
154 gint iUplinkStreamId; |
134 gboolean iDnlinkInitialized; |
155 gboolean iDnlinkInitialized; |
135 gint iDnlinkStreamId; |
156 gint iDnlinkStreamId; |
136 |
157 |
137 TMSIPDownlink* iIPDownlink; |
|
138 TMSIPUplink* iIPUplink; |
|
139 |
|
140 // Message queues for communication and data transfer back to the client |
|
141 RMsgQueue<TmsMsgBuf> iMsgQueueUp; |
|
142 RMsgQueue<TmsMsgBuf> iMsgQueueDn; |
|
143 |
|
144 TmsMsgBuf iMsgBuffer; |
|
145 TMMFPrioritySettings iPriority; |
158 TMMFPrioritySettings iPriority; |
146 guint32 iUpFourCC; |
159 guint32 iUpFourCC; |
147 guint32 iDnFourCC; |
160 guint32 iDnFourCC; |
148 gint iMaxVolume; |
161 gint iMaxVolume; |
149 gint iMaxGain; |
162 gint iMaxGain; |
150 RArray<guint> iArrBitrates; |
163 RArray<guint> iArrBitrates; |
151 RArray<TFourCC> iCodecs; |
164 RArray<TFourCC> iCodecs; |
152 gint iCodecsCount; |
165 gint iCodecsCount; |
153 |
|
154 }; |
166 }; |
155 |
167 |
156 } //namespace TMS |
168 } //namespace TMS |
157 |
169 |
158 #endif //__CALLIPADAPT_H |
170 #endif //CALLIPADPT_H |
159 |
171 |
160 // End of file |
172 // End of file |