equal
deleted
inserted
replaced
20 |
20 |
21 |
21 |
22 #ifndef __CREATORPHONEBOOK_H__ |
22 #ifndef __CREATORPHONEBOOK_H__ |
23 #define __CREATORPHONEBOOK_H__ |
23 #define __CREATORPHONEBOOK_H__ |
24 |
24 |
25 #include "engine.h" |
|
26 #include "creator_phonebookbase.h" |
25 #include "creator_phonebookbase.h" |
27 #include "creator_randomdatafield.h" |
26 #include "creator_randomdatafield.h" |
28 |
27 |
29 |
28 |
30 //#include <qmobilityglobal.h> //defines Q_SFW_EXPORT |
29 //#include <qmobilityglobal.h> //defines Q_SFW_EXPORT |
88 private: |
87 private: |
89 CCreatorPhonebook(); |
88 CCreatorPhonebook(); |
90 void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase |
89 void ConstructL(CCreatorEngine* aEngine); // from MCreatorModuleBase |
91 |
90 |
92 public: |
91 public: |
93 virtual TBool AskDataFromUserL(TInt aCommand, TInt& aNumberOfEntries); |
|
94 TInt CreateContactEntryL(CCreatorModuleBaseParameters *aParameters); |
92 TInt CreateContactEntryL(CCreatorModuleBaseParameters *aParameters); |
95 TInt CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters); |
93 TInt CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters); |
96 TInt CreateSubscribedContactEntryL(CCreatorModuleBaseParameters *aParameters); |
94 TInt CreateSubscribedContactEntryL(CCreatorModuleBaseParameters *aParameters); |
97 |
95 |
98 |
96 |
102 void DeleteAllGroupsCreatedByCreatorL(); |
100 void DeleteAllGroupsCreatedByCreatorL(); |
103 |
101 |
104 private: |
102 private: |
105 |
103 |
106 void InitializeContactParamsL(/*CCreatorModuleBaseParameters* aParameters*/); |
104 void InitializeContactParamsL(/*CCreatorModuleBaseParameters* aParameters*/); |
107 TBool IsContactGroupL(/*const MVPbkContactLink& aLink*/); //modify |
105 TBool IsContactGroupL( QContactLocalId& aLink ); |
108 void StoreLinksForDeleteL( RArray<TUint32>& aLinks, TUid aStoreUid ); //modify |
106 void StoreLinksForDeleteL( RArray<TUint32>& aLinks, TUid aStoreUid ); //modify |
109 void DeleteContactsL( QList<QContactLocalId>& contacts /*MVPbkContactLinkArray* aContacts, TBool aGroup*/ ); //modify |
107 void DeleteContactsL( QList<QContactLocalId>& contacts /*MVPbkContactLinkArray* aContacts, TBool aGroup*/ ); //modify |
110 void DeleteItemsCreatedWithCreatorL( TUid aStoreUid ); |
108 void DeleteItemsCreatedWithCreatorL( TUid aStoreUid ); |
111 void DoDeleteItemsCreatedWithCreatorL( TUid aStoreUid, CDictionaryFileStore* aStore ); |
109 void DoDeleteItemsCreatedWithCreatorL( TUid aStoreUid, CDictionaryFileStore* aStore ); |
112 TBool HasOtherThanGroupsL( /*MVPbkContactLinkArray* aContacts */); //modify |
110 TBool HasOtherThanGroupsL( /*MVPbkContactLinkArray* aContacts */); //modify |
121 CPhonebookParameters* iParameters; |
119 CPhonebookParameters* iParameters; |
122 |
120 |
123 static QString iPhoneNumberFields[]; |
121 static QString iPhoneNumberFields[]; |
124 static TInt iUrlFields[]; |
122 static TInt iUrlFields[]; |
125 static TInt iEmailFields[]; |
123 static TInt iEmailFields[]; |
126 TBool iAddAllFields; |
|
127 //QList<QContactLocalId> |
124 //QList<QContactLocalId> |
128 RArray<TUint32> iContactLinkArray;//CVPbkContactLinkArray* iContactLinkArray; //modify |
125 RArray<TUint32> iContactLinkArray;//CVPbkContactLinkArray* iContactLinkArray; //modify |
129 RArray<TUint32> iContactsToDelete; //CVPbkContactLinkArray* iContactsToDelete; //modify |
126 RArray<TUint32> iContactsToDelete; //CVPbkContactLinkArray* iContactsToDelete; //modify |
130 RArray<TUint32> iContactGroupsToDelete; //CVPbkContactLinkArray* iContactGroupsToDelete; //modify |
127 RArray<TUint32> iContactGroupsToDelete; //CVPbkContactLinkArray* iContactGroupsToDelete; //modify |
131 |
128 |
149 QList<QContactId>* iContactGroupsInStore;//MVPbkContactLinkArray* iContactGroupsInStore; |
146 QList<QContactId>* iContactGroupsInStore;//MVPbkContactLinkArray* iContactGroupsInStore; |
150 |
147 |
151 }; |
148 }; |
152 |
149 |
153 /** |
150 /** |
154 * Virtual phonebook parameters |
151 * phonebook parameters |
155 */ |
152 */ |
156 |
153 |
157 |
154 |
158 class CPhonebookParameters : public CCreatorModuleBaseParameters |
155 class CPhonebookParameters : public CCreatorModuleBaseParameters |
159 { |
156 { |
180 private: |
177 private: |
181 TInt iLinkId; // For contact. Stores the contact id |
178 TInt iLinkId; // For contact. Stores the contact id |
182 }; |
179 }; |
183 |
180 |
184 |
181 |
|
182 class CCreatorContactField : public CBase//, public MCreatorRandomDataField |
|
183 { |
|
184 public: |
|
185 static CCreatorContactField* NewL(); |
|
186 QContactDetail CreateContactDetail(CCreatorEngine* aEngine,CPhonebookParameters* aParameters,QString aDetail, QString aFieldContext, QString aFieldString, TInt aRand = KErrNotFound ); |
|
187 QContactDetail CreateContactDetail(CCreatorEngine* aEngine,CPhonebookParameters* aParameters,QString aDetail, QString aFieldContext, QString aFieldString, TPtrC aData ); |
|
188 void AddFieldToParam( CPhonebookParameters* aParam, QContactDetail aDetail); |
|
189 ~CCreatorContactField(); |
|
190 private: |
|
191 CCreatorContactField(); |
|
192 void ConstructL(); |
|
193 }; |
185 |
194 |
186 #endif // __CREATORPHONEBOOK_H__ |
195 #endif // __CREATORPHONEBOOK_H__ |