phoneengine/phonecntfinder2/src/cphcntmatch2.cpp
changeset 65 2a5d4ab426d3
parent 46 bc5a64e5bc3c
equal deleted inserted replaced
60:1eef62f5c541 65:2a5d4ab426d3
   123 //
   123 //
   124 TPtrC CPhCntMatch2::CompanyName() const
   124 TPtrC CPhCntMatch2::CompanyName() const
   125 {
   125 {
   126   return KNullDesC();
   126   return KNullDesC();
   127 }
   127 }
       
   128 
       
   129 // -----------------------------------------------------------------------------
       
   130 // GroupName
       
   131 // -----------------------------------------------------------------------------
       
   132 //
       
   133 TPtrC CPhCntMatch2::GroupName() const
       
   134 {
       
   135     return iGroupname.utf16();  
       
   136 }
       
   137 
   128 // -----------------------------------------------------------------------------
   138 // -----------------------------------------------------------------------------
   129 // Number
   139 // Number
   130 // -----------------------------------------------------------------------------
   140 // -----------------------------------------------------------------------------
   131 //
   141 //
   132 TPtrC CPhCntMatch2::Number() const
   142 TPtrC CPhCntMatch2::Number()
   133 {
   143 {
   134     //how many numbers are returned here? should be only one that matched 
   144     //how many numbers are returned here? should be only one that matched 
   135     if ( iNumber == NULL ) {
   145     if ( iNumber == NULL ) {      
   136    
   146         TPtrC ptr(FieldValue(QContactPhoneNumber::DefinitionName, 
   137     TPtrC ptr(FieldValue(QContactPhoneNumber::DefinitionName, 
   147                    QContactPhoneNumber::FieldNumber).utf16());
   138                QContactPhoneNumber::FieldNumber).utf16());
   148         iNumber = ptr.Alloc();
   139     const_cast<HBufC*>(iNumber) = ptr.Alloc();
   149         if (!iNumber) {
       
   150             return KNullDesC();
       
   151         }
   140     }  
   152     }  
   141     return iNumber->Des();
   153     return iNumber->Des();
   142 }
   154 }
   143 // -----------------------------------------------------------------------------
   155 // -----------------------------------------------------------------------------
   144 // PersonalRingingTone
   156 // PersonalRingingTone
   225     
   237     
   226     
   238     
   227     iLastname = FieldValue(
   239     iLastname = FieldValue(
   228              QContactName::DefinitionName, 
   240              QContactName::DefinitionName, 
   229              QContactName::FieldLastName);
   241              QContactName::FieldLastName);
       
   242     
       
   243     if (iContact.type() == QContactType::TypeGroup) {
       
   244         QContactName contactName = iContact.detail(QContactName::DefinitionName);
       
   245         iGroupname = contactName.customLabel();     
       
   246     }
   230     
   247     
   231     //Get caller's image
   248     //Get caller's image
   232     QList<QContactAvatar> details = iContact.details<QContactAvatar>();
   249     QList<QContactAvatar> details = iContact.details<QContactAvatar>();
   233     for (int i=0;i<details.count();++i) {
   250     for (int i=0;i<details.count();++i) {
   234         if (!details.at(i).imageUrl().isEmpty()) {
   251         if (!details.at(i).imageUrl().isEmpty()) {