serviceproviders/sapi_location/locationservice/src/locationcoreimp.cpp
changeset 32 8d692d9f828f
parent 22 fc9cf246af83
child 33 50974a8b132e
equal deleted inserted replaced
27:44bb89c96acb 32:8d692d9f828f
    63         {
    63         {
    64         //Open a new subsession with position server using default module
    64         //Open a new subsession with position server using default module
    65         User :: LeaveIfError((this->iPositioner).Open(aPositionServer)) ; 
    65         User :: LeaveIfError((this->iPositioner).Open(aPositionServer)) ; 
    66         }
    66         }
    67 
    67 
    68     CleanupClosePushL(iPositioner);
    68     //CleanupClosePushL(iPositioner);
    69     //Set the identity of this particular requestor
    69     //Set the identity of this particular requestor
    70     User::LeaveIfError( (this->iPositioner).SetRequestor( 
    70     User::LeaveIfError( (this->iPositioner).SetRequestor( 
    71             CRequestor::ERequestorService,
    71             CRequestor::ERequestorService,
    72             CRequestor::EFormatApplication,
    72             CRequestor::EFormatApplication,
    73             KIdentity ) );
    73             KIdentity ) );
    74 
    74 
    75     this->iPosInfoBase = &(this->iPositionInfo);
    75     this->iPosInfoBase = &(this->iPositionInfo);
    76     this->iRequestType = aRequestType;
    76     this->iRequestType = aRequestType;
    77     this->iGenericPosInfo = HPositionGenericInfo :: NewL();
    77     this->iGenericPosInfo = HPositionGenericInfo :: NewL();
    78     CleanupStack :: PushL(this->iGenericPosInfo);
    78     //CleanupStack :: PushL(this->iGenericPosInfo);
    79 
    79 
    80     if(aList)
    80     if(aList)
    81         {
    81         {
    82         User :: LeaveIfError((this->iGenericPosInfo)->SetRequestedFields(aList));
    82         User :: LeaveIfError((this->iGenericPosInfo)->SetRequestedFields(aList));
    83         }
    83         }
    84 
    84 
    85     CleanupStack ::Pop(this->iGenericPosInfo );
    85     //CleanupStack ::Pop(this->iGenericPosInfo );
    86     CleanupStack::Pop(&iPositioner);
    86     CleanupStack::Pop(&iPositioner);
    87     }
    87     }
    88 /**
    88 /**
    89  * Function name: NewL , 
    89  * Function name: NewL , 
    90  * Constructs a new core implementation object which will later 
    90  * Constructs a new core implementation object which will later 
   195     {
   195     {
   196     CActiveScheduler :: Add(this) 	;
   196     CActiveScheduler :: Add(this) 	;
   197     }
   197     }
   198 
   198 
   199     iPositioner.NotifyPositionUpdate( *iGenericPosInfo, iStatus );
   199     iPositioner.NotifyPositionUpdate( *iGenericPosInfo, iStatus );
   200     SetActive() ;
   200     if (!IsActive())
       
   201         {
       
   202         SetActive();
       
   203         }
   201     return KErrNone ;
   204     return KErrNone ;
   202     }
   205     }
   203 
   206 
   204 
   207 
   205 
   208 
   232 				
   235 				
   233 				{
   236 				{
   234 					if(!this->IsStatusComplete())
   237 					if(!this->IsStatusComplete())
   235 					{
   238 					{
   236 						iPositioner.NotifyPositionUpdate( *iGenericPosInfo, iStatus );
   239 						iPositioner.NotifyPositionUpdate( *iGenericPosInfo, iStatus );
   237 						SetActive();
   240 						if (!IsActive())
       
   241                             {
       
   242                             SetActive();
       
   243                             }
   238 					}
   244 					}
   239 					 	
   245 					 	
   240 				}
   246 				}
   241 			}
   247 			}
   242 
   248 
   252                     {          
   258                     {          
   253                     if (!this->IsStatusComplete())
   259                     if (!this->IsStatusComplete())
   254                         {
   260                         {
   255                         iPositioner.NotifyPositionUpdate( *iGenericPosInfo,
   261                         iPositioner.NotifyPositionUpdate( *iGenericPosInfo,
   256                                 iStatus);
   262                                 iStatus);
   257                         SetActive();
   263                         if (!IsActive())
       
   264                             {
       
   265                             SetActive();
       
   266                             }
   258                         }
   267                         }
   259 
   268 
   260                     }
   269                     }
   261                 }
   270                 }
   262             break;
   271             break;