mmserv/tms/tmscallserver/src/tmscallcsadpt.cpp
changeset 36 73253677b50a
parent 33 5e8b14bae8c3
child 53 eabc8c503852
equal deleted inserted replaced
33:5e8b14bae8c3 36:73253677b50a
    24 #include "tmscallcsadpt.h"
    24 #include "tmscallcsadpt.h"
    25 #include "tmsutility.h"
    25 #include "tmsutility.h"
    26 #include "tmsshared.h"
    26 #include "tmsshared.h"
    27 #include "tmsclientserver.h"
    27 #include "tmsclientserver.h"
    28 #include "tmstarsettings.h"
    28 #include "tmstarsettings.h"
       
    29 #include "tmssyncvol.h"
    29 
    30 
    30 using namespace TMS;
    31 using namespace TMS;
    31 
    32 
    32 // -----------------------------------------------------------------------------
    33 // -----------------------------------------------------------------------------
    33 // TMSCallCSAdpt::NewL
    34 // TMSCallCSAdpt::NewL
    53     TRACE_PRN_FN_ENT;
    54     TRACE_PRN_FN_ENT;
    54     iCSDownlink = NULL;
    55     iCSDownlink = NULL;
    55     iCSUplink = NULL;
    56     iCSUplink = NULL;
    56     iRouting = NULL;
    57     iRouting = NULL;
    57     iTarSettings = NULL;
    58     iTarSettings = NULL;
       
    59     iResetVolNotifier = NULL;
    58     TRACE_PRN_FN_EXT;
    60     TRACE_PRN_FN_EXT;
    59     }
    61     }
    60 
    62 
    61 // -----------------------------------------------------------------------------
    63 // -----------------------------------------------------------------------------
    62 // TMSCallCSAdpt::TMSCallCSAdpt
    64 // TMSCallCSAdpt::TMSCallCSAdpt
    78 
    80 
    79     delete iRouting;
    81     delete iRouting;
    80     delete iTarSettings;
    82     delete iTarSettings;
    81     delete iCSUplink;
    83     delete iCSUplink;
    82     delete iCSDownlink;
    84     delete iCSDownlink;
       
    85     delete iResetVolNotifier;
    83 
    86 
    84     if (iMsgQueueUp.Handle() > 0)
    87     if (iMsgQueueUp.Handle() > 0)
    85         {
    88         {
    86         iMsgQueueUp.Close();
    89         iMsgQueueUp.Close();
    87         }
    90         }
   280                 }
   283                 }
   281             break;
   284             break;
   282             }
   285             }
   283         case TMS_STREAM_DOWNLINK:
   286         case TMS_STREAM_DOWNLINK:
   284             {
   287             {
       
   288             if(!iResetVolNotifier)
       
   289                 {
       
   290                 TRAP(status, iResetVolNotifier = TMSSyncVol::NewL());
       
   291                 }
       
   292             if(iResetVolNotifier)
       
   293                 {
       
   294                 iResetVolNotifier->SetSyncVol();
       
   295                 }
   285             if (iCSDownlink && strmId == iDnlinkStreamId &&
   296             if (iCSDownlink && strmId == iDnlinkStreamId &&
   286                     iDnlState == EInitialized)
   297                     iDnlState == EInitialized)
   287                 {
   298                 {
   288                 iCSDownlink->Activate(retrytime);
   299                 iCSDownlink->Activate(retrytime);
   289                 status = TMS_RESULT_SUCCESS;
   300                 status = TMS_RESULT_SUCCESS;
   327 
   338 
   328     switch (strmType)
   339     switch (strmType)
   329         {
   340         {
   330         case TMS_STREAM_UPLINK:
   341         case TMS_STREAM_UPLINK:
   331             {
   342             {
   332             if (iCSUplink && strmId == iUplinkStreamId &&
   343             if (iCSUplink && strmId == iUplinkStreamId)
   333                     iUplState == EActivated)
       
   334                 {
   344                 {
   335                 iCSUplink->Deactivate();
   345                 iCSUplink->Deactivate();
   336                 iUplState = EInitialized;
   346                 iUplState = EInitialized;
   337                 status = TMS_RESULT_SUCCESS;
   347                 status = TMS_RESULT_SUCCESS;
   338                 NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
   348                 NotifyClient(iUplinkStreamId, ECmdUplinkInitComplete, status);
   339                 }
   349                 }
   340             break;
   350             break;
   341             }
   351             }
   342         case TMS_STREAM_DOWNLINK:
   352         case TMS_STREAM_DOWNLINK:
   343             {
   353             {
   344             if (iCSDownlink && strmId == iDnlinkStreamId &&
   354             if (iCSDownlink && strmId == iDnlinkStreamId)
   345                     iDnlState == EActivated)
       
   346                 {
   355                 {
   347                 iCSDownlink->Deactivate();
   356                 iCSDownlink->Deactivate();
   348                 iDnlState = EInitialized;
   357                 iDnlState = EInitialized;
   349                 status = TMS_RESULT_SUCCESS;
   358                 status = TMS_RESULT_SUCCESS;
   350                 NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
   359                 NotifyClient(iDnlinkStreamId, ECmdDownlinkInitComplete, status);
   374 
   383 
   375     switch (strmType)
   384     switch (strmType)
   376         {
   385         {
   377         case TMS_STREAM_UPLINK:
   386         case TMS_STREAM_UPLINK:
   378             {
   387             {
   379             if (iCSUplink && strmId == iUplinkStreamId && iUplState != EIdle)
   388             if (iCSUplink && strmId == iUplinkStreamId)
   380                 {
   389                 {
   381                 iCSUplink->Deactivate();
   390                 iCSUplink->Deactivate();
   382                 iUplState = EIdle;
   391                 iUplState = EIdle;
   383                 status = TMS_RESULT_SUCCESS;
   392                 status = TMS_RESULT_SUCCESS;
   384                 NotifyClient(iUplinkStreamId, ECmdUplinkDeInitComplete, status);
   393                 NotifyClient(iUplinkStreamId, ECmdUplinkDeInitComplete, status);
   385                 }
   394                 }
   386             break;
   395             break;
   387             }
   396             }
   388         case TMS_STREAM_DOWNLINK:
   397         case TMS_STREAM_DOWNLINK:
   389             {
   398             {
   390             if (iCSDownlink && strmId == iDnlinkStreamId && iDnlState != EIdle)
   399             if (iCSDownlink && strmId == iDnlinkStreamId)
   391                 {
   400                 {
   392                 iCSDownlink->Deactivate();
   401                 iCSDownlink->Deactivate();
   393                 iDnlState = EIdle;
   402                 iDnlState = EIdle;
   394                 status = TMS_RESULT_SUCCESS;
   403                 status = TMS_RESULT_SUCCESS;
   395                 NotifyClient(iDnlinkStreamId, ECmdDownlinkDeInitComplete,
   404                 NotifyClient(iDnlinkStreamId, ECmdDownlinkDeInitComplete,