--- a/ccservices/cmsservices/cmsengine/Client/bwinscw/cmsclientu.def Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Client/bwinscw/cmsclientu.def Fri Mar 12 15:41:25 2010 +0200
@@ -40,4 +40,6 @@
?UserIdentity@CCmsPresenceData@@QBE?AVTPtrC8@@XZ @ 39 NONAME ; class TPtrC8 CCmsPresenceData::UserIdentity(void) const
?Version@RCmsSession@@QBE?AVTVersion@@XZ @ 40 NONAME ; class TVersion RCmsSession::Version(void) const
?Info@CCmsContactFieldItem@@QBE?AVTPtrC16@@XZ @ 41 NONAME ; class TPtrC16 CCmsContactFieldItem::Info(void) const
+ ?IsTopContact@RCmsContact@@QAEHXZ @ 42 NONAME ; int RCmsContact::IsTopContact(void)
+ ?SetVoiceCallDefault@RCmsContact@@QBEXAAVTRequestStatus@@@Z @ 43 NONAME ; void RCmsContact::SetVoiceCallDefault(class TRequestStatus &) const
--- a/ccservices/cmsservices/cmsengine/Client/eabi/cmsclientu.def Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Client/eabi/cmsclientu.def Fri Mar 12 15:41:25 2010 +0200
@@ -58,4 +58,6 @@
_ZTV20CCmsContactFieldInfo @ 57 NONAME ; #<VT>#
_ZTV20CCmsContactFieldItem @ 58 NONAME ; #<VT>#
_ZNK20CCmsContactFieldItem4InfoEv @ 59 NONAME
+ _ZN11RCmsContact12IsTopContactEv @ 60 NONAME
+ _ZNK11RCmsContact19SetVoiceCallDefaultER14TRequestStatus @ 61 NONAME
--- a/ccservices/cmsservices/cmsengine/Client/src/cmscontact.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Client/src/cmscontact.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -282,6 +282,16 @@
}
// ----------------------------------------------------
+// RCmsContact::SetVoiceCallDefault
+//
+// ----------------------------------------------------
+//
+EXPORT_C void RCmsContact::SetVoiceCallDefault( TRequestStatus& aStatus ) const
+ {
+ SendReceive( ECmsSetVoiceCallDefault, TIpcArgs(), aStatus );
+ }
+
+// ----------------------------------------------------
// RCmsContact::SendMessage
//
// ----------------------------------------------------
@@ -433,4 +443,21 @@
}
}
+// ----------------------------------------------------
+// RCmsContact::IsTopContact
+//
+// ----------------------------------------------------
+//
+EXPORT_C TBool RCmsContact::IsTopContact()
+ {
+ #ifdef _DEBUG
+ RCmsSession::WriteToLog( _L8( "RCmsContact::IsTopContact()" ) );
+ #endif
+ TInt isTop( EFalse );
+ TPckg<TInt> pack( isTop );
+ SendReceive(ECmsIsTopContact, TIpcArgs(&pack));
+
+ return isTop;
+ }
+
--- a/ccservices/cmsservices/cmsengine/Client/src/cmssession.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Client/src/cmssession.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -117,7 +117,7 @@
#ifdef _DEBUG
RCmsSession::WriteToLog( _L8( "RCmsSession::IsRunning()" ) );
#endif
- TFindServer findServer( KCmsServerName );
+ TFindServer findServer( KCmsServerLib );
TFullName name;
return ( findServer.Next( name ) == KErrNone );
}
--- a/ccservices/cmsservices/cmsengine/Server/group/cmsserver.mmp Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/group/cmsserver.mmp Fri Mar 12 15:41:25 2010 +0200
@@ -40,6 +40,7 @@
SOURCE cmsserverasynccontact.cpp
SOURCE cmsserverxspcontacthandler.cpp
SOURCE cmsfindlinkedcontact.cpp
+SOURCE cmssetvoicecalldefault.cpp
USERINCLUDE ../inc
USERINCLUDE ../../inc
--- a/ccservices/cmsservices/cmsengine/Server/inc/cmscontactinterface.h Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/inc/cmscontactinterface.h Fri Mar 12 15:41:25 2010 +0200
@@ -37,7 +37,7 @@
EContactDeleted
};*/
- virtual TBool OfferContactEventL( TCmsPhonebookEvent aEventType,
+ virtual void OfferContactEventL( TCmsPhonebookEvent aEventType,
const MVPbkContactLink* aContactLink ) = 0;
virtual void ContactReadyL( TInt error, MVPbkStoreContact* aContact ) = 0;
@@ -52,6 +52,8 @@
virtual void HandleError( TInt aError ) = 0;
+ virtual void FetchContactL ( MVPbkContactLink* aContactLinkToFetch ) = 0;
+
};
#endif //__CMSCONTACTINTERFACE__
--- a/ccservices/cmsservices/cmsengine/Server/inc/cmsphonebookproxy.h Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/inc/cmsphonebookproxy.h Fri Mar 12 15:41:25 2010 +0200
@@ -50,6 +50,7 @@
class CVPbkContactStoreUriArray;
class CVPbkContactViewDefinition;
class MVPbkContactFindFromStoresObserver;
+class CmsSetVoiceCallDefault;
/**
* CCmsPhonebookProxy keeps all stores opened to speed up contact
@@ -181,6 +182,11 @@
* Destructor
*/
~CCmsPhonebookProxy();
+
+ /**
+ * Set default attribute for voice call
+ */
+ void SetVoiceCallDefaultL();
public:
@@ -316,6 +322,10 @@
RFs& iFileSessionHandle;
/// Array to keep a list of installed xSP stores. Owned.
CDesCArrayFlat ixSPStoresArray;
+ /// Default setting handle
+ CmsSetVoiceCallDefault* iSetDefault;
+ /// Store contact
+ MVPbkStoreContact* iContact;
};
#endif //__CMSPHONEBOOKPROXY__
--- a/ccservices/cmsservices/cmsengine/Server/inc/cmsservercontact.h Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/inc/cmsservercontact.h Fri Mar 12 15:41:25 2010 +0200
@@ -23,6 +23,7 @@
// INCLUDES
#include "cmscontact.h"
#include <VPbkEng.rsg>
+#include <MVPbkSingleContactOperationObserver.h>
#include "bpasobserver.h"
#include "cmscontactinterface.h"
#include "mpresencetrafficlightsobs.h"
@@ -48,7 +49,8 @@
NONSHARABLE_CLASS( CCmsServerContact ) : public CBase,
public MBPASObserver,
public MCmsContactInterface,
- public MPresenceIconNotifier
+ public MPresenceIconNotifier,
+ public MVPbkSingleContactOperationObserver
{
public:
@@ -180,6 +182,13 @@
*/
void StartNextFindOperationL( TInt aNextFindStringPos );
+ /**
+ * Checks whether the Current contact is top contact.
+ *
+ * @param aMessage Kernel message with client's data
+ */
+ void IsTopContactL( const RMessage2& aMessage );
+
private:
/**
@@ -349,13 +358,14 @@
private: //From MCmsContactInterface
void ContactReadyL( TInt aError, MVPbkStoreContact* aContact );
- TBool OfferContactEventL( TCmsPhonebookEvent aEventType,
+ void OfferContactEventL( TCmsPhonebookEvent aEventType,
const MVPbkContactLink* aContactLink );
const MVPbkStoreContact& Contact() const;
TBool HandleField( HBufC* aFieldData );
TBool HandleField( HBufC8* aFieldData );
TBool HandleEnabledFields( HBufC* aEnabledFields );
void HandleError( TInt aError );
+ void FetchContactL( MVPbkContactLink* aContactLinkToFetch);
private: //From MBPASObserver
@@ -374,6 +384,15 @@
MVPbkContactLink* aLink,
RPointerArray <MPresenceServiceIconInfo>& aInfoArray,
TInt aId );
+
+ private: //From MVPbkSingleContactOperationObserver
+
+ void VPbkSingleContactOperationComplete(
+ MVPbkContactOperationBase& aOperation,
+ MVPbkStoreContact* aContact );
+ void VPbkSingleContactOperationFailed(
+ MVPbkContactOperationBase& aOperation,
+ TInt aError );
private: //Data
@@ -448,6 +467,10 @@
/// Array of find operations in xSP stores. Owned.
RPointerArray<MVPbkContactOperationBase> iXSPFindOperationsArray;
+
+ /// Used to save Retrieve Contact operation. Owned.
+ MVPbkContactOperationBase* iOperation;
+
};
#endif //__CMSSERVERCONTACT__
--- a/ccservices/cmsservices/cmsengine/Server/inc/cmsserversession.h Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/inc/cmsserversession.h Fri Mar 12 15:41:25 2010 +0200
@@ -191,6 +191,13 @@
* @param aMessage Kernel message with client's data
*/
void DoServiceL( const RMessage2& aMessage );
+
+ /**
+ * Checks whether the Current contact is top contact.
+ *
+ * @param aMessage Kernel message with client's data
+ */
+ void IsTopContactL( const RMessage2& aMessage );
private: //Data
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ccservices/cmsservices/cmsengine/Server/inc/cmssetvoicecalldefault.h Fri Mar 12 15:41:25 2010 +0200
@@ -0,0 +1,175 @@
+/*
+* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of auto setting default for voice call
+*
+*/
+
+#ifndef CMSSETVOICECALLDEFAULT_H_
+#define CMSSETVOICECALLDEFAULT_H_
+
+#include <e32base.h>
+#include <mvpbksinglecontactoperationobserver.h>
+#include <mvpbkcontactattributemanager.h>
+#include <mvpbkcontactstoreobserver.h>
+#include <vpbkfieldtype.hrh>
+#include <mvpbkcontactobserver.h>
+#include <mvpbkbatchoperationobserver.h>
+
+class CmsSetVoiceCallDefault:
+ public CBase,
+ public MVPbkSetAttributeObserver,
+ public MVPbkContactObserver
+{
+public:
+
+ enum TCmsVoiceCallPriority
+ {
+ ECCACommLauncherCallMobile = 0,
+ ECCACommLauncherCallMobileHome,
+ ECCACommLauncherCallMobileWork,
+ ECCACommLauncherCallTelephone,
+ ECCACommLauncherCallTelephoneWork,
+ ECCACommLauncherCallTelephoneHome,
+ ECCACommLauncherCallCarPhone,
+ ECCACommLauncherCallAssistant,
+ ECCACommLauncherCallLast
+ };
+
+ /**
+ * Two phased constructor.
+ */
+ static CmsSetVoiceCallDefault* NewL();
+
+ /**
+ * Destructor.
+ */
+ ~CmsSetVoiceCallDefault();
+
+
+private: // From MVPbkSetAttributeObserver
+
+ void AttributeOperationComplete(
+ MVPbkContactOperationBase& aOperation );
+ void AttributeOperationFailed(
+ MVPbkContactOperationBase& aOperation,
+ TInt aError );
+
+public:
+
+ void SetVoiceCallDefaultL( MVPbkStoreContact* aContact, CVPbkContactManager* aContactManager );
+
+private: // From MVPbkContactObserver
+
+ void ContactOperationCompleted(
+ TContactOpResult aResult );
+
+ void ContactOperationFailed(
+ TContactOp aOpCode,
+ TInt aErrorCode,
+ TBool aErrorNotified );
+
+private:
+
+ /**
+ * ConstructL
+ */
+ void ConstructL();
+
+ CmsSetVoiceCallDefault();
+
+private: // New implemetations
+
+ /* Lock contact before setting default
+ * @param - none
+ * @return - none
+ */
+ void LockContactL();
+
+
+ /* Do set default atrribut
+ * @param: aDefaultType - default type
+ * @return: aIndex - the field index which will be set default attribute
+ */
+ void DoSetDefaultL( TVPbkDefaultType aDefaultType, TInt aIndex );
+
+
+ /*
+ * Check if default setting is needed
+ * if the contact has no call field
+ * or call default has been set, then the setting doesn't need.
+ * @return: True for setting needed, otherwize return false.
+ */
+ TBool IsSettingDefaultNeededL();
+
+ /* Get call field resource id
+ * @param: aPriority - setting priority
+ * @return: field resource id
+ */
+ TInt GetCallFieldResourceId( TInt aPriority );
+
+ /*
+ * Get field index from field resource id
+ * @param: aResourceId - field resource id
+ * @param: aIndex - the field index
+ * @return: Ture for find the specified field, otherwize return false.
+ */
+ TBool FieldIndex( TInt aResourceId, TInt& aIndex );
+
+ /* Default setting complete
+ * @param - none
+ * @return - none
+ */
+ void DefaultSettingCompleteL();
+
+ /* Process finished
+ * @param:aError - error id
+ * @return - none
+ */
+ void ProcessFinished( TInt aError );
+
+ /* Handle error
+ * @param:aError - error id
+ * @return - none
+ */
+ void HandleError( TInt aError );
+
+ /* Check if the contact is phone memory contact
+ * @param: aContact - the contact to be check
+ * @return: true for phone memory contact, otherwise return false
+ */
+ TBool IsPhoneMemoryContact(
+ const MVPbkStoreContact& aContact) const;
+
+ /*
+ * To set voice call default
+ */
+ void ToSetVoiceCallDefaultL();
+
+private: // Member variables
+
+ // Not own: store contact
+ MVPbkStoreContact* iStoreContact;
+
+ // Not own: contact manager
+ CVPbkContactManager* iContactManager;
+
+ // Own: attribut operation
+ MVPbkContactOperationBase* iSetAttributeOperation;
+
+ // Own: filed index array
+ RArray<TInt> iFieldIndexArray;
+
+ };
+
+#endif /* CMSSETVOICECALLDEFAULT_H_ */
--- a/ccservices/cmsservices/cmsengine/Server/src/cmsphonebookproxy.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/src/cmsphonebookproxy.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -37,6 +37,7 @@
#include "cmsdefines.h"
#include "cmsserver.h"
#include "cmsdebug.h"
+#include "cmssetvoicecalldefault.h"
#include "cmsfindlinkedcontact.h"
#include <MVPbkContactLink.h>
@@ -88,6 +89,7 @@
iStoreConfiguration = CPbk2StoreConfiguration::NewL();
iStoreConfiguration->AddObserverL( *this );
CreateConfigurationL();
+ iSetDefault = CmsSetVoiceCallDefault::NewL();
PRINT ( _L("End CCmsPhonebookProxy::ConstructL()") );
}
@@ -110,6 +112,7 @@
}
iObserverArray.Close();
ixSPStoresArray.Reset();
+ delete iSetDefault;
}
// ----------------------------------------------------------
@@ -228,14 +231,9 @@
{
contactLinkToFetch = contactLink.CloneLC();
}
-
- //Retreive the contact Info
- if( iOperation )
- {
- delete iOperation;
- iOperation = NULL;
- }
- iOperation = iContactManager->RetrieveContactL( *contactLinkToFetch, *this );
+ // Send the latest contact link to cmsservercontact
+ // to fetch contact.
+ iContactInterface->FetchContactL( contactLinkToFetch );
CleanupStack::PopAndDestroy(); //contactLinkToFetch
if ( findLinkedContact )
@@ -406,6 +404,16 @@
}
// ----------------------------------------------------------
+// CCmsPhonebookProxy::SetVoiceCallDefaultL
+//
+// ----------------------------------------------------------
+//
+void CCmsPhonebookProxy::SetVoiceCallDefaultL()
+ {
+ iSetDefault->SetVoiceCallDefaultL( iContact, iContactManager );
+ }
+
+// ----------------------------------------------------------
// CCmsPhonebookProxy::ExternalStoresIntalled
//
// ----------------------------------------------------------
@@ -542,15 +550,15 @@
{
PRINT( _L("Start CCmsPhonebookProxy::HandleStoreEventL()" ) );
- TBool found = EFalse;
const TInt count = iObserverArray.Count();
- for( TInt i = 0;!found && i < count;i++ )
+ // send store event to all observers
+ for( TInt i = 0; i < count ; i++ )
{
MCmsContactInterface* observer( iObserverArray[i] );
if( observer )
{
TCmsPhonebookEvent event = SelectEventType( aStoreEvent.iEventType );
- found = observer->OfferContactEventL( event, aStoreEvent.iContactLink );
+ observer->OfferContactEventL( event, aStoreEvent.iContactLink );
}
}
PRINT( _L("End CCmsPhonebookProxy::HandleStoreEventL()" ) );
@@ -719,6 +727,7 @@
PRINT( _L( "Start CCmsPhonebookProxy::VPbkSingleContactOperationComplete()" ) );
ResetData();
+ iContact = aContact;
CompleteContactRequestL( KErrNone, aContact );
iCmsPhonebookOperationsObserver.CmsSingleContactOperationComplete( KErrNone );
--- a/ccservices/cmsservices/cmsengine/Server/src/cmsservercontact.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/src/cmsservercontact.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -30,6 +30,7 @@
#include <MVPbkContactFieldUriData.h>
#include <MVPbkContactStoreProperties.h>
#include <MVPbkContactOperationBase.h>
+#include <CVPbkTopContactManager.h>
#include <featmgr.h>
#include <crcseprofileregistry.h>
@@ -127,6 +128,7 @@
delete iCachedField16;
delete iBrandedPresence;
delete iPackedContactLinkArray;
+ delete iOperation;
iPresenceEvents.ResetAndDestroy();
iPhonebookEvents.ResetAndDestroy();
iPresenceEvents.Close();
@@ -198,14 +200,13 @@
//
// ----------------------------------------------------
//
-TBool CCmsServerContact::OfferContactEventL( TCmsPhonebookEvent aEventType,
+void CCmsServerContact::OfferContactEventL( TCmsPhonebookEvent aEventType,
const MVPbkContactLink* aContactLink )
{
PRINT( _L(" Start CCmsServerContact::OfferContactEventL()" ) );
TBuf<5> buffer( _L( "" ) );
-
if ( !iContact )
{
buffer.AppendNum( aEventType );
@@ -213,15 +214,12 @@
CleanupStack::PushL( event );
User::LeaveIfError( iPhonebookEvents.Append( event ) );
CleanupStack::Pop(); //event
-
- return ETrue;
+ return;
}
- TBool linkConsumed = EFalse;
MVPbkContactLink* self = Contact().CreateLinkLC();
if( aContactLink && aContactLink->IsSame( *self ) )
{
- linkConsumed = ETrue;
buffer.AppendNum( aEventType );
if( ECmsContactDeleted == aEventType )
@@ -261,7 +259,6 @@
}
CleanupStack::PopAndDestroy(); //self
PRINT( _L(" End CCmsServerContact::OfferContactEventL()" ) );
- return linkConsumed;
}
// ----------------------------------------------------
@@ -1449,4 +1446,65 @@
CleanupStack::PopAndDestroy( data );
}
+// ----------------------------------------------------------
+// CCmsServerContact::IsTopContactL
+//
+// ----------------------------------------------------------
+//
+void CCmsServerContact::IsTopContactL( const RMessage2& aMessage )
+ {
+ PRINT( _L(" Start CCmsServerContact::IsTopContactL()" ) );
+
+ __ASSERT_DEBUG( iContact, CCmsServer::PanicServer( ENullContactHandle ) );
+
+ TBool isFav( EFalse );
+ isFav = CVPbkTopContactManager::IsTopContact( *iContact );
+
+ TPckgC<TInt> isTopContact( isFav );
+ aMessage.WriteL( KFirstParam, isTopContact );
+
+ aMessage.Complete( KErrNone );
+
+ PRINT( _L(" End CCmsServerContact::IsTopContactL()" ) );
+ }
+// ----------------------------------------------------
+// CCmsServerContact::VPbkSingleContactOperationComplete
+//
+// ----------------------------------------------------
+//
+void CCmsServerContact::VPbkSingleContactOperationComplete(
+ MVPbkContactOperationBase& /*aOperation*/,
+ MVPbkStoreContact* aContact )
+ {
+ TRAPD( res, ContactReadyL( KErrNone, aContact ) );
+ iCmsServer.CmsSingleContactOperationComplete( res );
+ }
+
+// ----------------------------------------------------
+// CCmsServerContact::VPbkSingleContactOperationFailed
+//
+// ----------------------------------------------------
+//
+void CCmsServerContact::VPbkSingleContactOperationFailed(
+ MVPbkContactOperationBase& /*aOperation*/,
+ TInt aError )
+ {
+ TRAP_IGNORE ( ContactReadyL( aError, NULL ) );
+ iCmsServer.CmsSingleContactOperationComplete( aError );
+ }
+
+// ----------------------------------------------------
+// CCmsServerContact::FetchContactL
+//
+// ----------------------------------------------------
+//
+void CCmsServerContact::FetchContactL( MVPbkContactLink* aContactLinkToFetch )
+ {
+ if( iOperation )
+ {
+ delete iOperation;
+ iOperation = NULL;
+ }
+ iOperation = iContactManager->RetrieveContactL( *aContactLinkToFetch, *this );
+ }
// End of File
--- a/ccservices/cmsservices/cmsengine/Server/src/cmsserversession.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/Server/src/cmsserversession.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -802,6 +802,18 @@
CreateContactL( aMessage );
break;
}
+ case ECmsIsTopContact:
+ {
+ PRINT( _L( " CCmsServerSession::ServiceL():Is Top Contact" ) );
+ IsTopContactL( aMessage );
+ break;
+ }
+ case ECmsSetVoiceCallDefault:
+ {
+ iCmsServer->PhonebookProxyHandle().SetVoiceCallDefaultL();
+ aMessage.Complete( KErrNone );
+ break;
+ }
default:
{
PRINT( _L( " CCmsServerSession::ServiceL(): not supported request" ) );
@@ -812,4 +824,28 @@
PRINT( _L( "End CCmsServerSession::DoServiceL()" ) );
}
+
+// ----------------------------------------------------------
+// CCmsServerSession::IsTopContactL
+//
+// ----------------------------------------------------------
+//
+void CCmsServerSession::IsTopContactL( const RMessage2& aMessage )
+ {
+ PRINT( _L( "Start CCmsServerSession::IsTopContactL()" ) );
+ if( iServerContact && !iServerContact->IsDeleted() )
+ {
+ //Currently only contactlink array is supported.
+ iServerContact->IsTopContactL( aMessage );
+ }
+ else
+ {
+ PRINT( _L( "CCmsServerSession::IsTopContactL'(): Contact has been deleted => complete with KErrNotFound" ) );
+ aMessage.Complete( KErrNotFound );
+ }
+
+ PRINT( _L( "End CCmsServerSession::IsTopContactL()" ) );
+ }
+
+
// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ccservices/cmsservices/cmsengine/Server/src/cmssetvoicecalldefault.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -0,0 +1,392 @@
+/*
+* Copyright (c) 2007-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of auto setting default for voice call
+*
+*/
+
+#include <mvpbkcontactstoreproperties.h>
+#include <mvpbkcontactstore.h>
+#include <mvpbkstorecontact.h>
+
+#include <cvpbkcontactmanager.h>
+#include <cvpbkdefaultattribute.h>
+#include <CVPbkFieldTypeSelector.h>
+#include <vpbkcontactstoreuris.h>
+#include <MVPbkFieldType.h>
+#include <CVPbkContactFieldIterator.h>
+#include <VPbkFieldTypeSelectorFactory.h>
+#include <VPbkEng.rsg>
+
+#include "cmssetvoicecalldefault.h"
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::CmsSetVoiceCallDefault
+// ---------------------------------------------------------------------------
+//
+CmsSetVoiceCallDefault::CmsSetVoiceCallDefault()
+ {
+
+ }
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::~CmsSetVoiceCallDefault
+// ---------------------------------------------------------------------------
+//
+CmsSetVoiceCallDefault::~CmsSetVoiceCallDefault()
+ {
+ delete iSetAttributeOperation;
+ iFieldIndexArray.Close();
+ }
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::NewL
+// ---------------------------------------------------------------------------
+//
+CmsSetVoiceCallDefault* CmsSetVoiceCallDefault::NewL()
+ {
+ CmsSetVoiceCallDefault* self =
+ new( ELeave ) CmsSetVoiceCallDefault();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::ConstructL()
+ {
+
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::AttributeProcessCompleted
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::AttributeOperationComplete( MVPbkContactOperationBase& aOperation )
+ {
+ TInt err = KErrNone;
+
+ if ( &aOperation == iSetAttributeOperation )
+ {
+ TRAP( err, DefaultSettingCompleteL() );
+ }
+
+ // Handle error
+ if ( err != KErrNone )
+ {
+ ProcessFinished( err );
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::AttributeProcessFailed
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::AttributeOperationFailed(
+ MVPbkContactOperationBase& aOperation,
+ TInt aError )
+ {
+ ProcessFinished( aError );
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::ContactOperationCompleted
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::ContactOperationCompleted
+ (TContactOpResult aResult)
+ {
+ if (aResult.iOpCode == EContactLock)
+ {
+ TRAPD( err, ToSetVoiceCallDefaultL() );
+ if ( err != KErrNone )
+ {
+ ProcessFinished( err );
+ }
+ }
+ else if (aResult.iOpCode == EContactCommit)
+ {
+ ProcessFinished( KErrNone );
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::ContactOperationFailed
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::ContactOperationFailed
+ ( TContactOp /*aOpCode*/, TInt aErrorCode,
+ TBool /*aErrorNotified*/ )
+ {
+ ProcessFinished( aErrorCode );
+ }
+
+// ----------------------------------------------------------
+// CmsSetVoiceCallDefault::LockContactL
+// ----------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::LockContactL()
+ {
+ // Lock the contact before changing it
+ iStoreContact->LockL(*this);
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::DoSetDefaultL
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::DoSetDefaultL( TVPbkDefaultType aDefaultType, TInt aIndex )
+ {
+ CVPbkDefaultAttribute* attr =
+ CVPbkDefaultAttribute::NewL( aDefaultType );
+ CleanupStack::PushL( attr );
+
+ iSetAttributeOperation =
+ iContactManager->ContactAttributeManagerL().SetFieldAttributeL
+ ( iStoreContact->Fields().FieldAt( aIndex ), *attr, *this );
+
+ CleanupStack::PopAndDestroy( attr );
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::SetVoiceCallDefaultL
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::SetVoiceCallDefaultL( MVPbkStoreContact* aContact, CVPbkContactManager* aContactManager )
+ {
+ iFieldIndexArray.Reset();
+ iStoreContact = aContact;
+ iContactManager = aContactManager;
+
+ if ( iStoreContact && iContactManager && IsSettingDefaultNeededL() )
+ {
+ LockContactL();
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::SetVoiceCallDefaultL
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::ToSetVoiceCallDefaultL()
+ {
+
+ TInt count = iFieldIndexArray.Count();
+
+ if ( count > 0 )
+ {
+ TInt index = KErrNotFound;
+
+ for ( TInt i=0; i<ECCACommLauncherCallLast; i++ )
+ {
+ TInt aResourceId = GetCallFieldResourceId(i);
+ if ( FieldIndex( aResourceId, index ) )
+ {
+ break;
+ }
+ }
+
+ if ( index != KErrNotFound )
+ {
+ DoSetDefaultL( EVPbkDefaultTypePhoneNumber, index );
+ }
+ else
+ {
+ DefaultSettingCompleteL();
+ }
+ }
+ else
+ {
+ // setting complete
+ DefaultSettingCompleteL();
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::IsSettingDefaultNeeded
+// --------------------------------------------------------------------------
+//
+TBool CmsSetVoiceCallDefault::IsSettingDefaultNeededL()
+ {
+ // If the contact is not in phone memory, don't set default
+ if ( !IsPhoneMemoryContact( *iStoreContact ) )
+ {
+ return EFalse;
+ }
+
+ CVPbkFieldTypeSelector* selector = VPbkFieldTypeSelectorFactory
+ ::BuildContactActionTypeSelectorL(
+ VPbkFieldTypeSelectorFactory::EVoiceCallSelector, iContactManager->FieldTypes());
+
+ const MVPbkStoreContactFieldCollection& fields = iStoreContact->Fields();
+ TBool result = EFalse;
+ TInt count = fields.FieldCount();
+
+ // Voice call default attribute
+ CVPbkDefaultAttribute* attr =
+ CVPbkDefaultAttribute::NewL( EVPbkDefaultTypePhoneNumber );
+ CleanupStack::PushL( attr );
+
+ for (TInt i = 0; i < count; ++i)
+ {
+ const MVPbkStoreContactField& field = fields.FieldAt(i);
+
+ // If this field is voice call field
+ if ( selector->IsFieldIncluded( field ) )
+ {
+ // Checking if the field has been set as voice call default,
+ // if hasn't, keep field index in an array
+ if ( !iContactManager->ContactAttributeManagerL().HasFieldAttributeL
+ ( *attr, field ) )
+ {
+ result = ETrue;
+ iFieldIndexArray.AppendL(i);
+ }
+ // it has been set as voice call default, no need to set again
+ else
+ {
+ result = EFalse;
+ iFieldIndexArray.Reset();
+ break;
+ }
+ }
+ }
+
+ CleanupStack::PopAndDestroy( attr );
+ delete selector;
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::FieldIndex
+// ---------------------------------------------------------------------------
+//
+TBool CmsSetVoiceCallDefault::FieldIndex( TInt aResourceId, TInt& aIndex )
+ {
+ TBool result = EFalse;
+
+ if( iStoreContact )
+ {
+ const MVPbkBaseContactFieldCollection& fields = iStoreContact->Fields();
+ TInt count = iFieldIndexArray.Count();
+
+ for (TInt i = 0; i < count; ++i)
+ {
+ const MVPbkFieldType* fieldType =
+ fields.FieldAt(iFieldIndexArray[i]).BestMatchingFieldType();
+
+ if ( fieldType && fieldType->FieldTypeResId() == aResourceId )
+ {
+ result = ETrue;
+ aIndex = iFieldIndexArray[i];
+ break;
+ }
+ }
+ }
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::NextAttribute
+// ---------------------------------------------------------------------------
+//
+TInt CmsSetVoiceCallDefault::GetCallFieldResourceId( TInt aPriority )
+ {
+
+ TInt resourceId;
+ switch ( aPriority )
+ {
+ case ECCACommLauncherCallMobile:
+ resourceId = R_VPBK_FIELD_TYPE_MOBILEPHONEGEN;
+ break;
+ case ECCACommLauncherCallMobileWork:
+ resourceId = R_VPBK_FIELD_TYPE_MOBILEPHONEWORK;
+ break;
+ case ECCACommLauncherCallMobileHome:
+ resourceId = R_VPBK_FIELD_TYPE_MOBILEPHONEHOME;
+ break;
+ case ECCACommLauncherCallTelephone:
+ resourceId = R_VPBK_FIELD_TYPE_LANDPHONEGEN;
+ break;
+ case ECCACommLauncherCallTelephoneWork:
+ resourceId = R_VPBK_FIELD_TYPE_LANDPHONEWORK;
+ break;
+ case ECCACommLauncherCallTelephoneHome:
+ resourceId = R_VPBK_FIELD_TYPE_LANDPHONEHOME;
+ break;
+ case ECCACommLauncherCallCarPhone:
+ resourceId = R_VPBK_FIELD_TYPE_CARPHONE;
+ break;
+ case ECCACommLauncherCallAssistant:
+ resourceId = R_VPBK_FIELD_TYPE_ASSTPHONE;
+ break;
+ default:
+ break;
+ }
+ return resourceId;
+ }
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::DefaultSettingCompleteL
+// ---------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::DefaultSettingCompleteL()
+ {
+ // commit the contact
+ iStoreContact->CommitL( *this );
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::ProcessFinished
+// --------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::ProcessFinished( TInt aError )
+ {
+ }
+
+// ---------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::HandleError
+// ---------------------------------------------------------------------------
+//
+void CmsSetVoiceCallDefault::HandleError( TInt aError )
+ {
+ }
+
+// --------------------------------------------------------------------------
+// CmsSetVoiceCallDefault::IsPhoneMemoryContact
+// --------------------------------------------------------------------------
+//
+TBool CmsSetVoiceCallDefault::IsPhoneMemoryContact(
+ const MVPbkStoreContact& aContact) const
+ {
+ TBool ret = EFalse;
+
+ TVPbkContactStoreUriPtr uri =
+ aContact.ParentStore().StoreProperties().Uri();
+
+ TVPbkContactStoreUriPtr phoneMemoryUri
+ ( VPbkContactStoreUris::DefaultCntDbUri() );
+
+ if (uri.Compare( phoneMemoryUri,
+ TVPbkContactStoreUriPtr::EContactStoreUriStoreType ) == 0)
+ {
+ ret = ETrue;
+ }
+
+ return ret;
+ }
--- a/ccservices/cmsservices/cmsengine/inc/cmscommondefines.h Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/inc/cmscommondefines.h Fri Mar 12 15:41:25 2010 +0200
@@ -67,7 +67,9 @@
ECmsFindParentStore,
ECmsFindExternalContact,
ECmsFetchServiceAvailability,
- ECmsGetContactActionFieldCount
+ ECmsGetContactActionFieldCount,
+ ECmsIsTopContact,
+ ECmsSetVoiceCallDefault
};
//Presence data stream delimiters
--- a/ccservices/cmsservices/cmsengine/inc/cmscontact.h Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/cmsengine/inc/cmscontact.h Fri Mar 12 15:41:25 2010 +0200
@@ -207,6 +207,20 @@
IMPORT_C TInt GetContactActionFieldCount(
VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector aContactAction);
+ /**
+ * Checks whether the Current contact is top contact.
+ *
+ * @return ETrue if Contact is a top contact, otherwise EFalse
+ */
+ IMPORT_C TBool IsTopContact();
+
+ /**
+ * Set default attribute for voice call
+ *
+ * @param aStatus TRequestStatus& aStatus
+ */
+ IMPORT_C void SetVoiceCallDefault( TRequestStatus& aStatus ) const;
+
public:
/**
--- a/ccservices/cmsservices/contactpresence/src/contactpresence.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/ccservices/cmsservices/contactpresence/src/contactpresence.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -163,8 +163,6 @@
#endif
iOpId++;
- CPresenceBrandedIcon* icon = CPresenceBrandedIcon::NewL(iBrandingFactory, iObs );
- iIconReqList.AddLast( *icon );
iListener->GetPresenceInfoL( aPackedLink, iOpId );
return iOpId;
--- a/contactextensions/predefinedcontacts/data/pdcstringconstants.st Fri Feb 19 22:40:27 2010 +0200
+++ b/contactextensions/predefinedcontacts/data/pdcstringconstants.st Fri Mar 12 15:41:25 2010 +0200
@@ -1,8 +1,8 @@
#
-# Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
--- a/logsui/AppSrc/CLogsEventListView.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/logsui/AppSrc/CLogsEventListView.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -496,7 +496,7 @@
popUpRow[i++] = ELogsFilterWlan;
}
}
- if( count > 0 )
+ if( count > 0 && MenuBar()->ItemSpecificCommandsEnabled() )
{
const MLogsEventGetter* event = Engine()->Model( ELogsMainModel )->At( iEventListCurrent );
//Seletected event supported only for events that have number or remoty party available, so e.g
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CContactIdConverter.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CContactIdConverter.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -66,7 +66,7 @@
TInt32 CContactIdConverter::LinkToIdentifier( const MVPbkContactLink& aLink ) const
{
TInt32 result = KNullContactId;
- if ( &aLink.ContactStore() == &iContactStore )
+ if ( &aLink && &aLink.ContactStore() == &iContactStore )
{
const CContactLink& link = static_cast<const CContactLink&>( aLink );
result = link.ContactId();
--- a/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CFilteredContactView.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookengines/VirtualPhonebook/VPbkCntModel/src/CFilteredContactView.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -145,8 +145,14 @@
for ( TInt matchPriority = 0;
matchPriority <= maxMatchPriority; ++matchPriority )
{
- if ( matchingProperty->Matches(
- aFilterType->VersitProperties()[matchPriority]) )
+ TBool versitIsMatched = matchingProperty->Matches(
+ aFilterType->VersitProperties()[matchPriority]);
+ TBool excludedParmaterIsMatched =
+ aFilterType->ExcludedParameters().
+ ContainsAll(aFieldType.ExcludedParameters());
+ // if the FilterType is matched the Versit Property and
+ // the excludeParameter of FiledType, it needn't custom filter.
+ if ( versitIsMatched && excludedParmaterIsMatched )
{
ret = EFalse;
break;
--- a/phonebookengines/contactsmodel/group/backup_registration.xml Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookengines/contactsmodel/group/backup_registration.xml Fri Mar 12 15:41:25 2010 +0200
@@ -1,10 +1,10 @@
<?xml version="1.0" standalone="yes"?>
<!--
- Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+ Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
- under the terms of the License "Eclipse Public License v1.0"
+ under the terms of "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".
--- a/phonebookui/Phonebook/group/BCardEng.mmp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook/group/BCardEng.mmp Fri Mar 12 15:41:25 2010 +0200
@@ -59,7 +59,7 @@
APP_LAYER_SYSTEMINCLUDE // macro that defines the platform system includes
// .def file name
-DEFFILE BCardEng.def
+DEFFILE BCARDENG.DEF
// Dependencies to system components
LIBRARY euser.lib bafl.lib estor.lib // User libraries
--- a/phonebookui/Phonebook2/CommandsExtension/src/CPbk2SetImageCmd.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/CommandsExtension/src/CPbk2SetImageCmd.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -141,12 +141,10 @@
if ( res && selectedFile->Count() > 0 )
{
- CAknWaitDialog* waitNote =
- new(ELeave) CAknWaitDialog(
+ iWaitNote = new(ELeave) CAknWaitDialog(
reinterpret_cast<CEikDialog**>( &iWaitNote ), ETrue );
- waitNote->ExecuteLD( R_QTN_GEN_NOTE_FETCHING );
- CleanupStack::PushL( waitNote );
-
+ iWaitNote->ExecuteLD( R_QTN_GEN_NOTE_FETCHING );
+
TPtrC fileName = (*selectedFile)[0];
// store reference to image field
@@ -157,8 +155,6 @@
iImageManager->SetImageAsyncL(
*iStoreContact, *iThumbnailFieldType, *this, fileName );
- CleanupStack::Pop( waitNote );
- iWaitNote = waitNote;
result = ETrue;
}
@@ -219,8 +215,8 @@
if ( err != KErrNone )
{
delete iWaitNote;
+ iWaitNote = NULL;
}
- iWaitNote = NULL;
}
}
--- a/phonebookui/Phonebook2/CommonUI/src/CPbk2ContactRelocator.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/CommonUI/src/CPbk2ContactRelocator.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -348,7 +348,23 @@
{
iTargetStoreOpen = ETrue;
// Safe to ignore error
- TRAP_IGNORE( DoRelocateContactL() );
+ TRAPD( err, DoRelocateContactL() );
+ if ( err == KErrDiskFull )
+ {
+ IssueRequest();
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CPbk2ContactRelocator::IssueRequest
+// Inform failure asynchronously
+// --------------------------------------------------------------------------
+//
+void CPbk2ContactRelocator::IssueRequest()
+ {
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete( status, KErrNone );
+ SetActive();
}
// --------------------------------------------------------------------------
@@ -485,7 +501,7 @@
// One contact from given link array was retrieved, now it has
// to be stored and then relocated
iSourceContact = aContact;
- TRAP_IGNORE( DoRelocateContactL() );
+ DoRelocateContactL();
}
}
@@ -497,11 +513,18 @@
void CPbk2ContactRelocator::VPbkSingleContactOperationFailed
( MVPbkContactOperationBase& /*aOperation*/, TInt aError )
{
- iObserver->ContactRelocationFailed( aError, iSourceContact );
- iSourceContact = NULL; // ownership was given away
+ if ( aError != KErrDiskFull )
+ {
+ iObserver->ContactRelocationFailed( aError, iSourceContact );
+ iSourceContact = NULL; // ownership was given away
- // Move to next request, if any
- TRAP_IGNORE( DoRelocateContactL() );
+ // Move to next request, if any
+ TRAP_IGNORE( DoRelocateContactL() );
+ }
+ else
+ {
+ IssueRequest();
+ }
}
// --------------------------------------------------------------------------
@@ -889,10 +912,7 @@
if ( iErrorCode != KErrNone )
{
- // Inform failure asynchronously
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, KErrNone );
- SetActive();
+ IssueRequest();
}
else
{
--- a/phonebookui/Phonebook2/CommonUI/src/CPbk2IconFactory.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/CommonUI/src/CPbk2IconFactory.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -226,7 +226,7 @@
TAknLayoutRect listLayoutRect;
listLayoutRect.LayoutRect(
mainPane,
- AknLayoutScalable_Avkon::list_single_graphic_pane_g2(0).LayoutLine() );
+ AknLayoutScalable_Avkon::list_single_graphic_pane_g1(0).LayoutLine() );
TSize size(listLayoutRect.Rect().Size());
// Add xsp service icons2
--- a/phonebookui/Phonebook2/MapExtension/src/cpmapcmd.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/MapExtension/src/cpmapcmd.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -570,33 +570,220 @@
// CPmapCmd::EditorShowMapL
// --------------------------------------------------------------------------
//
-void CPmapCmd::EditorShowOnMapsL(TVPbkFieldTypeParameter aAddressType)
- {
+void CPmapCmd::EditorShowOnMapsL( TVPbkFieldTypeParameter aAddressType )
+ {
CMnMapView* mapview = CMnMapView::NewL( *iMapViewProvider );
- CleanupStack::PushL( mapview );
-
- RPointerArray<CPosLandmark> landmarks;
- CleanupClosePushL( landmarks );
-
- CPosLandmark* landmark = CPosLandmark::NewL();
- CleanupStack::PushL( landmark );
-
- if ( !FillGeoLandmarkL( *landmark, aAddressType ) )
- {
- FillLandmarkL( *landmark, aAddressType );
- }
- TLocality locality;
- if( landmark->NumOfAvailablePositionFields() > 0 || landmark->GetPosition( locality ) == KErrNone )
- {
- landmarks.AppendL( landmark );
- mapview->AddLandmarksToShowL( landmarks );
- }
- mapview->ShowMapL();
+ CleanupStack::PushL( mapview );
+
+ RPointerArray<CPosLandmark> landmarks;
+ CleanupClosePushL( landmarks );
+
+ CPosLandmark* landmark = CPosLandmark::NewL();
+ CleanupStack::PushL( landmark );
+
+ if ( !FillGeoLandmarkL( *landmark, aAddressType ) )
+ {
+ FillLandmarkL( *landmark, aAddressType );
+ }
+ TLocality locality;
+ if ( landmark->NumOfAvailablePositionFields() > 0
+ || landmark->GetPosition( locality ) == KErrNone )
+ {
+ landmarks.AppendL( landmark );
+ mapview->AddLandmarksToShowL( landmarks );
+ }
+
+ if ( landmark->GetPosition( locality ) == KErrNone )
+ {
+ mapview->ShowMapL();
+ CleanupStack::PopAndDestroy( landmark );
+ CleanupStack::PopAndDestroy( &landmarks );
+ CleanupStack::PopAndDestroy( mapview );
+ }
+ else
+ {
+ TRequestStatus status;
+ mapview->SelectFromMapL( status );
+ User::WaitForRequest( status );
+ TBool update = EFalse;
+ TBool geocoordsExist = EFalse;
+
+ CPosLandmark* result = NULL;
+ if ( status.Int() == KErrNone )
+ {
+ result = mapview->RetrieveSelectionResultL();
+ if ( result->GetPosition( locality ) == KErrNone )
+ {
+ geocoordsExist = ETrue;
+ }
+ if ( result->IsPositionFieldAvailable( EPositionFieldStreet )
+ || result->IsPositionFieldAvailable( EPositionFieldCity )
+ || result->IsPositionFieldAvailable( EPositionFieldCountry ) )
+ {
+ update = ETrue;
+ }
+
+ }
+ CleanupStack::PopAndDestroy( landmark );
+ CleanupStack::PopAndDestroy( &landmarks );
+ CleanupStack::PopAndDestroy( mapview );
+ if ( result )
+ {
+ CleanupStack::PushL( result );
+ }
+
+ if ( update )
+ {
+
+ const TInt KGranularity = 4;
+ CDesCArrayFlat* arrFields = new (ELeave) CDesCArrayFlat(
+ KGranularity );
+ CleanupStack::PushL( arrFields );
+ HBufC* addrLebel = NULL;
+
+ switch ( aAddressType )
+ {
+ case EVPbkVersitParamPREF:
+ addrLebel = StringLoader::LoadLC(
+ R_QTN_PHOB_HEADER_ADDRESS );
+ break;
+ case EVPbkVersitParamHOME:
+ addrLebel = StringLoader::LoadLC(
+ R_QTN_PHOB_HEADER_ADDRESS_HOME );
+ break;
+ case EVPbkVersitParamWORK:
+ addrLebel = StringLoader::LoadLC(
+ R_QTN_PHOB_HEADER_ADDRESS_WORK );
+ break;
+ default:
+ User::Leave( KErrArgument );
+ }
+ arrFields->AppendL( addrLebel->Des() );
+ _LIT(KComma, ",");
+ _LIT(KSpace, " ");
+ TInt lenght = 0;
+ TPtrC street;
+ if ( result->IsPositionFieldAvailable( EPositionFieldStreet ) )
+ {
+ result->GetPositionField( EPositionFieldStreet, street );
+ lenght += street.Length();
+ }
- CleanupStack::PopAndDestroy( landmark );
- CleanupStack::PopAndDestroy( &landmarks );
- CleanupStack::PopAndDestroy( mapview );
- }
+ TPtrC city;
+ if ( result->IsPositionFieldAvailable( EPositionFieldCity ) )
+ {
+ result->GetPositionField( EPositionFieldCity, city );
+ if ( lenght )
+ {
+ lenght += KComma().Length() + KSpace().Length();
+ }
+ lenght += city.Length();
+ }
+
+ TPtrC country;
+ if ( result->IsPositionFieldAvailable( EPositionFieldCountry ) )
+ {
+ result->GetPositionField( EPositionFieldCountry, country );
+ if ( lenght )
+ {
+ lenght += KComma().Length() + KSpace().Length();
+ }
+ lenght += country.Length();
+ }
+
+ RBuf newAddr;
+ newAddr.CreateL( lenght );
+ CleanupClosePushL( newAddr );
+
+ if ( street.Length() )
+ {
+ newAddr += street;
+ }
+
+ if ( city.Length() )
+ {
+ if ( newAddr.Length() > 0 )
+ {
+ newAddr += KComma();
+ newAddr += KSpace();
+ }
+ newAddr += city;
+ }
+
+ if ( country.Length() )
+ {
+ if ( newAddr.Length() > 0 )
+ {
+ newAddr += KComma();
+ newAddr += KSpace();
+ }
+ newAddr += country;
+ }
+
+ arrFields->AppendL( newAddr );
+ HBufC* prompt = StringLoader::LoadLC(
+ R_QTN_PHOB_CONFIRM_CHANGE_ADDRESS, *arrFields );
+ CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+ if ( !dlg->ExecuteLD( R_PBK2_GENERAL_CONFIRMATION_QUERY, *prompt ) )
+ {
+ update = EFalse;
+ }
+ CleanupStack::PopAndDestroy( prompt );
+ CleanupStack::PopAndDestroy( &newAddr );
+ CleanupStack::PopAndDestroy( addrLebel );
+ CleanupStack::PopAndDestroy( arrFields );
+
+ }
+ if ( update )
+ {
+ if ( !iEditorControl )
+ {
+ iContact->LockL( *this );
+ CActiveScheduler::Start();
+ }
+ UpdateFieldL( *result, EPositionFieldCountry,
+ EVPbkVersitSubFieldCountry, aAddressType );
+ UpdateFieldL( *result, EPositionFieldCity,
+ EVPbkVersitSubFieldLocality, aAddressType );
+ UpdateFieldL( *result, EPositionFieldStreet,
+ EVPbkVersitSubFieldStreet, aAddressType );
+ UpdateFieldL( *result, EPositionFieldPostalCode,
+ EVPbkVersitSubFieldPostalCode, aAddressType );
+ UpdateFieldL( *result, EPositionFieldLocality,
+ EVPbkVersitSubFieldRegion, aAddressType );
+ UpdateFieldL( *result, EPositionFieldNone,
+ EVPbkVersitSubFieldPostOfficeAddress, aAddressType );
+ UpdateFieldL( *result, EPositionFieldNone,
+ EVPbkVersitSubFieldExtendedAddress, aAddressType );
+
+ if ( geocoordsExist )
+ {
+ UpdateCoordsL( locality, aAddressType );
+ }
+ if ( !iEditorControl )
+ {
+ iContact->CommitL( *this );
+ CActiveScheduler::Start();
+ }
+ if ( ControlExtension() )
+ {
+ ControlExtension()->UpdateControlsL();
+ }
+
+ HBufC* text = StringLoader::LoadLC(
+ R_QTN_PHOB_NOTE_ADDRESS_UPDATED );
+ CAknInformationNote* note = new (ELeave) CAknInformationNote(
+ ETrue );
+ note->ExecuteLD( *text );
+ CleanupStack::PopAndDestroy( text );
+ }
+
+ if ( result )
+ {
+ CleanupStack::PopAndDestroy( result );
+ }
+ }
+ }
// --------------------------------------------------------------------------
// CPmapCmd::FillLandmarkL
--- a/phonebookui/Phonebook2/NamesListExtension/rss/Pbk2ExNamesListRes.rss Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/NamesListExtension/rss/Pbk2ExNamesListRes.rss Fri Mar 12 15:41:25 2010 +0200
@@ -312,9 +312,7 @@
//
RESOURCE TBUF r_qtn_phob_n_numbers
{
- //buf = qtn_phob_n_numbers;
- // TODO: replace with correct strings once available
- buf = "%N numbers";
+ buf = qtn_phob_n_numbers;
}
// --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/NamesListExtension/src/CPbk2NlxAddToTopContactsCmd.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/NamesListExtension/src/CPbk2NlxAddToTopContactsCmd.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -673,7 +673,15 @@
TInt /* aReason */,
MVPbkStoreContact* /* aContact */ )
{
- __ASSERT_DEBUG( EFalse, Panic(ENlxUnexpectedFailurePath) );
+ if ( iDecorator )
+ {
+ // wait for callback from the wait note and finish then
+ iDecorator->ProcessStopped();
+ }
+ else
+ {
+ StartNext( EFinish );
+ }
}
// ---------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/NamesListExtension/src/NamesListUiExtensionPlugin.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/NamesListExtension/src/NamesListUiExtensionPlugin.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -232,10 +232,8 @@
}
case R_PHONEBOOK2_RCL_MENU:
{
- if ( Pbk2NlxMenuFiltering::RclCmdSelectOptSelected( aControl ) ||
- Pbk2NlxMenuFiltering::AddToFavoritesCmdSelected( aControl ) ||
- aControl.ContactsMarked() ||
- !(iNamesListExViewRef && iNamesListExViewRef->IsRclOnL()))
+ if ( aControl.ContactsMarked() ||
+ !(iNamesListExViewRef && iNamesListExViewRef->IsRclOnL()))
{
DimItem( aMenuPane, EPbk2CmdRcl );
}
@@ -351,17 +349,7 @@
#endif
case R_AVKON_MENUPANE_MARKABLE_LIST_IMPLEMENTATION:
{
- MPbk2ContactUiControl2* tempControl =
- reinterpret_cast<MPbk2ContactUiControl2*>
- (aControl.ContactUiControlExtension
- (KMPbk2ContactUiControlExtension2Uid ));
- if ( tempControl->FocusedCommandItem() &&
- aControl.ContactsMarked() )
- {
- DimItem( aMenuPane, EAknCmdMark );
- DimItem( aMenuPane, EAknMarkAll );
- }
if ( Pbk2NlxMenuFiltering::AddToFavoritesCmdSelected( aControl ) )
{
DimItem( aMenuPane, EAknCmdMark );
@@ -411,9 +399,10 @@
case R_PHONEBOOK2_NAMESLIST_DELETE_MENU:
{
// show delete mycard if mycard command is focused / tapped and
- // mycard is available
+ // mycard is available and there aren't any marked contacts.
if( !Pbk2NlxMenuFiltering::MyCardCmdSelected( aControl ) ||
- !MyCardLink() )
+ !MyCardLink() ||
+ aControl.ContactsMarked() )
{
DimItem( aMenuPane, EPbk2CmdDeleteMyCard );
}
--- a/phonebookui/Phonebook2/Presentation/src/CPbk2ServiceManager.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/Presentation/src/CPbk2ServiceManager.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -26,6 +26,7 @@
#include "Pbk2PresentationUtils.h"
#include <spsettings.h>
#include <spproperty.h>
+#include <spentry.h>
#include <cbsfactory.h>
#include <mbsaccess.h>
#include <fbs.h>
@@ -189,11 +190,26 @@
else
{
//Append new if ok to add
- TBool okToAppend(EFalse);
-
+ TBool okToAppend(ETrue);
+
+ // Check whether the service is VCC.
+ // If so, when the VoIP service is becoming available,
+ // the VCC item should be in a same field for UI displaying.
+ CSPEntry *entry = CSPEntry::NewLC();
+ TInt ret = iSettings->FindEntryL( idArray[ni], *entry );
+ if( ret == KErrNone )
+ {
+ const CSPProperty* prop = NULL;
+ ret = entry->GetProperty( prop, ESubPropertyVccVDI);
+ if( ret == KErrNone )
+ {
+ okToAppend = EFalse;
+ }
+ }
+ CleanupStack::PopAndDestroy(); //entry
// Check whether service supports cs voice call. If so, discard it.
CSPProperty* servAttrMask = CSPProperty::NewLC();
- TInt ret = iSettings->FindPropertyL(
+ ret = iSettings->FindPropertyL(
idArray[ni], EPropertyServiceAttributeMask, *servAttrMask );
if( ret == KErrNone )
--- a/phonebookui/Phonebook2/ServerApplication/src/CPbk2ServerAppStoreManager.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ServerApplication/src/CPbk2ServerAppStoreManager.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -140,6 +140,7 @@
delete iSortOrderAcquirer;
delete iMonitor;
delete iFetchView;
+ delete iMyCardFilter;
}
// --------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorTextField.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/inc/CPbk2ContactEditorTextField.h Fri Mar 12 15:41:25 2010 +0200
@@ -70,6 +70,9 @@
CPbk2IconInfoContainer& aIconInfoContainer );
void ConstructL();
+ // Deactivate T9 in editor
+ void DeactivateT9(TInt8 aEditMode);
+
protected: // Data
/// Ref: Editor control
CEikEdwin* iControl;
--- a/phonebookui/Phonebook2/UIControls/inc/CPbk2FetchDlgPage.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/inc/CPbk2FetchDlgPage.h Fri Mar 12 15:41:25 2010 +0200
@@ -23,11 +23,13 @@
#include <e32base.h>
#include "MPbk2FetchDlgPage.h"
#include "MPbk2ControlObserver.h"
+#include "MPbk2StoreConfigurationObserver.h"
// FORWARD DECLARATIONS
class CPbk2NamesListControl;
class MPbk2FetchDlg;
class MVPbkContactViewBase;
+class CPbk2StoreConfiguration;
// CLASS DECLARATION
@@ -37,7 +39,8 @@
*/
NONSHARABLE_CLASS(CPbk2FetchDlgPage) : public CBase,
public MPbk2FetchDlgPage,
- private MPbk2ControlObserver
+ private MPbk2ControlObserver,
+ private MPbk2StoreConfigurationObserver
{
public: // Constructors and destructor
@@ -78,6 +81,9 @@
void HandleControlEventL(
MPbk2ContactUiControl& aControl,
const TPbk2ControlEvent& aEvent );
+ private: // From MPbk2StoreConfigurationObserver
+ void ConfigurationChanged();
+ void ConfigurationChangedComplete();
private: // Implementation
CPbk2FetchDlgPage(
@@ -102,6 +108,7 @@
CPbk2NamesListControl* iControl;
/// Ref: Contact view
MVPbkContactViewBase* iContactView;
+ CPbk2StoreConfiguration* iStoreConfiguration;
/// Own: Control id
TInt iControlId;
/// Own: Flag indicating is the control ready
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorEmailField.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorEmailField.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -95,10 +95,12 @@
text.Zero();
Pbk2PresentationUtils::AppendWithNewlineTranslationL(text, dataPtr);
+ // T9 should be deactivated in all contact editors always
+ DeactivateT9(iContactField.FieldProperty().EditMode());
+
if (iContactField.FieldProperty().EditMode() ==
EPbk2FieldEditModeLatinOnly)
{
- iControl->SetAknEditorFlags(EAknEditorFlagLatinInputModesOnly);
iControl->SetAknEditorSpecialCharacterTable(
R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG );
}
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorImpplField.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorImpplField.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -110,10 +110,12 @@
| EAknEditorCharactersLowerCase, EAknEditorAlignLeft,
ETrue, ETrue, EFalse);
+ // T9 should be deactivated in all contact editors always
+ DeactivateT9(iContactField.FieldProperty().EditMode());
+
if (iContactField.FieldProperty().EditMode() ==
EPbk2FieldEditModeLatinOnly)
{
- iControl->SetAknEditorFlags(EAknEditorFlagLatinInputModesOnly);
iControl->SetAknEditorSpecialCharacterTable(
R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG );
}
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorTextField.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorTextField.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -96,10 +96,12 @@
text.Zero();
Pbk2PresentationUtils::AppendWithNewlineTranslationL(text, dataPtr);
+ // T9 should be deactivated in all contact editors always
+ DeactivateT9(iContactField.FieldProperty().EditMode());
+
if (iContactField.FieldProperty().EditMode() ==
EPbk2FieldEditModeLatinOnly)
{
- iControl->SetAknEditorFlags(EAknEditorFlagLatinInputModesOnly);
iControl->SetAknEditorSpecialCharacterTable(
R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG );
}
@@ -150,6 +152,26 @@
}
// --------------------------------------------------------------------------
+// CPbk2ContactEditorTextField::DeactivateT9
+// --------------------------------------------------------------------------
+//
+void CPbk2ContactEditorTextField::DeactivateT9(TInt8 aEditMode)
+ {
+ if (iControl)
+ {
+ if (aEditMode == EPbk2FieldEditModeLatinOnly)
+ {
+ iControl->SetAknEditorFlags(
+ EAknEditorFlagLatinInputModesOnly | EAknEditorFlagNoT9);
+ }
+ else
+ {
+ iControl->SetAknEditorFlags(EAknEditorFlagNoT9);
+ }
+ }
+ }
+
+// --------------------------------------------------------------------------
// CPbk2ContactEditorTextField::Control
// --------------------------------------------------------------------------
//
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorUrlField.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2ContactEditorUrlField.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -96,10 +96,12 @@
| EAknEditorCharactersLowerCase, EAknEditorAlignLeft,
ETrue, ETrue, EFalse);
+ // T9 should be deactivated in all contact editors always
+ DeactivateT9(iContactField.FieldProperty().EditMode());
+
if (iContactField.FieldProperty().EditMode() ==
EPbk2FieldEditModeLatinOnly)
{
- iControl->SetAknEditorFlags(EAknEditorFlagLatinInputModesOnly);
iControl->SetAknEditorSpecialCharacterTable(
R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG );
}
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2FetchDlgPage.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2FetchDlgPage.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -27,6 +27,9 @@
#include <Pbk2UIControls.hrh>
#include <Pbk2UIControls.rsg>
#include <CPbk2ViewState.h>
+#include <MPbk2AppUi.h>
+#include <MPbk2ApplicationServices.h>
+#include <MPbk2ContactViewSupplier.h>
// Virtual Phonebook
#include <MVPbkContactViewBase.h>
@@ -87,6 +90,10 @@
{
iContactView->RemoveObserver( *iControl );
}
+ if ( iStoreConfiguration )
+ {
+ iStoreConfiguration->RemoveObserver( *this );
+ }
}
// --------------------------------------------------------------------------
@@ -101,6 +108,8 @@
iControl->AddObserverL( *this );
iContactView->AddObserverL( *iControl );
+ iStoreConfiguration = &Phonebook2::Pbk2AppUi()->ApplicationServices().StoreConfiguration();
+ iStoreConfiguration->AddObserverL( *this );
AknLayoutUtils::LayoutControl
( iControl, iParentDlg.FetchDlgClientRect(),
@@ -383,4 +392,42 @@
return text;
}
+// --------------------------------------------------------------------------
+// CPbk2FetchDlgPage::ConfigurationChanged
+// --------------------------------------------------------------------------
+//
+void CPbk2FetchDlgPage::ConfigurationChanged()
+ {
+ if ( iControl )
+ {
+ iControl->Reset();
+ }
+ }
+
+// --------------------------------------------------------------------------
+// CPbk2FetchDlgPage::ConfigurationChangedComplete
+// --------------------------------------------------------------------------
+//
+void CPbk2FetchDlgPage::ConfigurationChangedComplete()
+ {
+ if ( iControl )
+ {
+ MVPbkContactViewBase* allContactsView = NULL;
+
+ TRAPD( res, allContactsView = Phonebook2::Pbk2AppUi()->
+ ApplicationServices().ViewSupplier().AllContactsViewL() );
+
+ if ( res == KErrNone )
+ {
+ TRAP( res, iControl->SetViewL( *allContactsView ) );
+ iControl->DrawNow();
+ }
+
+ if ( res != KErrNone )
+ {
+ CCoeEnv::Static()->HandleError( res );
+ iControl->Reset();
+ }
+ }
+ }
// End of File
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2MergePhotoConflictDlg.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2MergePhotoConflictDlg.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -31,11 +31,11 @@
#include <avkon.mbg>
#include <Pbk2UIControls.rsg>
#include <MPbk2MergeConflict.h>
-#include <cpbk2imagemanager.h>
-#include <tpbk2imagemanagerparams.h>
+#include <CPbk2ImageManager.h>
+#include <TPbk2ImageManagerParams.h>
#include <MVPbkBaseContact.h>
#include <MVPbkFieldType.h>
-#include <vpbkeng.rsg>
+#include <VPbkEng.rsg>
#include <MPbk2AppUi.h>
#include <MPbk2ApplicationServices.h>
#include <CVPbkContactManager.h>
--- a/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/UIControls/src/CPbk2NamesListControl.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -44,6 +44,7 @@
#include <CPbk2ThumbnailManager.h>
#include <Pbk2CommonUi.rsg>
#include <Pbk2UIControls.rsg>
+#include "CPbk2AppUi.h"
// Virtual Phonebook
#include <MVPbkContactViewBase.h>
@@ -2160,7 +2161,10 @@
//Prevent messing with focus with always-on when Phonebook hidden in
//reseted state. Otherwise background-added contacts will change focus.
//This would cause Phonebook not to look like freshly started when opened again.
- if(iCurrentState->NamesListState() != CPbk2NamesListControl::EStateHidden)
+ //And also make sure foreground-added contact will show the new contact
+ //even though the focus is not seen.
+ if( (static_cast<CPbk2AppUi*>(
+ CEikonEnv::Static()->AppUi()))->IsForeground() )
{
SelectAndChangeReadyStateL();
}
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/group/ccappcommlauncherplugin.mmp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/group/ccappcommlauncherplugin.mmp Fri Mar 12 15:41:25 2010 +0200
@@ -39,7 +39,6 @@
SOURCE ccappcommlaunchercustomlistboxdata.cpp
SOURCE ccappcommlaunchercustomlistbox.cpp
SOURCE ccappcommlaunchercustomlistboxitemdrawer.cpp
-SOURCE ccappcommlaunchersetdefault.cpp
// resources
START RESOURCE ../data/ccappcommlauncherpluginrsc.rss
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchercontacthandler.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlaunchercontacthandler.h Fri Mar 12 15:41:25 2010 +0200
@@ -348,6 +348,13 @@
*/
void RefetchContactL();
+ /**
+ * Checks whether the Current contact is top contact.
+ *
+ * @return ETrue if Contact is a top contact, otherwise EFalse
+ */
+ TBool IsTopContact();
+
private: // from MCCAppContactFieldDataObserver
/**
@@ -436,14 +443,14 @@
*/
MCCAppContactHandlerNotifier& iObserver;
/**
+ * Notify if dynamic address fields are set or not
+ * Own.
+ */
+ TBool iDynamicAddressGroupSet;
+ /**
* Dynamic address fields
* Own.
* */
- enum TDynamicAddressGroupSetFlag
- {
- EDynamicVoipAddressGroupSet = 1
- };
- TInt iDynamicAddressGroupSet;
RArray<TInt> iDynamicVoipAddressGroup;
/**
* Default attributes as bitmasks
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncherheadercontrol.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncherheadercontrol.h Fri Mar 12 15:41:25 2010 +0200
@@ -207,6 +207,11 @@
void ProcessContactImageDisplayL();
/**
+ * Helper function for changing Favorite Icon size
+ */
+ void FavoriteIconSizeChanged();
+
+ /**
* The image control
* Own.
*/
@@ -289,8 +294,20 @@
* Own
*/
HBufC8* iContactThumbnailData;
+
+ /**
+ * Store contact image path
+ * Own
+ */
+ HBufC* iStoreContactImageFullName;
TBool iStatusButtonVisibility;
+
+ /**
+ * The Favorite Icon control
+ * Own.
+ */
+ CEikImage* iFavContactIcon;
};
#endif // CCCAPPCOMMLAUNCHERHEADERCONTROL_H
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncherplugin.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/inc/ccappcommlauncherplugin.h Fri Mar 12 15:41:25 2010 +0200
@@ -27,7 +27,6 @@
class CCCAppCommLauncherContactHandler;
class CCCAppCommLauncherMenuHandler;
class CCAContactorService;
-class CCCAppCommLauncherLSetDefault;
/**
* Class implementing CCCAppViewPluginBase interface. This is
@@ -218,7 +217,6 @@
*/
CCAContactorService* ContactorService();
- void DefaultSettingComplete();
/**
* Start timer.
*/
@@ -291,7 +289,6 @@
*/
CCCAppCommLauncherContactHandler* iContactHandler;
- CCCAppCommLauncherLSetDefault* iSetDefault;
/**
* Pointer to preferred communication methods.
@@ -318,7 +315,6 @@
*/
CCAContactorService* iContactorService;
- CActiveSchedulerWait* iWaitFinish;
/**
* The timer notifier an aiw service request timeout.
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercontacthandler.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlaunchercontacthandler.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -148,6 +148,7 @@
if ( MCCAppContactFieldDataObserver::TParameter::EContactInfoAvailable
== aParameter.iType && NULL != aParameter.iContactInfo )
{
+ iDynamicAddressGroupSet = EFalse;
ContactInfoFetchedNotifyL( *aParameter.iContactInfo );
}
else if ( MCCAppContactFieldDataObserver::TParameter::EContactDataFieldAvailable
@@ -163,6 +164,7 @@
else if ( MCCAppContactFieldDataObserver::TParameter::EContactsChanged
== aParameter.iType )
{
+ iDynamicAddressGroupSet = EFalse;
iObserver.ContactsChangedL();
}
else if (MCCAppContactFieldDataObserver::TParameter::EContactPresenceChanged == aParameter.iType)
@@ -464,10 +466,10 @@
{
case VPbkFieldTypeSelectorFactory::EVOIPCallSelector:
{
- if ( !iDynamicAddressGroupSet & EDynamicVoipAddressGroupSet )
+ if ( !iDynamicAddressGroupSet )
{
CreateDynamicVoipAddressGroup( IsServiceAvailable( aContactAction ));
- iDynamicAddressGroupSet |= EDynamicVoipAddressGroupSet;
+ iDynamicAddressGroupSet = ETrue;
}
}
break;
@@ -547,4 +549,13 @@
iCmsWrapper->AddObserverL( *this );
}
+// --------------------------------------------------------------------------
+// CCCAppCommLauncherContactHandler::IsTopContact
+// --------------------------------------------------------------------------
+//
+TBool CCCAppCommLauncherContactHandler::IsTopContact()
+ {
+ return iCmsWrapper->IsTopContact();
+ }
+
// End of file
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherheadercontrol.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherheadercontrol.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -60,7 +60,12 @@
iImage = new (ELeave) CEikImage();
iImage->SetPictureOwnedExternally(ETrue);
iImage->SetBrushStyle( CGraphicsContext::ENullBrush ); // transparent
- iImage->SetAlignment(EHCenterVCenter);
+ iImage->SetAlignment(EHCenterVCenter);
+
+ //Favorite Icon
+ iFavContactIcon = new (ELeave) CEikImage();
+ iFavContactIcon->SetBrushStyle( CGraphicsContext::ENullBrush ); // transparent
+ iFavContactIcon->SetAlignment(EHCenterVCenter);
// Create the header labels
for (TInt i=0; i < KLabelLineCount; i++)
@@ -84,8 +89,14 @@
//
CCCAppCommLauncherHeaderControl::~CCCAppCommLauncherHeaderControl()
{
+ delete iFavContactIcon;
delete iContactImageFullName;
delete iContactThumbnailData;
+ if ( iStoreContactImageFullName )
+ {
+ delete iStoreContactImageFullName;
+ iStoreContactImageFullName = NULL;
+ }
iCmsContactFields.Close();
iLabels.ResetAndDestroy();
@@ -128,7 +139,7 @@
//
TInt CCCAppCommLauncherHeaderControl::CountComponentControls() const
{
- return 1 + iLabels.Count();
+ return 2 + iLabels.Count(); // iImage, iFavContactIcon
}
// ---------------------------------------------------------------------------
@@ -137,13 +148,19 @@
//
CCoeControl* CCCAppCommLauncherHeaderControl::ComponentControl(TInt aIndex) const
{
+ TInt imageControl = 2; // iImage, iFavContactIcon
+
if (aIndex == 0)
{
return iImage;
}
- else if (aIndex - 1 < iLabels.Count())
+ else if (aIndex == 1)
{
- return iLabels[aIndex-1];
+ return iFavContactIcon;
+ }
+ else if (aIndex - imageControl < iLabels.Count())
+ {
+ return iLabels[aIndex-imageControl];
}
else
{
@@ -156,7 +173,7 @@
// ---------------------------------------------------------------------------
//
void CCCAppCommLauncherHeaderControl::SizeChanged()
- {
+ {
const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
const TRect rect(Rect());
@@ -180,7 +197,9 @@
{
option = 0;
}
- }
+ }
+
+ FavoriteIconSizeChanged();
AknLayoutUtils::LayoutImage(
iImage, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g1(option));
@@ -235,6 +254,8 @@
{
CCoeControl::SetContainerWindowL(aContainer);
iImage->SetContainerWindowL(aContainer);
+ iFavContactIcon->SetContainerWindowL(aContainer);
+
for (TInt i=0; i < iLabels.Count(); i++)
{
iLabels[i]->SetContainerWindowL(aContainer);
@@ -270,6 +291,13 @@
delete iContactImageFullName;
iContactImageFullName = NULL;
iContactImageFullName = data.AllocL();
+
+ if ( iStoreContactImageFullName )
+ {
+ delete iStoreContactImageFullName;
+ iStoreContactImageFullName = NULL;
+ }
+ iStoreContactImageFullName = data.AllocL();
}
}
else if ( aContactField.Type() == CCmsContactFieldItem::ECmsThumbnailPic )
@@ -316,12 +344,35 @@
{
iLabels[i]->SetTextL(iTextOrder->GetTextForRow(i));
}
+
+ //Find whether the Contact is a Favorite Contact
+ if ( iPlugin.IsTopContactL() )
+ {
+ //Create the Favorite Icon
+ CFbsBitmap* bmp = NULL;
+ CFbsBitmap* mask = NULL;
+
+ AknIconUtils::CreateIconLC(
+ bmp, mask, KPbk2ECEIconFileName,
+ EMbmPhonebook2eceQgn_prop_pb_topc, EMbmPhonebook2eceQgn_prop_pb_topc_mask );
+
+ //Create the header image
+ iFavContactIcon->SetPicture( bmp, mask );
+ CleanupStack::Pop( 2 ); // bmp, mask
+
+ FavoriteIconSizeChanged();
+ }
+ else
+ {
+ iFavContactIcon->SetPicture(NULL, NULL);
+ }
+
DrawDeferred();
}
void CCCAppCommLauncherHeaderControl::BitmapReadyL( CFbsBitmap* aBitmap )
{
- SetBitmap(aBitmap);
+ SetBitmap(aBitmap);
}
// ---------------------------------------------------------------------------
@@ -342,7 +393,7 @@
}
iBitmap = aBmp;
iImage->SetPicture(aBmp, NULL);
- iImage->DrawDeferred();
+ iImage->DrawDeferred();
}
// ---------------------------------------------------------------------------
@@ -496,10 +547,15 @@
if( iHasContactImage )
{
- iImageSelectionPopup->SetItemDimmed(ECCAppCommLauncherStylusViewImageCmd, EFalse);
iImageSelectionPopup->SetItemDimmed(ECCAppCommLauncherStylusChangeImageCmd, EFalse);
iImageSelectionPopup->SetItemDimmed(ECCAppCommLauncherStylusRemoveImageCmd, EFalse);
iImageSelectionPopup->SetItemDimmed(ECCAppCommLauncherStylusAddImageCmd, ETrue);
+
+ // If the image has been deleted in the memory, "view image" should be hidden.
+ RFs& fs( iCoeEnv->FsSession() );
+ TEntry entry;
+ iImageSelectionPopup->SetItemDimmed( ECCAppCommLauncherStylusViewImageCmd,
+ ( fs.Entry( *iStoreContactImageFullName , entry ) == KErrNone ) ? EFalse : ETrue );
}
else
{
@@ -592,6 +648,10 @@
return ret;
}
+ // --------------------------------------------------------------------------
+ // CCCAppCommLauncherHeaderControl::OfferKeyEventL
+ // --------------------------------------------------------------------------
+ //
TKeyResponse CCCAppCommLauncherHeaderControl::OfferKeyEventL(
const TKeyEvent& aKeyEvent, TEventCode /*aType*/)
{
@@ -610,6 +670,10 @@
return ret;
}
+ // --------------------------------------------------------------------------
+ // CCCAppCommLauncherHeaderControl::ProcessContactImageDisplayL
+ // --------------------------------------------------------------------------
+ //
void CCCAppCommLauncherHeaderControl::ProcessContactImageDisplayL()
{
iHasContactImage = EFalse;
@@ -636,3 +700,36 @@
delete iContactThumbnailData;
iContactThumbnailData = NULL;
}
+
+ // --------------------------------------------------------------------------
+ // CCCAppCommLauncherHeaderControl::FavoriteIconSizeChanged
+ // --------------------------------------------------------------------------
+ //
+ void CCCAppCommLauncherHeaderControl::FavoriteIconSizeChanged()
+ {
+ //Set the size for the Favorite Icon
+ //This code must be in Sync with SizeChanged() code
+ const TInt isLandscape = Layout_Meta_Data::IsLandscapeOrientation() ? 1 : 0;
+ const TRect rect(Rect());
+
+ // (w/o button)
+ TInt option( isLandscape ? 2 : 1 );
+ if( iStatusButtonVisibility )
+ {
+ // (w button)
+ if( isLandscape )
+ {
+ option = 0;
+ }
+ else
+ {
+ option = 0;
+ }
+ }
+
+ AknLayoutUtils::LayoutImage(
+ iFavContactIcon, rect, AknLayoutScalable_Apps::phob2_cc_data_pane_g2(option));
+
+ }
+
+//End of File
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherlpadmodel.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -258,9 +258,16 @@
tempText.Append( KColumnListSeparator );
tempText.Append( iButtonDataArray[ aIndex ].iText );
tempText.Append( KColumnListSeparator );
- tempText.Append( textPtr );
- tempText.Append( KColumnListSeparator );
-
+ if( textPtr.Length() + tempText.Length() >=
+ KCCAppCommLauncherMaxButtonDataTextLength )
+ {
+ tempText.Append( textPtr.Left(
+ KCCAppCommLauncherMaxButtonDataTextLength - tempText.Length() - 1 ) );
+ }
+ else
+ {
+ tempText.Append( textPtr );
+ }
// TODO: Check presence icon
tempText.Append( KColumnListSeparator );
--- a/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherplugin.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccacommlauncherplugin/src/ccappcommlauncherplugin.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -18,7 +18,6 @@
#include "ccappcommlauncherheaders.h"
#include <phonebook2ece.mbg>
-#include "ccappcommlaunchersetdefault.h"
#include <mccappengine.h>
@@ -75,14 +74,8 @@
delete iMenuHandler;
delete iContactHandler;
- delete iSetDefault;
delete iContactorService;
- if ( iWaitFinish && iWaitFinish->IsStarted() )
- {
- iWaitFinish->AsyncStop();
- }
- delete iWaitFinish;
delete iAiwRequestTimer;
@@ -107,8 +100,6 @@
{
CCA_DP(KCommLauncherLogFile, CCA_L("ConstructL()"));
// ConstructL should be as light as possible.
- iWaitFinish = new (ELeave) CActiveSchedulerWait();
- iSetDefault = CCCAppCommLauncherLSetDefault::NewL(*this);
}
// ---------------------------------------------------------------------------
@@ -134,11 +125,7 @@
InitialisePreferredCommMethods();
BaseConstructL( R_COMMLAUNCHER_VIEW );
-
- // Set default for Voice call and Message
- // Not auto setting default for now
- // iSetDefault->ExecuteAssignDefaultL();
- // iWaitFinish->Start();
+
CCA_DP(KCommLauncherLogFile, CCA_L("<-CCCAppCommLauncherPlugin::PreparePluginViewL()"));
}
@@ -398,18 +385,6 @@
}
// ---------------------------------------------------------------------------
-// CCCAppCommLauncherPlugin::DefaultSettingComplete
-// ---------------------------------------------------------------------------
-//
-void CCCAppCommLauncherPlugin::DefaultSettingComplete()
- {
- if ( iWaitFinish && iWaitFinish->IsStarted() )
- {
- iWaitFinish->AsyncStop();
- }
- }
-
-// ---------------------------------------------------------------------------
// CCCAppCommLauncherPlugin::StartTimerL
// ---------------------------------------------------------------------------
//
@@ -449,7 +424,7 @@
//
TBool CCCAppCommLauncherPlugin::IsTopContactL()
{
- return EFalse;//todo
+ return iContactHandler->IsTopContact();
}
// ---------------------------------------------------------------------------
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/data/ccappdetailsviewpluginrsc.rss Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/data/ccappdetailsviewpluginrsc.rss Fri Mar 12 15:41:25 2010 +0200
@@ -154,6 +154,12 @@
command = KAiwCmdAssign;
txt = qtn_phob_opt_entry_edit;
},
+ MENU_ITEM
+ {
+ command = ECCAppDetailsViewCallCmd;
+ txt = qtn_phob_opt_call;
+ flags = EEikMenuItemSpecific;
+ },
/*
MENU_ITEM
{
@@ -344,6 +350,48 @@
}
// --------------------------------------------------------------------------
+// Selector for call fields
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_FIELD_TYPE_SELECTOR r_detailsview_call_selector
+{
+ versitProperties =
+ {
+ VBK_FIELD_VERSIT_PROPERTY
+ {
+ name = EVPbkVersitNameTEL;
+ },
+ VBK_FIELD_VERSIT_PROPERTY
+ {
+ name = EVPbkVersitNameX;
+ extensionName = "X-ASSISTANT-TEL";
+ }
+ };
+ excludedParameters = {EVPbkVersitParamFAX,EVPbkVersitParamMSG,EVPbkVersitParamBBS,EVPbkVersitParamMODEM,EVPbkVersitParamISDN};
+}
+
+// --------------------------------------------------------------------------
+// Selector for voip fields
+// --------------------------------------------------------------------------
+//
+RESOURCE VPBK_FIELD_TYPE_SELECTOR r_detailsview_voip_selector
+{
+ versitProperties =
+ {
+ VBK_FIELD_VERSIT_PROPERTY
+ {
+ name = EVPbkVersitNameX;
+ parameters = { EVPbkVersitParamVOIP };
+ extensionName = "X-SIP";
+ },
+ VBK_FIELD_VERSIT_PROPERTY
+ {
+ name = EVPbkVersitNameIMPP;
+ }
+ };
+}
+
+// --------------------------------------------------------------------------
// Selector for all image fields
// --------------------------------------------------------------------------
//
@@ -626,6 +674,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_one_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_one_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialOneAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -638,6 +692,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_two_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_two_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialTwoAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -650,6 +710,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_three_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_three_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialThreeAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -662,6 +728,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_four_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_four_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialFourAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -674,6 +746,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_five_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_five_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialFiveAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -686,6 +764,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_six_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_six_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialSixAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -698,6 +782,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_seven_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_seven_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialSevenAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -710,6 +800,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_eight_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_eight_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialEightAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -722,6 +818,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_qdial_nine_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_qdial_nine_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiQdialNineAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
},
PBK2_ICON_INFO
{
@@ -734,6 +836,12 @@
mbmFileName = detailsview_mbm_file_location;
iconId = EMbmCcappdetailsviewpluginQgn_indi_default_conn_add;
maskId = EMbmCcappdetailsviewpluginQgn_indi_default_conn_add_mask;
+ skinIdMajor = EAknsMajorGeneric;
+ skinIdMinor = EAknsMinorGenericQgnIndiDefaultConnAdd;
+ colorIdMajor = EAknsMajorSkin;
+ colorIdMinor = EAknsMinorQsnIconColors;
+ colorIndex = 12; // EAknsCIQsnIconColorsCG13
+ defaultColorIndex = 215;
}
};
}
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsview.hrh Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsview.hrh Fri Mar 12 15:41:25 2010 +0200
@@ -41,6 +41,7 @@
ECCAppDetailsViewPrependCmd,
ECCAppDetailsViewFindOnMapCmd,
ECCAppDetailsViewShowOnMapCmd,
+ ECCAppDetailsViewCallCmd,
// KAiwCmdAssign AIW service cmd used as Edit Options-menu item
// set AIW commands at last
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsviewcontainer.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/inc/ccappdetailsviewcontainer.h Fri Mar 12 15:41:25 2010 +0200
@@ -182,6 +182,11 @@
*/
CCCAppDetailsViewListBoxModel& ListBoxModel() const;
+ /*
+ * Launch Call
+ */
+ void HandleLaunchCallRequestL();
+
private:
// Called by ccapplication framework
@@ -199,11 +204,6 @@
*/
void DoShowMapCmdL( TPbk2CommandId aCommandId );
- /*
- * Launch Call
- */
- void HandleLaunchCallRequestL();
-
private: // data
--- a/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewmenuhandler.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccadetailsviewplugin/src/ccappdetailsviewmenuhandler.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Implementation of ccappdetailsview menuhandler
-* Version : %version: he1s60#31.1.15 %
+* Version : %version: he1s60#31.1.16 %
*
*/
@@ -146,6 +146,8 @@
static_cast<const CCCAppDetailsViewContainer&>(iPlugin.GetContainer());
TBool isNumberField = IsFocusedFieldTypeL(R_DETAILSVIEW_PHONENUMBER_SELECTOR);
+ TBool isOkForVoiceCall = IsFocusedFieldTypeL(R_DETAILSVIEW_CALL_SELECTOR);
+ TBool isOkForVoipCall = EFalse; //voip calls not provided
TBool isAddressField =
IsFocusedFieldTypeL(R_DETAILSVIEW_EL_ADDRESS_SELECTOR) ||
IsFocusedFieldTypeL(R_DETAILSVIEW_URL_SELECTOR);
@@ -211,6 +213,11 @@
aMenuPane->SetItemDimmed(ECCAppDetailsViewPrependCmd, !isNumberField);
}
+ if (aMenuPane->MenuItemExists(ECCAppDetailsViewCallCmd, pos))
+ {
+ aMenuPane->SetItemDimmed(ECCAppDetailsViewCallCmd, !(isOkForVoiceCall || isOkForVoipCall));
+ }
+
if ( aMenuPane->MenuItemExists(
ECCAppDetailsViewFindOnMapCmd, pos )
&& aMenuPane->MenuItemExists(
@@ -529,6 +536,14 @@
// Then check if command is normal application command
switch (aCommand)
{
+ case ECCAppDetailsViewCallCmd:
+ {
+ CCCAppDetailsViewContainer& container =
+ static_cast<CCCAppDetailsViewContainer&>(iPlugin.GetContainer());
+ container.HandleLaunchCallRequestL();
+ }
+ break;
+
case EAknSoftkeyEdit:
case KAiwCmdAssign: // AIW service cmd for Editing
case ECCAppDetailsViewEditItemCmd:
--- a/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardheadercontrol.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardheadercontrol.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -38,6 +38,7 @@
#include <gulicon.h>
#include <layoutmetadata.cdl.h>
#include <StringLoader.h>
+#include <AknsUtils.h>
namespace {
/// Amount of child UI components
@@ -235,18 +236,33 @@
iPortraitImage->SetRect( imageRect );
iPortraitImageSize = imageRect.Size();
-
+
+
// label 1
AknLayoutUtils::LayoutLabel(
iLabel1,
rect,
AknLayoutScalable_Apps::phob2_cc_data_pane_t1( option ) );
-
+
// label 2
AknLayoutUtils::LayoutLabel(
iLabel2,
rect,
AknLayoutScalable_Apps::phob2_cc_data_pane_t2( option ) );
+
+ TRgb color;
+ AknsUtils::GetCachedColor(
+ AknsUtils::SkinInstance(),
+ color,
+ KAknsIIDQsnTextColors,
+ EAknsCIQsnTextColorsCG6 );
+
+ TRAP_IGNORE(
+ {
+ iLabel1->OverrideColorL( EColorLabelText, color );
+ iLabel2->OverrideColorL( EColorLabelText, color );
+ } );
+
// resize images for new resolution
if( iPortraitBitmap )
--- a/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardplugin.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccamycardplugin/src/ccappmycardplugin.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -40,6 +40,7 @@
#include <TPbk2ContactEditorParams.h>
#include <CPbk2GeneralConfirmationQuery.h>
#include <CPbk2PresentationContact.h>
+#include <CPbk2PresentationContactFieldCollection.h>
#include <StringLoader.h>
#include <AknQueryDialog.h>
@@ -257,7 +258,8 @@
case ECCAppMyCardCmdEdit:
{
// when editor is called via options menu, focus first field always
- EditL( 0 );
+ EditL( iMyCard->PresentationContactL().
+ PresentationFields().StoreIndexOfField( 0 ) );
break;
}
case ECCappMyCardCmdSendVCard:
--- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/bwinscw/ccapputilu.def Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/bwinscw/ccapputilu.def Fri Mar 12 15:41:25 2010 +0200
@@ -29,3 +29,4 @@
?NewL@CCCAppImageDecoding@@SAPAV1@AAVMCCAppImageDecodingObserver@@AAVRFs@@PAVHBufC8@@PAVHBufC16@@@Z @ 28 NONAME ; class CCCAppImageDecoding * CCCAppImageDecoding::NewL(class MCCAppImageDecodingObserver &, class RFs &, class HBufC8 *, class HBufC16 *)
?SetDefaultStatusTextL@CCCAppStatusControl@@QAEXPAVHBufC16@@@Z @ 29 NONAME ; void CCCAppStatusControl::SetDefaultStatusTextL(class HBufC16 *)
?SetDefaultStatusIconL@CCCAppStatusControl@@QAEXPAVCGulIcon@@@Z @ 30 NONAME ; void CCCAppStatusControl::SetDefaultStatusIcon(class CGulIcon *)
+ ?IsTopContact@CCCAppCmsContactFetcherWrapper@@QAEHXZ @ 31 NONAME ; int CCCAppCmsContactFetcherWrapper::IsTopContact(void)
--- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/eabi/ccapputilu.def Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/eabi/ccapputilu.def Fri Mar 12 15:41:25 2010 +0200
@@ -39,4 +39,5 @@
_ZN19CCCAppImageDecoding6StartLERK5TSize @ 38 NONAME
_ZN19CCCAppStatusControl21SetDefaultStatusTextLEP7HBufC16 @ 39 NONAME
_ZN19CCCAppStatusControl21SetDefaultStatusIconLEP8CGulIcon @ 40 NONAME
+ _ZN30CCCAppCmsContactFetcherWrapper12IsTopContactEv @ 41 NONAME
--- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccacmscontactfetcherwrapper.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/inc/ccacmscontactfetcherwrapper.h Fri Mar 12 15:41:25 2010 +0200
@@ -209,7 +209,8 @@
EFindingFromOtherStores,
ELoadingEnabledFields,
ELoadingFields,
- EOperationsCompleted
+ EOperationsCompleted,
+ ESettingVoiceCallDefault
};
/**
@@ -324,6 +325,13 @@
*/
virtual void RefetchContactL();
+ /**
+ * Checks whether the Current contact is top contact.
+ *
+ * @return ETrue if aContact it top contact, otherwise EFalse
+ */
+ IMPORT_C TBool IsTopContact();
+
private:// new
/**
@@ -331,7 +339,7 @@
*
* @since S60 v5.0
*/
- void StartFetcherL();
+ void StartFetcherL( TBool aSetDefault = EFalse );
/**
* Opens the contact from contact db
@@ -404,6 +412,12 @@
*/
void NotifyErrorL();
+ /**
+ * Set default for voice call.
+ *
+ * @since S60 v5.0
+ */
+ void SetDefaultForVoiceCallL();
private: // from base class CActive
/**
--- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/src/ccacmscontactfetcherwrapper.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/src/ccacmscontactfetcherwrapper.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -112,7 +112,7 @@
{
CCA_DP(KCCAppUtilLogFile, CCA_L("->CCCAppCmsContactFetcherWrapper::ConstructL()"));
- TRAPD( err, StartFetcherL());
+ TRAPD( err, StartFetcherL( ETrue));
// problem can either be with connecting to CMS or with opening the contact
iErrorsOccured = err;
@@ -149,13 +149,21 @@
// CCCAppCmsContactFetcherWrapper::StartFetcherL
// --------------------------------------------------------------------------
//
-void CCCAppCmsContactFetcherWrapper::StartFetcherL()
+void CCCAppCmsContactFetcherWrapper::StartFetcherL( TBool aSetDefault )
{
CCA_DP(KCCAppUtilLogFile, CCA_L("->CCCAppCmsContactFetcherWrapper::StartFetcherL()"));
User::LeaveIfError( iCmsSession.Connect() );
+
OpenContactL();
- StartAsyncFetchingL();
+ if ( aSetDefault )
+ {
+ SetDefaultForVoiceCallL();
+ }
+ else
+ {
+ StartAsyncFetchingL();
+ }
CCA_DP(KCCAppUtilLogFile, CCA_L("<-CCCAppCmsContactFetcherWrapper::StartFetcherL()"));
}
@@ -303,6 +311,13 @@
switch( iHandlerState )
{
+ case ESettingVoiceCallDefault:
+ {
+ CCA_DP(KCCAppUtilLogFile, CCA_L("::RunL() iHandlerState == ESettingVoiceCallDefault"));
+ StartAsyncFetchingL();
+ CCA_DP(KCCAppUtilLogFile, CCA_L("::RunL() ESettingVoiceCallDefault completed"));
+ }
+ break;
case EFindingFromOtherStores:
{
CCA_DP(KCCAppUtilLogFile, CCA_L("::RunL() iHandlerState == EFindingFromOtherStores"));
@@ -365,7 +380,22 @@
CCA_DP(KCCAppUtilLogFile, CCA_L("<-CCCAppCmsContactFetcherWrapper::NotifyErrorL()"));
}
-
+// --------------------------------------------------------------------------
+// CCCAppCmsContactFetcherWrapper::SetDefaultForVoiceCallL
+// --------------------------------------------------------------------------
+//
+void CCCAppCmsContactFetcherWrapper::SetDefaultForVoiceCallL()
+ {
+ CCA_DP(KCCAppUtilLogFile, CCA_L("->CCCAppCmsContactFetcherWrapper::SetDefaultForVoiceCallL()"));
+
+ iHandlerState = ESettingVoiceCallDefault;
+ iStatus = KRequestPending;
+
+ iCmsContactDataFetcher.SetVoiceCallDefault( iStatus );
+ SetActive();
+
+ CCA_DP(KCCAppUtilLogFile, CCA_L("<-CCCAppCmsContactFetcherWrapper::SetDefaultForVoiceCallL()"));
+ }
// --------------------------------------------------------------------------
// CCCAppCmsContactFetcherWrapper::DoCancel
// --------------------------------------------------------------------------
@@ -676,4 +706,13 @@
StartFetcherL();
}
+// ---------------------------------------------------------------------------
+// CCCAppCmsContactFetcherWrapper::IsTopContact
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CCCAppCmsContactFetcherWrapper::IsTopContact()
+ {
+ return iCmsContactDataFetcher.IsTopContact();
+ }
+
// End of file
--- a/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/src/ccappstatuscontrol.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/ccapputil/src/ccappstatuscontrol.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -307,6 +307,19 @@
rect,
AknLayoutScalable_Apps::phob2_cc_button_pane_t1( aOption ) );
+ TRgb color;
+ AknsUtils::GetCachedColor(
+ AknsUtils::SkinInstance(),
+ color,
+ KAknsIIDQsnTextColors,
+ EAknsCIQsnTextColorsCG6 );
+
+ TRAP_IGNORE(
+ {
+ iStatusLabel1->OverrideColorL( EColorLabelText, color );
+ iStatusLabel2->OverrideColorL( EColorLabelText, color );
+ } );
+
// resize images for new resolution
ReSizeIcon( iStatusIcon, iStatusIconSize );
ReSizeIcon( iDefaultIcon, iStatusIconSize );
--- a/phonebookui/Phonebook2/ccapplication/ccapp/group/ccaapp.mmp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/group/ccaapp.mmp Fri Mar 12 15:41:25 2010 +0200
@@ -90,6 +90,9 @@
LIBRARY CdlEngine.lib
LIBRARY AknLayout2.lib
LIBRARY ws32.lib
+LIBRARY Pbk2CommonUI.lib
+LIBRARY VPbkEng.lib
+LIBRARY Pbk2Presentation.lib
LIBRARY flogger.lib
--- a/phonebookui/Phonebook2/ccapplication/ccapp/inc/ccapppluginloader.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/inc/ccapppluginloader.h Fri Mar 12 15:41:25 2010 +0200
@@ -20,6 +20,7 @@
#define __CCAPPLUGINLOADER_H__
#include <e32base.h>
+#include <RPbk2LocalizedResourceFile.h>
class CCCAppView;
class CCCAppPluginData;
@@ -29,7 +30,8 @@
class MCCAppEngine;
class TCCAPluginsOrderInfo;
class CcaPluginFactoryOwner;
-
+class TVPbkContactStoreUriPtr;
+class CPbk2ApplicationServices;
/**
* Class for loading and handling the plugins
*
@@ -351,7 +353,28 @@
* @param aDataPtr property string
*/
void GetNameValue( TPtrC8& aName, TPtrC8& aValue, TPtrC8& aDataPtr );
+
+ /**
+ * Determine whether a Contact Store URI is SIM Card storage.
+ *
+ * @param aUri, the Contact Store URI to compare.
+ */
+ TBool IsSimStoreUri( const TVPbkContactStoreUriPtr& aUri ) const;
+
+ /**
+ * Determine whether an implementation plug-in is supported by Current Contact Store.
+ *
+ * @param aImplmentationUid, the plug-in's ImplmentationUid.
+ */
+ TBool IsCurrentContactStoreSupportL( const TInt& aImplmentationUid ) const;
+ /**
+ * Prepare application services
+ *
+ */
+ void PreparePbk2ApplicationServicesL();
+
+
private://data
@@ -375,7 +398,19 @@
* Temporary holder for CcaPluginFactoryOwner,
* owned unless ownership handed over.
*/
- CcaPluginFactoryOwner* iFactoryTempPtr;
+ CcaPluginFactoryOwner* iFactoryTempPtr;
+
+ /// Own: Phonebook2 application services
+ CPbk2ApplicationServices* iAppServices;
+
+ /// Own: Phonebook2 commands dll resource file
+ RPbk2LocalizedResourceFile iCommandsResourceFile;
+
+ /// Own: Phonebook2 UI controls dll resource file
+ RPbk2LocalizedResourceFile iUiControlsResourceFile;
+
+ /// Own: Phonebook2 common UI dll resource file
+ RPbk2LocalizedResourceFile iCommonUiResourceFile;
};
#endif // __CCAPPUNITTESTMODE
--- a/phonebookui/Phonebook2/ccapplication/ccapp/src/ccapppluginloader.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/src/ccapppluginloader.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -22,12 +22,22 @@
#include <mccaparentcleaner.h>
#include <mccapluginfactory.h>
+#include <cpbk2applicationservices.h>
+#include <cvpbkcontactmanager.h>
+#include <MVPbkContactStoreProperties.h>
+#include <VPbkContactStoreUris.h>
+#include <TVPbkContactStoreUriPtr.h>
+#include <MVPbkContactStore.h>
#include "Phonebook2PrivateCRKeys.h"
#include "ccappheaders.h"
#include "tccapluginsorderinfo.h"
#include "ccapluginfactoryowner.h"
#include "../../ccadetailsviewplugin/inc/ccappdetailsviewpluginuids.hrh"
#include "../../ccacommlauncherplugin/inc/ccappcommlauncherpluginuids.hrh"
+#include "../inc/ccappmycardpluginuids.hrh"
+
+#include <Pbk2DataCaging.hrh>
+
// ======== CONSTANTS ==============
const TInt KMaxPlugins = 255;
@@ -36,6 +46,10 @@
_LIT8( KCcaOpaqueValueDelimiter, "=" ); //Names and values separated by =
_LIT8( KCcaOpaqueTABP, "TABP" ); //Tab position
+_LIT(KPbk2CommandsDllResFileName, "Pbk2Commands.rsc");
+_LIT(KPbk2UiControlsDllResFileName, "Pbk2UiControls.rsc");
+_LIT(KPbk2CommonUiDllResFileName, "Pbk2CommonUi.rsc" );
+
// ======== LOCAL FUNCTIONS ========
// ---------------------------------------------------------------------------
@@ -87,7 +101,11 @@
// CCCAppPluginLoader::CCCAppPluginLoader
// ---------------------------------------------------------------------------
//
-CCCAppPluginLoader::CCCAppPluginLoader(MCCAppEngine* aAppEngine) : iAppEngine(aAppEngine)
+CCCAppPluginLoader::CCCAppPluginLoader(MCCAppEngine* aAppEngine) :
+ iAppEngine(aAppEngine),
+ iCommandsResourceFile( *CCoeEnv::Static() ),
+ iUiControlsResourceFile( *CCoeEnv::Static() ),
+ iCommonUiResourceFile( *CCoeEnv::Static() )
{
CCA_DP( KCCAppLogFile, CCA_L("CCCAppPluginData::CCCAppPluginLoader"));
}
@@ -112,6 +130,12 @@
iPluginDataArray.ResetAndDestroy();
delete iFactoryTempPtr;
CCA_DP( KCCAppLogFile, CCA_L("<-CCCAppPluginData::~CCCAppPluginLoader"));
+
+ Release( iAppServices );
+
+ iCommandsResourceFile.Close();
+ iUiControlsResourceFile.Close();
+ iCommonUiResourceFile.Close();
}
// ---------------------------------------------------------------------------
@@ -147,6 +171,8 @@
//PERFORMANCE LOGGING: 3. Loading plugins
WriteToPerfLog();
+ PreparePbk2ApplicationServicesL();
+
RPointerArray<CImplementationInformation> oldImplInfoArray;
CleanupStack::PushL(TCleanupItem(CleanupResetAndDestroy, &oldImplInfoArray));
RPointerArray<CImplementationInformation> newImplInfoArray;
@@ -261,6 +287,93 @@
}
// ---------------------------------------------------------------------------
+// CCCAppPluginLoader::IsSimStoreUri
+// Determine whether a Contact Store URI is SIM Card storage.
+// ---------------------------------------------------------------------------
+//
+TBool CCCAppPluginLoader::IsSimStoreUri( const TVPbkContactStoreUriPtr& aUri ) const
+ {
+ TBool isSimUri(EFalse);
+
+ isSimUri = !aUri.Compare(VPbkContactStoreUris::SimGlobalAdnUri(),
+ TVPbkContactStoreUriPtr::EContactStoreUriAllComponents) ||
+ !aUri.Compare(VPbkContactStoreUris::SimGlobalFdnUri(),
+ TVPbkContactStoreUriPtr::EContactStoreUriAllComponents) ||
+ !aUri.Compare(VPbkContactStoreUris::SimGlobalSdnUri(),
+ TVPbkContactStoreUriPtr::EContactStoreUriAllComponents) ||
+ !aUri.Compare(VPbkContactStoreUris::SimGlobalOwnNumberUri(),
+ TVPbkContactStoreUriPtr::EContactStoreUriAllComponents);
+ return isSimUri;
+ }
+
+// ---------------------------------------------------------------------------
+// CCCAppPluginLoader::IsCurrentContactStoreSupportL
+// Determine whether an implementation plug-in is supported by Current Contact Store.
+// ---------------------------------------------------------------------------
+//
+TBool CCCAppPluginLoader::IsCurrentContactStoreSupportL( const TInt& aImplmentationUid ) const
+ {
+ TBool isCurrentContactStoreSupport(ETrue);
+
+ if( ( KCCADetailsViewPluginImplmentationUid != aImplmentationUid )
+ && ( KCCACommLauncherPluginImplmentationUid != aImplmentationUid )
+ && ( KCCAMyCardPluginImplmentationUid != aImplmentationUid ) )
+ {
+ MVPbkContactLink* link = NULL;
+ MVPbkContactLinkArray* contactArray = NULL;
+ HBufC& contactData = iAppEngine->Parameter().ContactDataL();
+ HBufC8* contactData8 = HBufC8::NewLC(contactData.Size());
+ TPtr8 contactData8Ptr(contactData8->Des());
+ contactData8Ptr.Copy(contactData.Des());
+
+ contactArray = iAppServices->ContactManager().CreateLinksLC(contactData8Ptr);
+
+ if (contactArray->Count() > 0)
+ {
+ link = contactArray->At(0).CloneLC();
+ }
+
+ if (link)
+ {
+ const MVPbkContactStoreProperties& storeProperties =
+ link->ContactStore().StoreProperties();
+ TVPbkContactStoreUriPtr uri = storeProperties.Uri();
+ isCurrentContactStoreSupport = !IsSimStoreUri( uri );
+ }
+
+
+ if( link )
+ {
+ CleanupStack::PopAndDestroy(); //link
+ }
+ if( contactArray )
+ {
+ CleanupStack::PopAndDestroy(); //contactArray
+ }
+
+ CleanupStack::PopAndDestroy(); //contactData8
+ }
+
+ return isCurrentContactStoreSupport;
+ }
+
+// ---------------------------------------------------------------------------
+// CCCAppPluginLoader::PreparePbk2ApplicationServicesL
+// ---------------------------------------------------------------------------
+//
+void CCCAppPluginLoader::PreparePbk2ApplicationServicesL()
+ {
+ iCommandsResourceFile.OpenL(
+ KPbk2RomFileDrive, KDC_RESOURCE_FILES_DIR, KPbk2CommandsDllResFileName );
+ iUiControlsResourceFile.OpenL(
+ KPbk2RomFileDrive, KDC_RESOURCE_FILES_DIR, KPbk2UiControlsDllResFileName );
+ iCommonUiResourceFile.OpenL(
+ KPbk2RomFileDrive, KDC_RESOURCE_FILES_DIR, KPbk2CommonUiDllResFileName );
+
+ iAppServices = CPbk2ApplicationServices::InstanceL();
+ }
+
+// ---------------------------------------------------------------------------
// CCCAppPluginLoader::LoadAllPlugins
// ---------------------------------------------------------------------------
//
@@ -273,6 +386,16 @@
CCA_DP( KCCAppLogFile, CCA_L("::LoadAllPlugins - plugin count: %d"), count );
for ( TInt i = 0; i < count; ++i )
{
+ TInt tempImplmentationUid = aPluginOrderInfoArray[i].iPluginInfor->ImplementationUid().iUid;
+ TBool isCurrentContactStoreSupport = EFalse;
+ TRAPD( err, isCurrentContactStoreSupport = IsCurrentContactStoreSupportL( tempImplmentationUid ) );
+ if( err != KErrNone || !isCurrentContactStoreSupport )
+ {
+ /* If problems with Contact Link related operations or the Contact Link is in SIM Store,
+ * don't load current plugin. Just continuing
+ * to load the next one. */
+ continue;
+ }
/* If problems with plugin loading, that plugin is
* not included to the plugin array. Just continuing
* and trying to load the next one. */
--- a/phonebookui/Phonebook2/group/Pbk2UIControls.mmp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/group/Pbk2UIControls.mmp Fri Mar 12 15:41:25 2010 +0200
@@ -176,6 +176,7 @@
// Include paths
USERINCLUDE ../UIControls/inc ../UIControls/rss
+USERINCLUDE ../Application/inc
SYSTEMINCLUDE ../inc
APP_LAYER_SYSTEMINCLUDE
--- a/phonebookui/Phonebook2/group/iconlistece.txt Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/group/iconlistece.txt Fri Mar 12 15:41:25 2010 +0200
@@ -33,3 +33,4 @@
/c8,8 qgn_indi_many_items_add.svg
/c8,8 qgn_prop_pb_thump_mycard.svg
/c8,8 qgn_prop_pb_add_top.svg
+/c8,8 qgn_prop_pb_topc.svg
--- a/phonebookui/Phonebook2/inc/CPbk2ContactRelocator.h Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/inc/CPbk2ContactRelocator.h Fri Mar 12 15:41:25 2010 +0200
@@ -282,6 +282,7 @@
CVPbkContactLinkArray* aContacts,
Pbk2ContactRelocator::TPbk2ContactRelocationQueryPolicy
aQueryPolicy );
+ void IssueRequest();
private: // Data
/// Own: Relocation policy
--- a/phonebookui/Phonebook2/spbcontentprovider/src/spbphonenumberparser.cpp Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Phonebook2/spbcontentprovider/src/spbphonenumberparser.cpp Fri Mar 12 15:41:25 2010 +0200
@@ -134,6 +134,9 @@
// was the default number found?
if( number.Length() == 0 )
{
+ CDesC16Array* phoneNumberArray = new (ELeave) CDesC16ArraySeg(8);
+ CleanupStack::PushL( phoneNumberArray );
+
// get contact fields
MVPbkStoreContactFieldCollection& fields = aContact.Fields();
const TInt fieldCount = fields.FieldCount();
@@ -147,39 +150,46 @@
const MVPbkFieldType* fieldType = field.BestMatchingFieldType();
if( fieldType )
{
+ const TInt fieldTypeResId = fieldType->FieldTypeResId();
// if one of the number fields
- if( fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_LANDPHONEHOME ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_MOBILEPHONEHOME ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VIDEONUMBERHOME ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_LANDPHONEWORK ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_MOBILEPHONEWORK ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VIDEONUMBERWORK ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_LANDPHONEGEN ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_MOBILEPHONEGEN ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_VIDEONUMBERGEN ||
- fieldType->FieldTypeResId() == R_VPBK_FIELD_TYPE_CARPHONE )
+ if( fieldTypeResId == R_VPBK_FIELD_TYPE_LANDPHONEGEN ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_LANDPHONEHOME ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_LANDPHONEWORK ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_MOBILEPHONEGEN ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_MOBILEPHONEHOME ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_MOBILEPHONEWORK ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_CARPHONE ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_ASSTPHONE ||
+ fieldTypeResId == R_VPBK_FIELD_TYPE_PAGERNUMBER )
{
- numberCount++;
- // if only one number, store it
- if( numberCount == 1 )
- {
- const MVPbkContactFieldTextData* textData =
- &MVPbkContactFieldTextData::Cast( field.FieldData() );
- number.CreateL( textData->Text() );
- }
+ const MVPbkContactFieldTextData* textData =
+ &MVPbkContactFieldTextData::Cast( field.FieldData() );
+ const TPtrC phoneNumber( textData->Text() );
+
+ // we need count phonenumbers same way how this is implemented in CCA
+ // so that we show same count for phonenumbers in names list
+ // CCA uses descriptor folded compare for phonenumbers
+ TInt dummy = 0;
+ if( 0 != phoneNumberArray->FindIsq( phoneNumber, dummy, ECmpFolded ) )
+ {
+ // phone number doesn't exist
+ phoneNumberArray->InsertIsqL( phoneNumber, ECmpFolded );
+ }
}
}
}
}
+ numberCount = phoneNumberArray->Count();
+ // if only one number, store it
+ if( numberCount == 1 )
+ {
+ number.CreateL( (*phoneNumberArray)[0] );
+ }
+ CleanupStack::PopAndDestroy( phoneNumberArray );
}
// no number was found
- if( number.Length() == 0 )
- {
- iContent.PhoneNumberUpdatedL( KNullDesC,
- CSpbContentProvider::ETypePhoneNumber );
- }
- else if( numberCount > 1 )
+ if( numberCount > 1 )
{
// contact has multiple numbers and no default
TBuf<12> count;
--- a/phonebookui/Speeddial/inc/Speeddial.laf Fri Feb 19 22:40:27 2010 +0200
+++ b/phonebookui/Speeddial/inc/Speeddial.laf Fri Mar 12 15:41:25 2010 +0200
@@ -1,8 +1,8 @@
/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
+* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*