S60 3rd Edition SDK for Symbian OS
Example Applications Guide

CIsvTelCallAppDlg Class Reference

#include <IsvTelCallAppDlg.h>

Inheritance diagram for CIsvTelCallAppDlg:

MIsvTelCallAppTelephonyNotify List of all members.

Public Member Functions

virtual ~CIsvTelCallAppDlg ()
TInt ExecuteLD (TInt aResourceId)
TKeyResponse OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
void DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
virtual void ProcessCommandL (TInt aCommandId)
void PageChangedL (TInt aPageId)
void SetDlgPage (TInt aPageId)
void SetTitlePane (CAknTitlePane *aTitlePane)
void SetContainer (CIsvTelCallAppContainer *aContainer)
void SetPageTitleOnPaneL (TInt aPageId)
void SetMainPageTitleOnPaneL ()
void MakeNewCallApiCompleteL (TInt aStatus, const CTelephony::TCallId aCallId, CTelephony::TTelNumber &aTelNum, TDesC16 &aErrMsg)
void HangupCompleteL (TInt aStatus, TDesC16 &aErrMsg)
void HoldCompleteL (TInt aStatus, TDesC16 &aErrMsg)
void ResumeCompleteL (TInt aStatus, TDesC16 &aErrMsg)
void SwapCompleteL (TInt aStatus, TDesC16 &aErrMsg)
void GetCallStatusCompleteL (TInt aStatus, const CTelephony::TCallId aCallId, CTelephony::TCallStatusV1 &aCallStatus, TDesC16 &aErrMsg)
void GetVoiceLineStatusCompleteL (TInt aStatus, TDesC16 &aErrMsg, CTelephony::TCallStatusV1 &aCallStatus)
void GetDataLineStatusCompleteL (TInt aStatus, TDesC16 &aErrMsg, CTelephony::TCallStatusV1 &aCallStatus)
void GetFaxLineStatusCompleteL (TInt aStatus, TDesC16 &aErrMsg, CTelephony::TCallStatusV1 &aCallStatus)
void SendDTMFApiCompleteL (TInt aStatus, TDesC16 &aErrMsg)
void AnswerIncomingCallApiCompleteL (TInt aStatus, const CTelephony::TCallId aCallId, TDesC16 &aErrMsg)

Static Public Member Functions

static CIsvTelCallAppDlg * NewL ()

Private Member Functions

void MakeNewCallProcessCommandL (TInt aFocusControlId)
void GetCallStatusL (const CTelephony::TCallId aCallId)
void HoldProcessCommandL (TInt aPageId)
void ResumeProcessCommandL (TInt aPageId)
void HangupProcessCommandL (TInt aPageId)
void SwapProcessCommamndL ()
void SendDTMFProcessCommandL (TInt aFocusControlId)
 CIsvTelCallAppDlg ()
void ConstructL ()
void PostLayoutDynInitL ()
TBool QuerySaveChangesL ()
TBool SaveFormDataL ()
void DoNotSaveFormDataL ()
void LoadStringsFromResource ()

Private Attributes

CAknTitlePane * iTitlePane
CIsvTelCallAppContainer * iContainer
TInt iPageId
TBool iIsAnswerInCall
TBool iIsInEditMode
CIsvTelCallAppTelephony * iTelephony
CIsvTelCallAppTelephony * iAnswerInCallTelephony
CIsvTelCallAppTelephony * iVoiceLineAsyncTelephony
CIsvTelCallAppTelephony * iCall1StatusAsyncTelephony
CIsvTelCallAppTelephony * iCall2StatusAsyncTelephony
TBuf8< KMaxCmdSize > iErrString
TBuf8< KMaxCmdSize > iSuccessString
CTelephony::TCallId iCallId1Str
CTelephony::TCallId iCallId2Str
TBuf8< KMaxCmdSize > iDelimiterStr
TBuf8< KMaxCmdSize > iNewLineStr
TBuf8< KMaxCmdSize > iUnknownStr
TBuf8< KMaxCmdSize > iIdleStr
TBuf8< KMaxCmdSize > iDiallingStr
TBuf8< KMaxCmdSize > iRingingStr
TBuf8< KMaxCmdSize > iAnsweringStr
TBuf8< KMaxCmdSize > iConnectingStr
TBuf8< KMaxCmdSize > iConnectedStr
TBuf8< KMaxCmdSize > iReconnectPendingStr
TBuf8< KMaxCmdSize > iDisconnectingStr
TBuf8< KMaxCmdSize > iHoldStr
TBuf8< KMaxCmdSize > iTransferringStr
TBuf8< KMaxCmdSize > iTransferAlertingStr
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinPhone1
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinDtmfSeq1
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1Status
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinPhone2
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinDtmfSeq2
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2Status
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1Dialnum
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1NumType
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1NumPlan
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1DialStatus
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1Starttime
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1Duration
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1Exitcode
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1Ciphering
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1CallId
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1RemStatus
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1RemName
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1RemNum
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1RemNumType
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1RemNumPlan
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall1Dir
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2Dialnum
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2NumType
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2NumPlan
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2DialStatus
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2Starttime
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2Duration
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2Exitcode
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2Ciphering
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2CallId
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2RemStatus
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2RemName
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2RemNum
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2RemNumType
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2RemNumPlan
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinCall2Dir
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinVoiceLineStatus
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinDataLineStatus
TBuf< EIsvTelCallAppEdwinMaxLength > iEdwinFaxLineStatus
TBuf< EIsvTelCallAppEdwinMaxLength > iAnswerInCallPhNum1
TBuf< EIsvTelCallAppEdwinMaxLength > iAnswerInCallPhNum2
TBuf< EIsvTelCallAppEdwinMaxLength > iEmuApiNotSupported

Detailed Description

CIsvTelCallAppDlg: A dialog class derived from CAknForm representing a Multi-page UI dialog It implments the MIsvTelCallAppTelephonyNotify interface

Definition at line 35 of file IsvTelCallAppDlg.h.


Constructor & Destructor Documentation

CIsvTelCallAppDlg::~CIsvTelCallAppDlg (   )  [virtual]
 

Destructor.

Definition at line 53 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppTelephony::GetTelephonyPtr(), iAnswerInCallTelephony, iCall1StatusAsyncTelephony, iCall2StatusAsyncTelephony, iTelephony, iVoiceLineAsyncTelephony, and SetMainPageTitleOnPaneL().

00054     {
00055 
00056         SetMainPageTitleOnPaneL();
00057 
00058         if (iVoiceLineAsyncTelephony)
00059         {
00060         delete(iVoiceLineAsyncTelephony);
00061         }
00062         if (iCall1StatusAsyncTelephony)
00063         {
00064         delete(iCall1StatusAsyncTelephony);
00065         }
00066         if (iCall2StatusAsyncTelephony)
00067         {
00068         delete(iCall2StatusAsyncTelephony);
00069         }
00070         if (iAnswerInCallTelephony)
00071         {
00072         delete(iAnswerInCallTelephony);
00073         }
00074     
00075     //Delete the CTelephony object
00076     if ( iTelephony->GetTelephonyPtr() )
00077         {
00078         delete ( iTelephony->GetTelephonyPtr() );
00079         }        
00080     
00081     //Delete the telephony pointer
00082     if ( iTelephony )
00083         {
00084         delete iTelephony;
00085         }
00086     }

CIsvTelCallAppDlg::CIsvTelCallAppDlg (   )  [private]
 

Default constructor.

Definition at line 1432 of file IsvTelCallAppDlg.cpp.

01433     {
01434     }


Member Function Documentation

CIsvTelCallAppDlg * CIsvTelCallAppDlg::NewL (   )  [static]
 

Two-phased constructor.

Definition at line 38 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppDlg().

00039     {
00040     CIsvTelCallAppDlg* self = 
00041         new (ELeave) CIsvTelCallAppDlg();
00042     CleanupStack::PushL(self);
00043     self->ConstructL();
00044     CleanupStack::Pop();
00045     return self;
00046     }

TInt CIsvTelCallAppDlg::ExecuteLD (  TInt  aResourceId  ) 
 

Overrides the ExecuteLD from CAknForm. Inturn calls the ExecuteLD of the base class. It adds the functionality of setting the Title of the page on the status pane.

Parameters:
aResourceId,: Id of the form resource
Returns:
Return value of the base class ExecuteLD

