logsui/logsapp/tsrc/ut_logsapp/logsengine_stub/logsabstractmodel.h
changeset 2 7119b73b84d6
parent 0 4a5361db8937
child 15 76d2cf7a585e
--- a/logsui/logsapp/tsrc/ut_logsapp/logsengine_stub/logsabstractmodel.h	Tue May 04 12:39:37 2010 +0300
+++ b/logsui/logsapp/tsrc/ut_logsapp/logsengine_stub/logsabstractmodel.h	Fri May 14 15:52:41 2010 +0300
@@ -25,6 +25,7 @@
 class LogsEvent;
 class LogsDbConnector;
 class LogsModelItemContainer;
+class LogsContact;
 
 /**
  * Abstract logs model.
@@ -51,6 +52,30 @@
     
     ~LogsAbstractModel();
     
+        
+    /**
+     * Factory method for creating a new contact object. Transfers ownership.
+     */
+    LogsContact* createContact(const QString& number);
+    
+        /**
+     * Returns cenrep key status of predictive search feature. 
+     * @return 0 - feature is permanently off and can't be turned on,
+     *         1 - feature is on
+     *         2 - feature is temporarily off and can be turned on 
+     *         negative value indicates some error in fetching the key
+     */
+    int predictiveSearchStatus();
+    /**
+     * Allows to modify cenrep key value of predictive search features. 
+     * However, this function can't be used if feature is set permanently off 
+     * (see predictiveSearchStatus())
+     * @param enabled, specify whether cenrep key will be set to 1 or 2
+     * @ return 0 if cenrep key value modified succesfully,
+     *          -1 in case of some error
+     */
+    int setPredictiveSearch(bool enabled);
+    
 public:
     
     static QString directionIconName(const LogsEvent& event);
@@ -70,6 +95,9 @@
     
     LogsDbConnector* mDbConnector;
     
+public: // test data
+    int mPredectiveSearchStatus;
+    
 private:
     
     friend class UT_LogsModel;