mmserv/tms/tmsimpl/src/tmsqueuehandler.cpp
branchRCL_3
changeset 3 4f62049db6ac
parent 0 71ca22bcf22a
child 7 3d8c721bf319
equal deleted inserted replaced
0:71ca22bcf22a 3:4f62049db6ac
    24 #include "tmsglobalcontext.h"
    24 #include "tmsglobalcontext.h"
    25 #include "tmscallproxy.h"
    25 #include "tmscallproxy.h"
    26 
    26 
    27 using namespace TMS;
    27 using namespace TMS;
    28 
    28 
    29 // ----------------------------------------------------------------------------
    29 // -----------------------------------------------------------------------------
    30 // CQueueHandler::NewL
    30 // TMSQueueHandler::NewL
    31 // Symbian constructor
    31 // Symbian constructor
    32 // ----------------------------------------------------------------------------
    32 // -----------------------------------------------------------------------------
    33 //
    33 //
    34 CQueueHandler* CQueueHandler::NewL(RMsgQueue<TmsMsgBuf>* aMsgQueue,
    34 TMSQueueHandler* TMSQueueHandler::NewL(RMsgQueue<TmsMsgBuf>* aMsgQueue,
    35         TMSGlobalContext* glblCtx)
    35         TMSGlobalContext* glblCtx)
    36     {
    36     {
    37     CQueueHandler* self = new (ELeave) CQueueHandler(aMsgQueue, glblCtx);
    37     TMSQueueHandler* self = new (ELeave) TMSQueueHandler(aMsgQueue, glblCtx);
    38     CleanupStack::PushL(self);
    38     CleanupStack::PushL(self);
    39     self->ConstructL();
    39     self->ConstructL();
    40     CleanupStack::Pop(self);
    40     CleanupStack::Pop(self);
    41     return self;
    41     return self;
    42     }
    42     }
    43 
    43 
    44 // ----------------------------------------------------------------------------
    44 // -----------------------------------------------------------------------------
    45 // CQueueHandler::ConstructL
    45 // TMSQueueHandler::ConstructL
    46 // Second phase constructor.
    46 // Second phase constructor.
    47 // ----------------------------------------------------------------------------
    47 // -----------------------------------------------------------------------------
    48 //
    48 //
    49 void CQueueHandler::ConstructL()
    49 void TMSQueueHandler::ConstructL()
    50     {
    50     {
    51     }
    51     }
    52 
    52 
    53 // ----------------------------------------------------------------------------
    53 // -----------------------------------------------------------------------------
    54 // CQueueHandler::~CQueueHandler
    54 // TMSQueueHandler::~TMSQueueHandler
    55 // Destructor.
    55 // Destructor.
    56 // ----------------------------------------------------------------------------
    56 // -----------------------------------------------------------------------------
    57 //
    57 //
    58 CQueueHandler::~CQueueHandler()
    58 TMSQueueHandler::~TMSQueueHandler()
    59     {
    59     {
    60     Cancel();
    60     Cancel();
    61     iObserversList.Reset();
    61     iObserversList.Reset();
    62     iClientList.Reset();
    62     iClientList.Reset();
    63     iChunk.Close();
    63     iChunk.Close();
    64     delete iBuffer;
    64     delete iBuffer;
    65     }
    65     }
    66 
    66 
    67 // ----------------------------------------------------------------------------
    67 // -----------------------------------------------------------------------------
    68 // CQueueHandler::CQueueHandler
    68 // TMSQueueHandler::TMSQueueHandler
    69 // Constructor.
    69 // Constructor.
    70 // ----------------------------------------------------------------------------
    70 // -----------------------------------------------------------------------------
    71 //
    71 //
    72 CQueueHandler::CQueueHandler(RMsgQueue<TmsMsgBuf>* aMsgQueue,
    72 TMSQueueHandler::TMSQueueHandler(RMsgQueue<TmsMsgBuf>* aMsgQueue,
    73         TMSGlobalContext* glblCtx) :
    73         TMSGlobalContext* glblCtx) :
    74     CActive(CActive::EPriorityStandard),
    74     CActive(CActive::EPriorityStandard),
    75     iMsgQueue(aMsgQueue),
    75     iMsgQueue(aMsgQueue),
    76     iChunkDataPtr(0, 0, 0)
    76     iChunkDataPtr(0, 0, 0)
    77     {
    77     {
    78     CActiveScheduler::Add(this);
    78     CActiveScheduler::Add(this);
    79     iTMSGlobalContext = glblCtx;
    79     iTMSGlobalContext = glblCtx;
    80     }
    80     }
    81 
    81 
    82 // ----------------------------------------------------------------------------
    82 // -----------------------------------------------------------------------------
    83 // CQueueHandler::Start
    83 // TMSQueueHandler::Start
    84 // Start listening for events on queue 0.
    84 // Start listening for events on queue 0.
    85 // ----------------------------------------------------------------------------
    85 // -----------------------------------------------------------------------------
    86 //
    86 //
    87 void CQueueHandler::Start()
    87 void TMSQueueHandler::Start()
    88     {
    88     {
    89     if (!IsActive() && iMsgQueue)
    89     if (!IsActive() && iMsgQueue)
    90         {
    90         {
       
    91         iStatus = KRequestPending;
    91         iMsgQueue->NotifyDataAvailable(iStatus);
    92         iMsgQueue->NotifyDataAvailable(iStatus);
    92         SetActive();
    93         SetActive();
    93         }
    94         }
    94     }
    95     }
    95 
    96 
    96 TInt CQueueHandler::AddObserver(MQueueHandlerObserver& aObserver,
    97 // -----------------------------------------------------------------------------
    97         TInt aClientId)
    98 // TMSQueueHandler::AddObserver
       
    99 //
       
   100 // -----------------------------------------------------------------------------
       
   101 //
       
   102 gint TMSQueueHandler::AddObserver(MQueueHandlerObserver& aObserver,
       
   103         gint aClientId)
    98     {
   104     {
    99     // Add to list if observer is not already added
   105     // Add to list if observer is not already added
   100     TInt status = iObserversList.Find(&aObserver);
   106     gint status = iObserversList.Find(&aObserver);
   101     if (status == KErrNotFound)
   107     if (status == KErrNotFound)
   102         {
   108         {
   103         status = iObserversList.Append(&aObserver);
   109         status = iObserversList.Append(&aObserver);
   104         status = iClientList.Append(aClientId);
   110         status = iClientList.Append(aClientId);
   105         }
   111         }
   106     else
   112     else
   107         {
   113         {
   108         status = KErrAlreadyExists;
   114         status = TMS_RESULT_ALREADY_EXIST;
   109         }
   115         }
   110     return status;
   116     return status;
   111     }
   117     }
   112 
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // TMSQueueHandler::RemoveObserver
   113 // Marks observer as inactive in the list
   121 // Marks observer as inactive in the list
   114 TInt CQueueHandler::RemoveObserver(MQueueHandlerObserver& aObserver)
   122 // -----------------------------------------------------------------------------
   115     {
   123 //
   116     TInt status(KErrNone);
   124 gint TMSQueueHandler::RemoveObserver(MQueueHandlerObserver& aObserver)
   117     TInt index = iObserversList.Find(&aObserver);
   125     {
       
   126     gint status(TMS_RESULT_SUCCESS);
       
   127     gint index = iObserversList.Find(&aObserver);
   118     // If found status has index to observer in the array
   128     // If found status has index to observer in the array
   119     // else it would contain KErrNotFound
   129     // else it would contain KErrNotFound
   120     if (index >= 0)
   130     if (index >= 0)
   121         {
   131         {
   122         iObserversList.Remove(index);
   132         iObserversList.Remove(index);
   123         iClientList.Remove(index);
   133         iClientList.Remove(index);
   124         status = KErrNone;
   134         status = TMS_RESULT_SUCCESS;
   125         }
   135         }
   126     else
   136     else
   127         {
   137         {
   128         status = KErrNotFound;
   138         status = TMS_RESULT_DOES_NOT_EXIST;
   129         }
   139         }
   130     return status;
   140     return status;
   131     }
   141     }
   132 
   142 
   133 // ----------------------------------------------------------------------------
   143 // -----------------------------------------------------------------------------
   134 // CQueueHandler::DoCancel
   144 // TMSQueueHandler::DoCancel
   135 // Cancel outstanding request
   145 // Cancel outstanding request
   136 // ----------------------------------------------------------------------------
   146 // -----------------------------------------------------------------------------
   137 //
   147 //
   138 void CQueueHandler::DoCancel()
   148 void TMSQueueHandler::DoCancel()
   139     {
   149     {
   140     if (iMsgQueue)
   150     if (iMsgQueue)
   141         {
   151         {
   142         iMsgQueue->CancelDataAvailable();
   152         iMsgQueue->CancelDataAvailable();
   143         }
   153         }
   144     }
   154     }
   145 
   155 
   146 // ----------------------------------------------------------------------------
   156 // -----------------------------------------------------------------------------
   147 // CQueueHandler::RunL
   157 // TMSQueueHandler::RunL
   148 // Process requests.
   158 // Process requests.
   149 // ----------------------------------------------------------------------------
   159 // -----------------------------------------------------------------------------
   150 //
   160 //
   151 void CQueueHandler::RunL()
   161 void TMSQueueHandler::RunL()
   152     {
   162     {
   153     TmsMsgBuf msgBuf;
   163     TmsMsgBuf msgBuf;
   154     TInt err = KErrNone;
   164     gint err = TMS_RESULT_SUCCESS;
   155 
   165 
   156     if (iMsgQueue)
   166     if (iMsgQueue)
   157         {
   167         {
   158         iMsgQueue->Receive(msgBuf);
   168         iMsgQueue->Receive(msgBuf);
   159         }
   169         }
   160     else
   170     else
   161         {
   171         {
   162         err = KErrGeneral;
   172         err = TMS_RESULT_INVALID_STATE;
   163         }
   173         }
   164 
   174 
   165     // Start monitoring for more events before calling the observer as client
   175     // Start monitoring for more events before calling the observer in case
   166     // may decide to destroy us before this RunL completes executing.
   176     // client decides to destroy us before this RunL completes executing.
   167     Start();
   177     Start();
   168 
   178 
   169     if (err == KErrNone)
   179     if (err == TMS_RESULT_SUCCESS)
   170         {
   180         {
   171         switch (msgBuf.iRequest)
   181         switch (msgBuf.iRequest)
   172             {
   182             {
   173             case ECmdDownlinkInitComplete:
   183             case ECmdDownlinkInitComplete:
   174             case ECmdUplinkInitComplete:
   184             case ECmdUplinkInitComplete:
   177             case ECmdDownlinkStarted:
   187             case ECmdDownlinkStarted:
   178             case ECmdUplinkStarted:
   188             case ECmdUplinkStarted:
   179             case ECmdDownlinkPaused:
   189             case ECmdDownlinkPaused:
   180             case ECmdUplinkPaused:
   190             case ECmdUplinkPaused:
   181                 {
   191                 {
   182                 TInt index = FindStreamInList();
   192                 gint index = FindStreamInList();
   183                 if (index != KErrNotFound)
   193                 if (index != KErrNotFound)
   184                     {
   194                     {
   185                     TMSStreamState streamstate = ConvertToStreamState(
   195                     TMSStreamState streamstate = ConvertToStreamState(
   186                             msgBuf.iRequest);
   196                             msgBuf.iRequest);
   187                     iObserversList[index]->QueueEvent(streamstate,
   197                     iObserversList[index]->QueueEvent(streamstate,
   188                             msgBuf.iStatus, NULL);
   198                             msgBuf.iStatus, NULL);
   189                     }
   199                     }
   190                 else
   200                 else
   191                     {
   201                     {
   192                     // This should never happen
   202                     // This should never happen
   193                     err = KErrNotFound;
   203                     err = TMS_RESULT_DOES_NOT_EXIST;
   194                     }
   204                     }
   195                 break;
   205                 break;
   196                 }
   206                 }
   197             case ECmdFillBuffer:
   207             case ECmdFillBuffer:
   198                 {
   208                 {
   224                 {
   234                 {
   225                 break;
   235                 break;
   226                 }
   236                 }
   227             case ECmdSetGain:
   237             case ECmdSetGain:
   228                 {
   238                 {
   229                 TInt index = FindGainEffectInList();
   239                 gint index = FindGainEffectInList();
   230                 if (index != KErrNotFound)
   240                 if (index != KErrNotFound)
   231                     {
   241                     {
   232                     iObserversList[index]->QueueEvent(TMS_EVENT_EFFECT_GAIN_CHANGED,
   242                     iObserversList[index]->QueueEvent(
   233                             msgBuf.iStatus, NULL);
   243                             TMS_EVENT_EFFECT_GAIN_CHANGED, msgBuf.iStatus,
       
   244                             NULL);
   234                     }
   245                     }
   235                 }
   246                 }
   236                 break;
   247                 break;
   237             case ECmdSetVolume:
   248             case ECmdSetVolume:
   238                 {
   249                 {
   239                 TInt index = FindVolEffectInList();
   250                 gint index = FindVolEffectInList();
   240                 if (index != KErrNotFound)
   251                 if (index != KErrNotFound)
   241                     {
   252                     {
   242                     iObserversList[index]->QueueEvent(TMS_EVENT_EFFECT_VOL_CHANGED,
   253                     iObserversList[index]->QueueEvent(
   243                             msgBuf.iStatus, NULL);
   254                             TMS_EVENT_EFFECT_VOL_CHANGED, msgBuf.iStatus, NULL);
   244                     }
   255                     }
   245                 }
   256                 }
   246                 break;
   257                 break;
   247             default:
   258             default:
   248                 break;
   259                 break;
   249             }
   260             }
   250         }
   261         }
   251     }
   262     }
   252 
   263 
   253 // ----------------------------------------------------------------------------
   264 // -----------------------------------------------------------------------------
   254 // CQueueHandler::DoFillBuffer
   265 // TMSQueueHandler::DoFillBuffer
   255 //
   266 //
   256 // ----------------------------------------------------------------------------
   267 // -----------------------------------------------------------------------------
   257 //
   268 //
   258 void CQueueHandler::DoFillBuffer(TInt aBufLen, TInt aStatus,
   269 void TMSQueueHandler::DoFillBuffer(gint aBufLen, gint aStatus,
   259         TBool aOpenChunk, TUint32 key)
   270         gboolean aOpenChunk, guint32 key)
   260     {
   271     {
   261     TInt err = KErrNone;
   272     gint err = TMS_RESULT_SUCCESS;
   262 
   273 
   263     // See if chunk needs to be opened
   274     // See if chunk needs to be opened
   264     if (aOpenChunk)
   275     if (aOpenChunk)
   265         {
   276         {
   266         if (iChunk.Handle())
   277         if (iChunk.Handle())
   269             }
   280             }
   270         delete iBuffer;
   281         delete iBuffer;
   271         iBuffer = NULL;
   282         iBuffer = NULL;
   272 
   283 
   273         // Get handle to chunk from proxy
   284         // Get handle to chunk from proxy
   274         TInt hndl(0);
   285         gint hndl(0);
   275         err = KErrNotReady;
   286         err = TMS_RESULT_NULL_ARGUMENT;
   276         if (iTMSGlobalContext->CallProxy)
   287         if (iTMSGlobalContext->CallProxy)
   277             {
   288             {
   278             hndl = (iTMSGlobalContext->CallProxy)->GetDataXferChunkHandle(
   289             hndl = (iTMSGlobalContext->CallProxy)->GetDataXferChunkHandle(
   279                     iTMSGlobalContext->CallType,
   290                     iTMSGlobalContext->CallType,
   280                     iTMSGlobalContext->StreamType,
   291                     iTMSGlobalContext->StreamType,
   282                     key);
   293                     key);
   283             err = iChunk.SetReturnedHandle(hndl);
   294             err = iChunk.SetReturnedHandle(hndl);
   284             }
   295             }
   285         }
   296         }
   286 
   297 
   287     if (err == KErrNone)
   298     if (err == TMS_RESULT_SUCCESS)
   288         {
   299         {
   289         iChunkDataPtr.Set(iChunk.Base(), 0, aBufLen);
   300         iChunkDataPtr.Set(iChunk.Base(), 0, aBufLen);
   290         if (!iBuffer)
   301         if (!iBuffer)
   291             {
   302             {
   292             TMSMemBuffer::Create((guint) aBufLen,
   303             TMSMemBuffer::Create((guint) aBufLen,
   293                     const_cast<guint8*> (iChunkDataPtr.Ptr()), iBuffer);
   304                     const_cast<guint8*> (iChunkDataPtr.Ptr()), iBuffer);
   294             }
   305             }
   295         iBuffer->SetDataSize(aBufLen);
   306         iBuffer->SetDataSize(aBufLen);
   296 
   307 
   297         TInt index = iClientList.Find(TMS_SOURCE_CLIENT);
   308         gint index = iClientList.Find(TMS_SOURCE_CLIENT);
   298         if (index != KErrNotFound)
   309         if (index != KErrNotFound)
   299             {
   310             {
   300             iObserversList[index]->QueueEvent(
   311             iObserversList[index]->QueueEvent(
   301                     TMS_EVENT_SOURCE_FILL_BUFFER, aStatus, iBuffer);
   312                     TMS_EVENT_SOURCE_FILL_BUFFER, aStatus, iBuffer);
   302             }
   313             }
   303         else
   314         else
   304             {
   315             {
   305             err = KErrNotFound;
   316             err = TMS_RESULT_DOES_NOT_EXIST;
   306             }
   317             }
   307         }
   318         }
   308     else
   319     else
   309         {
   320         {
   310         // TODO handle error here
   321         // TODO handle error here
   311         }
   322         }
   312     }
   323     }
   313 
   324 
   314 // ----------------------------------------------------------------------------
   325 // -----------------------------------------------------------------------------
   315 // CQueueHandler::DoEmptyBuffer
   326 // TMSQueueHandler::DoEmptyBuffer
   316 //
   327 //
   317 // ----------------------------------------------------------------------------
   328 // -----------------------------------------------------------------------------
   318 //
   329 //
   319 void CQueueHandler::DoEmptyBuffer(TInt aBufLen, TInt aStatus,
   330 void TMSQueueHandler::DoEmptyBuffer(gint aBufLen, gint aStatus,
   320         TBool aOpenChunk, TUint32 key)
   331         gboolean aOpenChunk, guint32 key)
   321     {
   332     {
   322     TInt err(KErrNone);
   333     gint err(TMS_RESULT_SUCCESS);
   323 
   334 
   324     // See if chunk needs to be opened
   335     // See if chunk needs to be opened
   325     if (aOpenChunk)
   336     if (aOpenChunk)
   326         {
   337         {
   327         if (iChunk.Handle())
   338         if (iChunk.Handle())
   328             {
   339             {
   329             iChunk.Close();
   340             iChunk.Close();
   330             }
   341             }
   331 
   342 
   332         // Get handle to chunk from proxy
   343         // Get handle to chunk from proxy
   333         TInt hndl(0);
   344         gint hndl(0);
   334         err = KErrNotReady;
   345         err = TMS_RESULT_NULL_ARGUMENT;
   335         if (iTMSGlobalContext->CallProxy)
   346         if (iTMSGlobalContext->CallProxy)
   336             {
   347             {
   337             hndl = (iTMSGlobalContext->CallProxy)->GetDataXferChunkHandle(
   348             hndl = (iTMSGlobalContext->CallProxy)->GetDataXferChunkHandle(
   338                     iTMSGlobalContext->CallType,
   349                     iTMSGlobalContext->CallType,
   339                     iTMSGlobalContext->StreamType,
   350                     iTMSGlobalContext->StreamType,
   344         // TODO handle error here
   355         // TODO handle error here
   345         delete iBuffer;
   356         delete iBuffer;
   346         iBuffer = NULL;
   357         iBuffer = NULL;
   347         }
   358         }
   348 
   359 
   349     if (err == KErrNone)
   360     if (err == TMS_RESULT_SUCCESS)
   350         {
   361         {
   351         iChunkDataPtr.Set(iChunk.Base(), aBufLen, aBufLen);
   362         iChunkDataPtr.Set(iChunk.Base(), aBufLen, aBufLen);
   352         if (!iBuffer)
   363         if (!iBuffer)
   353             {
   364             {
   354             TMSMemBuffer::Create((guint) aBufLen,
   365             TMSMemBuffer::Create((guint) aBufLen,
   355                     const_cast<guint8*> (iChunkDataPtr.Ptr()), iBuffer);
   366                     const_cast<guint8*> (iChunkDataPtr.Ptr()), iBuffer);
   356             }
   367             }
   357         iBuffer->SetDataSize(aBufLen);
   368         iBuffer->SetDataSize(aBufLen);
   358         TInt index = iClientList.Find(TMS_SINK_CLIENT);
   369         gint index = iClientList.Find(TMS_SINK_CLIENT);
   359         if (index != KErrNotFound)
   370         if (index != KErrNotFound)
   360             {
   371             {
   361             iObserversList[index]->QueueEvent(
   372             iObserversList[index]->QueueEvent(
   362                     TMS_EVENT_SINK_PROCESS_BUFFER, aStatus, iBuffer);
   373                     TMS_EVENT_SINK_PROCESS_BUFFER, aStatus, iBuffer);
   363             }
   374             }
   364         else
   375         else
   365             {
   376             {
   366             err = KErrNotFound;
   377             err = TMS_RESULT_DOES_NOT_EXIST;
   367             }
   378             }
   368         }
   379         }
   369     else
   380     else
   370         {
   381         {
   371         //iObserver->Event(MVoIPUplinkObserver::KUplinkError, aStatus);
   382         //iObserver->Event(MVoIPUplinkObserver::KUplinkError, aStatus);
   372         }
   383         }
   373     }
   384     }
   374 
   385 
   375 // ----------------------------------------------------------------------------
   386 // -----------------------------------------------------------------------------
   376 // CQueueHandler::ConvertToStreamState
   387 // TMSQueueHandler::ConvertToStreamState
   377 //
   388 //
   378 // ----------------------------------------------------------------------------
   389 // -----------------------------------------------------------------------------
   379 //
   390 //
   380 TMSStreamState CQueueHandler::ConvertToStreamState(TInt request)
   391 TMSStreamState TMSQueueHandler::ConvertToStreamState(gint request)
   381     {
   392     {
   382     TMSStreamState state = TMS_STREAM_UNINITIALIZED;
   393     TMSStreamState state = TMS_STREAM_UNINITIALIZED;
   383     switch (request)
   394     switch (request)
   384         {
   395         {
   385         case ECmdDownlinkInitComplete:
   396         case ECmdDownlinkInitComplete:
   402             break;
   413             break;
   403         }
   414         }
   404     return state;
   415     return state;
   405     }
   416     }
   406 
   417 
   407 // ----------------------------------------------------------------------------
   418 // -----------------------------------------------------------------------------
   408 // CQueueHandler::RunError
   419 // TMSQueueHandler::RunError
   409 // Process requests.
   420 // Process requests.
   410 // ----------------------------------------------------------------------------
   421 // -----------------------------------------------------------------------------
   411 //
   422 //
   412 TInt CQueueHandler::RunError(TInt /*aError*/)
   423 TInt TMSQueueHandler::RunError(TInt /*aError*/)
   413     {
   424     {
   414     // Current implementation of RunL does not leave
   425     // Current implementation of RunL does not leave
   415     return 0;
   426     return TMS_RESULT_SUCCESS;
   416     }
   427     }
   417 
   428 
   418 // ----------------------------------------------------------------------------
   429 // -----------------------------------------------------------------------------
   419 // CQueueHandler::Status
   430 // TMSQueueHandler::Status
   420 // Return request status.
   431 // Return request status.
   421 // ----------------------------------------------------------------------------
   432 // -----------------------------------------------------------------------------
   422 //
   433 //
   423 TRequestStatus* CQueueHandler::Status()
   434 TRequestStatus* TMSQueueHandler::Status()
   424     {
   435     {
   425     return &iStatus;
   436     return &iStatus;
   426     }
   437     }
   427 
   438 
   428 // ----------------------------------------------------------------------------
   439 // -----------------------------------------------------------------------------
   429 // CQueueHandler::FindStreamInList
   440 // TMSQueueHandler::FindStreamInList
   430 // Return stream index.
   441 // Return stream index.
   431 // ----------------------------------------------------------------------------
   442 // -----------------------------------------------------------------------------
   432 //
   443 //
   433 TInt CQueueHandler::FindStreamInList()
   444 gint TMSQueueHandler::FindStreamInList()
   434     {
   445     {
   435     gint index(-1);
   446     gint index(-1);
   436     index = iClientList.Find(TMS_STREAM_UPLINK);
   447     index = iClientList.Find(TMS_STREAM_UPLINK);
   437     if (index == KErrNotFound)
   448     if (index == KErrNotFound)
   438         {
   449         {
   439         index = iClientList.Find(TMS_STREAM_DOWNLINK);
   450         index = iClientList.Find(TMS_STREAM_DOWNLINK);
   440         return index;
       
   441         }
   451         }
   442     return index;
   452     return index;
   443     }
   453     }
   444 
   454 
   445 // ----------------------------------------------------------------------------
   455 // -----------------------------------------------------------------------------
   446 // CQueueHandler::FindGainEffectInList
   456 // TMSQueueHandler::FindGainEffectInList
   447 // Return effect index.
   457 // Return effect index.
   448 // ----------------------------------------------------------------------------
   458 // -----------------------------------------------------------------------------
   449 //
   459 //
   450 TInt CQueueHandler::FindGainEffectInList()
   460 gint TMSQueueHandler::FindGainEffectInList()
   451     {
   461     {
   452     gint index(-1);
   462     gint index(-1);
   453     index = iClientList.Find(TMS_EFFECT_GAIN);
   463     index = iClientList.Find(TMS_EFFECT_GAIN);
   454     return index;
   464     return index;
   455     }
   465     }
   456 
   466 
   457 // ----------------------------------------------------------------------------
   467 // -----------------------------------------------------------------------------
   458 // CQueueHandler::FindVolEffectInList
   468 // TMSQueueHandler::FindVolEffectInList
   459 // Return effect index.
   469 // Return effect index.
   460 // ----------------------------------------------------------------------------
   470 // -----------------------------------------------------------------------------
   461 //
   471 //
   462 TInt CQueueHandler::FindVolEffectInList()
   472 gint TMSQueueHandler::FindVolEffectInList()
   463     {
   473     {
   464     gint index(-1);
   474     gint index(-1);
   465     index = iClientList.Find(TMS_EFFECT_VOLUME);
   475     index = iClientList.Find(TMS_EFFECT_VOLUME);
   466     return index;
   476     return index;
   467     }
   477     }