Definition at line 94 of file IsvTelCallAppDlg.cpp.

References iPageId, and SetPageTitleOnPaneL().

00095     {
00096 
00097     TInt retCode;
00098 
00099     //Set page title for first page
00100     SetPageTitleOnPaneL(iPageId);
00101       
00102     //Call the base-class routine
00103     retCode = CAknForm::ExecuteLD( aResourceId );
00104 
00105     TryChangeFocusToL(EIsvTelCallAppDlgCtrlIdPhone1);
00106 
00107     return( retCode );
00108     }

TKeyResponse CIsvTelCallAppDlg::OfferKeyEventL (  const TKeyEvent &  aKeyEvent,
TEventCode  aType
) 
 

An over-riding routine that captures the Green dial key and the Red hang-up key from the key-pad when they are pressed with the focus being present on the Phone-numbers in the dialog screen. For other keys, it calls the base-class routine for handling.

Parameters:
aKeyEvent The key event.
aType The type of key event.
Returns:
Indicates whether or not the key event was used by this control.

Definition at line 118 of file IsvTelCallAppDlg.cpp.

References iIsInEditMode, and ProcessCommandL().

00121     {
00122     if (aType == EEventKey)
00123         {
00124         //Catch the dial button
00125         switch (aKeyEvent.iCode)
00126             {
00127             case EKeyYes:
00128                 {
00129                 TInt focusControlId = IdOfFocusControl();
00130                 switch (focusControlId)
00131                     {
00132                     case EIsvTelCallAppDlgCtrlIdPhone1:
00133                     case EIsvTelCallAppDlgCtrlIdPhone2:
00134                                 {
00135                         ProcessCommandL(EIsvTelCallAppCmdAPITestCall);
00136                         return EKeyWasConsumed; 
00137                         }
00138                     default:
00139                         break;
00140                     }
00141                 }
00142                 break;
00143             case EKeyNo:
00144                 {
00145                 TInt focusControlId = IdOfFocusControl();
00146                 switch (focusControlId)
00147                     {
00148                     case EIsvTelCallAppDlgCtrlIdPhone1:
00149                     case EIsvTelCallAppDlgCtrlIdPhone2:
00150                         {
00151                                                 ProcessCommandL(EIsvTelCallAppCmdAPITestHangup);
00152                         return EKeyWasConsumed;                         
00153                         }
00154                     default:
00155                         break;
00156                     }
00157                 }
00158                 break;
00159             case EKeyUpArrow:
00160             case EKeyDownArrow:
00161                 {
00162                 if( iIsInEditMode )
00163                     {
00164                     return EKeyWasConsumed;
00165                     }
00166                 }
00167                 break;
00168             case EKeyOK:
00169                 {
00170                 if(iIsInEditMode)
00171                     {
00172                     ProcessCommandL(EAknFormCmdSave);
00173                     }
00174                 else
00175                     {
00176                     ProcessCommandL(EAknFormCmdEdit);
00177                     }
00178                 return EKeyWasConsumed;
00179                 }
00180             default:
00181                 break;
00182             }
00183         }
00184     return CAknForm::OfferKeyEventL(aKeyEvent, aType);
00185     }

void CIsvTelCallAppDlg::DynInitMenuPaneL (  TInt  aResourceId,
CEikMenuPane *  aMenuPane
) 
 

Different controls/dialog items/pages on the multi-page dialog require their own context sensitive menus to be able to choose only the applicable operations on the item. For this purpose, this function, loads menu panes that are appropriate and applicable for the respective menu items.

Parameters:
aResourceId Resource ID identifying the menu pane to initialise.
aMenuPane The in-memory representation of the menu pane.

Definition at line 195 of file IsvTelCallAppDlg.cpp.

00198     {
00199 
00200     TInt pageId = ActivePageId();
00201     TInt focusControlId = IdOfFocusControl();
00202 
00203     if (aResourceId == R_AVKON_FORM_MENUPANE)  
00204         {
00205         switch (pageId)
00206             {
00207             case EIsvTelCallAppPageCtrlIdPagePhone1:
00208                 {
00209                 //Phone Menu
00210                 switch (focusControlId)    
00211                     {
00212                     case EIsvTelCallAppDlgCtrlIdPhone1:
00213                         {
00214                                                 //Menu for Phone-1 and Phone-2 numbers
00215                                                 aMenuPane->AddMenuItemsL(R_PHONE_MENU_PANE,0,1);
00216                         aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
00217                         aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
00218                         aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
00219                         break;
00220                         }
00221                     case EIsvTelCallAppDlgCtrlIdDtmfSeq1:
00222                         {
00223                                                 //Menu for DTMF sequence
00224                         aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
00225                         aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
00226                         aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
00227                         break;                          
00228                         }
00229                     case EIsvTelCallAppDlgCtrlIdCall1Status:
00230                         {
00231                                                 aMenuPane->AddMenuItemsL(
00232                                     R_GENERAL_STATUS_MENU_PANE,0,1);
00233                         aMenuPane->SetItemDimmed(EAknFormCmdEdit,TRUE);
00234                         aMenuPane->SetItemDimmed(EAknFormCmdSave,TRUE);
00235                         aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
00236                         aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
00237                         aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
00238                         }
00239                     default:
00240                         break;
00241                     }
00242                 }
00243                 break;
00244             case EIsvTelCallAppPageCtrlIdPagePhone2:
00245                 {
00246                 //Phone Menu
00247                 switch (focusControlId)    
00248                     {
00249                     case EIsvTelCallAppDlgCtrlIdPhone2:
00250                         {
00251                         //Menu for Phone-1 and Phone-2 numbers
00252                         aMenuPane->AddMenuItemsL(R_PHONE_MENU_PANE,0,1);
00253                         aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
00254                         aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
00255                         aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
00256                         break;
00257                         }
00258                     case EIsvTelCallAppDlgCtrlIdDtmfSeq2:
00259                         {
00260                         //Menu for DTMF sequence
00261                         aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
00262                         aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
00263                         aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
00264                         break;
00265                             }
00266                     case EIsvTelCallAppDlgCtrlIdCall2Status:
00267                             {
00268                         aMenuPane->AddMenuItemsL(
00269                                     R_GENERAL_STATUS_MENU_PANE,0,1);
00270                         aMenuPane->SetItemDimmed(EAknFormCmdEdit,TRUE);
00271                         aMenuPane->SetItemDimmed(EAknFormCmdSave,TRUE);
00272                         aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
00273                         aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
00274                         aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
00275                         }
00276                     default:
00277                         break;
00278                     }
00279                 }
00280                 break;
00281             case EIsvTelCallAppPageCtrlIdPageCallLineStatus:
00282                 {
00283                 aMenuPane->AddMenuItemsL(
00284                             R_GENERAL_STATUS_MENU_PANE,0,1);
00285                 aMenuPane->SetItemDimmed(EAknFormCmdEdit,TRUE);
00286                 aMenuPane->SetItemDimmed(EAknFormCmdSave,TRUE);
00287                 aMenuPane->SetItemDimmed(EAknFormCmdAdd,TRUE);
00288                 aMenuPane->SetItemDimmed(EAknFormCmdLabel,TRUE);
00289                 aMenuPane->SetItemDimmed(EAknFormCmdDelete,TRUE);
00290                 break;
00291                 }
00292             default:
00293                 break;
00294             }
00295         }
00296     else
00297         {
00298         CAknForm::DynInitMenuPaneL(aResourceId, aMenuPane);
00299         }    
00300     }

void CIsvTelCallAppDlg::ProcessCommandL (  TInt  aCommandId  )  [virtual]
 

An over-riding function that handles all commands loaded by the DynInitMenuPaneL. For the remaining commands like Edit & Save, it invokes the base class routine. aCommandId ID of the command to respond to.

Definition at line 309 of file IsvTelCallAppDlg.cpp.

References GetCallStatusL(), HangupProcessCommandL(), HoldProcessCommandL(), iIsInEditMode, iTelephony, MakeNewCallProcessCommandL(), ResumeProcessCommandL(), SendDTMFProcessCommandL(), SwapProcessCommamndL(), CIsvTelCallAppTelephony::TelApiWrapperGetDataLineStatusL(), CIsvTelCallAppTelephony::TelApiWrapperGetFaxLineStatusL(), and CIsvTelCallAppTelephony::TelApiWrapperGetVoiceLineStatusL().

