installationservices/swi/source/sislauncher/server/sislauncherserver.cpp
changeset 60 245df5276b97
parent 42 d17dc5398051
child 75 2d2d25361590
equal deleted inserted replaced
53:ae54820ef82c 60:245df5276b97
   151         DEBUG_PRINTF(_L8("Sis Launcher Server - Starting shutdown timer"));
   151         DEBUG_PRINTF(_L8("Sis Launcher Server - Starting shutdown timer"));
   152         iShutdown->StartShort(ETrue);
   152         iShutdown->StartShort(ETrue);
   153         } 
   153         } 
   154     }
   154     }
   155 
   155 
   156     // All functions require TCB capability
       
   157 const TInt CSisLauncherServer::iRanges[iRangeCount] = 
   156 const TInt CSisLauncherServer::iRanges[iRangeCount] = 
   158     {
   157     {
   159     0, // All connect attempts
   158     0, // All connect attempts
   160 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   159 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   161     // Range of utility services for Post manufacture management of Layered Execution Environemnts
   160     EParseSwTypeRegFile,                                // accessible by Installserver 
   162     EParseSwTypeRegFile,
   161     EUnregisterSifLauncherMimeTypes,                    // accessible by SisRegistryServer
   163     EUnregisterSifLauncherMimeTypes,
   162     ENotifyApparcForApps,                               // accessible by Installserver and SisRegistry
   164     EAsyncParseResourceFileSize,
   163     EAsyncParseResourceFileSize,                        // accessible by all clients
   165 #endif
   164 #endif
   166     ESeparatorEndAll,
   165     ESeparatorEndAll,
   167     };
   166     };
   168 
   167 
   169 const TUint8 CSisLauncherServer::iElementsIndex[iRangeCount] = 
   168 const TUint8 CSisLauncherServer::iElementsIndex[iRangeCount] = 
   170     {
   169     {
   171     0, // Used by Client which is only swis and TCB is needed.
   170     0, // Used by Client which is only swis and TCB is needed.
   172 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   171 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   173     1, // Utility services used by InstallServer
   172     1, // Utility services used by InstallServer
   174     2, // Utility services used by SisRegistryServer
   173     2, // Utility services used by SisRegistryServer
       
   174     CPolicyServer::ECustomCheck,
   175     CPolicyServer::EAlwaysPass,
   175     CPolicyServer::EAlwaysPass,
   176 #endif  
   176 #endif  
   177     CPolicyServer::ENotSupported,
   177     CPolicyServer::ENotSupported,
   178     };
   178     };
       
   179 
   179 const CPolicyServer::TPolicyElement CSisLauncherServer::iPolicyElements[] = 
   180 const CPolicyServer::TPolicyElement CSisLauncherServer::iPolicyElements[] = 
   180     {
   181     {
   181     {_INIT_SECURITY_POLICY_C1(ECapabilityTCB), CPolicyServer::EFailClient},
   182     {_INIT_SECURITY_POLICY_C1(ECapabilityTCB), CPolicyServer::EFailClient},
   182 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   183 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
   183     {_INIT_SECURITY_POLICY_S0(KInstallServerUid), CPolicyServer::EFailClient},
   184     {_INIT_SECURITY_POLICY_S0(KInstallServerUid), CPolicyServer::EFailClient},
   325     CThreadMonitor* threadMonitor = CThreadMonitor::NewLC(aThread, wsSession);
   326     CThreadMonitor* threadMonitor = CThreadMonitor::NewLC(aThread, wsSession);
   326     threadMonitor->SyncShutdownL(runWaitTimeout, aKillOnTimeout, shutdownTimeout);
   327     threadMonitor->SyncShutdownL(runWaitTimeout, aKillOnTimeout, shutdownTimeout);
   327     CleanupStack::PopAndDestroy(threadMonitor);
   328     CleanupStack::PopAndDestroy(threadMonitor);
   328     }
   329     }
   329 
   330 
       
   331 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
   332 CPolicyServer::TCustomResult CSisLauncherServer::CustomSecurityCheckL(const RMessage2& aMsg, 
       
   333     TInt& /*aAction*/, TSecurityInfo& /*aMissing*/)
       
   334     {
       
   335     TUint32 secureId = aMsg.SecureId().iId;
       
   336     if (secureId == KInstallServerUid || secureId == KSisRegistryServerUid)
       
   337         {
       
   338         return CPolicyServer::EPass;
       
   339         }
       
   340     else
       
   341         {
       
   342         //client accessing the function is neither Install Server nor Sis Registry
       
   343         return CPolicyServer::EFail;
       
   344         }
       
   345     }
       
   346 #endif
   330 
   347 
   331 #ifndef SWI_TEXTSHELL_ROM
   348 #ifndef SWI_TEXTSHELL_ROM
   332 void CSisLauncherServer::StartDocumentL(RFile& aFile, TBool aWait)
   349 void CSisLauncherServer::StartDocumentL(RFile& aFile, TBool aWait)
   333     {
   350     {
   334     DEBUG_CODE_SECTION(
   351     DEBUG_CODE_SECTION(
   563     // UI frameworks advise ignoring the return code
   580     // UI frameworks advise ignoring the return code
   564     // Proceeding even if force registration fails so that installation is not aborted
   581     // Proceeding even if force registration fails so that installation is not aborted
   565     apaSession.ForceRegistration(aApplicationRegistrationData);
   582     apaSession.ForceRegistration(aApplicationRegistrationData);
   566     CleanupStack::PopAndDestroy();
   583     CleanupStack::PopAndDestroy();
   567     }
   584     }
   568 #endif
   585 
   569 #endif
   586 #endif
   570 
   587 #endif
   571     
   588 
       
   589