telephonyutils/etel3rdpartyapi/ExampleApps/AutoDTMFDialler/CMainMenu.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 #ifndef __CMAINMENU_H__
       
    18 #define __CMAINMENU_H__
       
    19 
       
    20 #include <e32base.h>
       
    21 #include <etel3rdparty.h>
       
    22 
       
    23 
       
    24 #include "CISVAPIAsync.h"
       
    25 
       
    26 #include "CBaseMenuAsync.h"
       
    27 
       
    28 // Active objects
       
    29 #include "CPhoneId.h"
       
    30 #include "CFlightModeInfo.h"
       
    31 #include "CNetworkRegInfo.h"
       
    32 #include "CDialCall.h"
       
    33 #include "CSendDTMF.h"
       
    34 #include "CHangup.h"
       
    35 #include "CLineStatus.h"
       
    36 #include "CCallStatus.h"
       
    37 
       
    38 
       
    39 _LIT(KPhoneIdMsg, "Phone Id:\n");
       
    40 _LIT(KNetworkRegMsg, "Network Registration Status:\n");
       
    41 _LIT(KMenuMsg, "*~Auto DTMF Dialler~*\nPress E to exit\n");
       
    42 _LIT(KHangupMsg, "Press H to Hangup the active Call\n");
       
    43 _LIT(KDialMsg, "Press D to Dial a Call\n");
       
    44 _LIT(KDTMFQuestion, "How would you like to send the DTMF string?\n" );
       
    45 _LIT(KiSingleString, "Press S to Send Predefinied DTMF string\n");
       
    46 _LIT(KAsChar, "Press Required numbers then # to specify the DTMF string with Keypresses\n");
       
    47 
       
    48 _LIT(KTheNumber, "01632960000");
       
    49 
       
    50 /**
       
    51 Provides the required functionality for the application to run correctly; owns 
       
    52 active objects required to make ETel3rdParty calls.
       
    53 */
       
    54 class CMainMenu : public CBaseMenuAsync
       
    55 	{
       
    56 	// Methods
       
    57 public:
       
    58 	static CMainMenu* NewLC(CConsoleBase& aConsole);
       
    59 	~CMainMenu();
       
    60 
       
    61 	void ExecComplete(TTelISVExampleType aDerivedType);
       
    62 	void ExecNotify(TTelISVExampleType aDerivedType);
       
    63 
       
    64 private:
       
    65 	CMainMenu(CConsoleBase& aConsole);
       
    66 	void ConstructL();
       
    67 
       
    68 	void RunL();	// Handles key presses
       
    69 	void DoCancel();
       
    70 
       
    71 	// Data
       
    72 private:
       
    73 	// Owned active objects
       
    74 	/**
       
    75 	Active object which demonstrates the use of CTelephony::GetPhoneId()
       
    76 	*/
       
    77 	CISVAPIAsync* iPhoneId;
       
    78 	/**
       
    79 	Active object which demonstrates the use of CTelephony::GetFlightMode()
       
    80 	*/
       
    81 	CISVAPIAsync* iFlightModeInfo;
       
    82 	/**
       
    83 	Active object which demonstrates the use of CTelephony::GetNetworkRegistrationStatus()
       
    84 	*/
       
    85 	CISVAPIAsync* iNetworkRegInfo;
       
    86 	/**
       
    87 	Active object which demonstrates the use of CTelephony::SendDTMFTones()
       
    88 	*/
       
    89 	CISVAPIAsync* iSendDTMF;
       
    90 	/**
       
    91 	Active object which demonstrates the use of CTelephony::DialNewCall()
       
    92 	*/
       
    93 	CISVAPIAsync* iDialCall;
       
    94 	/**
       
    95 	Active object which demonstrates the use of CTelephony::HangUp()
       
    96 	*/
       
    97 	CISVAPIAsync* iHangup;
       
    98 	/**
       
    99 	Active object which demonstrates the use of CTelephony::GetCallStatus()
       
   100 	*/
       
   101 	CISVAPIAsync* iCallStatus;
       
   102 	/**
       
   103 	Active object which demonstrates the use of CTelephony::GetLineStatus()
       
   104 	*/
       
   105 	CISVAPIAsync* iLineStatus;
       
   106 	/**
       
   107 	Call ID of the currently active call.
       
   108 	*/
       
   109 	CTelephony::TCallId iCallId;
       
   110 	/**
       
   111 	The current single tone the user has specified.
       
   112 	*/
       
   113 	TBuf<1> iCurrentTone;
       
   114 	/**
       
   115 	A log of all tones sent down the line.
       
   116 	*/
       
   117 	TBuf<100> iCurrentToneLog;
       
   118 	/**
       
   119 	The number to be sent as a whole DTMF string.
       
   120 	*/
       
   121 	TBuf<100> iTheNumber;
       
   122 	/**
       
   123 	Has the user selected to enter the DTMF as a single string all
       
   124 	in one go or as single characters.
       
   125 	*/
       
   126 	TBool iSingleString;
       
   127 	};
       
   128 
       
   129 #endif // __CMAINMENU_H__