Question on Multiple Opertion on a single CTelephony Session

Login to reply to this topic.
Tue, 2008-08-26 11:10
Joined: 2008-06-15
Forum posts: 48

Hello to you all ,

I Have a quesiton :

I have read the CCallHandler Example over the Internet and i wanted to know the following :
Is it possible to make in a single active object more than one asynch operation?
My intention is in the Code Snippet as comment :

void CCallHandler::RunL()
    {
    if( iStatus==KErrNone )
       {
        if( iLineStatus.iStatus == CTelephony::EStatusDialling ) 
                  {
                          CTelephony::TRemotePartyInfoV1 RemInfoUse;
                           CTelephony::TCallInfoV1                   CallInfoUse;
                           CTelephony::TCallSelectionV1   CallSelectionUse;
                                              
                           CallSelectionUse.iLine = CTelephony::EVoiceLine;
                           CallSelectionUse.iSelect = CTelephony::EInProgressCall;
                                              
                           CTelephony::TRemotePartyInfoV1Pckg         RemParty(RemInfoUse);
                           CTelephony::TCallInfoV1Pckg                 CallInfo(CallInfoUse);
                           CTelephony::TCallSelectionV1Pckg         CallSelection(CallSelectionUse);
                                                              
                           iTelephony->GetCallInfo(CallSelection,CallInfo,RemParty);
                                   
                           if(iLineStatus.iStatus == CTelephony::EStatusRinging)
                            {               
                                     CallerNumber.Copy(RemInfoUse.iRemoteNumber.iTelNumber);
                            }
                           else if(iLineStatus.iStatus == CTelephony::EStatusDialling)
                            {                       
                                     CallerNumber.Copy(CallInfoUse.iDialledParty.iTelNumber);
                            }
                     }
           else if( iLineStatus.iStatus == CTelephony::EStatusIdle )
                                    {

                                            //Call a Certain Number                  
                         }
           else if( iLineStatus.iStatus == CTelephony::EStatusConnected )
                           {
                                                 //Send a DTMF String    
                           }
                     iNotifier->NotifyOutgoingCall(iLineStatus.iStatus, CallerNumber);
                   
                     /* Request the next notification */
                     iTelephony->NotifyChange( iStatus,CTelephony::EVoiceLineStatusChange,iLineStatusPckg );
                     SetActive();
               }
      }

Regards ,

Yotam


Tue, 2008-08-26 13:36
Joined: 2003-12-05
Forum posts: 683
Re: Question on Multiple Opertion on a single...

One active object can only have one and only one outstanding asynchronous request going on at any time. So as long as your different requests are executed in queue, one after another, it's OK. But you have to wait the completion of the current request before launching a new one. If you want simultaneous requests, you need many active objects.

Tue, 2008-08-26 13:53
Joined: 2008-06-15
Forum posts: 48
Question on Multiple Opertion on a single CTelephony Session

so stopping one , and after that executing the other , correct ?
In Example :

If i hangup already , i know i am in Idle State , so i DoCancel() on the last request and perform the next assignment?

Tue, 2008-08-26 17:56
Joined: 2003-12-05
Forum posts: 683
Re: Question on Multiple Opertion on a single ...

When your AO is idle (no asynch request ongoing) you can safely start a new one. In case you do have a request active, just call Cancel (which will call DoCancel where you do your canceling, depending on state).

Wed, 2008-08-27 06:31
Joined: 2008-06-15
Forum posts: 48
Question on Multiple Opertion on a single CTelephony Session

I understand , thank you .

  • Login to reply to this topic.