mmserv/tms/tmsfactory/src/tmsfactoryimpl.cpp
changeset 12 5a06f39ad45b
parent 0 71ca22bcf22a
child 14 80975da52420
equal deleted inserted replaced
0:71ca22bcf22a 12:5a06f39ad45b
    13  *
    13  *
    14  * Description: Telephony Multimedia Service
    14  * Description: Telephony Multimedia Service
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 #include <tms.h>
       
    19 #include <tmscall.h>
       
    20 #include <tmsformat.h>
       
    21 #include <tmseffect.h>
       
    22 #include <tmsbuffer.h>
       
    23 #include <tmssource.h>
       
    24 #include <tmssink.h>
       
    25 #include "tmsutility.h"
       
    26 #include "tmsproxy.h"
       
    27 #include "tmscallimpl.h"
    18 #include "tmscallimpl.h"
    28 #include "tmsformatimpl.h"
    19 #include "tmsformatimpl.h"
    29 #include "tmseffectimpl.h"
    20 #include "tmseffectimpl.h"
    30 #include "tmsbufferimpl.h"
    21 #include "tmsbufferimpl.h"
    31 #include "tmssourceimpl.h"
    22 #include "tmssourceimpl.h"
    32 #include "tmssinkimpl.h"
    23 #include "tmssinkimpl.h"
    33 #include "tmsglobalroutingimpl.h"
    24 #include "tmsglobalroutingimpl.h"
       
    25 #include "tmsringtoneimpl.h"
       
    26 #include "tmsdtmfimpl.h"
       
    27 #include "tmsinbandtoneimpl.h"
       
    28 //#include "tmsrtpsessionimpl.h"
       
    29 
       
    30 #include "tmsutility.h"
       
    31 #include "tmsproxy.h"
    34 #include "tmsfactoryimpl.h"
    32 #include "tmsfactoryimpl.h"
    35 
    33 
    36 using namespace TMS;
    34 using namespace TMS;
    37 
    35 
    38 TMSFactoryImpl::TMSFactoryImpl()
    36 TMSFactoryImpl::TMSFactoryImpl()
    55     }
    53     }
    56 
    54 
    57 gint TMSFactoryImpl::DeleteCall(TMSCall*& tmscall)
    55 gint TMSFactoryImpl::DeleteCall(TMSCall*& tmscall)
    58     {
    56     {
    59     gint ret(TMS_RESULT_SUCCESS);
    57     gint ret(TMS_RESULT_SUCCESS);
    60     // TODO put the delete in the impl
    58     ret = TMSCallImpl::Delete(tmscall);
    61     delete tmscall; //iTMSCall
       
    62     tmscall = NULL;
       
    63     return ret;
    59     return ret;
    64     }
    60     }
    65 
    61 
    66 gint TMSFactoryImpl::IsCallTypeSupported(TMSCallType ctype, gboolean& flag)
    62 gint TMSFactoryImpl::IsCallTypeSupported(TMSCallType ctype, gboolean& flag)
    67     {
    63     {
   198     gint ret(TMS_RESULT_SUCCESS);
   194     gint ret(TMS_RESULT_SUCCESS);
   199     ret = TMSGlobalRoutingImpl::Delete(globrouting);
   195     ret = TMSGlobalRoutingImpl::Delete(globrouting);
   200     return ret;
   196     return ret;
   201     }
   197     }
   202 
   198 
       
   199 gint TMSFactoryImpl::CreateDTMF(TMSStreamType streamtype, TMSDTMF*& dtmf)
       
   200     {
       
   201     gint ret(TMS_RESULT_SUCCESS);
       
   202     ret = TMSDTMFImpl::Create(streamtype, dtmf);
       
   203     return ret;
       
   204     }
       
   205 
       
   206 gint TMSFactoryImpl::DeleteDTMF(TMSDTMF*& dtmf)
       
   207     {
       
   208     gint ret(TMS_RESULT_SUCCESS);
       
   209     ret = TMSDTMFImpl::Delete(dtmf);
       
   210     return ret;
       
   211     }
       
   212 
       
   213 gint TMSFactoryImpl::CreateRingTonePlayer(TMSRingTone*& rt)
       
   214     {
       
   215     gint ret(TMS_RESULT_SUCCESS);
       
   216     ret = TMSRingToneImpl::Create(rt);
       
   217     return ret;
       
   218     }
       
   219 
       
   220 gint TMSFactoryImpl::CreateRingTonePlayer(TMSRingTone*& rt, RWindow& window,
       
   221         gint scrid)
       
   222     {
       
   223     gint ret(TMS_RESULT_SUCCESS);
       
   224     ret = TMSRingToneImpl::Create(rt, window, scrid);
       
   225     return ret;
       
   226     }
       
   227 
       
   228 gint TMSFactoryImpl::DeleteRingTonePlayer(TMSRingTone*& rt)
       
   229     {
       
   230     gint ret(TMS_RESULT_SUCCESS);
       
   231     ret = TMSRingToneImpl::Delete(rt);
       
   232     return ret;
       
   233     }
       
   234 
       
   235 gint TMSFactoryImpl::CreateInbandTonePlayer(TMSInbandTone*& inbandtone)
       
   236     {
       
   237     gint ret(TMS_RESULT_SUCCESS);
       
   238     ret = TMSInbandToneImpl::Create(inbandtone);
       
   239     return ret;
       
   240     }
       
   241 
       
   242 gint TMSFactoryImpl::DeleteInbandTonePlayer(TMSInbandTone*& inbandtone)
       
   243     {
       
   244     gint ret(TMS_RESULT_SUCCESS);
       
   245     ret = TMSInbandToneImpl::Delete(inbandtone);
       
   246     return ret;
       
   247     }
       
   248 
   203 gint TMSFactoryImpl::QueryDevice(const TMSStreamType strmtype)
   249 gint TMSFactoryImpl::QueryDevice(const TMSStreamType strmtype)
   204     {
   250     {
   205     gint ret(TMS_RESULT_SUCCESS);
   251     gint ret(TMS_RESULT_SUCCESS);
   206     TMSProxy* session = new TMSProxy;
   252     TMSProxy* session = new TMSProxy;
   207     if (session)
   253     if (session)