contentpublishingsrv/contentharvester/factorysettingsplugin/inc/chfactorysettingsinstallnotifier.h
changeset 93 82b66994846c
parent 92 782e3408c2ab
child 94 dbb8300717f7
equal deleted inserted replaced
92:782e3408c2ab 93:82b66994846c
     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:  Sis package installation event listener
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CCHFACTORYSETTINGSINSTALLNOTIFIER_H
       
    20 #define C_CCHFACTORYSETTINGSINSTALLNOTIFIER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32property.h>
       
    24 
       
    25 class CCHFactorySettings;
       
    26 
       
    27 /**
       
    28  *  Central Repository notifier.
       
    29  *
       
    30  *  @since S60 S60 v3.1
       
    31  */
       
    32 class CCHFactorySettingsInstallNotifier : public CActive
       
    33     {
       
    34     /**
       
    35      * Enum defining the purpouse of the installation event.
       
    36      */
       
    37     enum TInstOp
       
    38         {
       
    39         EInstOpNone = 0x00000000,
       
    40         EInstOpInstall = 0x00000001,
       
    41         EInstOpUninstall = 0x00000002,
       
    42         EInstOpRestore = 0x00000004
       
    43         };
       
    44 
       
    45     /**
       
    46      * Enum defining the exit status of the installation event.
       
    47      */
       
    48     enum TInstOpStatus
       
    49         {
       
    50         EInstOpStatusNone = 0x00000000,
       
    51         EInstOpStatusSuccess = 0x00000100,
       
    52         EInstOpStatusAborted = 0x00000200
       
    53         };
       
    54 
       
    55 public:
       
    56 
       
    57     /**
       
    58      * Creates an instance of CCHFactorySettingsInstallNotifier implementation.
       
    59      * @param aCallBack Reference to notifier interface.
       
    60      * @param aCategory Package uid.
       
    61      * @param aKey Key for central repository.
       
    62      */
       
    63     static CCHFactorySettingsInstallNotifier* NewL(
       
    64         CCHFactorySettings* aCallback, TUid aCategory, TUint aKey );
       
    65 
       
    66     /**
       
    67      * Destructor.
       
    68      */
       
    69     virtual ~CCHFactorySettingsInstallNotifier();
       
    70 
       
    71 private:
       
    72     /**
       
    73      * Constructor.
       
    74      * @param aCallBack Reference to notifier interface.
       
    75      * @param aCategory Package uid.
       
    76      * @param aKey Key for central repository.
       
    77      */
       
    78     CCHFactorySettingsInstallNotifier( CCHFactorySettings* aCallback,
       
    79         TUid aCategory, TUint aKey );
       
    80 
       
    81     /**
       
    82      * Symbian 2nd phase constructor.
       
    83      */
       
    84     void ConstructL();
       
    85 
       
    86     /**
       
    87      * From CActive.
       
    88      */
       
    89     void DoCancel();
       
    90 
       
    91     /**
       
    92      * From CActive.
       
    93      */
       
    94     void RunL();
       
    95 
       
    96     /**
       
    97      * From CActive.
       
    98      */
       
    99     TInt RunError( TInt aError );
       
   100 
       
   101 private:
       
   102     /**
       
   103      * User side interface to Publish & Subscribe.
       
   104      * Own.
       
   105      */
       
   106     RProperty iProperty;
       
   107 
       
   108     /**
       
   109      * Interface for notifying changes in SWI.
       
   110      * Not own.
       
   111      */
       
   112     CCHFactorySettings* iCallback;
       
   113 
       
   114     /**
       
   115      * Category uid.
       
   116      * Own.
       
   117      */
       
   118     TUid iCategory;
       
   119 
       
   120     /**
       
   121      * Key identifier.
       
   122      * Own.
       
   123      */
       
   124     TUint iKey;
       
   125 
       
   126     };
       
   127 
       
   128 #endif // C_CCHFACTORYSETTINGSINSTALLNOTIFIER_H
       
   129 // End of File