homescreenpluginsrv/hspsmanager/inc/hspsbrobserver.h
changeset 0 79c6a41cd166
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:  Defination of class CHSPSBRObserver
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CHSPSBROBSERVER_H
       
    20 #define C_CHSPSBROBSERVER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32property.h>
       
    24 
       
    25 class ChspsThemeServer;
       
    26 
       
    27 /**
       
    28 * @ingroup group_hspsserver
       
    29 * Provides implementation to HSPS backup event listener
       
    30 *
       
    31 **/
       
    32 NONSHARABLE_CLASS( CHSPSBRObserver ) : public CActive
       
    33     {
       
    34 
       
    35     public:  // Constructors and destructor
       
    36         
       
    37         /**
       
    38         * Two-phased constructor.
       
    39         * @param aServer Reference to listening server
       
    40         * @return pointer to CHSPSBRObserver object
       
    41         */
       
    42         static CHSPSBRObserver* NewL( ChspsThemeServer& aServer );
       
    43         
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         virtual ~CHSPSBRObserver();
       
    48 
       
    49 
       
    50     public: // New functions
       
    51         /**
       
    52         * Starts listening of backup events
       
    53         */
       
    54         void Start();
       
    55 
       
    56     public: // Functions from base classes
       
    57         
       
    58         /**
       
    59         * From CActive
       
    60         */
       
    61         void RunL();
       
    62 
       
    63         /**
       
    64         * From CActive
       
    65         */
       
    66         void DoCancel();
       
    67         
       
    68         /**
       
    69         * From CActive
       
    70         * @param aError error code
       
    71         */
       
    72         TInt RunError( TInt aError );
       
    73 
       
    74 
       
    75     private:
       
    76 
       
    77         /**
       
    78         * C++ default constructor.
       
    79         * @param aServer Reference to listening server
       
    80         */
       
    81         CHSPSBRObserver( ChspsThemeServer& aServer );
       
    82 
       
    83         /**
       
    84         * By default Symbian 2nd phase constructor is private.
       
    85         */
       
    86         void ConstructL();
       
    87 
       
    88 
       
    89     private:    // Data
       
    90 
       
    91         // Listening server reference
       
    92         ChspsThemeServer& iServer;
       
    93 
       
    94         // To receive backup events
       
    95         RProperty iProperty;
       
    96 
       
    97     };
       
    98 
       
    99 #endif // C_CHSPSBROBSERVER_H