00310     {
00311     
00312     switch (aCommandId)
00313         {
00314         ////////////////////////////////////////////////////////////////////
00315         case EIsvTelCallAppCmdAPITestCall:
00316             {
00317             TInt afocusControlId = IdOfFocusControl();
00318             MakeNewCallProcessCommandL(afocusControlId);
00319             }
00320             break;
00321             
00322         ////////////////////////////////////////////////////////////////////
00323         case EIsvTelCallAppCmdAPITestHangup:
00324             {
00325             //Branch to the appropriate page and control
00326             TInt pageId = ActivePageId();
00327             HangupProcessCommandL(pageId);
00328             }
00329             break;
00330     
00331         ////////////////////////////////////////////////////////////////////
00332         case EIsvTelCallAppCmdAPITestHold:
00333             {
00334             //Branch to the appropriate page and control
00335             TInt pageId = ActivePageId();
00336             HoldProcessCommandL(pageId);
00337             }
00338             break;
00339             
00340         ////////////////////////////////////////////////////////////////////
00341         case EIsvTelCallAppCmdAPITestResume:
00342             {
00343             //Branch to the appropriate page and control
00344             TInt pageId = ActivePageId();
00345             ResumeProcessCommandL(pageId);
00346             }
00347             break;
00348                     
00349         ////////////////////////////////////////////////////////////////////
00350         case EIsvTelCallAppCmdAPITestSwap:
00351             {
00352             SwapProcessCommamndL();
00353             }
00354             break;
00355                 
00356         ////////////////////////////////////////////////////////////////////
00357         case EIsvTelCallAppCmdAPITestFetch:
00358             {
00359             //Branch to the appropriate page and control
00360             TInt pageId = ActivePageId();
00361             switch (pageId)
00362                 {
00363                 /////////////////////////////////////////////////////////////
00364                 case EIsvTelCallAppPageCtrlIdPagePhone1:
00365                         {
00366                         //Fetch information for call status control.  
00367                     //This helps user to stay updated
00368                     //all the time. These are synchronous calls
00369                     GetCallStatusL(CTelephony::EISVCall1);
00370                         }
00371                     break;
00372 
00373                 /////////////////////////////////////////////////////////////
00374                 case EIsvTelCallAppPageCtrlIdPagePhone2:
00375                         {
00376                         //Fetch information for call status control.  
00377                     //This helps user to stay updated
00378                     //all the time. These are synchronous calls
00379                     GetCallStatusL(CTelephony::EISVCall2);
00380                         }
00381                     break;
00382                         /////////////////////////////////////////////////////////////   
00383                         case EIsvTelCallAppPageCtrlIdPageCallLineStatus:
00384                         {
00385                         //Fetch EIsvTelCallAppDlgCtrlIdVoiceLineStatus:
00386                         iTelephony->TelApiWrapperGetVoiceLineStatusL( );
00387      
00388                         //Fetch EIsvTelCallAppDlgCtrlIdDataLineStatus:
00389                         iTelephony->TelApiWrapperGetDataLineStatusL( );
00390                                                                 
00391                         //Fetch EIsvTelCallAppDlgCtrlIdFaxLineStatus:
00392                         iTelephony->TelApiWrapperGetFaxLineStatusL( );
00393                   }                
00394                   break;  
00395                /////////////////////////////////////////////////////////////
00396                 default:
00397                     break;
00398                 }//Switch pageId
00399             }//Fetch Case
00400             break;
00401         
00402         //////////// /////////////////////////////////////////////////     
00403         case EIsvTelCallAppCmdAPITestSendDTMF:
00404             {
00405             TInt focusControlId = IdOfFocusControl();  
00406             SendDTMFProcessCommandL(focusControlId);
00407             }
00408             break;
00409 
00410         ////////////////////////////////////////////////////////////////////
00411         case EAknFormCmdEdit:
00412             {
00413             iIsInEditMode = ETrue;
00414             }
00415             break;
00416 
00417         ////////////////////////////////////////////////////////////////////
00418         default:
00419             break;
00420         }
00421 
00422     //Call the base class routine
00423     CAknForm::ProcessCommandL(aCommandId);
00424     }

void CIsvTelCallAppDlg::PageChangedL (  TInt  aPageId  ) 
 

Derived from base-class. It invokes the base-class function and after the page switch is executed, it sets the appropriate title for the page.

Parameters:
aPageId The page ID.

Definition at line 432 of file IsvTelCallAppDlg.cpp.

References SetPageTitleOnPaneL().

00433     {
00434     //Invoke the base class routine
00435     CAknForm::PageChangedL(aPageId);
00436 
00437     //Call SetPageTitleOnPaneL to set the appropriate title on pane
00438     SetPageTitleOnPaneL(aPageId);
00439     }

void CIsvTelCallAppDlg::SetDlgPage (  TInt  aPageId  ) 
 

Sets page on the dialog

Parameters:
aPageId. The control Id of the page

Definition at line 446 of file IsvTelCallAppDlg.cpp.

References iPageId.

00447     {
00448     iPageId = aPageId;
00449     }

void CIsvTelCallAppDlg::SetTitlePane (  CAknTitlePane *  aTitlePane  ) 
 

Sets title to the status pane.

Parameters:
aTitlePane. This object contains Title Name.

Definition at line 458 of file IsvTelCallAppDlg.cpp.

References iTitlePane.

00459     {
00460     iTitlePane = aTitlePane;
00461     }

void CIsvTelCallAppDlg::SetContainer (  CIsvTelCallAppContainer *  aContainer  ) 
 

Sets the container control.

Parameters:
aContainer. This object specifies container of type CIsvTelCallAppContainer

Definition at line 470 of file IsvTelCallAppDlg.cpp.

References iContainer.

00471     {
00472     iContainer = aContainer;
00473     }

void CIsvTelCallAppDlg::SetPageTitleOnPaneL (  TInt  aPageId  ) 
 

Sets title of specified pafe to the status pane.

Parameters:
aPageId. specifes which page

Definition at line 480 of file IsvTelCallAppDlg.cpp.

References iTitlePane.

00481     {
00482     const TInt KTitlePaneBufLength = 256;
00483     TBuf<KTitlePaneBufLength> titleText( NULL );
00484     
00485     //Select the page title
00486     switch (aPageId)
00487         {
00488         case EIsvTelCallAppPageCtrlIdPagePhone1:
00489                 {
00490                 iEikonEnv->ReadResource( titleText, 
00491                 R_ISVTELCALLAPP_TEXT_STATUS_PANE_PHONE1 );
00492             break;
00493                 }
00494         case EIsvTelCallAppPageCtrlIdPagePhone2:
00495                 {
00496                 iEikonEnv->ReadResource( titleText, 
00497                 R_ISVTELCALLAPP_TEXT_STATUS_PANE_PHONE2 );
00498             break;
00499                 }
00500         case EIsvTelCallAppPageCtrlIdPageCallLineStatus:
00501             {
00502                 iEikonEnv->ReadResource(titleText, 
00503                 R_ISVTELCALLAPP_TEXT_STATUS_PANE_CALL_LINE_STATUS);
00504             break;
00505                 }
00506         default:
00507             break;
00508         }
00509         
00510     //Set the appropriate title on the pane
00511     if (iTitlePane)
00512         {
00513         iTitlePane->SetTextL( titleText );
00514         }
00515     }

void CIsvTelCallAppDlg::SetMainPageTitleOnPaneL (   ) 
 

Sets title of Application to the status pane.

Definition at line 522 of file IsvTelCallAppDlg.cpp.

References iTitlePane.

00523     {
00524     const TInt KTitlePaneBufLength = 256;
00525     TBuf<KTitlePaneBufLength> titleText( NULL );
00526     
00527     iEikonEnv->ReadResource(titleText, 
00528         R_ISVTELCALLAPP_TEXT_STATUS_PANE_MAIN_PAGE);
00529      
00530      //Set the appropriate title on the pane
00531     if (iTitlePane)
00532         {
00533         iTitlePane->SetTextL( titleText );
00534         }
00535     }

void CIsvTelCallAppDlg::MakeNewCallProcessCommandL (  TInt  aFocusControlId  )  [private]
 

Invokes the DialNewNumber ETel ISV API

Parameters:
aFocusControlId,Id of the control where it is focused

Definition at line 542 of file IsvTelCallAppDlg.cpp.

