idlehomescreen/hscontentcontrol/inc/hscontentcontrolecomlistener.h
changeset 1 5315654608de
equal deleted inserted replaced
0:f72a12da539e 1:5315654608de
       
     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: Listens for change in ecom registry of content controller
       
    15 * interface.  
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef HSCONTENTCONTROLECOMLISTENER_H 
       
    20 #define HSCONTENTCONTROLECOMLISTENER_H 
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 
       
    25 // User includes
       
    26 
       
    27 // Forward declarations
       
    28 class MHsContentControlEComObserver;
       
    29 class REComSession;
       
    30 
       
    31 // Class declaration
       
    32 /** 
       
    33 * @class CHsContentControlEComListener
       
    34 * 
       
    35 * @brief An instance of class CHsContentControlEComListener which listens for 
       
    36 *  changes in the ECOM registry.
       
    37 *  
       
    38 * @lib hscontentcontrol.lib
       
    39 */
       
    40 NONSHARABLE_CLASS( CHsContentControlEComListener ) : public CActive
       
    41     {
       
    42 public: // Constructor and destructor
       
    43 
       
    44     /**
       
    45      * Two-phased constructor.
       
    46      */ 
       
    47     static CHsContentControlEComListener* NewL( 
       
    48             MHsContentControlEComObserver& aContentControlEComObserver );                                         
       
    49     
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     ~CHsContentControlEComListener();
       
    54 
       
    55 protected: // Functions from base classes
       
    56    /**
       
    57     * From CActive
       
    58     */
       
    59    void RunL();
       
    60 
       
    61    /**
       
    62     * From CActive
       
    63     */
       
    64    void DoCancel();
       
    65 
       
    66    /**
       
    67     * From CActive
       
    68     */
       
    69    TInt RunError( TInt aError );
       
    70 
       
    71 private: // Constructors
       
    72     
       
    73    /**
       
    74     * Default C++ constructor.
       
    75     */ 
       
    76     CHsContentControlEComListener( 
       
    77             MHsContentControlEComObserver& aHsContentControlEComObserver );
       
    78 
       
    79     /**
       
    80      * Second phase constructor.
       
    81      */ 
       
    82     void ConstructL();
       
    83 
       
    84 private: // Data
       
    85 
       
    86     // Reference of MHsContentControlEComObserver
       
    87     MHsContentControlEComObserver& iHsContentControlEComObserver;
       
    88     
       
    89     // An object of type REComSession.
       
    90     REComSession* iEComSession;
       
    91     };
       
    92 
       
    93 #endif  // HSCONTENTCONTROLECOMLISTENER_H
       
    94 
       
    95 // End of file
       
    96