menucontentsrv/srvinc/mcsinstallnotifier.h
changeset 0 79c6a41cd166
child 31 8baec10861af
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This class implements MMcsGetListCreatorInterface. It builds tree 
       
    15 *   output list for getlist operation 
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 #ifndef MCSINSTALLNOTIFIER_H_
       
    21 #define MCSINSTALLNOTIFIER_H_
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32property.h>
       
    25 
       
    26 
       
    27 /**
       
    28  * Interface for updating after installer events.
       
    29  *
       
    30  * @since S60 v5.0
       
    31  */
       
    32 class MMcsInstallListener
       
    33     {
       
    34 protected:
       
    35     /**
       
    36      * Enum defining the purpouse of the installation event.
       
    37      */
       
    38     enum TInstOp
       
    39     	{
       
    40     	EInstOpNone = 0x00000000,
       
    41     	EInstOpInstall = 0x00000001,
       
    42     	EInstOpUninstall = 0x00000002,
       
    43     	EInstOpRestore = 0x00000004
       
    44 		};
       
    45 public:
       
    46     virtual void HandleInstallNotifyL(TInt aEvent) = 0;
       
    47     };
       
    48 
       
    49 
       
    50 /**
       
    51  *  MCS Install notifier.
       
    52  *
       
    53  *  @since S60 v5.0
       
    54  */
       
    55 NONSHARABLE_CLASS( CMcsInstallNotifier ) :
       
    56 	public CActive
       
    57 	{
       
    58     /**
       
    59      * Enum defining the purpouse of the installation event.
       
    60      */
       
    61     enum TInstOp
       
    62     	{
       
    63     	EInstOpNone = 0x00000000,
       
    64     	EInstOpInstall = 0x00000001,
       
    65     	EInstOpUninstall = 0x00000002,
       
    66     	EInstOpRestore = 0x00000004
       
    67 		};
       
    68     
       
    69     enum TInstOpStatus
       
    70         {
       
    71         EInstOpStatusNone = 0x00000000,
       
    72         EInstOpStatusSuccess = 0x00000100,
       
    73         EInstOpStatusAborted = 0x00000200
       
    74         };
       
    75 public:	
       
    76 		
       
    77     /**
       
    78      * Creates an instance of CMCSInstallNotifier implementation.
       
    79      * @param aNotifier Reference to notifier interface.
       
    80      * @param aCategory Package uid.
       
    81      * @param aKey Key for central repository.
       
    82      */
       
    83 	static CMcsInstallNotifier* NewL(MMcsInstallListener& aListener, TInt aKey );
       
    84 	
       
    85 	/**
       
    86 	 * Destructor.
       
    87 	 */
       
    88 	virtual ~CMcsInstallNotifier();
       
    89 	
       
    90 private:
       
    91 	
       
    92     /**
       
    93      * Constructor.
       
    94      * @param aNotifier Reference to notifier interface.
       
    95      * @param aCategory Package uid.
       
    96      * @param aKey Key for central repository.
       
    97      */
       
    98 	CMcsInstallNotifier( MMcsInstallListener& aListener, TInt aKey );
       
    99 	
       
   100 	/**
       
   101 	     * Symbian 2nd phase constructor.
       
   102 	     */
       
   103 	    void ConstructL();
       
   104 
       
   105 	    /**
       
   106 	     * From CActive.
       
   107 	     */
       
   108 	    void DoCancel();
       
   109 
       
   110 	    /**
       
   111 	     * From CActive.
       
   112 	     */
       
   113 	    void RunL();
       
   114 
       
   115 	    /**
       
   116 	     * From CActive.
       
   117 	     */
       
   118 	    TInt RunError( TInt aError );
       
   119 	    
       
   120 private:
       
   121     /**.
       
   122      * Own.
       
   123      */
       
   124     RProperty iProperty;
       
   125 
       
   126     /**
       
   127      * Interface for notifying changes in folder.
       
   128      * Not Own.
       
   129      */
       
   130     MMcsInstallListener& iListener;
       
   131 
       
   132     /*
       
   133      * 
       
   134      */
       
   135     TInt iKey;
       
   136 	};
       
   137 
       
   138 
       
   139 #endif /* MCSINSTALLNOTIFIER_H_ */