--- a/phoneapp/phoneuicontrol/inc/cphonestate.h Tue Aug 31 15:14:29 2010 +0300
+++ b/phoneapp/phoneuicontrol/inc/cphonestate.h Wed Sep 01 12:30:10 2010 +0100
@@ -24,6 +24,9 @@
#include <w32std.h>
#include <remconcoreapitargetobserver.h>
#include <MProfileEngine.h>
+#include <bmbubblemanager.h>
+#include <eikenv.h>
+
#include "mphonestate.h"
#include "mphoneviewcommandhandle.h"
#include "cphonecbamanager.h"
@@ -40,6 +43,12 @@
enum TStateTransEffectType
{
ENoneType,
+ ECallUiAppear,
+ ECallUiDisappear,
+ // These effect types can be used only when NE is opened/closed
+ // when some other app than phone is visible on the foreground/
+ // background.
+ // These cannot be used for internal transitions (=call ui<->dialer).
ENumberEntryOpen,
ENumberEntryClose,
ENumberEntryCreate
@@ -121,6 +130,26 @@
TTimeIntervalMicroSeconds aKeyPressDuration );
/**
+ * From CAknAppUi, initialise a menupane (dynamic).
+ *
+ * @param aResourceId It is the resource id for the pane.
+ * @param aMenuPane It is the menu pane corresponding to the resource.
+ */
+ IMPORT_C virtual void DynInitMenuPaneL(
+ TInt aResourceId,
+ CEikMenuPane* aMenuPane );
+
+ /**
+ * From CAknAppUi, initialise a menubar (dynamic).
+ *
+ * @param aResourceId It is the resource id for the bar.
+ * @param aMenuBar It is the menu bar corresponding to the resource.
+ */
+ IMPORT_C virtual void DynInitMenuBarL(
+ TInt aResourceId,
+ CEikMenuBar* aMenuBar );
+
+ /**
* From CEikAppUi. For Idle indicator
*/
IMPORT_C virtual void HandleSystemEventL(
@@ -148,11 +177,6 @@
IMPORT_C virtual void HandleIdleForegroundEventL();
/**
- * Indicates when the keylock events
- */
- IMPORT_C virtual void HandleKeyLockEnabled( TBool aKeylockEnabled );
-
- /**
* Handle environment changes.
* @param aChanges environment changes which may be reported by
* a change notifier through the RChangeNotifier interface.
@@ -211,26 +235,35 @@
TRemConCoreApiButtonAction aButtonAct);
/**
- * Setter for divert indication showing in bubble.
- * @param aDivertIndication ETrue to show divert indication,
- * EFalse to not. Usually setting EFalse isn't necessary
- * as it's a default value in bubble creation.
- */
- IMPORT_C virtual void SetDivertIndication(
- const TBool aDivertIndication );
-
- /**
* Handles Long hash key press
*/
IMPORT_C void HandleLongHashL();
/**
+ * Informs view to start Transition effect if effect
+ * type is feasible for current state.
+ * @param aType a transition effect, default none
+ * EndTransEffect() must be called when update is done.
+ */
+ IMPORT_C void BeginTransEffectLC( TStateTransEffectType aType = ENoneType );
+
+ /**
+ * Informs view to complete Transition effect
+ */
+ IMPORT_C void EndTransEffect();
+
+ /**
* Checks whether customized dialer view is active,
* @return ETrue if customized dialer is active
*/
IMPORT_C TBool IsCustomizedDialerVisibleL() const;
/**
+ * Closes customized dialer view
+ */
+ IMPORT_C void CloseCustomizedDialerL();
+
+ /**
* Plays DTMF tone for key event
* */
IMPORT_C void HandleDtmfKeyToneL( const TKeyEvent& aKeyEvent,
@@ -239,58 +272,16 @@
/**
* Show global InfoNote
* @param aResourceId resource id to be resolved
- * @param aNotificationDialog True if notification
- * dialog should be used.
*/
- IMPORT_C void SendGlobalInfoNoteL( TInt aResourceId,
- TBool aNotificationDialog = EFalse );
+ IMPORT_C void SendGlobalInfoNoteL( TInt aResourceId );
/**
* Show global ErrorNote
* @param aResourceId resource id to be resolved
- * @param aNotificationDialog True if notification
- * dialog should be used.
*/
- IMPORT_C void SendGlobalErrorNoteL( TInt aResourceId,
- TBool aNotificationDialog = EFalse );
-
- /**
- * Get blocked key list
- * @returns RArray<TInt>& lsit of blocked keys
- */
- IMPORT_C const RArray<TInt>& GetBlockedKeyList() const;
-
- /**
- * Disable HW Keys if needed
- */
- IMPORT_C void DisableHWKeysL();
+ IMPORT_C void SendGlobalErrorNoteL( TInt aResourceId );
/**
- * Disable Call UI
- */
- IMPORT_C void DisableCallUIL();
-
- /**
- * Enable Call UI
- */
- IMPORT_C void EnableCallUIL();
-
- /**
- * Disable HW Keys and Call UI if needed
- */
- IMPORT_C void CheckDisableHWKeysAndCallUIL();
-
- /**
- * Handle hold switch key event when there is an incoming or waiting call
- */
- IMPORT_C void HandleHoldSwitchL();
-
- /**
- * Enable HW Keys and Call UI if needed
- */
- IMPORT_C void CheckEnableHWKeysAndCallUIL();
-
- /**
* Fetches autolock information - is it set on or not
* @return is autolock set on (ETrue) or off (EFalse)
*/
@@ -315,6 +306,18 @@
*/
IMPORT_C TBool IsAnyQueryActiveL();
+ /**
+ * Check if menu bar is visible
+ * @return boolean value indicating that menu bar is visible
+ */
+ IMPORT_C TBool IsMenuBarVisibleL() const;
+
+ /**
+ * Sets context menu to correspond the incall options menu
+ *
+ */
+ IMPORT_C virtual void UpdateInCallContextMenuL();
+
/*
* If KFeatureIdFfSimlessOfflineSupport is undefined and
* UI shows note which will be closed by key event then
@@ -322,11 +325,39 @@
*/
TBool IsNoteDismissableL();
- IMPORT_C void RetainPreviousKeylockStateL();
+ /**
+ * Check if possible dialer extension is in focus
+ * @return boolean value indicating if dialer extension is in focus
+ */
+ IMPORT_C TBool IsDialingExtensionInFocusL() const;
+
+ /**
+ * At moment does nothing in CPhoneState, only causes function call
+ * to inherinting classes.
+ */
+ IMPORT_C virtual void DoStateSpecificCallSetUpDefinitionsL();
+ /**
+ * Getter for CEikonEnv to avoid use of static system calls
+ * @return CEikonEnv handle
+ */
+ IMPORT_C CEikonEnv* EikonEnv() const;
+
+ /**
+ * Setter for CEikonEnv to avoid use of static system calls
+ * @param CEikonEnv handle
+ */
+ IMPORT_C virtual void SetEikonEnv( CEikonEnv* aEnv );
+
public: // NumberEntry functions.
/**
+ * Passes create number entry command forward if NE can be created.
+ */
+ IMPORT_C virtual void HandleCreateNumberEntryL(
+ const TKeyEvent& aKeyEvent,
+ TEventCode aEventCode );
+ /**
* Check if number entry is used
* @return boolean value indicating that number entry is used
*/
@@ -337,6 +368,11 @@
* @return boolean value indicating that number entry is visible
*/
IMPORT_C TBool IsNumberEntryVisibleL();
+
+ /**
+ * Close and and clear number entry.
+ */
+ IMPORT_C void CloseClearNumberEntryAndLoadEffectL( TStateTransEffectType aType );
protected:
@@ -373,7 +409,7 @@
/**
* Disconnect call
*/
- IMPORT_C TBool DisconnectCallL();
+ IMPORT_C virtual void DisconnectCallL();
/**
* Display idle screen
@@ -397,15 +433,15 @@
TInt aCallId,
TInt aWaitingCall );
- /**
+ /**
* Sets call header texts for call coming in
* @param aCallid call id
* @param aWaitingCall waiting call indication
- * @param aCallHeaderData - Call header parameter into which the text
+ * @param aCallHeaderData - Call header parameter into which the text
* will be set.
*/
IMPORT_C void SetCallHeaderTextsForCallComingInL(
- TInt aCallId,
+ TInt aCallId,
TBool aWaitingCall,
TPhoneCmdParamCallHeaderData* aCallHeaderData );
@@ -436,6 +472,21 @@
IMPORT_C void GetRemoteInfoDataL( TInt aCallId, TDes& aData );
/**
+ * Sets context menu
+ *
+ * @param aResourceId resource
+ */
+ IMPORT_C virtual void SetContextMenuL( TInt aResourceId );
+
+ /**
+ * Sets context menu to correspond the incoming options menu
+ *
+ * @param aCallId incoming call id
+ */
+ IMPORT_C virtual void UpdateIncomingContextMenuL( TInt aCallId );
+
+
+ /**
* Show note
* @param aResourceId resource id to be resolved
*/
@@ -463,6 +514,12 @@
TBool aSendKeyEnabled = EFalse );
/**
+ * Check if note is visible
+ * @return boolean value indicating that note is visible
+ */
+ IMPORT_C TBool IsNoteVisibleL();
+
+ /**
* Handle numeric key event
*/
IMPORT_C virtual void HandleNumericKeyEventL(
@@ -474,11 +531,11 @@
* @return boolean value indicating that application needs to be
* sent to the background
*/
- IMPORT_C TBool NeedToSendToBackgroundL() const;
+ IMPORT_C TBool NeedToReturnToForegroundAppL() const;
/**
- * Check if the top application is currently displayed in the foreground
- * @return boolean value indicating that top app is displayed
+ * Check if the top application is idle or phone app.
+ * @return boolean value indicating that top app is idle/phone application.
*/
IMPORT_C TBool TopAppIsDisplayedL() const;
@@ -508,11 +565,8 @@
/**
* Show global WarningNote
* @param aResourceId resource id to be resolved
- * @param aNotificationDialog True if notification dialog
- * should be used.
*/
- IMPORT_C void SendGlobalWarningNoteL( TInt aResourceId,
- TBool aNotificationDialog = EFalse );
+ IMPORT_C void SendGlobalWarningNoteL( TInt aResourceId );
/**
* Checks is the call id a video call.
@@ -574,7 +628,7 @@
/**
* Sets the call header type used in the call bubble.
*/
- IMPORT_C void SetCallHeaderType( TInt aCallHeaderType );
+ IMPORT_C void SetCallHeaderType( const CBubbleManager::TPhoneCallTypeFlags aCallHeaderType );
/**
* Handles situation when hash key has been kept down long
@@ -610,10 +664,42 @@
IMPORT_C void SetTouchPaneButtons( TInt aResourceId );
/*
+ * Sets touchpane visibility.
+ *
+ * @param ETrue if visible otherwise EFalse.
+ */
+ IMPORT_C void SetTouchPaneVisible( TBool aVisible );
+
+ /*
* Destroys touchpane buttons.
*/
IMPORT_C void DeleteTouchPaneButtons();
+ /*
+ * Enables touchpane button that holds given command id.
+ *
+ * @param aCommandId Command id.
+ */
+ IMPORT_C void SetTouchPaneButtonEnabled( TInt aCommandId );
+
+ /*
+ * Disables touchpane button that holds given command id.
+ *
+ * @param aCommandId Command id.
+ */
+ IMPORT_C void SetTouchPaneButtonDisabled( TInt aCommandId );
+
+ /*
+ * Checks if DTMF editor is active,
+ * @return true is DTMF is active
+ */
+ IMPORT_C TBool IsDTMFEditorVisibleL() const;
+
+ /**
+ * Closes dtmf editor.
+ */
+ IMPORT_C void CloseDTMFEditorL();
+
/**
* Set default flags values.
* No active call
@@ -637,11 +723,40 @@
* @param aCallId: the call id of the call
*/
IMPORT_C void HandleDisconnectingL( TInt aCallId );
+
+ /**
+ * Returns customized dialer menu resource id
+ */
+ IMPORT_C TInt CustomizedDialerMenuResourceIdL();
+
+ /**
+ * Returns customized dialer CBA resource id
+ */
+ IMPORT_C TInt CustomizedDialerCbaResourceIdL();
/**
- * Opens soft reject message editor.
+ * Forwards Phone Engine messages to Phone customization
+ * @param aMessage Message from Phone Engine
+ * @param aCallId Call id the message concerns
+ * @return ETrue if message was handled
*/
- IMPORT_C virtual void OpenSoftRejectMessageEditorL();
+ IMPORT_C TBool ForwardPEMessageToPhoneCustomizationL(
+ const TInt aMessage,
+ TInt aCallId );
+
+ /**
+ * Sets up all call setup to display.
+ * @param aCallId - call id to set up
+ */
+ IMPORT_C void DisplayCallSetupL( TInt aCallId );
+
+ /**
+ * Sets the flag wether the foreground application
+ * needs to be brought foreground after the phone
+ * goes idle
+ */
+ IMPORT_C void SetNeedToReturnToForegroundAppStatusL(
+ TBool aNeedToReturn );
protected: // NumberEntry functions.
@@ -679,6 +794,11 @@
IMPORT_C void StoreNumberEntryContentL();
/**
+ * Restores the number entry content from the cache
+ */
+ IMPORT_C void RestoreNumberEntryContentL();
+
+ /**
* Clears the number entry content cache
*/
IMPORT_C void ClearNumberEntryContentCache();
@@ -694,6 +814,11 @@
IMPORT_C TBool IsOnScreenDialerSupported() const;
/**
+ * Informs phoneengine that phone number has been edited i.e. phonenumber parser is run
+ */
+ IMPORT_C virtual void HandleNumberEntryEdited();
+
+ /**
* Returns ETrue if alphanumeric characters are supported.
* @param aKeyEvent Key event.
* @return ETrue if alphanumeric chars are supported.
@@ -710,17 +835,35 @@
* Internal number entry handling methods.
*/
void NumberEntryClearL();
+
+
+ /**
+ * Dims silence touch button if call is not alerting.
+ * @param None
+ */
+ IMPORT_C void UpdateSilenceButtonDimming();
+
+ /**
+ * Sets toolbar dimming.
+ * @param aDimmed ETrue if dimmed
+ */
+ IMPORT_C void SetToolbarDimming( TBool aDimmed );
/**
* Sets toolbar loudspeaker button enabled.
*/
IMPORT_C void SetToolbarButtonLoudspeakerEnabled();
-
+
/**
- * Sets state of TitleBar Back button
+ * Sets toolbar handset button enabled.
*/
- IMPORT_C void SetBackButtonActive( TBool aActive );
+ IMPORT_C void SetToolbarButtonHandsetEnabled();
+ /**
+ * Sets Bluetooth handsfree button enabled.
+ */
+ IMPORT_C void SetToolbarButtonBTHFEnabled();
+
protected:
/**
@@ -739,6 +882,11 @@
TBool IsWaitingCallL( const TInt aCallId );
/**
+ * Shows dtmf dialer
+ */
+ void ShowDtmfDialerL();
+
+ /**
* Checks status of KFeatureIdSideVolumeKeys and KTelephonyLVFlagScrollVolumeKeys
* keys. If KTelephonyLVFlagScrollVolumeKeys is false and KFeatureIdSideVolumeKeys is true
* then side volume keys are only supported and method returns true, otherwise false.
@@ -756,6 +904,12 @@
private:
/**
+ * Update incall indicator
+ * @param aCallState a call state
+ */
+ void UpdateIncallIndicatorL( TInt aCallState );
+
+ /**
* Handle EPEMessageChangedCallDuration
* @param aCallId call id of the message
*/
@@ -767,6 +921,11 @@
void UpdateProfileDisplayL();
/**
+ * Update operator display
+ */
+ void UpdateOperatorDisplayL();
+
+ /**
* Sends key down event to the phone engine
* @param aKeyEvent a key event
* @param aEventCode key event code
@@ -785,6 +944,11 @@
TEventCode aEventCode );
/**
+ * ETrue if title pane is visible
+ */
+ TBool TitlePaneIsVisibleL() const;
+
+ /**
* Change Audio volume level
* @param aLevel New volume level.
* @param aUpdateControl Set ETrue if volume ui control
@@ -806,11 +970,21 @@
void HandleInitiatedEmergencyWhileActiveVideoL();
/**
+ * Shows IMEI note
+ */
+ void HandleShowImeiL();
+
+ /**
* Handles network ciphering info changes
*/
void HandleCallSecureStatusChangeL( TInt aCallId );
/**
+ * Shows Life time note
+ */
+ void HandleShowLifeTimerL();
+
+ /**
* Handles change als line command
*/
void ChangeAlsLineL();
@@ -833,6 +1007,7 @@
*/
void ShowWlanMacAddressL();
+
/**
* Check if ALS line change is possible
*/
@@ -861,6 +1036,12 @@
static void UiUpdateCleanup(TAny* aThis );
/**
+ * TCleanupOperation to call EndTransEffect, if leave occurs
+ * after BeginTransEffect().
+ */
+ static void EffectCleanup(TAny* aThis );
+
+ /**
* Gets volume level from ui control.
*/
TInt GetVolumeLevel();
@@ -936,6 +1117,33 @@
*/
void LoadResource( TDes& aData, const TInt aResource ) const;
+ /**
+ * Opens virtual keyboard.
+ */
+ void OpenVkbL();
+
+ /**
+ * Handles commands sent by easydialing plugin.
+ * @param aCommandId - command id to be handled
+ */
+ void HandleEasyDialingCommandsL( TInt aCommandId );
+
+ /**
+ * Sets little bubble value if dialler is open.
+ */
+ void SetLittleBubbleVisibilityL(TPhoneCommandParam* aCommandParam);
+
+ private: // NumberEntry functions.
+
+ /**
+ * Handles key events in situations when there exists a number entry.
+ * In this case number entry may be visible or hidden.
+ * @param aKeyEvent - key event
+ * @param aEventCode - event code
+ */
+ void KeyEventForExistingNumberEntryL(
+ const TKeyEvent& aKeyEvent,
+ TEventCode aEventCode );
protected: // Data
@@ -981,7 +1189,7 @@
// Internal variable for EikonEnv to avoid
// use of static system calls
- CEikonEnv& iEnv;
+ CEikonEnv* iEnv; // Not owned
// Call header manager.
CPhoneCallHeaderManager* iCallHeaderManager;