supl/locationsuplfw/settingsapi/src/epos_csettingsdatabasehandler.cpp
changeset 40 16118e24b93b
parent 22 4c4ed41530db
equal deleted inserted replaced
33:834e27cad510 40:16118e24b93b
  1694     TInt columnIndexOtherProperties = stmt.ColumnIndex(KColOtherProperties);
  1694     TInt columnIndexOtherProperties = stmt.ColumnIndex(KColOtherProperties);
  1695 
  1695 
  1696     while((err=stmt.Next())==KSqlAtRow)
  1696     while((err=stmt.Next())==KSqlAtRow)
  1697         {
  1697         {
  1698         CServerParams *params = CServerParams::NewL();
  1698         CServerParams *params = CServerParams::NewL();
       
  1699         CleanupStack::PushL(params);
  1699         SLPId = stmt.ColumnInt(columnIndexSLPID);
  1700         SLPId = stmt.ColumnInt(columnIndexSLPID);
  1700         stmt.ColumnText(columnIndexSLPAddress,ServerAddress);
  1701         stmt.ColumnText(columnIndexSLPAddress,ServerAddress);
  1701               
  1702               
  1702         stmt.ColumnText(columnIndexIAP,Iap);            
  1703         stmt.ColumnText(columnIndexIAP,Iap);            
  1703         otherprops = stmt.ColumnInt(columnIndexOtherProperties);
  1704         otherprops = stmt.ColumnInt(columnIndexOtherProperties);
  1712         editable = otherprops & KEditable;
  1713         editable = otherprops & KEditable;
  1713         prodConfig = otherprops & KProductConfigured;
  1714         prodConfig = otherprops & KProductConfigured;
  1714         params->Set(ServerAddress,Iap,serverEnabled,simChangeRemove,usageInHomeNw,editable,SLPId);
  1715         params->Set(ServerAddress,Iap,serverEnabled,simChangeRemove,usageInHomeNw,editable,SLPId);
  1715         params->SetServerConfigurationType(prodConfig);
  1716         params->SetServerConfigurationType(prodConfig);
  1716         
  1717         
  1717         aParamValues.Append(params);//ownership transferred to RPointerArray
  1718         aParamValues.AppendL(params);//ownership transferred to RPointerArray
       
  1719         CleanupStack::Pop(params);
  1718         }   
  1720         }   
  1719 
  1721 
  1720     stmt.Close();
  1722     stmt.Close();
  1721     LogAllSLP();
  1723     LogAllSLP();
  1722     }
  1724     }
  1765     TInt columnIndexOtherProperties = stmt.ColumnIndex(KColOtherProperties);
  1767     TInt columnIndexOtherProperties = stmt.ColumnIndex(KColOtherProperties);
  1766 
  1768 
  1767     while((err=stmt.Next())==KSqlAtRow)
  1769     while((err=stmt.Next())==KSqlAtRow)
  1768         {
  1770         {
  1769         CServerParams *params = CServerParams::NewL();
  1771         CServerParams *params = CServerParams::NewL();
       
  1772         CleanupStack::PushL(params);
  1770         SLPId = stmt.ColumnInt(columnIndexSLPID);
  1773         SLPId = stmt.ColumnInt(columnIndexSLPID);
  1771         stmt.ColumnText(columnIndexSLPAddress,ServerAddress);
  1774         stmt.ColumnText(columnIndexSLPAddress,ServerAddress);
  1772               
  1775               
  1773         stmt.ColumnText(columnIndexIAP,Iap);            
  1776         stmt.ColumnText(columnIndexIAP,Iap);            
  1774         otherprops = stmt.ColumnInt(columnIndexOtherProperties);
  1777         otherprops = stmt.ColumnInt(columnIndexOtherProperties);
  1782         usageInHomeNw = otherprops & KUsageInHomeNw; 
  1785         usageInHomeNw = otherprops & KUsageInHomeNw; 
  1783         editable = otherprops & KEditable;
  1786         editable = otherprops & KEditable;
  1784         prodConfig = otherprops & KProductConfigured;
  1787         prodConfig = otherprops & KProductConfigured;
  1785         params->Set(ServerAddress,Iap,serverEnabled,simChangeRemove,usageInHomeNw,editable,SLPId);
  1788         params->Set(ServerAddress,Iap,serverEnabled,simChangeRemove,usageInHomeNw,editable,SLPId);
  1786         params->SetServerConfigurationType(prodConfig);
  1789         params->SetServerConfigurationType(prodConfig);
  1787         aParamValues.Append(params);//ownership transferred to RPointerArray
  1790         aParamValues.AppendL(params);//ownership transferred to RPointerArray
       
  1791         CleanupStack::Pop(params);
  1788         }   
  1792         }   
  1789 
  1793 
  1790     stmt.Close();
  1794     stmt.Close();
  1791     LogAllSLP();
  1795     LogAllSLP();
  1792     User::RequestComplete(iStatus,KErrNone);
  1796     User::RequestComplete(iStatus,KErrNone);
  2554     //Get all slp ids whose priorities wil get affected
  2558     //Get all slp ids whose priorities wil get affected
  2555     while((err=stmt.Next())==KSqlAtRow)
  2559     while((err=stmt.Next())==KSqlAtRow)
  2556         {
  2560         {
  2557         SLPId = stmt.ColumnInt64(columnIndexSLPID);
  2561         SLPId = stmt.ColumnInt64(columnIndexSLPID);
  2558         if(SLPId != aSlpId)
  2562         if(SLPId != aSlpId)
  2559             slpIndexArray.Append(stmt.ColumnInt64(columnIndexSLPID));
  2563             slpIndexArray.AppendL(stmt.ColumnInt64(columnIndexSLPID));
  2560         }
  2564         }
  2561     stmt.Reset(); 
  2565     stmt.Reset(); 
  2562     stmt.Close();
  2566     stmt.Close();
  2563     //update the priority of the requested server first
  2567     //update the priority of the requested server first
  2564     if(!aDirection)
  2568     if(!aDirection)
  2725     //Get all slp ids whose priorities wil get affected
  2729     //Get all slp ids whose priorities wil get affected
  2726     while((err=stmt.Next())==KSqlAtRow)
  2730     while((err=stmt.Next())==KSqlAtRow)
  2727         {
  2731         {
  2728         SLPId = stmt.ColumnInt64(columnIndexSLPID);
  2732         SLPId = stmt.ColumnInt64(columnIndexSLPID);
  2729         if(SLPId != aSlpId)
  2733         if(SLPId != aSlpId)
  2730             slpIndexArray.Append(stmt.ColumnInt64(columnIndexSLPID));
  2734             slpIndexArray.AppendL(stmt.ColumnInt64(columnIndexSLPID));
  2731         }
  2735         }
  2732     stmt.Reset(); 
  2736     stmt.Reset(); 
  2733     stmt.Close();
  2737     stmt.Close();
  2734     //update the priority of the requested server first
  2738     //update the priority of the requested server first
  2735     iSQLString.Zero();
  2739     iSQLString.Zero();
  2805     TInt columnIndexSLPID = stmt.ColumnIndex(KColSLPId);
  2809     TInt columnIndexSLPID = stmt.ColumnIndex(KColSLPId);
  2806     RArray<TInt64> slpIdArray;
  2810     RArray<TInt64> slpIdArray;
  2807     //Get all slp ids currently in the database
  2811     //Get all slp ids currently in the database
  2808     while((err=stmt.Next())==KSqlAtRow)
  2812     while((err=stmt.Next())==KSqlAtRow)
  2809         {
  2813         {
  2810         slpIdArray.Append(stmt.ColumnInt64(columnIndexSLPID));
  2814         slpIdArray.AppendL(stmt.ColumnInt64(columnIndexSLPID));
  2811         }
  2815         }
  2812     stmt.Reset();
  2816     stmt.Reset();
  2813     
  2817     
  2814     iSQLString.Zero();
  2818     iSQLString.Zero();
  2815 
  2819 
  3205     // Reset client array
  3209     // Reset client array
  3206     aParamValues.Reset();
  3210     aParamValues.Reset();
  3207     while((err=stmt.Next())==KSqlAtRow)
  3211     while((err=stmt.Next())==KSqlAtRow)
  3208         {
  3212         {
  3209         CTriggerParams *params = CTriggerParams::NewL();
  3213         CTriggerParams *params = CTriggerParams::NewL();
       
  3214         CleanupStack::PushL(params);
  3210         sessionId = stmt.ColumnInt(columnIndexSessionID);
  3215         sessionId = stmt.ColumnInt(columnIndexSessionID);
  3211         stmt.ColumnText(columnIndexSessionName,sessionName);
  3216         stmt.ColumnText(columnIndexSessionName,sessionName);
  3212         notificationPresent = stmt.ColumnInt(columnIndexNotificationPresent);
  3217         notificationPresent = stmt.ColumnInt(columnIndexNotificationPresent);
  3213         triggerNotificationStatus = stmt.ColumnInt(columnIndexTriggerNotificationStatus);
  3218         triggerNotificationStatus = stmt.ColumnInt(columnIndexTriggerNotificationStatus);
  3214         triggerType = (CTriggerParams::TTriggerType) stmt.ColumnInt(columnIndexTriggerType);
  3219         triggerType = (CTriggerParams::TTriggerType) stmt.ColumnInt(columnIndexTriggerType);
  3217         interval = stmt.ColumnInt(columnIndexInterval);
  3222         interval = stmt.ColumnInt(columnIndexInterval);
  3218         endTimeInt = stmt.ColumnInt64(columnIndexEndTime);
  3223         endTimeInt = stmt.ColumnInt64(columnIndexEndTime);
  3219         endTime = endTimeInt;
  3224         endTime = endTimeInt;
  3220         params->Set(sessionId,sessionName,notificationPresent,triggerNotificationStatus,triggerType,requestType,outstandingTrigger,interval);
  3225         params->Set(sessionId,sessionName,notificationPresent,triggerNotificationStatus,triggerType,requestType,outstandingTrigger,interval);
  3221 				params->SetTriggerEndTime(endTime);        
  3226 				params->SetTriggerEndTime(endTime);        
  3222         aParamValues.Append(params);//ownership transferred to RPointerArray
  3227         aParamValues.AppendL(params);//ownership transferred to RPointerArray
       
  3228         CleanupStack::Pop(params);
  3223         }   
  3229         }   
  3224 
  3230 
  3225     stmt.Close();
  3231     stmt.Close();
  3226     if(aParamValues.Count()==0)
  3232     if(aParamValues.Count()==0)
  3227         {
  3233         {