contacts_plat/predictivesearch_client_api/tsrc/PsClientTestSuite/src/pstestcontactshandler.cpp
equal
deleted
inserted
replaced
50 _LIT(KDummyPhoneNumber,"9900211"); |
50 _LIT(KDummyPhoneNumber,"9900211"); |
51 |
51 |
52 // --------------------------------------------------------------------------------- |
52 // --------------------------------------------------------------------------------- |
53 // 1st phase constructor |
53 // 1st phase constructor |
54 // --------------------------------------------------------------------------------- |
54 // --------------------------------------------------------------------------------- |
55 CPcsTestContactsHandler* CPcsTestContactsHandler::NewL(TBool SimStoreOnly) |
55 CPcsTestContactsHandler* CPcsTestContactsHandler::NewL(TBool aSimStoreOnly) |
56 { |
56 { |
57 CPcsTestContactsHandler* self = new ( ELeave ) CPcsTestContactsHandler(); |
57 CPcsTestContactsHandler* self = new ( ELeave ) CPcsTestContactsHandler(); |
58 CleanupStack::PushL( self ); |
58 CleanupStack::PushL( self ); |
59 self->ConstructL(SimStoreOnly); |
59 self->ConstructL(aSimStoreOnly); |
60 CleanupStack::Pop( self ); |
60 CleanupStack::Pop( self ); |
61 |
61 |
62 return self; |
62 return self; |
63 } |
63 } |
64 |
64 |
75 } |
75 } |
76 |
76 |
77 // --------------------------------------------------------------------------------- |
77 // --------------------------------------------------------------------------------- |
78 // 2nd phase constructor |
78 // 2nd phase constructor |
79 // --------------------------------------------------------------------------------- |
79 // --------------------------------------------------------------------------------- |
80 void CPcsTestContactsHandler::ConstructL(TBool SimStoreOnly) |
80 void CPcsTestContactsHandler::ConstructL(TBool aSimStoreOnly) |
81 { |
81 { |
82 iOperationComplete = EFalse; |
82 iOperationComplete = EFalse; |
83 |
83 |
84 // initialize virtual phonebook with phonebook and sim contact uris. |
84 // initialize virtual phonebook with phonebook and sim contact uris. |
85 CVPbkContactStoreUriArray* uriArray = CVPbkContactStoreUriArray::NewLC(); |
85 CVPbkContactStoreUriArray* uriArray = CVPbkContactStoreUriArray::NewLC(); |
86 if(SimStoreOnly) |
86 if(aSimStoreOnly) |
87 { |
87 { |
88 uriArray->AppendL( TVPbkContactStoreUriPtr( VPbkContactStoreUris::SimGlobalAdnUri() ) ); |
88 uriArray->AppendL( TVPbkContactStoreUriPtr( VPbkContactStoreUris::SimGlobalAdnUri() ) ); |
89 } |
89 } |
90 else |
90 else |
91 { |
91 { |
101 // Create the active scheduler wait |
101 // Create the active scheduler wait |
102 iWait = new( ELeave )CActiveSchedulerWait(); |
102 iWait = new( ELeave )CActiveSchedulerWait(); |
103 |
103 |
104 // Open al the stores |
104 // Open al the stores |
105 iContactManager->ContactStoresL().OpenAllL( *this ); |
105 iContactManager->ContactStoresL().OpenAllL( *this ); |
106 if(SimStoreOnly) |
106 if(aSimStoreOnly) |
107 { |
107 { |
108 iStore = iContactManager->ContactStoresL().Find( TVPbkContactStoreUriPtr( VPbkContactStoreUris::SimGlobalAdnUri() ) ); |
108 iStore = iContactManager->ContactStoresL().Find( TVPbkContactStoreUriPtr( VPbkContactStoreUris::SimGlobalAdnUri() ) ); |
109 } |
109 } |
110 else |
110 else |
111 { |
111 { |