systemswstubs/startupadaptationstub/inc/sastubeventlistener.h
changeset 46 e1758cbb96ac
parent 0 0ce1b5ce9557
equal deleted inserted replaced
43:e71858845f73 46:e1758cbb96ac
       
     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:  Declaration of CSAStubEventListener class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __SASTUBEVENTLISTENER_H__
       
    20 #define __SASTUBEVENTLISTENER_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <e32property.h>
       
    24 
       
    25 class MSAStubEventSender;
       
    26 
       
    27 /**
       
    28  *  Observer for Starter module test events.
       
    29  *
       
    30  *  @lib None
       
    31  *  @since S60 4.0
       
    32  */
       
    33 class CSAStubEventListener : public CActive
       
    34     {
       
    35 
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Second phase constructor.
       
    40      *
       
    41      * @param aSender Object that can send an event in response to an
       
    42      * indication received from P&S.
       
    43      * @since S60 4.0
       
    44      */
       
    45     static CSAStubEventListener* NewL( MSAStubEventSender& aSender );
       
    46 
       
    47     virtual ~CSAStubEventListener();
       
    48 
       
    49 protected:
       
    50 
       
    51     /**
       
    52      * From CActive.
       
    53      * Implements cancellation of an outstanding request.
       
    54      *
       
    55      * @since S60 4.0
       
    56      */
       
    57     virtual void DoCancel();
       
    58 
       
    59     /**
       
    60      * From CActive.
       
    61      * Handles an active object's request completion event.
       
    62      * Never leaves.
       
    63      *
       
    64      * @since S60 4.0
       
    65      */
       
    66     virtual void RunL();
       
    67 
       
    68 private:
       
    69 
       
    70     /**
       
    71      * First phase constructor.
       
    72      *
       
    73      * @param aSender Object that can send an event in response to an
       
    74      * indication received from P&S.
       
    75      * @since S60 4.0
       
    76      */
       
    77     CSAStubEventListener( MSAStubEventSender& aSender );
       
    78 
       
    79     void ConstructL();
       
    80 
       
    81 private: // data
       
    82 
       
    83     /**
       
    84      * Handle to Publish&Subscribe key to observe.
       
    85      */
       
    86     RProperty iProperty;
       
    87 
       
    88     /**
       
    89      * Object that can send an event in response to an indication received from
       
    90      * P&S.
       
    91      */
       
    92     MSAStubEventSender& iSender;
       
    93 
       
    94     };
       
    95 
       
    96 #endif // __SASTUBEVENTLISTENER_H__