mmserv/tms/tmsimpl/src/tmsdtmfbodyimpl.cpp
changeset 36 73253677b50a
parent 33 5e8b14bae8c3
equal deleted inserted replaced
33:5e8b14bae8c3 36:73253677b50a
    81         {
    81         {
    82         ret = TMS_RESULT_INSUFFICIENT_MEMORY;
    82         ret = TMS_RESULT_INSUFFICIENT_MEMORY;
    83         }
    83         }
    84     else
    84     else
    85         {
    85         {
    86         if (iProxy->Connect() != TMS_RESULT_SUCCESS)
    86         if (iProxy->Connect() == TMS_RESULT_SUCCESS)
       
    87             {
       
    88             ret = iProxy->InitDTMFPlayer(iStreamType);
       
    89             }
       
    90         else
    87             {
    91             {
    88             delete iProxy;
    92             delete iProxy;
    89             iProxy = NULL;
    93             iProxy = NULL;
    90             ret = TMS_RESULT_FATAL_ERROR;
    94             ret = TMS_RESULT_FATAL_ERROR;
    91             }
    95             }
   103         iUserData = user_data;
   107         iUserData = user_data;
   104         if (iProxy)
   108         if (iProxy)
   105             {
   109             {
   106             ret = iProxy->SetMsgQueueNotifier(EMsgQueueDTMFType, iObserver,
   110             ret = iProxy->SetMsgQueueNotifier(EMsgQueueDTMFType, iObserver,
   107                     iParent, iClientId);
   111                     iParent, iClientId);
   108             if (ret == TMS_RESULT_SUCCESS)
       
   109                 {
       
   110                 ret = iProxy->StartDTMFNotifier();
       
   111                 ret |= iProxy->InitDTMFPlayer(iStreamType);
       
   112                 }
       
   113             }
   112             }
   114         else
   113         else
   115             {
   114             {
   116             ret = TMS_RESULT_DOES_NOT_EXIST;
   115             ret = TMS_RESULT_DOES_NOT_EXIST;
   117             }
   116             }
   128     gint ret(TMS_RESULT_SUCCESS);
   127     gint ret(TMS_RESULT_SUCCESS);
   129     if (iProxy && (&obsrvr == iObserver))
   128     if (iProxy && (&obsrvr == iObserver))
   130         {
   129         {
   131         ret = iProxy->RemoveMsgQueueNotifier(EMsgQueueDTMFType, iObserver);
   130         ret = iProxy->RemoveMsgQueueNotifier(EMsgQueueDTMFType, iObserver);
   132         iObserver = NULL;
   131         iObserver = NULL;
   133         iProxy->CancelDTMFNotifier();
       
   134         }
   132         }
   135     else
   133     else
   136         {
   134         {
   137         ret = TMS_RESULT_DOES_NOT_EXIST;
   135         ret = TMS_RESULT_DOES_NOT_EXIST;
   138         }
   136         }