ccservices/cmsservices/cmsengine/Server/inc/cmsservercontact.h
branchRCL_3
changeset 5 81f8547efd4f
parent 0 e686773b3f54
child 6 e8e3147d53eb
--- 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__