contentstorage/srvinc/cainstallnotifier.h
changeset 92 782e3408c2ab
parent 89 1e87eb3b400f
child 119 50e220be30d1
equal deleted inserted replaced
91:a6d55a2e75be 92:782e3408c2ab
    21 #include <sacls.h>
    21 #include <sacls.h>
    22 #include <e32base.h>
    22 #include <e32base.h>
    23 #include <e32property.h>
    23 #include <e32property.h>
    24 #include "castorage_global.h"
    24 #include "castorage_global.h"
    25 
    25 
       
    26 class CNotifierStrategy;
       
    27 
    26 /**
    28 /**
    27  * Interface for updating after installer events.
    29  * Interface for updating after installer events.
    28  *
    30  *
    29  * @since S60 v5.0
    31  * @since S60 v5.0
    30  */
    32  */
    35 
    37 
    36     /**
    38     /**
    37      * Pure virtual method.
    39      * Pure virtual method.
    38      * @param aEvent event type.
    40      * @param aEvent event type.
    39      */
    41      */
    40     virtual void HandleInstallNotifyL( TInt aEvent ) = 0;
    42     virtual void HandleInstallNotifyL(TInt aEvent) = 0;
    41     };
    43     };
    42 
    44 
    43 /**
    45 /**
    44  *  CA Install notifier.
    46  *  CA Install notifier.
    45  *
    47  *
    46  *  @since S60 v5.0
    48  *  @since S60 v5.0
    47  */
    49  */
    48 NONSHARABLE_CLASS( CCaInstallNotifier ): public CActive
    50 NONSHARABLE_CLASS( CCaInstallNotifier ) : public CActive
    49     {
    51     {
    50 
    52 
    51 public:
    53 public:
    52 
       
    53     /**
       
    54      * Enum defining the operation type.
       
    55      */
       
    56     enum TInstOp
       
    57         {
       
    58         EInstOpNone = 0x00000000,
       
    59         EInstOpInstall = 0x00000001,
       
    60         EInstOpUninstall = 0x00000002,
       
    61         EInstOpRestore = 0x00000004
       
    62         };
       
    63 
       
    64     /**
       
    65      * Enum defining the operation status.
       
    66      */
       
    67     enum TInstOpStatus
       
    68         {
       
    69         EInstOpStatusNone = 0x00000000,
       
    70         EInstOpStatusSuccess = 0x00000100,
       
    71         EInstOpStatusAborted = 0x00000200
       
    72         };
       
    73 
    54 
    74     /**
    55     /**
    75      * Enum defining notification type.
    56      * Enum defining notification type.
    76      */
    57      */
    77     enum TNotificationType
    58     enum TNotificationType
    78         {
    59         {
    79         ENoNotification = 0x00000000,
    60         ENoNotification,            ///< No notification.
    80         ESisInstallNotification = KUidSwiLatestInstallation, ///< installation notification
    61         ESisInstallNotification,    ///< System installation notification.
       
    62         EJavaInstallNotification,   ///< Java instalation and uninstallation notification.
       
    63         EUsifUninstallNotification, ///< Usif's uninstalation notification.
    81         };
    64         };
    82 
    65 
    83     /**
    66     /**
    84      * Creates an instance of CCaInstallNotifier implementation.
    67      * Creates an instance of CCaInstallNotifier.
    85      * @param aNotifier Reference to notifier interface.
    68      * @param aNotifier Reference to notifier interface.
    86      * @param aNotificationType Notification type.
    69      * @param aNotificationType Notification type.
    87      */
    70      */
    88 IMPORT_C static CCaInstallNotifier* NewL( MCaInstallListener& aListener,
    71 IMPORT_C static CCaInstallNotifier* NewL( MCaInstallListener& aListener,
    89             TNotificationType aNotificationType );
    72             TNotificationType aNotificationType );
    97 
    80 
    98     /**
    81     /**
    99      * Constructor.
    82      * Constructor.
   100      * @param aNotifier Reference to notifier interface.
    83      * @param aNotifier Reference to notifier interface.
   101      */
    84      */
   102     CCaInstallNotifier( MCaInstallListener& aListener,
    85     CCaInstallNotifier( MCaInstallListener& aListener );
   103             TNotificationType aNotificationType );
       
   104 
    86 
   105     /**
    87     /**
   106      * Symbian 2nd phase constructor.
    88      * Symbian 2nd phase constructor.
   107      * @param aNotificationType Notification type.
    89      * @param aNotificationType Notification type.
   108      */
    90      */
   109     void ConstructL();
    91     void ConstructL( TNotificationType aNotificationType );
   110 
    92 
   111     /**
    93     /**
   112      * From CActive.
    94      * From CActive.
   113      */
    95      */
   114     void DoCancel();
    96     void DoCancel();
   136      * Not Own.
   118      * Not Own.
   137      */
   119      */
   138     MCaInstallListener& iListener;
   120     MCaInstallListener& iListener;
   139 
   121 
   140     /*
   122     /*
   141      * Notification type.
   123      * Notification strategy.
   142      */
   124      */
   143     TInt iRPropertyKey;
   125     CNotifierStrategy* iNotifierStrategy;
   144 
   126 
   145     };
   127     };
   146 
   128 
   147 #endif /* CAINSTALLNOTIFIER_H */
   129 #endif /* CAINSTALLNOTIFIER_H */
   148 
   130