References iEdwinPhone1, iEdwinPhone2, iTelephony, and CIsvTelCallAppTelephony::TelApiWrapperMakeNewCallL().

00543     {
00544     switch (aFocusControlId)
00545         {
00546         
00547         case EIsvTelCallAppDlgCtrlIdPhone1:
00548             {
00549             if (ControlOrNull(EIsvTelCallAppDlgCtrlIdPhone1))
00550                 {
00551                 GetEdwinText(iEdwinPhone1, EIsvTelCallAppDlgCtrlIdPhone1);
00552                 iTelephony->TelApiWrapperMakeNewCallL(CTelephony::EISVCall1, 
00553                     iEdwinPhone1);
00554                 }
00555             }
00556             break;
00557             
00558         case EIsvTelCallAppDlgCtrlIdPhone2:
00559             {
00560             if (ControlOrNull(EIsvTelCallAppDlgCtrlIdPhone2))
00561                 {
00562                 GetEdwinText(iEdwinPhone2, EIsvTelCallAppDlgCtrlIdPhone2);
00563                 iTelephony->TelApiWrapperMakeNewCallL(CTelephony::EISVCall2,
00564                     iEdwinPhone2);
00565                 }
00566             }
00567             break;
00568             
00569         default:
00570             break;
00571         }    
00572     }

void CIsvTelCallAppDlg::GetCallStatusL (  const CTelephony::TCallId  aCallId  )  [private]
 

Invokes the GetCallStatus ETel ISV API

Parameters:
const CTelephony::TCallId aCallId, Id by which call is made

Definition at line 729 of file IsvTelCallAppDlg.cpp.

References iTelephony, and CIsvTelCallAppTelephony::TelApiWrapperGetCallStatusL().

00730     {
00731     iTelephony->TelApiWrapperGetCallStatusL( aCallId );
00732     }        

void CIsvTelCallAppDlg::HoldProcessCommandL (  TInt  aPageId  )  [private]
 

Invokes the Hold ETel ISV API

Parameters:
aPageId,Id of the page from where it got invoked

Definition at line 579 of file IsvTelCallAppDlg.cpp.

References iTelephony, and CIsvTelCallAppTelephony::TelApiWrapperHoldL().

00580     {
00581     switch (aPageId)
00582         {
00583         /////////////////////////////////////////////////////////////
00584         case EIsvTelCallAppPageCtrlIdPagePhone1:
00585             //Hold Call 1
00586             {
00587             iTelephony->TelApiWrapperHoldL( CTelephony::EISVCall1 );
00588             }
00589             break;
00590 
00591         /////////////////////////////////////////////////////////////
00592         case EIsvTelCallAppPageCtrlIdPagePhone2:
00593             //Hold Call 2
00594             {
00595             iTelephony->TelApiWrapperHoldL( CTelephony::EISVCall2 );
00596             }
00597             break;
00598         }    
00599     }

void CIsvTelCallAppDlg::ResumeProcessCommandL (  TInt  aPageId  )  [private]
 

Invokes the Resume ETel ISV API

Parameters:
aPageId,Id of the page from where it got invoked

Definition at line 606 of file IsvTelCallAppDlg.cpp.

References iTelephony, and CIsvTelCallAppTelephony::TelApiWrapperResumeL().

00607     {
00608     switch (aPageId)
00609         {
00610         /////////////////////////////////////////////////////////////
00611         case EIsvTelCallAppPageCtrlIdPagePhone1:
00612             //Resume Call 1
00613             {
00614             iTelephony->TelApiWrapperResumeL( CTelephony::EISVCall1 );
00615             }
00616             break;
00617 
00618         /////////////////////////////////////////////////////////////
00619         case EIsvTelCallAppPageCtrlIdPagePhone2:
00620             //Resume Call 2
00621             {
00622             iTelephony->TelApiWrapperResumeL( CTelephony::EISVCall2 );
00623             }
00624             break;
00625         }    
00626     }

void CIsvTelCallAppDlg::HangupProcessCommandL (  TInt  aPageId  )  [private]
 

Invokes the Hangup ETel ISV API

Parameters:
aPageId,Id of the page from where it got invoked

Definition at line 633 of file IsvTelCallAppDlg.cpp.

References iTelephony, and CIsvTelCallAppTelephony::TelApiWrapperHangupL().

00634     {
00635     switch (aPageId)
00636         {
00637         /////////////////////////////////////////////////////////////
00638         case EIsvTelCallAppPageCtrlIdPagePhone1:
00639             //Hangup Call 1
00640             {
00641             iTelephony->TelApiWrapperHangupL( CTelephony::EISVCall1 );
00642             }
00643             break;
00644 
00645         /////////////////////////////////////////////////////////////
00646         case EIsvTelCallAppPageCtrlIdPagePhone2:
00647             //Hangup Call 1
00648             {
00649             iTelephony->TelApiWrapperHangupL( CTelephony::EISVCall2 );
00650             }
00651             break;
00652         }    
00653     }

void CIsvTelCallAppDlg::SwapProcessCommamndL (   )  [private]
 

Invokes the Swap ETel ISV API

Definition at line 717 of file IsvTelCallAppDlg.cpp.

References iTelephony, and CIsvTelCallAppTelephony::TelApiWrapperSwapL().

00718     {
00719     //Swap Call1 and Call2
00720     //Format the string with command & parameters 
00721     iTelephony->TelApiWrapperSwapL( );    
00722     }

void CIsvTelCallAppDlg::SendDTMFProcessCommandL (  TInt  aFocusControlId  )  [private]
 

Invokes the SendDTMF ETel ISV API

Parameters:
aFocusControlId,Id of the control where it is focused

Definition at line 661 of file IsvTelCallAppDlg.cpp.

References iTelephony, and CIsvTelCallAppTelephony::TelApiWrapperSendDTMFL().

00662     {
00663     TBuf<KMaxDTMFLength> edwinData;
00664               
00665     switch (aFocusControlId)
00666         {
00667         case EIsvTelCallAppDlgCtrlIdPhone1:
00668             {
00669             GetEdwinText(edwinData, EIsvTelCallAppDlgCtrlIdDtmfSeq1);  
00670                 if (edwinData.Length() > KMaxDTMFLength)
00671                         {
00672                         TBuf<KMaxErrMsgSize> errNoteMsg;
00673                         iCoeEnv->ReadResource(errNoteMsg,
00674                         R_ISVTELCALLAPP_UIERR_DTMFTOOLONG);
00675 
00676                         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
00677                         errorNote->ExecuteLD(errNoteMsg);
00678                         }
00679                 else
00680                         {                   
00681                         iTelephony->TelApiWrapperSendDTMFL( CTelephony::EISVCall1,
00682                                 edwinData);    
00683                         }                       
00684             }
00685             break;
00686             
00687         case EIsvTelCallAppDlgCtrlIdPhone2:
00688             {
00689             GetEdwinText(edwinData, EIsvTelCallAppDlgCtrlIdDtmfSeq2);    
00690                 if (edwinData.Length() > KMaxDTMFLength)
00691                         {
00692                         TBuf<KMaxErrMsgSize> errNoteMsg;
00693                         iCoeEnv->ReadResource(errNoteMsg,
00694                         R_ISVTELCALLAPP_UIERR_DTMFTOOLONG);
00695 
00696                         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
00697                         errorNote->ExecuteLD(errNoteMsg);
00698                         }
00699                 else
00700                         {                   
00701                         iTelephony->TelApiWrapperSendDTMFL( CTelephony::EISVCall2,
00702                                 edwinData);    
00703                         }                       
00704             }
00705             break;
00706         
00707         default:    
00708             break;
00709         }
00710     }

