diff -r e0ec97ec3cc4 -r 98924d2efce9 creator/engine/inc/creator_phonebook.h --- a/creator/engine/inc/creator_phonebook.h Wed Jun 23 18:13:31 2010 +0300 +++ b/creator/engine/inc/creator_phonebook.h Tue Jul 06 14:17:03 2010 +0300 @@ -17,65 +17,21 @@ - - #ifndef __CREATORPHONEBOOK_H__ #define __CREATORPHONEBOOK_H__ #include "creator_phonebookbase.h" #include "creator_randomdatafield.h" +#include "creator_phonebookwrapper.h" -//#include //defines Q_SFW_EXPORT -//#include - -#include -#include -#include -#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include - -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -//#include -QTM_USE_NAMESPACE class CCreatorEngine; class CCreatorModuleBaseParameters; -//class QContactManager; -//class QContact; -//class QContactId; -//class QContactData; -//class QContactName; - -//class MVPbkStoreContact; //to change -//class MVPbkContactStore; //to change -//class CAsyncWaiter; //to change - remove class CContactDatabase; -//class MVPbkContactLinkArray; //to change class CPhonebookParameters; - +class CCreatorPhonebookWrapper; class CCreatorPhonebook : public CCreatorPhonebookBase { @@ -99,50 +55,42 @@ void DeleteAllGroupsL(); void DeleteAllGroupsCreatedByCreatorL(); + void TestPrintOut(CPhonebookParameters* aParam); + private: - void InitializeContactParamsL(/*CCreatorModuleBaseParameters* aParameters*/); - TBool IsContactGroupL( QContactLocalId& aLink ); - void StoreLinksForDeleteL( RArray& aLinks, TUid aStoreUid ); //modify - void DeleteContactsL( QList& contacts /*MVPbkContactLinkArray* aContacts, TBool aGroup*/ ); //modify + void InitializeContactParamsL(); + TBool IsContactGroupL( TUint32& aLink ); + void StoreLinksForDeleteL( RArray& aLinks, TUid aStoreUid ); + void DeleteContactsL( RArray& aContactsToDelete, TUid aStoreUid ); void DeleteItemsCreatedWithCreatorL( TUid aStoreUid ); void DoDeleteItemsCreatedWithCreatorL( TUid aStoreUid, CDictionaryFileStore* aStore ); - TBool HasOtherThanGroupsL( /*MVPbkContactLinkArray* aContacts */); //modify + TBool HasOtherThanGroupsL(); private: - - QContactManager* iContactMngr;//CVPbkContactManager* iContactManager; + CCreatorPhonebookWrapper* iPhonebookWrapper; TInt iOpCounter; CPhonebookParameters* iParameters; - static QString iPhoneNumberFields[]; static TInt iUrlFields[]; static TInt iEmailFields[]; - //QList - RArray iContactLinkArray;//CVPbkContactLinkArray* iContactLinkArray; //modify - RArray iContactsToDelete; //CVPbkContactLinkArray* iContactsToDelete; //modify - RArray iContactGroupsToDelete; //CVPbkContactLinkArray* iContactGroupsToDelete; //modify + + RArray iContactLinkArray; + RArray iContactsToDelete; + RArray iContactGroupsToDelete; RArray iPreviousDeleteLinks; - //RPointerArray iPreviousDeleteLinks; //modify private: //new variables /// Ref: the target of the copy - QContact* iStore; //MVPbkContactStore* iStore; - - //CAsyncWaiter* iWaiter; //remove + /// Own: Contact database for this store CContactDatabase* iContactDb; - //Contacts found in contacts db. - QList* iContactResults;//MVPbkContactLinkArray* iContactResults; - // Contact groups that are found in the store. These are used in filtering - // the groups from the find results. - QList* iContactGroupsInStore;//MVPbkContactLinkArray* iContactGroupsInStore; }; @@ -159,15 +107,16 @@ TInt CPhonebookParameters::ScriptLinkId() const; void CPhonebookParameters::SetScriptLinkId(TInt aLinkId); - QList iContactFields;// RPointerArray iContactFields; + TCreatorContactFields iContactFields; - QString iGroupName;//HBufC* iGroupName; + HBufC* iGroupName; TInt iContactsInGroup; TInt iNumberOfPhoneNumberFields; TInt iNumberOfURLFields; TInt iNumberOfEmailAddressFields; TInt iContactSetPtr; - RArray iLinkIds; //QList iLinkIds;// For contactgroup. Stores the linked contact ids. + RArray iLinkIds; // For contactgroup. Stores the linked contact ids. + public: CPhonebookParameters(); @@ -178,13 +127,12 @@ }; -class CCreatorContactField : public CBase//, public MCreatorRandomDataField +class CCreatorContactField : public CBase //, public MCreatorRandomDataField { public: static CCreatorContactField* NewL(); - QContactDetail CreateContactDetailL(CCreatorEngine* aEngine,CPhonebookParameters* aParameters,QString aDetail, QString aFieldContext, QString aFieldString, TInt aRand = KErrNotFound ); - QContactDetail CreateContactDetailL(CCreatorEngine* aEngine,CPhonebookParameters* aParameters,QString aDetail, QString aFieldContext, QString aFieldString, TPtrC aData ); - void AddFieldToParam( CPhonebookParameters* aParam, QContactDetail aDetail); + void AddFieldToParamL( CCreatorEngine* aEngine, CPhonebookParameters* aParam, TInt aType, TInt aRand = KErrNotFound ); + void AddFieldToParamL( CPhonebookParameters* aParam, TInt aType, TPtrC aContent ); ~CCreatorContactField(); private: CCreatorContactField();