locationsystemui/locationsysui/privacyverifiernotifierui/locnotificationengine/src/qlocnotificationengine.cpp
changeset 40 16118e24b93b
parent 32 b12ea03c50a3
equal deleted inserted replaced
33:834e27cad510 40:16118e24b93b
    38 // QLocNotificationEngine::QLocNotificationEngine()
    38 // QLocNotificationEngine::QLocNotificationEngine()
    39 // (other items were commented in a header).
    39 // (other items were commented in a header).
    40 //---------------------------------------------------------------------
    40 //---------------------------------------------------------------------
    41 QLocNotificationEngine::QLocNotificationEngine()
    41 QLocNotificationEngine::QLocNotificationEngine()
    42     {
    42     {
       
    43     qDebug()
       
    44             << "+QLocNotificationEngine::QLocNotificationEngine()";
    43     //"symbian" is the string used to load the contact manager corresponding to the phonebook database
    45     //"symbian" is the string used to load the contact manager corresponding to the phonebook database
    44     mContactManager = new QtMobility::QContactManager("symbian");
    46     mContactManager = new QtMobility::QContactManager("symbian");
       
    47    qDebug()
       
    48             << "-QLocNotificationEngine::QLocNotificationEngine()";	
    45     }
    49     }
    46 
    50 
    47 //------QLocNotificationEngine-----------------------------------------
    51 //------QLocNotificationEngine-----------------------------------------
    48 // QLocNotificationEngine::~QLocNotificationEngine()
    52 // QLocNotificationEngine::~QLocNotificationEngine()
    49 // (other items were commented in a header).
    53 // (other items were commented in a header).
    58 // Used to resolve requestors
    62 // Used to resolve requestors
    59 // (other items were commented in a header).
    63 // (other items were commented in a header).
    60 //---------------------------------------------------------------------
    64 //---------------------------------------------------------------------
    61 void QLocNotificationEngine::processRequestors(QPosRequestorData& posRequestorData)
    65 void QLocNotificationEngine::processRequestors(QPosRequestorData& posRequestorData)
    62     {        
    66     {        
    63   
    67     qDebug()
       
    68             << "+QLocNotificationEngine::processRequestors()"; 
    64     QtMobility::QContactDetailFilter filter;
    69     QtMobility::QContactDetailFilter filter;
    65 
    70 
    66     QString idString;
    71     QString idString;
    67     QPosRequestorData::IdFormat idFormat =  QPosRequestorData::EIdFormatUnknown;
    72     QPosRequestorData::IdFormat idFormat =  QPosRequestorData::EIdFormatUnknown;
    68     posRequestorData.getPosRequestorData(idFormat,idString);
    73     posRequestorData.getPosRequestorData(idFormat,idString);
    98     
   103     
    99     if (matchingContacts.size() > 0) //if any contacts were found
   104     if (matchingContacts.size() > 0) //if any contacts were found
   100         {
   105         {
   101                
   106                
   102         QtMobility::QContact match = mContactManager->contact(matchingContacts.at(0)); //return the first contact among the ones found
   107         QtMobility::QContact match = mContactManager->contact(matchingContacts.at(0)); //return the first contact among the ones found
   103 
   108           
   104        // QtMobility::QContactDisplayLabel cdl = match.detail(QtMobility::QContactDisplayLabel::DefinitionName);
       
   105         QString labelDetail = match.displayLabel();
   109         QString labelDetail = match.displayLabel();
   106         posRequestorData.setPosRequestorData(idFormat,labelDetail); //set back result
   110         posRequestorData.setPosRequestorData(idFormat,labelDetail); //set back result
   107         }
   111         }
   108     else
   112     else
   109     	{
   113     	{
   118     		*/
   122     		*/
   119             posRequestorData.setPosRequestorData(idFormat,idString); //set back result
   123             posRequestorData.setPosRequestorData(idFormat,idString); //set back result
   120     		}
   124     		}
   121     	} 
   125     	} 
   122     
   126     
       
   127     qDebug()
       
   128             << "-QLocNotificationEngine::processRequestors()"; 
   123     }
   129     }
   124 
   130 
   125 //---------------------------------------------------------------------
   131 //---------------------------------------------------------------------
   126 // QPosRequestorData::QPosRequestorData()
   132 // QPosRequestorData::QPosRequestorData()
   127 // Constructor for QPosRequestorData
   133 // Constructor for QPosRequestorData