void CIsvTelCallAppDlg::MakeNewCallApiCompleteL (  TInt  aStatus,
const CTelephony::TCallId  aCallId,
CTelephony::TTelNumber &  aTelNum,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from MakeNewCall ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
const CTelephony::TCallId aCallId, refrence to Call ID.
CTelephony::TTelNumber &aTelNum, refrence to Tel Number.
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 742 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppContainer::BringToForeGroundL(), GetCallStatusL(), iContainer, iEdwinPhone1, and iEdwinPhone2.

00747     {
00748     if (aStatus != KErrNone)
00749         {
00750         TBuf<KMaxErrMsgSize> errorNoteMsg;
00751         errorNoteMsg.Copy(aErrMsg);
00752         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
00753         errorNote->ExecuteLD(errorNoteMsg);
00754         }
00755     else
00756         {   
00757 
00758         //Set the Phone number to the page where the corresponding Call ID
00759         //is handled. If the first call is made on the second page ie., 
00760         //Phone-2, since it is the first call, the Call ID returned is 1
00761         //and hence, in the GUI, the call will have to be set to Phone-1
00762         //page. Also the focus will have to be changed to the corresponding
00763         //page.
00764         switch ((TInt)aCallId)
00765             {
00766             case CTelephony::EISVCall1:
00767                 {
00768                 if ( aTelNum == iEdwinPhone2 )
00769                     {
00770                     //Swap Phone1 and Phone2
00771                     iEdwinPhone2.Copy(iEdwinPhone1);
00772                     }
00773                 iEdwinPhone1.Copy(aTelNum);
00774                 
00775                 if (iEdwinPhone1 == iEdwinPhone2)
00776                     {
00777                     //Set Phone-2 to NULL
00778                     _LIT(KNullStr,"");
00779                     iEdwinPhone2 = KNullStr;
00780                     }
00781                 }
00782                 SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdPhone1,
00783                     &iEdwinPhone1);
00784                 SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdPhone2,
00785                     &iEdwinPhone2);
00786                 TryChangeFocusToL(EIsvTelCallAppDlgCtrlIdPhone1);
00787                 break;
00788                 
00789             case CTelephony::EISVCall2:
00790                 {
00791                 iEdwinPhone2.Copy(aTelNum);
00792                 SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdPhone2,
00793                     &iEdwinPhone2);
00794                 TryChangeFocusToL(EIsvTelCallAppDlgCtrlIdPhone2);
00795                 }
00796                 break;
00797 
00798             default:
00799                 break;
00800             }
00801         //Fetch status for both the call ids
00802         GetCallStatusL(CTelephony::EISVCall1);
00803         GetCallStatusL(CTelephony::EISVCall2);        
00804         }
00805     //Bring back the view to foreground
00806     iContainer->BringToForeGroundL();
00807     }

void CIsvTelCallAppDlg::HangupCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from HangUp ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
const CTelephony::TCallId aCallId, refrence to Call ID.
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 815 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppContainer::BringToForeGroundL(), GetCallStatusL(), and iContainer.

00816     {
00817     if (aStatus != KErrNone)
00818         {
00819         TBuf<KMaxErrMsgSize> errNoteMsg; 
00820         errNoteMsg.Copy(aErrMsg);
00821  
00822         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
00823         errorNote->ExecuteLD(errNoteMsg);
00824         }
00825     else
00826         {
00827         //Fetch status for both the call ids
00828         GetCallStatusL(CTelephony::EISVCall1);
00829         GetCallStatusL(CTelephony::EISVCall2);        
00830         }
00831 
00832     //Bring back the view to foreground
00833     iContainer->BringToForeGroundL();
00834     }

void CIsvTelCallAppDlg::HoldCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from Hold ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
const CTelephony::TCallId aCallId, refrence to Call ID.
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 842 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppContainer::BringToForeGroundL(), GetCallStatusL(), and iContainer.

00843     {
00844     if (aStatus != KErrNone)
00845         {
00846         TBuf<KMaxErrMsgSize> errNoteMsg;
00847         errNoteMsg.Copy(aErrMsg);
00848 
00849         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
00850         errorNote->ExecuteLD(errNoteMsg);
00851         }
00852     else
00853         {
00854         //Fetch status for both the call ids
00855         GetCallStatusL(CTelephony::EISVCall1);
00856         GetCallStatusL(CTelephony::EISVCall2);        
00857         }
00858 
00859     //Bring back the view to foreground
00860     iContainer->BringToForeGroundL();
00861     }

void CIsvTelCallAppDlg::ResumeCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from Resume ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
const CTelephony::TCallId aCallId, refrence to Call ID.
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 869 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppContainer::BringToForeGroundL(), GetCallStatusL(), and iContainer.

00870     {
00871     if (aStatus != KErrNone)
00872         {
00873         TBuf<KMaxErrMsgSize> errNoteMsg;
00874         errNoteMsg.Copy(aErrMsg);
00875  
00876         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
00877         errorNote->ExecuteLD(errNoteMsg);
00878         }
00879     else
00880         {
00881         //Fetch status for both the call ids
00882         GetCallStatusL(CTelephony::EISVCall1);
00883         GetCallStatusL(CTelephony::EISVCall2);        
00884         }
00885         
00886     //Bring back the view to foreground
00887     iContainer->BringToForeGroundL();
00888     }

void CIsvTelCallAppDlg::SwapCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from Swap ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 896 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppContainer::BringToForeGroundL(), GetCallStatusL(), and iContainer.

00899     {
00900     if (aStatus != KErrNone)
00901         {
00902         TBuf<KMaxErrMsgSize> errNoteMsg;
00903         errNoteMsg.Copy(aErrMsg);
00904 
00905         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
00906         errorNote->ExecuteLD(errNoteMsg);
00907         }
00908     else
00909         {
00910         //Fetch status for both the call ids
00911         GetCallStatusL(CTelephony::EISVCall1);
00912         GetCallStatusL(CTelephony::EISVCall2);        
00913         }
00914 
00915     //Bring back the view to foreground
00916     iContainer->BringToForeGroundL();
00917     }

void CIsvTelCallAppDlg::GetCallStatusCompleteL (  TInt  aStatus,
const CTelephony::TCallId  aCallId,
CTelephony::TCallStatusV1 &  aCallStatus,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from GetCallStatus ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
const CTelephony::TCallId aCallId, refrence to Call ID.
CTelephony::TCallStatusV1 &aCallStatus, contains status
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 925 of file IsvTelCallAppDlg.cpp.

References iAnsweringStr, iConnectedStr, iConnectingStr, iDiallingStr, iDisconnectingStr, iEdwinCall1Status, iEdwinCall2Status, iErrString, iHoldStr, iIdleStr, iReconnectPendingStr, iRingingStr, iTransferAlertingStr, iTransferringStr, and iUnknownStr.

00930     {
00931 
00932     TBuf<EIsvTelCallAppEdwinMaxLength> callStatusStr;
00933 
00934     if (aStatus != KErrNone)
00935         {
00936         callStatusStr.Copy(iErrString);
00937         }
00938     else
00939         {
00940         switch (aCallStatus.iStatus)
00941             {
00942             case CTelephony::EStatusUnknown:
00943                 {
00944                 callStatusStr.Copy(iUnknownStr);
00945                 }
00946                 break;
00947                 
00948             case CTelephony::EStatusIdle:
00949                 {
00950                 callStatusStr.Copy(iIdleStr);
00951                 }
00952                 break;
00953                 
00954             case CTelephony::EStatusDialling:
00955                 {
00956                 callStatusStr.Copy(iDiallingStr);
00957                 }
00958                 break;
00959                 
00960             case CTelephony::EStatusRinging:
00961                 {
00962                 callStatusStr.Copy(iRingingStr);
00963                 }
00964                 break;
00965                 
00966             case CTelephony::EStatusAnswering:
00967                 {
00968                 callStatusStr.Copy(iAnsweringStr);
00969                 }
00970                 break;
00971                 
00972             case CTelephony::EStatusConnecting:
00973                 {
00974                 callStatusStr.Copy(iConnectingStr);
00975                 }
00976                 break;
00977                 
00978             case CTelephony::EStatusConnected:
00979                 {
00980                 callStatusStr.Copy(iConnectedStr);
00981                 }
00982                 break;
00983                 
00984             case CTelephony::EStatusReconnectPending:
00985                 {
00986                 callStatusStr.Copy(iReconnectPendingStr);
00987                 }
00988                 break;
00989 
00990             case CTelephony::EStatusDisconnecting:
00991                 {
00992                 callStatusStr.Copy(iDisconnectingStr);
00993                 }
00994                 break;
00995 
00996             case CTelephony::EStatusHold:
00997                 {
00998                 callStatusStr.Copy(iHoldStr);
00999                 }
01000                 break;
01001 
01002             case CTelephony::EStatusTransferring:
01003                 {
01004                 callStatusStr.Copy(iTransferringStr);
01005                 }
01006                 break;
01007 
01008             case CTelephony::EStatusTransferAlerting:
01009                 {
01010                 callStatusStr.Copy(iTransferAlertingStr);
01011                 }
01012                 break;
01013 
01014             default:
01015                 {
01016                 callStatusStr.Copy(iErrString);
01017                 }
01018                 break;
01019             }
01020         }
01021         //Update the UI
01022     switch (aCallId)
01023         {
01024         case CTelephony::EISVCall1:
01025             {
01026             if ( aStatus != KErrNone )
01027                 {
01028                 iEdwinCall1Status.Copy(aErrMsg);
01029                 }
01030             else
01031                 {
01032                 iEdwinCall1Status.Copy(callStatusStr);
01033                 }
01034             SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdCall1Status,
01035                 &iEdwinCall1Status);
01036             }
01037             break;
01038             
01039         case CTelephony::EISVCall2:
01040             {
01041             if ( aStatus != KErrNone )
01042                 {
01043                 iEdwinCall2Status.Copy(aErrMsg);
01044                 }
01045             else
01046                 {
01047                 iEdwinCall2Status.Copy(callStatusStr);
01048                 }
01049             SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdCall2Status,
01050                 &iEdwinCall2Status);
01051             }
01052             break;
01053             
01054         default:
01055             break;
01056         }
01057     }

