logsui/logsengine/logssymbianos/tsrc/stubs/qtcontacts_stubs.cpp
changeset 19 e4c884866116
parent 16 c5af8598d22c
--- a/logsui/logsengine/logssymbianos/tsrc/stubs/qtcontacts_stubs.cpp	Thu Sep 02 20:27:05 2010 +0300
+++ b/logsui/logsengine/logssymbianos/tsrc/stubs/qtcontacts_stubs.cpp	Fri Sep 17 08:29:34 2010 +0300
@@ -33,6 +33,8 @@
 QString logsTestAvatar = "";
 QString logsFirstName = "";
 QString logsLastName = "";
+int testContactIdsMethodCallCount = 0;
+
 Q_DECLARE_METATYPE(QContactAvatar *)
 
 void QtContactsStubsHelper::reset()
@@ -42,6 +44,7 @@
     logsTestContactLocalId = 0;
     logsFirstName = "";
     logsLastName = "";
+    testContactIdsMethodCallCount = 0;
 }
         
 void QtContactsStubsHelper::setContactId(int id)
@@ -55,6 +58,11 @@
     logsLastName = last;
 }
 
+int QtContactsStubsHelper::contactIdsMethodCallCount()
+{
+    return testContactIdsMethodCallCount;
+}
+
 // ----------------------------------------------------------------------------
 // QContactData
 // ----------------------------------------------------------------------------
@@ -111,6 +119,7 @@
     if ( QString("11112222").endsWith(matchNum) ){
         list.append( logsTestContactId );
     }
+    testContactIdsMethodCallCount++;
     return list;
 }
 
@@ -151,6 +160,11 @@
     logsTestNumber = value.toString();
 }
 
+QVariant QContactDetailFilter::value() const
+{
+    return QVariant(logsTestNumber);
+}
+
 // ----------------------------------------------------------------------------
 // QContact
 // ----------------------------------------------------------------------------
@@ -216,6 +230,14 @@
     return logsTestContactLocalId;
 }
 
+QString QContact::type() const
+{
+    if (logsTestContactLocalId == 99) {
+        return QContactType::TypeGroup;
+    } else {
+        return QContactType::TypeContact;
+    }
+}
 
 // ----------------------------------------------------------------------------
 // QContactDetail