csxhelp/inc/csxhruntimeappwatcher.h
changeset 0 1f04cf54edd8
equal deleted inserted replaced
-1:000000000000 0:1f04cf54edd8
       
     1 /*
       
     2 * Copyright (c) 2006 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:  observer if any install/unistall happens at help app
       
    15 *                 runtime
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef CSXHRUNTIMEAPPWATCHER_H
       
    20 #define CSXHRUNTIMEAPPWATCHER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <f32file.h>
       
    24 
       
    25 /*
       
    26  * Base class of Installation/Uninstallation
       
    27  * 
       
    28  */
       
    29 class MInstallationObserver
       
    30     {
       
    31 public:
       
    32     /*
       
    33      * call back function, to handle update index
       
    34      */
       
    35     virtual void RuntimeUpdateIndex() = 0;
       
    36     };
       
    37 
       
    38 /*
       
    39  * Runtime indexing wather
       
    40  * keep watching if user install/uninstall/modify any helps
       
    41  * 
       
    42  */
       
    43 class CCSXHRuntimeAppWatcher : public CActive
       
    44     {
       
    45 public:
       
    46     
       
    47     /*
       
    48      * default constructor
       
    49      */
       
    50     CCSXHRuntimeAppWatcher();
       
    51     
       
    52     /*
       
    53      * destructor
       
    54      */
       
    55     ~CCSXHRuntimeAppWatcher();
       
    56     
       
    57     /*
       
    58      * two-phase constructor
       
    59      */
       
    60     static CCSXHRuntimeAppWatcher* NewL();
       
    61     
       
    62     /*
       
    63      * from base class CActive
       
    64      * Handles an active object's request completion event
       
    65      */
       
    66     void RunL();
       
    67     
       
    68     /*
       
    69      * from base class CActive
       
    70      * Implements cancellation of an outstanding request
       
    71      */
       
    72     void DoCancel();
       
    73     
       
    74     /*
       
    75      * start this active object
       
    76      */
       
    77     void Start();
       
    78     
       
    79     /*
       
    80      * Set observer
       
    81      * @param aObserver: App UI, notify user helps modified
       
    82      * 
       
    83      */
       
    84     void SetObserver( MInstallationObserver* aObserver );
       
    85     
       
    86 private:
       
    87     
       
    88     /*
       
    89      * two-phase constructor
       
    90      */
       
    91     void ConstructL();
       
    92     
       
    93 private:
       
    94 
       
    95     /*
       
    96      * file session
       
    97      */
       
    98     RFs iFileSession;
       
    99     
       
   100     /*
       
   101      * observer
       
   102      * not owned
       
   103      */
       
   104     MInstallationObserver* iObserver;
       
   105     };
       
   106     
       
   107 #endif // CSXHRUNTIMEAPPWATCHER_H