void CIsvTelCallAppDlg::GetVoiceLineStatusCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg,
CTelephony::TCallStatusV1 &  aCallStatus
)  [virtual]
 

Gets invoked once command completion notification from GetVoiceLineStatus ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
aErrMsg,contains the error message returned by ETel ISV API
CTelephony::TCallStatusV1 &aCallStatus, contains status.

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 1065 of file IsvTelCallAppDlg.cpp.

References iAnsweringStr, iConnectedStr, iConnectingStr, iDiallingStr, iDisconnectingStr, iEdwinVoiceLineStatus, iErrString, iHoldStr, iIdleStr, iReconnectPendingStr, iRingingStr, iTransferAlertingStr, iTransferringStr, and iUnknownStr.

01069     {
01070     if (aStatus != KErrNone)
01071         {
01072         iEdwinVoiceLineStatus.Copy(aErrMsg);
01073         SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdVoiceLineStatus,
01074             &iEdwinVoiceLineStatus);
01075         }
01076     else
01077         {
01078         TBuf<EIsvTelCallAppEdwinMaxLength> callStatusStr;
01079         switch (aCallStatus.iStatus)
01080             {
01081             case CTelephony::EStatusUnknown:
01082                 {
01083                 callStatusStr.Copy(iUnknownStr);
01084                 }
01085                 break;
01086             case CTelephony::EStatusIdle:
01087                 {
01088                 callStatusStr.Copy(iIdleStr);
01089                 }
01090                 break;
01091             case CTelephony::EStatusDialling:
01092                 {
01093                 callStatusStr.Copy(iDiallingStr);
01094                 }
01095                 break;
01096             case CTelephony::EStatusRinging:
01097                 {
01098                 callStatusStr.Copy(iRingingStr);
01099                 }
01100                 break;
01101             case CTelephony::EStatusAnswering:
01102                 {
01103                 callStatusStr.Copy(iAnsweringStr);
01104                 }
01105                 break;
01106             case CTelephony::EStatusConnecting:
01107                 {
01108                 callStatusStr.Copy(iConnectingStr);
01109                 }
01110                 break;
01111             case CTelephony::EStatusConnected:
01112                 {
01113                 callStatusStr.Copy(iConnectedStr);
01114                 }
01115                 break;
01116             case CTelephony::EStatusReconnectPending:
01117                 {
01118                 callStatusStr.Copy(iReconnectPendingStr);
01119                 }
01120                 break;
01121             case CTelephony::EStatusDisconnecting:
01122                 {
01123                 callStatusStr.Copy(iDisconnectingStr);
01124                 }
01125                 break;
01126             case CTelephony::EStatusHold:
01127                 {
01128                 callStatusStr.Copy(iHoldStr);
01129                 }
01130                 break;
01131             case CTelephony::EStatusTransferring:
01132                 {
01133                 callStatusStr.Copy(iTransferringStr);
01134                 }
01135                 break;
01136             case CTelephony::EStatusTransferAlerting:
01137                 {
01138                 callStatusStr.Copy(iTransferAlertingStr);
01139                 }
01140                 break;
01141             default:
01142                 {
01143                 callStatusStr.Copy(iErrString);
01144                 }
01145                 break;
01146             }
01147 
01148         //Update line status to UI
01149         iEdwinVoiceLineStatus.Copy(callStatusStr);
01150         SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdVoiceLineStatus,
01151                                            &iEdwinVoiceLineStatus);
01152        // Register the Call 1 and 2 Status Active Object
01153         iCall1StatusAsyncTelephony->
01154             RegisterForAsyncNotification(
01155             CTelephony::EOwnedCall1StatusChange);
01156         iCall2StatusAsyncTelephony->
01157             RegisterForAsyncNotification(
01158             CTelephony::EOwnedCall2StatusChange);
01159 
01160         // Invoke Answer Incoming Call Wrapper function, 
01161         // if voice line status is ringing
01162         if ( aCallStatus.iStatus  == CTelephony::EStatusRinging )
01163             {
01164             iAnswerInCallTelephony->TelApiWrapperAnswerInCallL();
01165             } 
01166                 }
01167     }

void CIsvTelCallAppDlg::GetDataLineStatusCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg,
CTelephony::TCallStatusV1 &  aCallStatus
)  [virtual]
 

Gets invoked once command completion notification from GetDataLineStatus ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
aErrMsg,contains the error message returned by ETel ISV API
CTelephony::TCallStatusV1 &aCallStatus, contains status.

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 1175 of file IsvTelCallAppDlg.cpp.

References iAnsweringStr, iConnectedStr, iConnectingStr, iDiallingStr, iDisconnectingStr, iEdwinDataLineStatus, iErrString, iHoldStr, iIdleStr, iReconnectPendingStr, iRingingStr, iTransferAlertingStr, iTransferringStr, and iUnknownStr.

01179     {
01180     if (aStatus != KErrNone)
01181         {
01182         iEdwinDataLineStatus.Copy(aErrMsg);
01183         SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdDataLineStatus,
01184             &iEdwinDataLineStatus);
01185         }
01186     else
01187         {
01188         TBuf<EIsvTelCallAppEdwinMaxLength> callStatusStr;
01189         switch (aCallStatus.iStatus)
01190             {
01191             case CTelephony::EStatusUnknown:
01192                 {
01193                 callStatusStr.Copy(iUnknownStr);
01194                 }
01195                 break;
01196             case CTelephony::EStatusIdle:
01197                 {
01198                 callStatusStr.Copy(iIdleStr);
01199                 }
01200                 break;
01201             case CTelephony::EStatusDialling:
01202                 {
01203                 callStatusStr.Copy(iDiallingStr);
01204                 }
01205                 break;
01206             case CTelephony::EStatusRinging:
01207                 {
01208                 callStatusStr.Copy(iRingingStr);
01209                 }
01210                 break;
01211             case CTelephony::EStatusAnswering:
01212                 {
01213                 callStatusStr.Copy(iAnsweringStr);
01214                 }
01215                 break;
01216             case CTelephony::EStatusConnecting:
01217                 {
01218                 callStatusStr.Copy(iConnectingStr);
01219                 }
01220                 break;
01221             case CTelephony::EStatusConnected:
01222                 {
01223                 callStatusStr.Copy(iConnectedStr);
01224                 }
01225                 break;
01226             case CTelephony::EStatusReconnectPending:
01227                 {
01228                 callStatusStr.Copy(iReconnectPendingStr);
01229                 }
01230                 break;
01231             case CTelephony::EStatusDisconnecting:
01232                 {
01233                 callStatusStr.Copy(iDisconnectingStr);
01234                 }
01235                 break;
01236             case CTelephony::EStatusHold:
01237                 {
01238                 callStatusStr.Copy(iHoldStr);
01239                 }
01240                 break;
01241             case CTelephony::EStatusTransferring:
01242                 {
01243                 callStatusStr.Copy(iTransferringStr);
01244                 }
01245                 break;
01246             case CTelephony::EStatusTransferAlerting:
01247                 {
01248                 callStatusStr.Copy(iTransferAlertingStr);
01249                 }
01250                 break;
01251             default:
01252                 {
01253                 callStatusStr.Copy(iErrString);
01254                 }
01255                 break;
01256             }
01257         //Update line status to UI
01258         iEdwinDataLineStatus.Copy(callStatusStr);
01259         SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdDataLineStatus,
01260                                            &iEdwinDataLineStatus);
01261         }    
01262     }

