installationservices/swi/source/swis/server/restoremachine.cpp
branchRCL_3
changeset 12 7ca52d38f8c3
parent 0 ba25891c3a9e
child 25 7333d7932ef7
equal deleted inserted replaced
11:3ba40be8e484 12:7ca52d38f8c3
     1 /*
     1 /*
     2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Eclipse Public License v1.0"
     5 * under the terms of the License "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    35 #include "sisinfo.h"
    35 #include "sisinfo.h"
    36 #include "sisuid.h"
    36 #include "sisuid.h"
    37 #include "log.h"
    37 #include "log.h"
    38 #include "swispubsubdefs.h"
    38 #include "swispubsubdefs.h"
    39 #include "securitycheckutil.h"
    39 #include "securitycheckutil.h"
    40 #include "secutils.h"
       
    41 #include "cleanuputils.h"
    40 #include "cleanuputils.h"
    42 #include "sisversion.h"
    41 #include "sisversion.h"
    43 #include "sisregistrywritablesession.h"
    42 #include "sisregistrywritablesession.h"
    44 #include <f32file.h>
    43 #include <f32file.h>
    45 #include "sisregistrypackage.h"
    44 #include "sisregistrypackage.h"
   138  		}
   137  		}
   139  	else
   138  	else
   140  		{
   139  		{
   141  		CheckVersionUpgradeL();
   140  		CheckVersionUpgradeL();
   142  		}
   141  		}
       
   142 		//Publish package Uid which is going to be restored.
       
   143  	err = SecUtils::PublishPackageUid(iPackageUid, iUidList);
       
   144 	if (err == KErrNone)
       
   145     	{
       
   146         DEBUG_PRINTF2(_L("CRestoreMachine::ConstructL published Uid is %x."),iPackageUid);
       
   147     	}
       
   148 	else if (err == KErrOverflow)
       
   149 	    {
       
   150         DEBUG_PRINTF2(_L("CRestoreMachine::ConstructL Failed to publish Uid %x as the array, holding the uids, exceeded its upper limit."),iPackageUid);
       
   151 	    }
       
   152     else if (err == KErrNotFound)
       
   153         {
       
   154         DEBUG_PRINTF2(_L("CRestoreMachine::ConstructL Failed to publish Uid %x as the property is not defined."),iPackageUid);
       
   155         }
       
   156 	else
       
   157 		{
       
   158         DEBUG_PRINTF3(_L("CRestoreMachine::ConstructL Failed to publish Uid %x with error %d."),iPackageUid, err);
       
   159         User::Leave(err);
       
   160 		}
   143 
   161 
   144  #ifdef SYMBIAN_USER_PROMPT_SERVICE
   162  #ifdef SYMBIAN_USER_PROMPT_SERVICE
   145 	//connect to the SWI Observer
   163 	//connect to the SWI Observer
   146 	User::LeaveIfError(iObserver.Connect());
   164 	User::LeaveIfError(iObserver.Connect());
   147 	//Resgister to the SWI Observer
   165 	//Resgister to the SWI Observer