serviceproviders/sapi_contacts_vpbk/contactservice/src/contactsynccallback.cpp
changeset 22 fc9cf246af83
parent 19 989d2f495d90
--- a/serviceproviders/sapi_contacts_vpbk/contactservice/src/contactsynccallback.cpp	Fri Jul 03 15:51:24 2009 +0100
+++ b/serviceproviders/sapi_contacts_vpbk/contactservice/src/contactsynccallback.cpp	Thu Aug 27 07:43:07 2009 +0300
@@ -126,3 +126,41 @@
      //can be CActiveScheduler::Stop(); or to be replaced by wait scheduler.    
      iWaitScheduler->AsyncStop();
      }
+
+ 
+ void CContactSyncCallback :: HandleReturnId(const TInt& /*aError*/,HBufC8* acntId , TInt /*aTransId*/ )
+     {
+     icntId = acntId;
+     
+     iWaitScheduler->AsyncStop();
+     }
+
+ 
+ HBufC8* CContactSyncCallback :: GetId()
+     {
+     return icntId;
+     }
+ 
+ void CContactSyncCallback :: HandleReturnArray( const TInt& /*aError*/, RPointerArray<HBufC8>& idArray, TInt /*aTransId*/ )
+      {         
+      //iIDArray = idArray;
+      for(TInt i = 0; i<idArray.Count(); i++)
+          {
+      TDesC8* idVal = idArray[i];
+       HBufC8* idBufVal = idVal->AllocL();
+       iIDArray.AppendL(idBufVal);
+          }
+       //can be CActiveScheduler::Stop(); or to be replaced by wait scheduler.    
+      iWaitScheduler->AsyncStop();
+      }
+
+void CContactSyncCallback::GetArray(RPointerArray<HBufC8>* aArray)
+    {
+    for(TInt i = 0; i<iIDArray.Count(); i++)
+              {
+              TDesC8* idVal = iIDArray[i];
+           HBufC8* idBufVal = idVal->AllocL();
+           aArray->AppendL(idBufVal);
+           delete idVal;
+              }
+    }