13 * |
13 * |
14 * Description: Telephony Multimedia Service |
14 * Description: Telephony Multimedia Service |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef TMSSERVER_H |
18 #ifndef __TMSSERVER_H |
19 #define TMSSERVER_H |
19 #define __TMSSERVER_H |
20 |
20 |
21 #include <e32base.h> |
21 #include <e32base.h> |
22 #include <mmcccodecinformation.h> |
22 #include <mmcccodecinformation.h> |
23 #include <tms.h> |
23 #include <tms.h> |
24 #include "tmsshared.h" |
24 #include "tmsshared.h" |
25 #include "tmsclientserver.h" |
25 #include "tmsclientserver.h" |
26 #include "tmsrtplayerobsrv.h" |
|
27 #include "tmsrtplayer.h" |
|
28 #include "tmsdtmfobserver.h" |
|
29 #include "tmsdtmftoneplayerobserver.h" |
|
30 #include "tmspubsubobserver.h" |
|
31 |
26 |
32 namespace TMS { |
27 namespace TMS { |
33 |
28 |
34 // FORWARD DECLARATIONS |
29 // FORWARD DECLARATIONS |
35 class TMSServerShutDown; |
30 class TMSServerShutDown; |
37 class TMSCallProxyLocal; |
32 class TMSCallProxyLocal; |
38 class TMSGlobalEffectsSettings; |
33 class TMSGlobalEffectsSettings; |
39 class TMSTarEventHandler; |
34 class TMSTarEventHandler; |
40 class TMSCSPCenRepListener; |
35 class TMSCSPCenRepListener; |
41 class TMSCenRepAudioHandler; |
36 class TMSCenRepAudioHandler; |
42 class TMSAudioDtmfTonePlayer; |
|
43 class TMSDTMFProvider; |
|
44 class TMSPubSubListener; |
|
45 |
37 |
46 // ----------------------------------------------------------------------------- |
38 // ----------------------------------------------------------------------------- |
47 // TMSServer class |
39 // TMSServer class |
48 // ----------------------------------------------------------------------------- |
40 // ----------------------------------------------------------------------------- |
49 // |
41 // |
50 class TMSServer : public CServer2, |
42 class TMSServer : public CServer2 |
51 private TMSRtPlayerObsrv, |
|
52 private TMSDTMFObserver, |
|
53 private TMSDTMFTonePlayerObserver, |
|
54 public TMSPubSubObserver |
|
55 { |
43 { |
56 public: |
44 public: |
57 static void RunServerL(); |
45 static void RunServerL(); |
58 ~TMSServer(); |
46 ~TMSServer(); |
59 |
47 |
60 void AddSession(); |
48 void AddSession(); |
61 void DropSession(); |
49 void DropSession(); |
62 TInt SessionCount() const; |
50 TInt SessionCount() const; |
|
51 |
|
52 void SetDnLinkSession(const TBool aSession); |
|
53 void SetUpLinkSession(const TBool aSession); |
|
54 |
|
55 TBool HasDnLinkSession() const; |
|
56 TBool HasUpLinkSession() const; |
63 |
57 |
64 void GetNewTMSCallSessionHandleL(RHandleBase& aHandle); |
58 void GetNewTMSCallSessionHandleL(RHandleBase& aHandle); |
65 TInt SetOutput(CSession2* sid, TInt output); |
59 TInt SetOutput(CSession2* sid, TInt output); |
66 TInt GetOutput(const RMessage2& aMessage); |
60 TInt GetOutput(const RMessage2& aMessage); |
67 TInt GetPreviousOutput(const RMessage2& aMessage); |
61 TInt GetPreviousOutput(const RMessage2& aMessage); |
75 TInt GetGain(const RMessage2& aMessage); |
69 TInt GetGain(const RMessage2& aMessage); |
76 TInt SetGain(CSession2* sid, TInt level); |
70 TInt SetGain(CSession2* sid, TInt level); |
77 TInt GetSupportedCodecs(const TMSStreamType strmType, |
71 TInt GetSupportedCodecs(const TMSStreamType strmType, |
78 RArray<TFourCC>*& aCodecs); |
72 RArray<TFourCC>*& aCodecs); |
79 |
73 |
80 // for DTMF player |
74 TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg); |
81 TInt InitDTMF(const RMessage2& aMessage); |
|
82 TInt StartDTMF(const RMessage2& aMessage); |
|
83 TInt StopDTMF(const RMessage2& aMessage); |
|
84 TInt ContinueSendingDTMF(const RMessage2& aMessage); |
|
85 TInt NotifyDtmfClients(gint aEventType, gint aError); |
|
86 gint FindActiveCallType(); |
|
87 |
75 |
88 TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg); |
|
89 void StartRoutingNotifierL(); |
76 void StartRoutingNotifierL(); |
90 void CancelRoutingNotifier(); |
77 void CancelRoutingNotifier(); |
91 void StartCenRepHandlerL(); |
78 void StartCenRepHandlerL(); |
92 void CancelCenRepHandler(); |
79 void CancelCenRepHandler(); |
93 |
|
94 // for RingTone player |
|
95 void InitRingTonePlayerL(); |
|
96 void OpenRingTonePlayerFromProfileL(const RMessage2& aMessage); |
|
97 void OpenRingTonePlayerFromFileL(const RMessage2& aMessage); |
|
98 void OpenRingToneTTSPlayerL(const RMessage2& aMessage); |
|
99 void OpenRingToneSequencePlayerL(const RMessage2& aMessage); |
|
100 void OpenRingToneBeepOnceL(); |
|
101 void OpenRingToneSilentL(); |
|
102 void OpenRingToneUnsecureVoipL(); |
|
103 void DeinitRingTonePlayer(); |
|
104 void PlayRingToneL(); |
|
105 void PauseVideoRingTone(); |
|
106 void StopRingTone(); |
|
107 void MuteRingTone(); |
|
108 |
|
109 // from TMSRtPlayerObsrv |
|
110 void RtPlayerEvent(TInt aEventType, TInt aError); |
|
111 |
|
112 // from TMSDTMFTonePlayerObserver |
|
113 void DTMFInitCompleted(gint status); |
|
114 void DTMFToneFinished(gint status); |
|
115 |
|
116 // from TMSDTMFObserver |
|
117 void HandleDTMFEvent(const TMSDTMFObserver::TCCPDtmfEvent event, |
|
118 const gint status, const TChar tone); |
|
119 |
|
120 // from TMSPubSubObserver |
|
121 void HandleNotifyPSL(const TUid aUid, const TInt& aKey, |
|
122 const TRequestStatus& aStatus); |
|
123 |
80 |
124 private: |
81 private: |
125 static TMSServer* NewLC(); |
82 static TMSServer* NewLC(); |
126 TMSServer(); |
83 TMSServer(); |
127 void ConstructL(); |
84 void ConstructL(); |
135 |
92 |
136 private: |
93 private: |
137 TInt iSession; |
94 TInt iSession; |
138 TMSServerShutDown *iShutdownTimer; |
95 TMSServerShutDown *iShutdownTimer; |
139 |
96 |
|
97 TBool iDnlinkSession; |
|
98 TBool iUplinkSession; |
|
99 |
140 mutable RPointerArray<TMSStartAndMonitorTMSCallThread> iTMSCallServList; |
100 mutable RPointerArray<TMSStartAndMonitorTMSCallThread> iTMSCallServList; |
141 TMSGlobalEffectsSettings* iEffectSettings; |
101 TMSGlobalEffectsSettings* iEffectSettings; |
142 TMSTarEventHandler* iTarHandler; |
102 TMSTarEventHandler* iTarHandler; |
143 TMSCenRepAudioHandler* iAudioCenRepHandler; |
103 TMSCenRepAudioHandler* iAudioCenRepHandler; |
144 TMSAudioOutput iCurrentRouting; |
104 TMSAudioOutput iCurrentRouting; |
145 TInt iTarHandlerCount; |
105 TInt iTarHandlerCount; |
146 TInt iAudioCenRepHandlerCount; |
106 TInt iAudioCenRepHandlerCount; |
147 TInt iDTMFHandlerCount; |
|
148 TMSCallType iActiveCallType; |
|
149 |
|
150 // for RT |
|
151 TMSRingTonePlayer* iTMSRtPlayer; |
|
152 HBufC* iRtFile; |
|
153 HBufC8* iRtSequence; |
|
154 HBufC* iTtsText; |
|
155 |
|
156 // for DTMF |
|
157 TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer; |
|
158 TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer; |
|
159 TMSDTMFProvider* iDTMFUplinkPlayerEtel; |
|
160 |
107 |
161 // for codecs count |
108 // for codecs count |
162 RArray<TFourCC> iDnlCodecs; |
109 RArray<TFourCC> iDnlCodecs; |
163 RArray<TFourCC> iUplCodecs; |
110 RArray<TFourCC> iUplCodecs; |
164 TMSPubSubListener* iSyncVol; |
|
165 }; |
111 }; |
166 |
112 |
167 // ----------------------------------------------------------------------------- |
113 // ----------------------------------------------------------------------------- |
168 // TMSStartAndMonitorTMSCallThread class |
114 // TMSStartAndMonitorTMSCallThread class |
169 // ----------------------------------------------------------------------------- |
115 // ----------------------------------------------------------------------------- |