installationservices/swi/inc/swi/sisuihandler.h
branchRCL_3
changeset 40 f8cf9d484c15
parent 0 ba25891c3a9e
child 65 7333d7932ef7
equal deleted inserted replaced
36:f9033e605ee2 40:f8cf9d484c15
     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".
    36 {
    36 {
    37 class CUissCmd;
    37 class CUissCmd;
    38 class CWriteStream;
    38 class CWriteStream;
    39 class CProgressBarValuePublisher;
    39 class CProgressBarValuePublisher;
    40 
    40 
       
    41 
    41 /**
    42 /**
    42  * RClass which is used to make calls to the UI Support server using
    43  * RClass which is used to make calls to the UI Support server using
    43  * the client-server framework. The ExecuteL() method is passed a
    44  * the client-server framework. The ExecuteL() method is passed a
    44  * command, in order to display the associated dialog box.
    45  * command, in order to display the associated dialog box.
    45  */
    46  */
    61 	/**
    62 	/**
    62 	 * Helper function to update progress bar
    63 	 * Helper function to update progress bar
    63 	 */
    64 	 */
    64 	IMPORT_C void UpdateProgressBarL(const TAppInfo& aAppInfo, TInt aAmount);
    65 	IMPORT_C void UpdateProgressBarL(const TAppInfo& aAppInfo, TInt aAmount);
    65 	
    66 	
    66 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
    67 	/** Sets a reference to the progress bar value publisher object. The ownership is NOT transferred. */
    67 	/** Sets a reference to the progress bar value publisher object. The ownership is NOT transferred. */
    68 	IMPORT_C void SetProgressBarValuePublisher(CProgressBarValuePublisher* aPublisher);
    68 	IMPORT_C void SetProgressBarValuePublisher(CProgressBarValuePublisher* aPublisher);
    69 private:
    69 private:
    70 	CProgressBarValuePublisher* iPublisher; // Owned by the state machine
    70 	CProgressBarValuePublisher* iPublisher; // Owned by the state machine
    71 #endif
       
    72 	};
    71 	};
    73 
    72 
    74 /**
    73 /**
    75  * Base class used for client classes, which marshall the arguments in order to make 
    74  * Base class used for client classes, which marshall the arguments in order to make 
    76  * a request to the server.  
    75  * a request to the server.  
   818 inline const TVersion& TAppInfo::AppVersion() const
   817 inline const TVersion& TAppInfo::AppVersion() const
   819 	{
   818 	{
   820 	return iAppVersion;
   819 	return iAppVersion;
   821 	}
   820 	}
   822 
   821 
   823 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
       
   824 	NONSHARABLE_CLASS(CProgressBarValuePublisher) : public CBase
   822 	NONSHARABLE_CLASS(CProgressBarValuePublisher) : public CBase
   825 	/**
   823 	/**
   826 	 * This class is used to publish the percentage value of the installation progress bar.
   824 	 * This class is used to publish the percentage value of the installation progress bar.
   827 	 * The progress bar value is published by using a publish&subscribe property. @see Swi::KUidSwiProgressBarValueKey.
   825 	 * The progress bar value is published by using a publish&subscribe property. @see Swi::KUidSwiProgressBarValueKey.
   828 	 */
   826 	 */
   833 		
   831 		
   834 		/** Sets the final value of the installation progress bar. */
   832 		/** Sets the final value of the installation progress bar. */
   835 		IMPORT_C void SetFinalProgressBarValue(TInt aValue);
   833 		IMPORT_C void SetFinalProgressBarValue(TInt aValue);
   836 		
   834 		
   837 		/** Updates the value of the progress bar value property by adding the given value to the current value. */
   835 		/** Updates the value of the progress bar value property by adding the given value to the current value. */
   838 		IMPORT_C void UpdateProgressBarValueL(TInt aValue);
   836 		IMPORT_C TInt CalculateProgressBarValue(TInt aValue);
   839 	
   837 	
   840 	private:
   838 	private:
   841 		CProgressBarValuePublisher();
   839 		CProgressBarValuePublisher();
   842 		void ConstructL();
   840 		void ConstructL();
   843 		
   841 		
   844 	private:
   842 	private:
   845 		TInt iCurrentProgressValue;
   843 		TInt iCurrentProgressValue;
   846 		TInt iFinalProgressValue;
   844 		TInt iFinalProgressValue;
       
   845 		TInt iLastPercentCompletion;
       
   846 		TInt iLastProgressValue;
   847 		};
   847 		};
   848 #endif
       
   849 
   848 
   850 } // namespace Swi
   849 } // namespace Swi
   851 
   850 
   852 #endif // #ifndef __SISUIHANDLER_H__
   851 #endif // #ifndef __SISUIHANDLER_H__