mmserv/tms/tmscallserver/inc/tmscallipadpt.h
changeset 33 5e8b14bae8c3
parent 21 2ed61feeead6
child 53 eabc8c503852
equal deleted inserted replaced
28:ebf79c79991a 33:5e8b14bae8c3
    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 "tmsipcallstream.h"
    28 #include "tmsdtmftoneplayer.h"
       
    29 #include "tmsdtmfnotifier.h"
       
    30 
    28 
    31 namespace TMS {
    29 namespace TMS {
    32 
    30 
    33 // FORWARD DECLARATIONS
    31 // FORWARD DECLARATIONS
    34 class TMSIPDownlink;
    32 class TMSIPDownlink;
    36 
    34 
    37 /*
    35 /*
    38  * TMSCallIPAdpt class
    36  * TMSCallIPAdpt class
    39  */
    37  */
    40 class TMSCallIPAdpt : public TMSCallAdpt,
    38 class TMSCallIPAdpt : public TMSCallAdpt,
    41                       public TMSIPDevSoundObserver,
    39                       public TMSIPDevSoundObserver
    42                       public TMSDTMFTonePlayerObserver
       
    43     {
    40     {
    44 public:
    41 public:
    45     static TMSCallIPAdpt* NewL();
    42     static TMSCallIPAdpt* NewL();
    46     virtual ~TMSCallIPAdpt();
    43     virtual ~TMSCallIPAdpt();
    47     virtual gint PostConstruct();
    44     virtual gint PostConstruct();
   107     virtual gint SetOutput(const TMSAudioOutput output);
   104     virtual gint SetOutput(const TMSAudioOutput output);
   108     virtual gint GetOutput(TMSAudioOutput& output);
   105     virtual gint GetOutput(TMSAudioOutput& output);
   109     virtual gint GetPreviousOutput(TMSAudioOutput& output);
   106     virtual gint GetPreviousOutput(TMSAudioOutput& output);
   110     virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf);
   107     virtual gint GetAvailableOutputsL(gint& count, CBufFlat*& outputsbuf);
   111 
   108 
   112 	// From TMSDTMF
       
   113     virtual gint StartDTMF(const TMSStreamType streamtype, TDes& dtmfstr);
       
   114     virtual gint StopDTMF(const TMSStreamType streamtype);
       
   115     virtual gint ContinueDTMF(const gboolean sending);
       
   116 
       
   117     // From TMS codec formats
   109     // From TMS codec formats
   118     gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype);
   110     gint SetIlbcCodecMode(const gint mode, const TMSStreamType strmtype);
   119     gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype);
   111     gint GetIlbcCodecMode(gint& mode, const TMSStreamType strmtype);
   120     gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype);
   112     gint SetG711CodecMode(const gint mode, const TMSStreamType strmtype);
   121     gint GetG711CodecMode(gint& mode, const TMSStreamType strmtype);
   113     gint GetG711CodecMode(gint& mode, const TMSStreamType strmtype);
   136     void DownlinkInitCompleted(gint status);
   128     void DownlinkInitCompleted(gint status);
   137     void UplinkInitCompleted(gint status);
   129     void UplinkInitCompleted(gint status);
   138     void DownlinkStarted(gint status);
   130     void DownlinkStarted(gint status);
   139     void UplinkStarted(gint status);
   131     void UplinkStarted(gint status);
   140 
   132 
   141     //From TMSDTMFTonePlayerObserver
       
   142     void DTMFInitCompleted(gint status);
       
   143     void DTMFToneFinished(gint status);
       
   144 
       
   145 private:
   133 private:
   146     TMSCallIPAdpt();
   134     TMSCallIPAdpt();
   147     void ConstructL();
   135     void ConstructL();
   148 
   136 
   149     gint OpenDownlink(const RMessage2& message, const gint retrytime);
   137     gint OpenDownlink(const RMessage2& message, const gint retrytime);
   150     gint OpenUplink(const RMessage2& message, const gint retrytime);
   138     gint OpenUplink(const RMessage2& message, const gint retrytime);
   151 
   139 
   152     gint InitDTMF(TMSStreamType strmtype);
       
   153     void GetSupportedBitRatesL(CBufFlat*& brbuffer);
   140     void GetSupportedBitRatesL(CBufFlat*& brbuffer);
   154     void NotifyClient(const gint strmId, const gint command,
   141     void NotifyClient(const gint strmId, const gint command,
   155             const gint status = KErrNone, const gint64 int64 = TInt64(0));
   142             const gint status = KErrNone, const gint64 int64 = TInt64(0));
   156 
   143 
   157 private:
   144 private:
   158     gint iNextStreamId;
   145     gint iNextStreamId;
   159     TMSIPUplink* iIPUplink;
   146     TMSIPUplink* iIPUplink;
   160     TMSIPDownlink* iIPDownlink;
   147     TMSIPDownlink* iIPDownlink;
   161     TMSAudioDtmfTonePlayer* iDTMFDnlinkPlayer;
   148 
   162     TMSDtmfNotifier* iDTMFNotifier;
       
   163     TMSAudioDtmfTonePlayer* iDTMFUplinkPlayer;
       
   164     // Message queues for communication and data transfer back to the client
   149     // Message queues for communication and data transfer back to the client
   165     RMsgQueue<TmsMsgBuf> iMsgQueueUp;
   150     RMsgQueue<TmsMsgBuf> iMsgQueueUp;
   166     RMsgQueue<TmsMsgBuf> iMsgQueueDn;
   151     RMsgQueue<TmsMsgBuf> iMsgQueueDn;
   167     TmsMsgBuf iMsgBuffer;
   152     TmsMsgBuf iMsgBuffer;
   168 
   153 
   169     gboolean iUplinkInitialized;
       
   170     gint iUplinkStreamId;
   154     gint iUplinkStreamId;
   171     gboolean iDnlinkInitialized;
       
   172     gint iDnlinkStreamId;
   155     gint iDnlinkStreamId;
   173 
   156 
   174     TMMFPrioritySettings iPriority;
   157     TMMFPrioritySettings iPriority;
   175     guint32 iUpFourCC;
   158     guint32 iUpFourCC;
   176     guint32 iDnFourCC;
   159     guint32 iDnFourCC;