void CIsvTelCallAppDlg::GetFaxLineStatusCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg,
CTelephony::TCallStatusV1 &  aCallStatus
)  [virtual]
 

Gets invoked once command completion notification from GetFaxLineStatus ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
aErrMsg,contains the error message returned by ETel ISV API
CTelephony::TCallStatusV1 &aCallStatus, contains status.

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 1270 of file IsvTelCallAppDlg.cpp.

References iAnsweringStr, iConnectedStr, iConnectingStr, iDiallingStr, iDisconnectingStr, iEdwinFaxLineStatus, iErrString, iHoldStr, iIdleStr, iReconnectPendingStr, iRingingStr, iTransferAlertingStr, iTransferringStr, and iUnknownStr.

01274     {
01275 
01276     if (aStatus != KErrNone)
01277         {
01278         iEdwinFaxLineStatus.Copy(aErrMsg);
01279         SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdFaxLineStatus,
01280             &iEdwinFaxLineStatus);
01281             }
01282     else
01283         {
01284         TBuf<EIsvTelCallAppEdwinMaxLength> callStatusStr;
01285         switch (aCallStatus.iStatus)
01286             {
01287             case CTelephony::EStatusUnknown:
01288                 {
01289                 callStatusStr.Copy(iUnknownStr);
01290                 }
01291                 break;
01292             case CTelephony::EStatusIdle:
01293                 {
01294                 callStatusStr.Copy(iIdleStr);
01295                 }
01296                 break;
01297             case CTelephony::EStatusDialling:
01298                 {
01299                 callStatusStr.Copy(iDiallingStr);
01300                 }
01301                 break;
01302             case CTelephony::EStatusRinging:
01303                 {
01304                 callStatusStr.Copy(iRingingStr);
01305                 }
01306                 break;
01307             case CTelephony::EStatusAnswering:
01308                 {
01309                 callStatusStr.Copy(iAnsweringStr);
01310                 }
01311                 break;
01312             case CTelephony::EStatusConnecting:
01313                 {
01314                 callStatusStr.Copy(iConnectingStr);
01315                 }
01316                 break;
01317             case CTelephony::EStatusConnected:
01318                 {
01319                 callStatusStr.Copy(iConnectedStr);
01320                 }
01321                 break;
01322             case CTelephony::EStatusReconnectPending:
01323                 {
01324                 callStatusStr.Copy(iReconnectPendingStr);
01325                 }
01326                 break;
01327             case CTelephony::EStatusDisconnecting:
01328                 {
01329                 callStatusStr.Copy(iDisconnectingStr);
01330                 }
01331                 break;
01332             case CTelephony::EStatusHold:
01333                 {
01334                 callStatusStr.Copy(iHoldStr);
01335                 }
01336                 break;
01337             case CTelephony::EStatusTransferring:
01338                 {
01339                 callStatusStr.Copy(iTransferringStr);
01340                 }
01341                 break;
01342             case CTelephony::EStatusTransferAlerting:
01343                 {
01344                 callStatusStr.Copy(iTransferAlertingStr);
01345                 }
01346                 break;
01347             default:
01348                 {
01349                 callStatusStr.Copy(iErrString);
01350                 }
01351                 break;
01352             }
01353         //Update Line status to UI
01354         iEdwinFaxLineStatus.Copy(callStatusStr);
01355         SetEdwinTextL((TInt)EIsvTelCallAppDlgCtrlIdFaxLineStatus,
01356             &iEdwinFaxLineStatus);
01357         }    
01358     }

