|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : IsvTelCallAppDlg.h 00004 * Part of : IsvTelCallApp 00005 * Interface : 00006 * Description : A class representing a Multi page Avkon dialog 00007 * Version : 00008 * 00009 * Copyright (c) 2005-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================== 00014 */ 00015 00016 #ifndef ISVTELCALLAPPDLG_H 00017 #define ISVTELCALLAPPDLG_H 00018 00019 // INCLUDES 00020 #include <aknform.h> 00021 #include <eikappui.h> 00022 #include "IsvTelCallApp.hrh" 00023 #include "IsvTelCallAppTelephonyNotify.h" 00024 #include "IsvTelCallAppTelephony.h" 00025 00026 //FOWARD DECLARATIONS 00027 class CIsvTelCallAppContainer; 00028 00029 // CLASS DEFINITIONS 00030 /** 00031 * CIsvTelCallAppDlg: A dialog class derived from CAknForm representing a 00032 * Multi-page UI dialog 00033 * It implments the MIsvTelCallAppTelephonyNotify interface 00034 */ 00035 class CIsvTelCallAppDlg : public CAknForm, 00036 public MIsvTelCallAppTelephonyNotify 00037 { 00038 public: // Constructor and destructor 00039 /** 00040 * Two-phased constructor. 00041 */ 00042 static CIsvTelCallAppDlg* NewL(); 00043 00044 /** 00045 * Destructor. 00046 */ 00047 virtual ~CIsvTelCallAppDlg(); 00048 00049 public: // From CAknForm 00050 /** 00051 * Overrides the ExecuteLD from CAknForm. 00052 * Inturn calls the ExecuteLD of the base class. It adds the 00053 * functionality of setting the Title of the page on the status 00054 * pane. 00055 * @param aResourceId: Id of the form resource 00056 * @return Return value of the base class ExecuteLD 00057 */ 00058 TInt ExecuteLD( TInt aResourceId ); 00059 00060 /** 00061 * An over-riding routine that captures the Green dial key and the 00062 * Red hang-up key from the key-pad when they are pressed with the 00063 * focus being present on the Phone-numbers in the dialog screen. 00064 * For other keys, it calls the base-class routine for handling. 00065 * @param aKeyEvent The key event. 00066 * @param aType The type of key event. 00067 * @return Indicates whether or not the key event was used by 00068 * this control. 00069 */ 00070 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 00071 TEventCode aType ); 00072 00073 /** 00074 * Different controls/dialog items/pages on the multi-page dialog 00075 * require their own context sensitive menus to be able to choose 00076 * only the applicable operations on the item. For this purpose, 00077 * this function, loads menu panes that are appropriate and 00078 * applicable for the respective menu items. 00079 * @param aResourceId Resource ID identifying the menu pane to 00080 * initialise. 00081 * @param aMenuPane The in-memory representation of the menu pane. 00082 */ 00083 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); 00084 00085 /** 00086 * An over-riding function that handles all commands loaded by the 00087 * DynInitMenuPaneL. For the remaining commands like Edit & Save, 00088 * it invokes the base class routine. 00089 * aCommandId ID of the command to respond to. 00090 */ 00091 virtual void ProcessCommandL( TInt aCommandId ); 00092 00093 /** 00094 * Derived from base-class. It invokes the base-class function and 00095 * after the page switch is executed, it sets the appropriate title 00096 * for the page. 00097 * @param aPageId The page ID. 00098 */ 00099 void PageChangedL( TInt aPageId ); 00100 00101 public: //New Functions 00102 00103 /** 00104 * Sets page on the dialog 00105 * @param aPageId. The control Id of the page 00106 */ 00107 void SetDlgPage(TInt aPageId); 00108 00109 /** 00110 * Sets title to the status pane. 00111 * @param aTitlePane. This object contains Title Name. 00112 */ 00113 void SetTitlePane(CAknTitlePane* aTitlePane); 00114 00115 /** 00116 * Sets the container control. 00117 * @param aContainer. This object specifies container of type 00118 * CIsvTelCallAppContainer 00119 */ 00120 void SetContainer(CIsvTelCallAppContainer* aContainer); 00121 00122 /** 00123 * Sets title of specified pafe to the status pane. 00124 * @param aPageId. specifes which page 00125 */ 00126 void SetPageTitleOnPaneL( TInt aPageId ); 00127 00128 /** 00129 * Sets title of Application to the status pane. 00130 */ 00131 void SetMainPageTitleOnPaneL(); 00132 00133 private: 00134 /** 00135 * Invokes the DialNewNumber ETel ISV API 00136 * @param aFocusControlId, Id of the control where it is focused 00137 */ 00138 void MakeNewCallProcessCommandL( TInt aFocusControlId ); 00139 00140 /** 00141 * Invokes the GetCallStatus ETel ISV API 00142 * @param const CTelephony::TCallId aCallId, Id by which call is made 00143 */ 00144 void GetCallStatusL( const CTelephony::TCallId aCallId ); 00145 00146 /** 00147 * Invokes the Hold ETel ISV API 00148 * @param aPageId, Id of the page from where it got invoked 00149 */ 00150 void HoldProcessCommandL( TInt aPageId ); 00151 00152 /** 00153 * Invokes the Resume ETel ISV API 00154 * @param aPageId, Id of the page from where it got invoked 00155 */ 00156 void ResumeProcessCommandL( TInt aPageId ); 00157 00158 /** 00159 * Invokes the Hangup ETel ISV API 00160 * @param aPageId, Id of the page from where it got invoked 00161 */ 00162 void HangupProcessCommandL( TInt aPageId ); 00163 00164 /** 00165 * Invokes the Swap ETel ISV API 00166 */ 00167 void SwapProcessCommamndL( ); 00168 00169 /** 00170 * Invokes the SendDTMF ETel ISV API 00171 * @param aFocusControlId, Id of the control where it is focused 00172 */ 00173 void SendDTMFProcessCommandL( TInt aFocusControlId ); 00174 00175 public: 00176 00177 /** 00178 * Instances of overload pure virtual functions drawn from 00179 * MIsvTelCallAppTelephonyNotify 00180 */ 00181 00182 /** 00183 * Gets invoked once command completion notification from MakeNewCall 00184 * ETel ISV API is received. 00185 * @param aStatus, specifies SUCCESS or Error Code 00186 * @param const CTelephony::TCallId aCallId, refrence to Call ID. 00187 * @param CTelephony::TTelNumber &aTelNum, refrence to Tel Number. 00188 * @param aErrMsg, contains the error message returned by ETel ISV API 00189 */ 00190 void MakeNewCallApiCompleteL( TInt aStatus, 00191 const CTelephony::TCallId aCallId, 00192 CTelephony::TTelNumber& aTelNum, 00193 TDesC16& aErrMsg ); 00194 00195 /** 00196 * Gets invoked once command completion notification from HangUp 00197 * ETel ISV API is received. 00198 * @param aStatus, specifies SUCCESS or Error Code 00199 * @param const CTelephony::TCallId aCallId, refrence to Call ID. 00200 * @param aErrMsg, contains the error message returned by ETel ISV API 00201 */ 00202 void HangupCompleteL( TInt aStatus, TDesC16& aErrMsg ); 00203 00204 /** 00205 * Gets invoked once command completion notification from Hold 00206 * ETel ISV API is received. 00207 * @param aStatus, specifies SUCCESS or Error Code 00208 * @param const CTelephony::TCallId aCallId, refrence to Call ID. 00209 * @param aErrMsg, contains the error message returned by ETel ISV API 00210 */ 00211 void HoldCompleteL(TInt aStatus, TDesC16& aErrMsg ); 00212 00213 /** 00214 * Gets invoked once command completion notification from Resume 00215 * ETel ISV API is received. 00216 * @param aStatus, specifies SUCCESS or Error Code 00217 * @param const CTelephony::TCallId aCallId, refrence to Call ID. 00218 * @param aErrMsg, contains the error message returned by ETel ISV API 00219 */ 00220 void ResumeCompleteL( TInt aStatus, TDesC16& aErrMsg ); 00221 00222 /** 00223 * Gets invoked once command completion notification from Swap ETel 00224 * ISV API is received. 00225 * @param aStatus, specifies SUCCESS or Error Code 00226 * @param aErrMsg, contains the error message returned by ETel ISV API 00227 */ 00228 void SwapCompleteL( TInt aStatus, TDesC16& aErrMsg); 00229 00230 00231 /** 00232 * Gets invoked once command completion notification from GetCallStatus 00233 * ETel ISV API is received. 00234 * @param aStatus, specifies SUCCESS or Error Code 00235 * @param const CTelephony::TCallId aCallId, refrence to Call ID. 00236 * @param CTelephony::TCallStatusV1 &aCallStatus, contains status 00237 * @param aErrMsg, contains the error message returned by ETel ISV API 00238 */ 00239 void GetCallStatusCompleteL( TInt aStatus, 00240 const CTelephony::TCallId aCallId, 00241 CTelephony::TCallStatusV1& aCallStatus, 00242 TDesC16& aErrMsg ); 00243 00244 00245 /** 00246 * Gets invoked once command completion notification from 00247 * GetVoiceLineStatus ETel ISV API is received. 00248 * @param aStatus, specifies SUCCESS or Error Code 00249 * @param aErrMsg, contains the error message returned by ETel ISV API 00250 * @param CTelephony::TCallStatusV1 &aCallStatus, contains status. 00251 */ 00252 void GetVoiceLineStatusCompleteL( TInt aStatus, 00253 TDesC16& aErrMsg, 00254 CTelephony::TCallStatusV1& aCallStatus ); 00255 00256 /** 00257 * Gets invoked once command completion notification from 00258 * GetDataLineStatus ETel ISV API is received. 00259 * @param aStatus, specifies SUCCESS or Error Code 00260 * @param aErrMsg, contains the error message returned by ETel ISV API 00261 * @param CTelephony::TCallStatusV1 &aCallStatus, contains status. 00262 */ 00263 void GetDataLineStatusCompleteL( TInt aStatus, 00264 TDesC16& aErrMsg, 00265 CTelephony::TCallStatusV1& aCallStatus ); 00266 00267 /** 00268 * Gets invoked once command completion notification from 00269 * GetFaxLineStatus ETel ISV API is received. 00270 * @param aStatus, specifies SUCCESS or Error Code 00271 * @param aErrMsg, contains the error message returned by ETel ISV API 00272 * @param CTelephony::TCallStatusV1 &aCallStatus, contains status. 00273 */ 00274 void GetFaxLineStatusCompleteL( TInt aStatus, 00275 TDesC16& aErrMsg, 00276 CTelephony::TCallStatusV1& aCallStatus ); 00277 00278 /** 00279 * Gets invoked once command completion notification from 00280 * SendDTMF ETel ISV API is received. 00281 * @param aStatus, specifies SUCCESS or Error Code 00282 * @param aErrMsg, contains the error message returned by ETel ISV API 00283 */ 00284 void SendDTMFApiCompleteL( TInt aStatus, TDesC16& aErrMsg ); 00285 00286 /** 00287 * Gets invoked once command completion notification from 00288 * AnswerIncomingCallApiCompleteL ETel ISV API is received. 00289 * @param aStatus, specifies SUCCESS or Error Code 00290 * @param aErrMsg, contains the error message returned by ETel ISV API 00291 */ 00292 void AnswerIncomingCallApiCompleteL( TInt aStatus, 00293 const CTelephony::TCallId aCallId, 00294 TDesC16& aErrMsg ); 00295 00296 private: // Constructor 00297 /** 00298 * Default constructor. 00299 */ 00300 CIsvTelCallAppDlg(); 00301 00302 /** 00303 * Second-phase constructor. 00304 */ 00305 void ConstructL(); 00306 00307 private: 00308 // Functions from base class 00309 /** 00310 * From CEikDialog 00311 * Set default field value to member data. 00312 */ 00313 void PostLayoutDynInitL(); 00314 00315 /** 00316 * From CAknForm 00317 * Show save query. If user answers "No" to this query. 00318 * If true returns field value to the value which is before editing. 00319 */ 00320 TBool QuerySaveChangesL(); 00321 00322 /** 00323 * From CAknForm 00324 * Save the contents of the form. 00325 */ 00326 TBool SaveFormDataL(); 00327 00328 /** 00329 * From CAknForm 00330 * Does not save the contents of the form. Updates the form from stored 00331 * data 00332 */ 00333 void DoNotSaveFormDataL(); 00334 00335 /** 00336 * Loads strings from resource 00337 */ 00338 void LoadStringsFromResource( ); 00339 00340 00341 00342 private: 00343 //Have a handle to the title pane. This will be initialised 00344 //by the container calls before displaying the form 00345 CAknTitlePane* iTitlePane; 00346 CIsvTelCallAppContainer* iContainer; 00347 00348 //Start page Id 00349 TInt iPageId; 00350 00351 TBool iIsAnswerInCall; 00352 00353 //Edit/View mode 00354 TBool iIsInEditMode; 00355 00356 // Pointer to CIsvTelCallAppTelephony 00357 // Class and those gets instantiated at second phase construction 00358 CIsvTelCallAppTelephony* iTelephony; 00359 CIsvTelCallAppTelephony* iAnswerInCallTelephony; 00360 CIsvTelCallAppTelephony* iVoiceLineAsyncTelephony; 00361 CIsvTelCallAppTelephony* iCall1StatusAsyncTelephony; 00362 CIsvTelCallAppTelephony* iCall2StatusAsyncTelephony; 00363 00364 //General Error string 00365 TBuf8<KMaxCmdSize> iErrString; 00366 //General Success string 00367 TBuf8<KMaxCmdSize> iSuccessString; 00368 00369 //Contains command languauge arguments loaded from resource 00370 CTelephony::TCallId iCallId1Str; 00371 CTelephony::TCallId iCallId2Str; 00372 00373 00374 TBuf8<KMaxCmdSize> iDelimiterStr; 00375 TBuf8<KMaxCmdSize> iNewLineStr; 00376 00377 //Contains GetCallStatus strings loaded from resource 00378 TBuf8<KMaxCmdSize> iUnknownStr; 00379 TBuf8<KMaxCmdSize> iIdleStr; 00380 TBuf8<KMaxCmdSize> iDiallingStr; 00381 TBuf8<KMaxCmdSize> iRingingStr; 00382 TBuf8<KMaxCmdSize> iAnsweringStr; 00383 TBuf8<KMaxCmdSize> iConnectingStr; 00384 TBuf8<KMaxCmdSize> iConnectedStr; 00385 TBuf8<KMaxCmdSize> iReconnectPendingStr; 00386 TBuf8<KMaxCmdSize> iDisconnectingStr; 00387 TBuf8<KMaxCmdSize> iHoldStr; 00388 TBuf8<KMaxCmdSize> iTransferringStr; 00389 TBuf8<KMaxCmdSize> iTransferAlertingStr; 00390 00391 //Phone 1 Operations Menu 00392 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinPhone1; 00393 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinDtmfSeq1; 00394 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1Status; 00395 00396 //Phone 2 Operations Menu 00397 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinPhone2; 00398 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinDtmfSeq2; 00399 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2Status; 00400 00401 //Call 1 status Menu 00402 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1Dialnum; 00403 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1NumType; 00404 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1NumPlan; 00405 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1DialStatus; 00406 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1Starttime; 00407 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1Duration; 00408 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1Exitcode; 00409 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1Ciphering; 00410 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1CallId; 00411 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1RemStatus; 00412 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1RemName; 00413 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1RemNum; 00414 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1RemNumType; 00415 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1RemNumPlan; 00416 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall1Dir; 00417 00418 //Call 2 status Menu 00419 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2Dialnum; 00420 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2NumType; 00421 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2NumPlan; 00422 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2DialStatus; 00423 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2Starttime; 00424 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2Duration; 00425 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2Exitcode; 00426 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2Ciphering; 00427 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2CallId; 00428 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2RemStatus; 00429 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2RemName; 00430 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2RemNum; 00431 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2RemNumType; 00432 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2RemNumPlan; 00433 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinCall2Dir; 00434 00435 //Line Status Menu 00436 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinVoiceLineStatus; 00437 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinDataLineStatus; 00438 TBuf<EIsvTelCallAppEdwinMaxLength> iEdwinFaxLineStatus; 00439 00440 //Answer Incoming Call Phone Num 00441 TBuf<EIsvTelCallAppEdwinMaxLength> iAnswerInCallPhNum1; 00442 TBuf<EIsvTelCallAppEdwinMaxLength> iAnswerInCallPhNum2; 00443 00444 TBuf<EIsvTelCallAppEdwinMaxLength> iEmuApiNotSupported; 00445 }; 00446 00447 #endif // ISVTELCALLAPPDLG_H 00448 00449 // End of File
|
© Nokia 2006 |