logsui/logsengine/logssymbianos/tsrc/stubs/qtcontacts_stubs.cpp
changeset 13 52d644758b05
parent 8 6c9acdc6adc0
child 15 76d2cf7a585e
equal deleted inserted replaced
9:68f3171a5819 13:52d644758b05
   112         list.append( logsTestContactId );
   112         list.append( logsTestContactId );
   113     }
   113     }
   114     return list;
   114     return list;
   115 }
   115 }
   116 
   116 
   117 QContact QContactManager::contact(const QContactLocalId& contactId, const QStringList& definitionRestrictions) const
       
   118 {
       
   119 		Q_UNUSED(definitionRestrictions)
       
   120     QContact contact;
       
   121     if ( contactId == logsTestContactId ) {
       
   122         logsTestContactLocalId = logsTestContactId;
       
   123     }
       
   124     return contact;
       
   125 }
       
   126 
       
   127 QContact QContactManager::contact(const QContactLocalId& contactId, const QContactFetchHint& fetchHint) const
   117 QContact QContactManager::contact(const QContactLocalId& contactId, const QContactFetchHint& fetchHint) const
   128 {
   118 {
   129     Q_UNUSED(fetchHint)
   119     Q_UNUSED(fetchHint)
   130     QContact contact;
   120     QContact contact;
   131     if ( contactId == logsTestContactId ) {
   121     if ( contactId == logsTestContactId ) {
   145 }
   135 }
   146   
   136   
   147 void QContactDetailFilter::setDetailDefinitionName(
   137 void QContactDetailFilter::setDetailDefinitionName(
   148         const QString& definition, const QString& fieldName)
   138         const QString& definition, const QString& fieldName)
   149 {
   139 {
   150 
   140     Q_UNUSED(definition)
   151 }
   141     Q_UNUSED(fieldName)
       
   142 }
       
   143 
   152 void QContactDetailFilter::setMatchFlags(QContactFilter::MatchFlags flags)
   144 void QContactDetailFilter::setMatchFlags(QContactFilter::MatchFlags flags)
   153 {
   145 {
   154     Q_UNUSED(flags)
   146     Q_UNUSED(flags)
   155 }
   147 }
       
   148 
   156 void QContactDetailFilter::setValue(const QVariant& value)
   149 void QContactDetailFilter::setValue(const QVariant& value)
   157 {
   150 {
   158     logsTestNumber = value.toString();
   151     logsTestNumber = value.toString();
   159 }
   152 }
   160 
   153 
   174 
   167 
   175 
   168 
   176 QContact& QContact::operator=(const QContact& other)
   169 QContact& QContact::operator=(const QContact& other)
   177 {
   170 {
   178     Q_UNUSED(other)
   171     Q_UNUSED(other)
   179 }
   172     return *this;
       
   173 }
       
   174 
       
   175 QContactDetail  QContact::detail(const char* definitionId) const
       
   176 {
       
   177     if ( definitionId == QContactName::DefinitionName ){
       
   178          QContactName name;
       
   179          return name;
       
   180      } else if ( definitionId == QContactPhoneNumber::DefinitionName ){
       
   181          QContactPhoneNumber number;
       
   182          return number;
       
   183      }
       
   184      QContactDetail detail;
       
   185      return detail;   
       
   186 }
       
   187 
   180 
   188 
   181 QContactDetail QContact::detail(const QString& definitionId) const
   189 QContactDetail QContact::detail(const QString& definitionId) const
   182 {
   190 {
   183     if ( definitionId == QContactName::DefinitionName ){
   191     if ( definitionId == QContactName::DefinitionName ){
   184         QContactName name;
   192         QContactName name;
   190     QContactDetail detail;
   198     QContactDetail detail;
   191     return detail;
   199     return detail;
   192 }
   200 }
   193 
   201 
   194 bool QContact::saveDetail(QContactDetail* detail)
   202 bool QContact::saveDetail(QContactDetail* detail)
   195     {
   203 {
   196       return true;
   204     Q_UNUSED(detail)
   197     }
   205     return true;
       
   206 }
   198  
   207  
   199 bool QContact::removeDetail(QContactDetail* detail)
   208 bool QContact::removeDetail(QContactDetail* detail)
   200     {
   209 {
   201      return true;
   210     Q_UNUSED(detail)
   202     }
   211     return true;
       
   212 }
   203 
   213 
   204 
   214 
   205 QContactLocalId QContact::localId() const
   215 QContactLocalId QContact::localId() const
   206 {
   216 {
   207     return logsTestContactLocalId;
   217     return logsTestContactLocalId;
   227 
   237 
   228 
   238 
   229 QContactDetail& QContactDetail::operator=(const QContactDetail& other)
   239 QContactDetail& QContactDetail::operator=(const QContactDetail& other)
   230 {
   240 {
   231     Q_UNUSED(other)
   241     Q_UNUSED(other)
       
   242     return *this;
   232 }
   243 }
   233 
   244 
   234 QString QContactDetail::definitionName() const
   245 QString QContactDetail::definitionName() const
   235 {
   246 {
   236     return QString("");
   247     return QString("");
   258         return QString( "12345" );
   269         return QString( "12345" );
   259     }
   270     }
   260     return QString("");
   271     return QString("");
   261 }
   272 }
   262 
   273 
   263 
   274 QString QContactDetail::value(const char* key) const
       
   275 {
       
   276     if ( key == QContactName::FieldFirstName ){
       
   277         return logsFirstName;
       
   278     } else if ( key == QContactName::FieldLastName ) {
       
   279         return logsLastName;
       
   280     } else if ( key == QContactPhoneNumber::FieldNumber ) {
       
   281         return QString( "12345" );
       
   282     }
       
   283     return QString("");    
       
   284 }