phonebookui/Phonebook2/ccapplication/ccapp/tsrc/ut_cmscontactfetcher/inc/ccapputilheaders.h
branchRCL_3
changeset 21 b3431bff8c19
parent 0 e686773b3f54
child 64 c1e8ba0c2b16
--- a/phonebookui/Phonebook2/ccapplication/ccapp/tsrc/ut_cmscontactfetcher/inc/ccapputilheaders.h	Mon Mar 15 12:39:26 2010 +0200
+++ b/phonebookui/Phonebook2/ccapplication/ccapp/tsrc/ut_cmscontactfetcher/inc/ccapputilheaders.h	Wed Mar 31 21:13:53 2010 +0300
@@ -54,10 +54,22 @@
 const TUid KTestPropertyCat={0x10012349};  
 enum TTestPropertyKeys 
     {
-	ETestCaseStateProperty = 1,
+    ETestCaseStateProperty = 1,
     ETestParameterTypeProperty
     };    
 
+enum TCmsContactStore
+    {    
+    ECmsContactStorePbk = 0,
+    ECmsContactStoreSim,
+    ECmsContactStoreSdn
+    };
+
+enum TCmsContactIdentifierType
+    {    
+    ECmsPackedContactLinkArray = 0
+    };
+
 // used in CCmsContactFieldItem creation
 const TInt PHONE = 1;
 const TInt EMAIL = 2;
@@ -68,10 +80,10 @@
 const TInt VOIP2 = 7;
 const TInt NAME = 8;
 
-///////////////////////////////////////////////////
-// Dummy class interface
+// -----------------------------------------------------------------------------
+// Dummy class 
 // MCCAParameter
-///////////////////////////////////////////////////
+// -----------------------------------------------------------------------------
 class MCCAParameter
     {
 
@@ -123,12 +135,12 @@
 
 
     };
-///////////////////////////////////////////////////
+// -----------------------------------------------------------------------------
 // Dummy class 
 // CCCAParameter
-///////////////////////////////////////////////////
+// -----------------------------------------------------------------------------
 class CCCAParameter : public CBase, 
-					  public MCCAParameter
+                      public MCCAParameter
     {
 
 public:
@@ -180,7 +192,8 @@
         {
         // get property using category and key
         TInt type( MCCAParameter::EContactNone );
-        TInt err = RProperty::Get( KTestPropertyCat, ETestParameterTypeProperty, type );
+        TInt err = RProperty::Get( 
+                KTestPropertyCat, ETestParameterTypeProperty, type );
 
         if ( KErrNone == err )
             {
@@ -222,21 +235,12 @@
     HBufC* iContactData;    
 
     };
-
-
-/** 
-* Contact identifier.
-*/
-enum TCmsContactIdentifierType
-    {    
-    ECmsPackedContactLinkArray = 0
-    };
     
     
-///////////////////////////////////////////////////
+// -----------------------------------------------------------------------------
 // Dummy class 
-// CCCAParameter
-///////////////////////////////////////////////////
+// CCmsContactBase
+// -----------------------------------------------------------------------------
 class CCmsContactBase : public CBase
     {
     public:
@@ -250,7 +254,10 @@
     };
 
     
-// dummy class
+// -----------------------------------------------------------------------------
+// Dummy class 
+// CCmsContactField
+// -----------------------------------------------------------------------------
 class CCmsContactField : public CCmsContactBase
     {
     public:
@@ -332,10 +339,10 @@
         TInt iType;
     };
 
-///////////////////////////////////////////////////
+// -----------------------------------------------------------------------------
 // Dummy class 
-// CCCAParameter
-///////////////////////////////////////////////////
+// CCmsContactFieldInfo
+// -----------------------------------------------------------------------------
 class CCmsContactFieldInfo : public CCmsContactBase
     {
 public:
@@ -350,7 +357,8 @@
         iArray = new (ELeave) RArray<CCmsContactFieldItem::TCmsContactField>();
         TInt testCase( 0 );
         // get property using category and key
-        TInt err = RProperty::Get( KTestPropertyCat, ETestCaseStateProperty, testCase );
+        TInt err = RProperty::Get( 
+                KTestPropertyCat, ETestCaseStateProperty, testCase );
 
         if ( KTestOneContactFieldItem == testCase
              || KTestCompleteOpenWithError == testCase
@@ -393,10 +401,10 @@
     };
    
 
-///////////////////////////////////////////////////
+// -----------------------------------------------------------------------------
 // Dummy class 
-// CCCAParameter
-///////////////////////////////////////////////////
+// RCmsSession
+// -----------------------------------------------------------------------------
 class RCmsSession : public CBase
     {
     public:
@@ -415,21 +423,15 @@
             };
     };
 
-///////////////////////////////////////////////////
+// -----------------------------------------------------------------------------
 // Dummy class 
 // RCmsContact
-///////////////////////////////////////////////////
-enum TCmsContactStore
-    {    
-    ECmsContactStorePbk = 0,
-    ECmsContactStoreSim,
-    ECmsContactStoreSdn
-    };
+// -----------------------------------------------------------------------------
 
 class RCmsContact : public CBase 
     {
     public:  // New functions
-        
+        RCmsContact() : iTopContact( ETrue ){}
         TInt Open( RCmsSession& /*aSession*/,
                             TInt32 aContactId )
             {
@@ -482,33 +484,48 @@
               return NULL;
               };
 
-          TBool IsServiceAvailable( VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector /*aContactAction*/ ) const
+          TBool IsServiceAvailable( 
+                  VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector 
+                  /*aContactAction*/ ) const
               {
               return ETrue;
               };
           
           void OrderNotificationsL( 
                       MCmsNotificationHandlerAPI* /*aHandler*/,
-                      CCmsContactFieldItem::TCmsContactNotification /*aNotificationType*/ )
+                      CCmsContactFieldItem::TCmsContactNotification 
+                      /*aNotificationType*/ )
               {
               };
                       
           TCmsContactStore ContactStore() const
               {
               const_cast<TBool&>(iContactStore_called) = ETrue;
+              return ECmsContactStorePbk;
               };
           
           void CancelNotifications( 
-                      CCmsContactFieldItem::TCmsContactNotification /*aNotificationType*/ ) {};
+                      CCmsContactFieldItem::TCmsContactNotification 
+                      /*aNotificationType*/ ) {};
                      
           void DeleteL(){};
           
           ~RCmsContact(){};
           
           TInt GetContactActionFieldCount(
-                  VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector /*aContactAction*/)
+                  VPbkFieldTypeSelectorFactory::TVPbkContactActionTypeSelector 
+                  /*aContactAction*/)
               {
-              return ETrue; //SendReceive( ECmsGetContactActionFieldCount, TIpcArgs( aContactAction ) );
+              return ETrue; 
+              }
+          
+          void SetVoiceCallDefault( TRequestStatus& aStatus ) const
+              {
+              aStatus = KRequestPending;
+              }
+          TBool IsTopContact()
+              {
+              return iTopContact;
               }
 
     public:
@@ -518,6 +535,7 @@
     TBuf<128> iDesDummy;
     
     TBool iContactStore_called;
+    TBool iTopContact;
     };    
 
 #include "ccacmscontactfetcherwrapper.h"