void CIsvTelCallAppDlg::SendDTMFApiCompleteL (  TInt  aStatus,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from SendDTMF ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 1366 of file IsvTelCallAppDlg.cpp.

01367     {
01368     
01369     if (aStatus != KErrNone)
01370         {
01371         TBuf<KMaxErrMsgSize> errNoteMsg;
01372         errNoteMsg.Copy(aErrMsg);
01373         CAknErrorNote* errorNote = new (ELeave) CAknErrorNote;
01374         errorNote->ExecuteLD(errNoteMsg);
01375         }
01376     }

void CIsvTelCallAppDlg::AnswerIncomingCallApiCompleteL (  TInt  aStatus,
const CTelephony::TCallId  aCallId,
TDesC16 &  aErrMsg
)  [virtual]
 

Gets invoked once command completion notification from AnswerIncomingCallApiCompleteL ETel ISV API is received.

Parameters:
aStatus,specifies SUCCESS or Error Code
aErrMsg,contains the error message returned by ETel ISV API

Implements MIsvTelCallAppTelephonyNotify.

Definition at line 1384 of file IsvTelCallAppDlg.cpp.

References GetCallStatusCompleteL(), iAnswerInCallPhNum1, and iAnswerInCallPhNum2.

01388     {
01389     if (aStatus == KErrNone)
01390         {
01391         // Getting Call Status here, just to display on Dialog
01392         TInt retCode;
01393         retCode = iAnswerInCallTelephony->iTel->GetCallStatus( aCallId, 
01394             iAnswerInCallTelephony->iCallStatusPckg );
01395 
01396         //Find the type of error message and store in errMsgBuffer.
01397         TBuf16<KMaxErrMsgSize> errMsgBuffer;
01398         errMsgBuffer.Copy(aErrMsg);
01399         iAnswerInCallTelephony->GeneralErrorMessage( retCode, &errMsgBuffer );
01400 
01401         GetCallStatusCompleteL( retCode, 
01402             aCallId,
01403             iAnswerInCallTelephony->iCallStatus,
01404             errMsgBuffer);       
01405          
01406         if((TInt)aCallId == CTelephony::EISVCall1 )
01407             {
01408             //Writing Incoming Call1 on dialog
01409             SetEdwinTextL((TInt) EIsvTelCallAppDlgCtrlIdPhone1,
01410                 &iAnswerInCallPhNum1);
01411             // Registering here to update dialog fields, based on this 
01412             // answered call
01413             iCall1StatusAsyncTelephony->RegisterForAsyncNotification(
01414                 CTelephony::EOwnedCall1StatusChange);
01415             }
01416         else
01417             {
01418             //Writing Incoming Call2 on dialog
01419             SetEdwinTextL((TInt) EIsvTelCallAppDlgCtrlIdPhone2,
01420                 &iAnswerInCallPhNum2);
01421             iCall2StatusAsyncTelephony->RegisterForAsyncNotification(
01422                 CTelephony::EOwnedCall2StatusChange);
01423             }
01424         }
01425     }

void CIsvTelCallAppDlg::ConstructL (   )  [private]
 

Second-phase constructor.

Definition at line 1441 of file IsvTelCallAppDlg.cpp.

References CIsvTelCallAppTelephony::CreateTelephonyPtrL(), CIsvTelCallAppTelephony::GetTelephonyPtr(), iDelimiterStr, iIsAnswerInCall, iNewLineStr, iTelephony, iTitlePane, iVoiceLineAsyncTelephony, LoadStringsFromResource(), CIsvTelCallAppTelephony::NewL(), CIsvTelCallAppTelephony::RegisterForAsyncNotification(), and CIsvTelCallAppTelephony::SetTelephonyPtr().

01442     {
01443     iTitlePane = NULL;
01444 
01445     iIsAnswerInCall = ETrue;
01446     
01447     //Load strings from resource
01448     LoadStringsFromResource();
01449         
01450     CAknForm::ConstructL();
01451 
01452     // Create the telephony object for execution from GUI
01453     iTelephony = CIsvTelCallAppTelephony::NewL(*this);
01454     iAnswerInCallTelephony = CIsvTelCallAppTelephony::NewL(*this);
01455     iVoiceLineAsyncTelephony = CIsvTelCallAppTelephony::NewL(*this);
01456     iCall1StatusAsyncTelephony = CIsvTelCallAppTelephony::NewL(*this);
01457     iCall2StatusAsyncTelephony = CIsvTelCallAppTelephony::NewL(*this);
01458         
01459 #ifdef __WINS__ 
01460 
01461 #else
01462     iTelephony->CreateTelephonyPtrL();
01463 
01464     iAnswerInCallTelephony->SetTelephonyPtr(iTelephony->GetTelephonyPtr());
01465        
01466     iVoiceLineAsyncTelephony->SetTelephonyPtr(
01467         iTelephony->GetTelephonyPtr());
01468     iVoiceLineAsyncTelephony->RegisterForAsyncNotification(
01469         CTelephony::EVoiceLineStatusChange );
01470             
01471     iCall1StatusAsyncTelephony->SetTelephonyPtr(
01472         iTelephony->GetTelephonyPtr());
01473                 
01474     iCall2StatusAsyncTelephony->SetTelephonyPtr(
01475         iTelephony->GetTelephonyPtr());
01476 #endif                  
01477             
01478     //Initilalise the delimiter string
01479     _LIT8(KSpaceStr," ");
01480     iDelimiterStr.Copy(KSpaceStr);
01481 
01482     //Initialise the new line string
01483     _LIT8(KNewLineStr,"\n");
01484     iNewLineStr.Format(KNewLineStr);
01485     }

void CIsvTelCallAppDlg::PostLayoutDynInitL (   )  [private]
 

From CEikDialog Set default field value to member data.

Definition at line 1493 of file IsvTelCallAppDlg.cpp.

References iIsInEditMode.

01494     {
01495     //Call the base class routine
01496     CAknForm::PostLayoutDynInitL();
01497 
01498     //Set edit mode to false
01499     iIsInEditMode = EFalse;
01500     }

TBool CIsvTelCallAppDlg::QuerySaveChangesL (   )  [private]
 

From CAknForm Show save query. If user answers "No" to this query. If true returns field value to the value which is before editing.

Definition at line 1509 of file IsvTelCallAppDlg.cpp.

References DoNotSaveFormDataL(), and SaveFormDataL().

01510     {
01511     TBool isAnsYes(CAknForm::QuerySaveChangesL());
01512 
01513     if (isAnsYes)
01514         {
01515         SaveFormDataL();
01516         }
01517     else 
01518         {
01519         // Case that answer "No" to query.
01520         DoNotSaveFormDataL();
01521         }
01522     return isAnsYes;
01523     }

TBool CIsvTelCallAppDlg::SaveFormDataL (   )  [private]
 

From CAknForm Save the contents of the form.

Definition at line 1530 of file IsvTelCallAppDlg.cpp.

References iEdwinDtmfSeq1, iEdwinDtmfSeq2, iEdwinPhone1, iEdwinPhone2, and iIsInEditMode.

01531     {
01532     GetEdwinText(iEdwinPhone1,          EIsvTelCallAppDlgCtrlIdPhone1);
01533     GetEdwinText(iEdwinPhone2,          EIsvTelCallAppDlgCtrlIdPhone2);
01534     GetEdwinText(iEdwinDtmfSeq1,        EIsvTelCallAppDlgCtrlIdDtmfSeq1);
01535     GetEdwinText(iEdwinDtmfSeq2,        EIsvTelCallAppDlgCtrlIdDtmfSeq2);
01536 
01537     //Set edit mode to false
01538     iIsInEditMode = EFalse;
01539     return ETrue;
01540     }

void CIsvTelCallAppDlg::DoNotSaveFormDataL (   )  [private]
 

From CAknForm Does not save the contents of the form. Updates the form from stored data

Definition at line 1547 of file IsvTelCallAppDlg.cpp.

References iEdwinDtmfSeq1, iEdwinDtmfSeq2, iEdwinPhone1, iEdwinPhone2, and iIsInEditMode.

01548     {
01549     SetEdwinTextL(EIsvTelCallAppDlgCtrlIdPhone1,       &iEdwinPhone1);
01550     SetEdwinTextL(EIsvTelCallAppDlgCtrlIdPhone2,       &iEdwinPhone2);
01551     SetEdwinTextL(EIsvTelCallAppDlgCtrlIdDtmfSeq1,     &iEdwinDtmfSeq1);
01552     SetEdwinTextL(EIsvTelCallAppDlgCtrlIdDtmfSeq2,     &iEdwinDtmfSeq2);
01553 
01554     //Set edit mode to false
01555     iIsInEditMode = EFalse;
01556     }

void CIsvTelCallAppDlg::LoadStringsFromResource (   )  [private]
 

Loads strings from resource

Definition at line 1563 of file IsvTelCallAppDlg.cpp.

References iAnswerInCallPhNum1, iAnswerInCallPhNum2, iAnsweringStr, iConnectedStr, iConnectingStr, iDiallingStr, iDisconnectingStr, iEmuApiNotSupported, iErrString, iHoldStr, iIdleStr, iReconnectPendingStr, iRingingStr, iSuccessString, iTransferAlertingStr, iTransferringStr, and iUnknownStr.

01564     {
01565     TBuf16<KMaxCmdSize> resStr;
01566 
01567     //Load general error and success strings
01568     iCoeEnv->ReadResource(resStr, 
01569         R_ISVTELCALLAPP_TELSTR_ERRSTRING);
01570     iErrString.Copy(resStr);
01571 
01572     iCoeEnv->ReadResource(resStr, 
01573         R_ISVTELCALLAPP_TELSTR_SUCCESSSTRING);
01574     iSuccessString.Copy(resStr);
01575     
01576     //Load GetCallStatus strings from resource
01577     iCoeEnv->ReadResource(resStr, 
01578         R_ISVTELCALLAPP_UNKNOWN);
01579     iUnknownStr.Copy(resStr);
01580     
01581     iCoeEnv->ReadResource(resStr, 
01582         R_ISVTELCALLAPP_CALLSTATUS_IDLE);
01583     iIdleStr.Copy(resStr);
01584     
01585     iCoeEnv->ReadResource(resStr, 
01586         R_ISVTELCALLAPP_CALLSTATUS_DIALLING);
01587     iDiallingStr.Copy(resStr);
01588     
01589     iCoeEnv->ReadResource(resStr, 
01590         R_ISVTELCALLAPP_CALLSTATUS_RINGING);
01591     iRingingStr.Copy(resStr);
01592     
01593     iCoeEnv->ReadResource(resStr, 
01594         R_ISVTELCALLAPP_CALLSTATUS_ANSWERING);
01595     iAnsweringStr.Copy(resStr);
01596     
01597     iCoeEnv->ReadResource(resStr, 
01598         R_ISVTELCALLAPP_CALLSTATUS_CONNECTING);
01599     iConnectingStr.Copy(resStr);
01600     
01601     iCoeEnv->ReadResource(resStr, 
01602         R_ISVTELCALLAPP_CALLSTATUS_CONNECTED);
01603     iConnectedStr.Copy(resStr);
01604     
01605     iCoeEnv->ReadResource(resStr, 
01606         R_ISVTELCALLAPP_CALLSTATUS_RECONNECTPENDING);
01607     iReconnectPendingStr.Copy(resStr);
01608     
01609     iCoeEnv->ReadResource(resStr, 
01610         R_ISVTELCALLAPP_CALLSTATUS_DISCONNECTING);
01611     iDisconnectingStr.Copy(resStr);
01612 
01613     iCoeEnv->ReadResource(resStr, 
01614         R_ISVTELCALLAPP_CALLSTATUS_HOLD);
01615     iHoldStr.Copy(resStr);
01616 
01617     iCoeEnv->ReadResource(resStr, 
01618         R_ISVTELCALLAPP_CALLSTATUS_TRANSFERRING);
01619     iTransferringStr.Copy(resStr);
01620 
01621     iCoeEnv->ReadResource(resStr, 
01622         R_ISVTELCALLAPP_CALLSTATUS_TRANSFERALERTING);
01623     iTransferAlertingStr.Copy(resStr);  
01624     
01625     //Answer Incoming Call Phone Number
01626     iCoeEnv->ReadResource(resStr, 
01627         R_ISVTELCALLAPP_TELSTR_ANSWERINCALLPHONENUM1);
01628     iAnswerInCallPhNum1.Copy(resStr);  
01629 
01630     iCoeEnv->ReadResource(resStr, 
01631         R_ISVTELCALLAPP_TELSTR_ANSWERINCALLPHONENUM2);
01632     iAnswerInCallPhNum2.Copy(resStr);  
01633 
01634         iCoeEnv->ReadResource(iEmuApiNotSupported,
01635             R_ISVTELCALLAPP_ERR_EMUAPINOTSUPPORTED);        
01636 
01637     return;
01638     }


© Nokia 2006

Back to top