mmserv/tms/tmsserver/inc/tmsserver.h
branchRCL_3
changeset 19 095bea5f582e
parent 12 2eb3b066cc7d
child 20 0ac9a5310753
equal deleted inserted replaced
18:a36789189b53 19:095bea5f582e
    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"
    26 
    31 
    27 namespace TMS {
    32 namespace TMS {
    28 
    33 
    29 // FORWARD DECLARATIONS
    34 // FORWARD DECLARATIONS
    30 class TMSServerShutDown;
    35 class TMSServerShutDown;
    32 class TMSCallProxyLocal;
    37 class TMSCallProxyLocal;
    33 class TMSGlobalEffectsSettings;
    38 class TMSGlobalEffectsSettings;
    34 class TMSTarEventHandler;
    39 class TMSTarEventHandler;
    35 class TMSCSPCenRepListener;
    40 class TMSCSPCenRepListener;
    36 class TMSCenRepAudioHandler;
    41 class TMSCenRepAudioHandler;
       
    42 class TMSAudioDtmfTonePlayer;
       
    43 class TMSDTMFProvider;
       
    44 class TMSPubSubListener;
    37 
    45 
    38 // -----------------------------------------------------------------------------
    46 // -----------------------------------------------------------------------------
    39 // TMSServer class
    47 // TMSServer class
    40 // -----------------------------------------------------------------------------
    48 // -----------------------------------------------------------------------------
    41 //
    49 //
    42 class TMSServer : public CServer2
    50 class TMSServer : public CServer2,
       
    51                   private TMSRtPlayerObsrv,
       
    52                   private TMSDTMFObserver,
       
    53                   private TMSDTMFTonePlayerObserver,
       
    54                   public TMSPubSubObserver
    43     {
    55     {
    44 public:
    56 public:
    45     static void RunServerL();
    57     static void RunServerL();
    46     ~TMSServer();
    58     ~TMSServer();
    47 
    59 
    48     void AddSession();
    60     void AddSession();
    49     void DropSession();
    61     void DropSession();
    50     TInt SessionCount() const;
    62     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;
       
    57 
    63 
    58     void GetNewTMSCallSessionHandleL(RHandleBase& aHandle);
    64     void GetNewTMSCallSessionHandleL(RHandleBase& aHandle);
    59     TInt SetOutput(CSession2* sid, TInt output);
    65     TInt SetOutput(CSession2* sid, TInt output);
    60     TInt GetOutput(const RMessage2& aMessage);
    66     TInt GetOutput(const RMessage2& aMessage);
    61     TInt GetPreviousOutput(const RMessage2& aMessage);
    67     TInt GetPreviousOutput(const RMessage2& aMessage);
    69     TInt GetGain(const RMessage2& aMessage);
    75     TInt GetGain(const RMessage2& aMessage);
    70     TInt SetGain(CSession2* sid, TInt level);
    76     TInt SetGain(CSession2* sid, TInt level);
    71     TInt GetSupportedCodecs(const TMSStreamType strmType,
    77     TInt GetSupportedCodecs(const TMSStreamType strmType,
    72             RArray<TFourCC>*& aCodecs);
    78             RArray<TFourCC>*& aCodecs);
    73 
    79 
       
    80     // for DTMF player
       
    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 
    74     TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg);
    88     TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg);
    75 
       
    76     void StartRoutingNotifierL();
    89     void StartRoutingNotifierL();
    77     void CancelRoutingNotifier();
    90     void CancelRoutingNotifier();
    78     void StartCenRepHandlerL();
    91     void StartCenRepHandlerL();
    79     void CancelCenRepHandler();
    92     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);
    80 
   123 
    81 private:
   124 private:
    82     static TMSServer* NewLC();
   125     static TMSServer* NewLC();
    83     TMSServer();
   126     TMSServer();
    84     void ConstructL();
   127     void ConstructL();
    91     TInt SendMessageToCallServ(TInt func, TIpcArgs args);
   134     TInt SendMessageToCallServ(TInt func, TIpcArgs args);
    92 
   135 
    93 private:
   136 private:
    94     TInt iSession;
   137     TInt iSession;
    95     TMSServerShutDown *iShutdownTimer;
   138     TMSServerShutDown *iShutdownTimer;
    96 
       
    97     TBool iDnlinkSession;
       
    98     TBool iUplinkSession;
       
    99 
   139 
   100     mutable RPointerArray<TMSStartAndMonitorTMSCallThread> iTMSCallServList;
   140     mutable RPointerArray<TMSStartAndMonitorTMSCallThread> iTMSCallServList;
   101     TMSGlobalEffectsSettings* iEffectSettings;
   141     TMSGlobalEffectsSettings* iEffectSettings;
   102     TMSTarEventHandler* iTarHandler;
   142     TMSTarEventHandler* iTarHandler;
   103     TMSCenRepAudioHandler* iAudioCenRepHandler;
   143     TMSCenRepAudioHandler* iAudioCenRepHandler;
   104     TMSAudioOutput iCurrentRouting;
   144     TMSAudioOutput iCurrentRouting;
   105     TInt iTarHandlerCount;
   145     TInt iTarHandlerCount;
   106     TInt iAudioCenRepHandlerCount;
   146     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;
   107 
   160 
   108     // for codecs count
   161     // for codecs count
   109     RArray<TFourCC> iDnlCodecs;
   162     RArray<TFourCC> iDnlCodecs;
   110     RArray<TFourCC> iUplCodecs;
   163     RArray<TFourCC> iUplCodecs;
       
   164     TMSPubSubListener* iSyncVol;
   111     };
   165     };
   112 
   166 
   113 // -----------------------------------------------------------------------------
   167 // -----------------------------------------------------------------------------
   114 // TMSStartAndMonitorTMSCallThread class
   168 // TMSStartAndMonitorTMSCallThread class
   115 // -----------------------------------------------------------------------------
   169 // -----------------------------------------------------------------------------
   153     RThread iServerThread;
   207     RThread iServerThread;
   154     };
   208     };
   155 
   209 
   156 } //namespace TMS
   210 } //namespace TMS
   157 
   211 
   158 #endif //__TMSSERVER_H
   212 #endif //TMSSERVER_H
   159 
   213 
   160 // End of file