startupservices/Startup/inc/StartupSubscriber.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Startup Subscriber (Publish & Subscribe).
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef STARTUPSUBSCRIBER_H
       
    20 #define STARTUPSUBSCRIBER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <e32property.h>
       
    25 #include "MStartupPropertyResponder.h"
       
    26 
       
    27 // CLASS DECLARATION
       
    28 /**
       
    29 *  CStartupSubscriber
       
    30 *  
       
    31 *  @lib   Startup
       
    32 *  @since 3.0
       
    33 */
       
    34 
       
    35 class CStartupSubscriber : public CActive
       
    36 {
       
    37 public:
       
    38     /**
       
    39     * Two-phased constructor.
       
    40     */         
       
    41     static CStartupSubscriber* NewL( MStartupPropertyResponder& aStartupPropertyResponder, 
       
    42                                      const TUid& aCategory, 
       
    43                                      TUint aKey );
       
    44 
       
    45     /**
       
    46     * Destructor.
       
    47     */
       
    48      ~CStartupSubscriber();
       
    49 
       
    50      void Subscribe();
       
    51 
       
    52 private:
       
    53      CStartupSubscriber( MStartupPropertyResponder& aStartupPropertyResponder, 
       
    54                          const TUid& aCategory, TUint 
       
    55                          aKey );
       
    56      void ConstructL();
       
    57 
       
    58 public: // from CActive
       
    59     /**
       
    60     *	@param none
       
    61     *	@return none
       
    62     */    
       
    63     void RunL();
       
    64     
       
    65     /**
       
    66     *	@param aError the error returned
       
    67     *	@return error
       
    68     */
       
    69     TInt RunError( TInt aError );
       
    70 
       
    71     /**
       
    72     *	@param none
       
    73     *	@return none
       
    74     */    
       
    75     void DoCancel();
       
    76 	
       
    77 private: // Methods not implemented
       
    78     CStartupSubscriber( const CStartupSubscriber& );           // Copy constructor
       
    79     CStartupSubscriber& operator=( const CStartupSubscriber& );// Assigment operator
       
    80 
       
    81 private:
       
    82 
       
    83     MStartupPropertyResponder&  iStartupPropertyResponder;
       
    84     RProperty                   iProperty;
       
    85     TUid                        iCategory;
       
    86     TUint                       iKey;
       
    87 };
       
    88 
       
    89 
       
    90 #endif // STARTUPSUBSCRIBER_H
       
    91 
       
    92 // End of File