logsui/logsengine/tsrc/symbianos_stub/logsdbconnector_stub.cpp
changeset 19 e4c884866116
parent 16 c5af8598d22c
equal deleted inserted replaced
16:c5af8598d22c 19:e4c884866116
    21 #include "logsevent.h"
    21 #include "logsevent.h"
    22 
    22 
    23 // CONSTANTS
    23 // CONSTANTS
    24 
    24 
    25 QString logsLastCalledFunction = "";
    25 QString logsLastCalledFunction = "";
    26 int logsPredictiveSearchStatus = 0;
       
    27 
    26 
    28 void LogsDbConnectorStubHelper::reset()
    27 void LogsDbConnectorStubHelper::reset()
    29 {
    28 {
    30     logsLastCalledFunction = "";
    29     logsLastCalledFunction = "";
    31     logsPredictiveSearchStatus = 0;
       
    32 }
    30 }
    33 
    31 
    34 QString LogsDbConnectorStubHelper::lastCalledFunction()
    32 QString LogsDbConnectorStubHelper::lastCalledFunction()
    35 {
    33 {
    36     return logsLastCalledFunction;
    34     return logsLastCalledFunction;
    37 }
       
    38 
       
    39 void LogsDbConnectorStubHelper::setPredictiveSearch(int status)
       
    40 {
       
    41     logsPredictiveSearchStatus = status;
       
    42 }
    35 }
    43 
    36 
    44 // ----------------------------------------------------------------------------
    37 // ----------------------------------------------------------------------------
    45 // LogsDbConnector::LogsDbConnector
    38 // LogsDbConnector::LogsDbConnector
    46 // ----------------------------------------------------------------------------
    39 // ----------------------------------------------------------------------------
    99 //
    92 //
   100 bool LogsDbConnector::clearList(LogsModel::ClearType /*cleartype*/)
    93 bool LogsDbConnector::clearList(LogsModel::ClearType /*cleartype*/)
   101 {
    94 {
   102     logsLastCalledFunction = "clearList";
    95     logsLastCalledFunction = "clearList";
   103     return true;
    96     return true;
   104 }
       
   105 
       
   106 // ----------------------------------------------------------------------------
       
   107 // LogsDbConnector::clearMissedCallsCounter
       
   108 // ----------------------------------------------------------------------------
       
   109 //
       
   110 int LogsDbConnector::clearMissedCallsCounter()
       
   111 {
       
   112     logsLastCalledFunction = "clearMissedCallsCounter";
       
   113     return 0;
       
   114 }
    97 }
   115 
    98 
   116 // ----------------------------------------------------------------------------
    99 // ----------------------------------------------------------------------------
   117 // LogsDbConnector::clearEvents
   100 // LogsDbConnector::clearEvents
   118 // ----------------------------------------------------------------------------
   101 // ----------------------------------------------------------------------------
   250 //
   233 //
   251 int LogsDbConnector::doMarkEventSeen()
   234 int LogsDbConnector::doMarkEventSeen()
   252 {
   235 {
   253     return 0;
   236     return 0;
   254 }
   237 }
   255 
       
   256 // ----------------------------------------------------------------------------
       
   257 // LogsDbConnector::predictiveSearchStatus
       
   258 // ----------------------------------------------------------------------------
       
   259 //
       
   260 int LogsDbConnector::predictiveSearchStatus()
       
   261 {
       
   262     logsLastCalledFunction = "predictiveSearchStatus";
       
   263     return logsPredictiveSearchStatus;
       
   264 }
       
   265 
       
   266 // ----------------------------------------------------------------------------
       
   267 // LogsDbConnector::setPredictiveSearch
       
   268 // ----------------------------------------------------------------------------
       
   269 //
       
   270 int LogsDbConnector::setPredictiveSearch(bool enabled)
       
   271 {
       
   272     logsLastCalledFunction = "setPredictiveSearch";
       
   273     if (logsPredictiveSearchStatus != 0) {
       
   274         logsPredictiveSearchStatus = enabled ? 1 : 2;
       
   275         return 0;
       
   276     } else {
       
   277         return -1;
       
   278     }
       
   279 }