mmserv/tms/tmsserver/inc/tmsserver.h
changeset 12 5a06f39ad45b
parent 0 71ca22bcf22a
child 20 b67dd1fc57c5
equal deleted inserted replaced
0:71ca22bcf22a 12:5a06f39ad45b
    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"
    26 
    28 
    27 namespace TMS {
    29 namespace TMS {
    28 
    30 
    29 // FORWARD DECLARATIONS
    31 // FORWARD DECLARATIONS
    30 class TMSServerShutDown;
    32 class TMSServerShutDown;
    31 class CStartAndMonitorTMSCallThread;
    33 class TMSStartAndMonitorTMSCallThread;
    32 class TMSCallProxyLocal;
    34 class TMSCallProxyLocal;
    33 class GlobalEffectsSettings;
    35 class TMSGlobalEffectsSettings;
    34 class CTarEventHandler;
    36 class TMSTarEventHandler;
    35 class CSPCenRepListener;
    37 class TMSCSPCenRepListener;
    36 class CSPAudioHandler;
    38 class TMSCenRepAudioHandler;
       
    39 class TMSDtmfEventHandler;
    37 
    40 
    38 // -----------------------------------------------------------------------------
    41 // -----------------------------------------------------------------------------
    39 // TMSServer class
    42 // TMSServer class
    40 // -----------------------------------------------------------------------------
    43 // -----------------------------------------------------------------------------
    41 //
    44 //
    42 class TMSServer : public CServer2
    45 class TMSServer : public CServer2,
       
    46                   private TMSRtPlayerObsrv
    43     {
    47     {
    44 public:
    48 public:
    45     static TMSServer* NewL();
    49     static TMSServer* NewL();
    46     ~TMSServer();
    50     ~TMSServer();
    47 
    51 
    48     void AddSession();
    52     void AddSession();
    49     void DropSession();
    53     void DropSession();
    50     TInt SessionCount();
    54     TInt SessionCount() const;
    51 
    55 
    52     void SetDnLinkSession(TBool aSession);
    56     void SetDnLinkSession(const TBool aSession);
    53     void SetUpLinkSession(TBool aSession);
    57     void SetUpLinkSession(const TBool aSession);
    54 
    58 
    55     TBool HasDnLinkSession() const;
    59     TBool HasDnLinkSession() const;
    56     TBool HasUpLinkSession() const;
    60     TBool HasUpLinkSession() const;
    57 
    61 
    58     void GetNewTMSCallSessionHandleL(RHandleBase& aHandle);
    62     void GetNewTMSCallSessionHandleL(RHandleBase& aHandle);
    70     TInt SetGain(CSession2* sid, TInt level);
    74     TInt SetGain(CSession2* sid, TInt level);
    71     TInt GetSupportedCodecs(const TMSStreamType strmType,
    75     TInt GetSupportedCodecs(const TMSStreamType strmType,
    72             RArray<TFourCC>*& aCodecs);
    76             RArray<TFourCC>*& aCodecs);
    73 
    77 
    74     TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg);
    78     TInt NotifyTarClients(TRoutingMsgBufPckg routingpckg);
       
    79     TInt StartDTMF(const RMessage2& aMessage);
       
    80     TInt StopDTMF(const RMessage2& aMessage);
       
    81     TInt ContinueSendingDTMF(const RMessage2& aMessage);
       
    82     TInt NotifyDtmfClients(TmsMsgBufPckg dtmfpckg);
    75 
    83 
       
    84     void StartDTMFNotifierL();
       
    85     void CancelDTMFNotifier();
    76     void StartRoutingNotifierL();
    86     void StartRoutingNotifierL();
    77     void CancelRoutingNotifier();
    87     void CancelRoutingNotifier();
    78     void StartCenRepHandlerL();
    88     void StartCenRepHandlerL();
    79     void CancelCenRepHandler();
    89     void CancelCenRepHandler();
       
    90 
       
    91     // for RingTone player
       
    92     void InitRingTonePlayerL();
       
    93     void OpenRingTonePlayerFromProfileL(const RMessage2& aMessage);
       
    94     void OpenRingTonePlayerFromFileL(const RMessage2& aMessage);
       
    95     void OpenRingToneTTSPlayerL(const RMessage2& aMessage);
       
    96     void OpenRingToneSequencePlayerL(const RMessage2& aMessage);
       
    97     void OpenRingToneBeepOnceL();
       
    98     void OpenRingToneSilentL();
       
    99     void OpenRingToneUnsecureVoipL();
       
   100     void DeinitRingTonePlayer();
       
   101     void PlayRingToneL();
       
   102     void PauseVideoRingTone();
       
   103     void StopRingTone();
       
   104     void MuteRingTone();
       
   105 
       
   106     // from TMSRtPlayerObsrv
       
   107     void RtPlayerEvent(TInt aEventType, TInt aError);
    80 
   108 
    81 private:
   109 private:
    82     TMSServer();
   110     TMSServer();
    83     void ConstructL();
   111     void ConstructL();
    84     CSession2* NewSessionL(const TVersion& aVersion,
   112     CSession2* NewSessionL(const TVersion& aVersion,
    94     TMSServerShutDown *iShutdownTimer;
   122     TMSServerShutDown *iShutdownTimer;
    95 
   123 
    96     TBool iDnlinkSession;
   124     TBool iDnlinkSession;
    97     TBool iUplinkSession;
   125     TBool iUplinkSession;
    98 
   126 
    99     mutable RPointerArray<CStartAndMonitorTMSCallThread> iTMSCallServList;
   127     mutable RPointerArray<TMSStartAndMonitorTMSCallThread> iTMSCallServList;
   100     GlobalEffectsSettings* iEffectSettings;
   128     TMSGlobalEffectsSettings* iEffectSettings;
   101     CTarEventHandler* iTarHandler;
   129     TMSTarEventHandler* iTarHandler;
   102     CSPAudioHandler* iAudioCenRepHandler;
   130     TMSCenRepAudioHandler* iAudioCenRepHandler;
   103     TMSAudioOutput iCurrentRouting;
   131     TMSAudioOutput iCurrentRouting;
       
   132     TMSDtmfEventHandler* iDTMFHandler;
       
   133     TInt iTarHandlerCount;
       
   134     TInt iAudioCenRepHandlerCount;
       
   135     TInt iDTMFHandlerCount;
   104 
   136 
       
   137     // for RT
       
   138     TMSRingTonePlayer* iTMSRtPlayer;
       
   139     HBufC* iRtFile;
       
   140     HBufC8* iRtSequence;
       
   141     HBufC* iTtsText;
       
   142 
       
   143     // for codecs count
   105     RArray<TFourCC> iDnlCodecs;
   144     RArray<TFourCC> iDnlCodecs;
   106     RArray<TFourCC> iUplCodecs;
   145     RArray<TFourCC> iUplCodecs;
   107     };
   146     };
   108 
   147 
   109 // -----------------------------------------------------------------------------
   148 // -----------------------------------------------------------------------------
   110 // CStartAndMonitorTMSCallThread class
   149 // TMSStartAndMonitorTMSCallThread class
   111 // -----------------------------------------------------------------------------
   150 // -----------------------------------------------------------------------------
   112 //
   151 //
   113 class TMSCallProxyLocal : public RSessionBase
   152 class TMSCallProxyLocal : public RSessionBase
   114     {
   153     {
   115 public:
   154 public:
   119     TInt ReceiveFromCallServer(TInt aFunc, TUint& value);
   158     TInt ReceiveFromCallServer(TInt aFunc, TUint& value);
   120     TInt ReceiveFromCallServer(TInt aFunc, TIpcArgs args);
   159     TInt ReceiveFromCallServer(TInt aFunc, TIpcArgs args);
   121     };
   160     };
   122 
   161 
   123 // -----------------------------------------------------------------------------
   162 // -----------------------------------------------------------------------------
   124 // CStartAndMonitorTMSCallThread class
   163 // TMSStartAndMonitorTMSCallThread class
   125 // -----------------------------------------------------------------------------
   164 // -----------------------------------------------------------------------------
   126 //
   165 //
   127 class CStartAndMonitorTMSCallThread : public CActive
   166 class TMSStartAndMonitorTMSCallThread : public CActive
   128     {
   167     {
   129 public:
   168 public:
   130     static CStartAndMonitorTMSCallThread* NewL(TMSServer* aServer);
   169     static TMSStartAndMonitorTMSCallThread* NewL(TMSServer* aServer);
   131     ~CStartAndMonitorTMSCallThread();
   170     ~TMSStartAndMonitorTMSCallThread();
   132     TInt StartTMSCallServer(TMSCallProxyLocal& aHandle);
   171     TInt StartTMSCallServer(TMSCallProxyLocal& aHandle);
   133 
   172 
   134 private:
   173 private:
   135     // Construct
   174     // Construct
   136     CStartAndMonitorTMSCallThread(TMSServer* aServer);
   175     TMSStartAndMonitorTMSCallThread(TMSServer* aServer);
   137     void ConstructL();
   176     void ConstructL();
   138 
   177 
   139     // From CActive
   178     // From CActive
   140     void RunL();
   179     void RunL();
   141     void DoCancel();
   180     void DoCancel();