--- a/phoneapp/phoneuiqtviewadapter/inc/phonecallheaderutil.h Fri Sep 17 17:09:12 2010 +0300
+++ b/phoneapp/phoneuiqtviewadapter/inc/phonecallheaderutil.h Mon Oct 04 16:06:10 2010 +0300
@@ -21,7 +21,6 @@
//INCLUDES
#include "mpeengineinfo.h"
-#include "tphonecmdparamcallheaderdata.h"
//FORWARD
class MPEEngineInfo;
@@ -34,7 +33,13 @@
class PhoneCallHeaderUtil
{
public: // Constructors & destructors.
-
+
+ enum ClippingDirection
+ {
+ ERight = 0,
+ ELeft
+ };
+
/**
* C++ constructor.
*/
@@ -45,209 +50,163 @@
public: // New functions.
/**
- * Sets info to outgoing call header.
- * @param aCallId - call id.
- * @param aWaitingCall - if call is waiting value is ETrue otherwise EFalse.
- * @param aVideoCall - if call is video value is ETrue otherwise EFalse.
- * @param aCallHeaderData - Call header parameter into which the text/picture
- * parameters will be set.
- */
- void SetIncomingCallHeaderParams(
- const TInt aCallId,
- const TBool aWaitingCall,
- const TBool aVideoCall,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
- /**
- * Sets info to outgoing call header.
- * @param aCallId - call id.
- * @param aCallHeaderData - Call header parameter into which the text/picture
- * parameters will be set.
- */
- void SetOutgoingCallHeaderParams(
- const TInt aCallId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
- /**
- * Updates call header info.
- * NOTE: This method is used when state receives
- * EPEMessageRemotePartyInfoChanged from PhoneEngine.
- *
- * @param aCallId - call id.
- * @param aWaitingCall - if call is waiting value is ETrue otherwise EFalse.
- * @param aVideoCall - if call is video value is ETrue otherwise EFalse.
- * @param aCallHeaderData - Call header parameter into which the text/picture
- * parameters will be set.
- */
- void UpdateCallHeaderInfo(
- const TInt aCallId,
- const TBool aWaitingCall,
- const TBool aVideoCall,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
-
- /**
- * Sets the call header type used in the call bubble.
- * @param aCallHeaderType, call header type.
- */
- void SetCallHeaderType(
- TInt aCallHeaderType );
- /**
- * Returns the set call header type. Used for constructing right type
- * of call bubble.
- */
- TInt CallHeaderType() const;
-
- /**
- * 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.
- */
- void SetDivertIndication( const TBool aDivertIndication );
-
- /**
- * Return remote info data
- * @return True if secondary CLI is used
- * @param aCallid call id
- * @param aData the returned remote info data
- */
- TBool GetRemoteInfoData(
- const TInt aCallId,
- TDes& aData ) const;
-
- /**
- * Sets texts for voice call header.
- * @param aCallId - Call Id.
- * @param aWaitingCall - Waiting call indication.
- * @param aCallHeaderData - Call header parameter into which the text
- * will be set.
- */
- void SetCallHeaderTexts(
- const TInt aCallId,
- const TBool aWaitingCall,
- const TBool aVideoCall,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
-
- /**
* Returns the call header label text
* @return Returns the label
*/
const TDesC& LabelText( TInt aCallId );
- const TDesC& EmergencyHeaderText();
+ /**
+ * Gets the call cli texts.
+ */
+ void GetCliTexts(
+ TInt aCallId,
+ TDes& aCliText,
+ ClippingDirection &aCliClip,
+ TDes& aSecondaryCliText,
+ ClippingDirection &aSecondaryCliClip );
- const TDesC& AttemptingEmergencyText();
+ /**
+ * Gets the cli text.
+ * @return Returns cli text.
+ */
+ void GetCli( TInt aCallId, TDes& aCliText,
+ ClippingDirection &aClipping );
+
+ /**
+ * Gets the secondary cli text.
+ */
+ void GetSecondaryCli( TInt aCallId,
+ TDes& aSecondaryCliText,
+ ClippingDirection &aClipping );
+
+ /**
+ * Remote phone number.
+ * @return Phone number for remote end.
+ */
+ const TDesC& RemotePhoneNumber( TInt aCallId ) const;
/**
- * Returns the call header call state.
+ * Returns the call type.
+ * @return Returns call type.
+ */
+ TInt CallType( const TInt aCallId );
+
+ /**
+ * Returns service id.
+ * @return Returns service id.
+ */
+ TInt ServiceId( const TInt aCallId );
+
+ /**
+ * Returns flag is the call forwarded.
+ * @return Returns is forwarded.
+ */
+ TBool IsCallForwarded( TInt aCallId );
+
+ /**
+ * Returns secure specified status.
+ * @return Returns secure specified status.
+ */
+ TBool SecureSpecified();
+
+ /**
+ * Returns ciphering status.
+ * @return Returns ciphering status.
+ */
+ TBool Ciphering( TInt aCallId );
+
+ /**
+ * Returns the call state.
* @return Returns the call state
*/
TInt CallState( TInt aCallId ) const;
- void LoadResource( TDes& aData, const TInt aResource ) const;
-
- HBufC* LoadResource( const TInt aResource ) const;
-
- private:
-
-
-
- /**
- * Set basic info to call header.
- * @param aCallId - call id.
- * @param aCallHeaderData - Call header parameter into which the text/picture
- * parameters will be set.
- */
- void SetBasicCallHeaderParams(
- const TInt aCallId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
-
/**
- * Sets divert indication to call header if necessary
- * @param aCallId - Call Id.
- * @param aCallHeaderData - Call header where indication will be set
- * if needed.
- */
- void SetDivertIndicatorToCallHeader(
- const TInt aCallId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
-
+ * Returns the caller image.
+ * @return Returns the caller image.
+ */
+ const TDesC& CallerImage( const TInt aCallId );
+
/**
- * Sets divert indication to call header if necessary
- * @param aFeatureKey - feature key id Id.
- * @param aCallId - Call Id.
- */
- TBool IsFeatureSupported(
- const TInt aFeatureKey,
- const TInt aCallId ) const;
-
- /**
- * Return CNAP (Calling Name Presentation) text
- * @param aCallid call id
- * @param aData the returned CNAP text
- * @param aDirection the returned CNAP clipping direction
- */
- void GetCNAPText(
- const TInt aCallId,
- TDes& aData,
- TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection& aDirection ) const;
+ * Returns emergency call header text.
+ * @return Returns emergency call header text.
+ */
+ const TDesC& EmergencyHeaderText();
/**
- * Check if contact is available(RemoteName or RemoteCompanyName),
- * if available ETrue is returned otherwise EFalse.
- * @param aCallid call id
- */
- TBool ContactInfoAvailable(
- const TInt aCallId ) const;
-
- /**
- * Returns call type and stores type to member variable.
- * @param aCallId - Call Id.
- * @param aCallHeaderData - Call header data.
- */
- TPECallType GetCallType(
- const TInt aCallId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
+ * Returns emergency call label text.
+ * @return Returns emergency call label text.
+ */
+ const TDesC& AttemptingEmergencyText();
/**
- * Sets caller image.
- * @param aCallId - Call Id.
- * @param aCallHeaderData - Call header parameter where modifications
- * are made.
- */
- void SetCallerImage(
- const TInt aCallId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
-
- /**
- * Updates cli and cnap parameters to call header.
- * @param aCallId - Call Id.
- * @param aCallHeaderData - Call header parameter where modifications
- * are made.
+ * Check if the call is video call.
+ * @param aCallid call id
*/
- void SetCliAndCnapParamaters(
- const TInt aCallId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
+ TBool IsVoiceCall(TInt aCallId) const;
+
/**
- * Updates cli parameter to call header.
- * @param aCallId - Call Id.
- * @param aCallHeaderData - Call header parameter where modifications
- * are made.
+ * Check if the call is video call.
+ * @param aCallid call id
*/
- void SetCliParamaters(
- const TInt aCallId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
-
- void LoadCallHeaderTexts(
- const TInt aLabelId,
- TPhoneCmdParamCallHeaderData* aCallHeaderData );
-
TBool IsVideoCall(int aCallId ) const;
private:
+ /**
+ * Sets label text for incoming call.
+ * @param aCallId - Call Id.
+ */
+ void SetCallHeaderLabelTextForRingingCall( TInt aCallId );
+
+ /**
+ * Check if remote name info is available
+ * (RemoteName, RemotePartyName or RemoteCompanyName),
+ * if available ETrue is returned otherwise EFalse.
+ * @param aCallid call id
+ */
+ TBool RemoteNameAvailable( const TInt aCallId ) const;
+
+ /**
+ * Gets remote info data
+ * @param aCallid call id
+ * @param aData the returned remote info data
+ */
+ void GetRemoteInfoData(
+ const TInt aCallId,
+ TDes& aData ) const;
+
+ /**
+ * Checks is the secondary cli allowed for the call.
+ * @param aCallid call id
+ * @return ETrue if allowed to show the secondary cli.
+ */
+ TBool IsSecondaryCliAllowed( TInt aCallId );
+
+ /**
+ * Check if the call is waiting call.
+ * @param aCallid call id
+ */
+ TBool IsWaitingCall(int callId) const;
+
+ /**
+ * Loads resource text.
+ * @return Returns loaded text.
+ */
+ HBufC* LoadResource( const TInt aResource ) const;
+
+ /**
+ * Loads recource text.
+ */
+ void LoadResource( TDes& aData, const TInt aResource ) const;
+
+ private:
+
MPEEngineInfo& m_engineInfo;
- TInt iCallHeaderType;
- TBool iSetDivertIndication;
HBufC *iLabelText;
+ HBufC *iCliText;
+ HBufC *iSecondaryCliText;
+ HBufC *iCallerImage;
HBufC *iEmergencyHeaderText;
HBufC *iAttemptingEmergencyText;