sysstatemgmt/systemstatereferenceplugins/clayer/inc/strtsecphaseobserver.h
changeset 0 4e1aa6a622a0
child 7 1a73e8f1b64d
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:
       
    15 * Name        : strtsecphaseobserver.h
       
    16 * Part of     : System Startup / StrtSecObs
       
    17 * Declaration of CStrtSecPhaseObserver class
       
    18 * Version     : %version: 1 % << Don't touch! Updated by Synergy at check-out.
       
    19 * This material, including documentation and any related computer
       
    20 * programs, is protected by copyright controlled by Nokia.  All
       
    21 * rights are reserved.  Copying, including reproducing, storing,
       
    22 * adapting or translating, any or all of this material requires the
       
    23 * prior written consent of Nokia.  This material also contains
       
    24 * confidential information which may not be disclosed to others
       
    25 * without the prior written consent of Nokia.
       
    26 * Template version: 4.2
       
    27 * Nokia Core OS *
       
    28 *
       
    29 */
       
    30 
       
    31 
       
    32 
       
    33 #ifndef C_STRTSECPHASEOBSERVER_H
       
    34 #define C_STRTSECPHASEOBSERVER_H
       
    35 
       
    36 #include <e32base.h>
       
    37 #include <e32property.h>
       
    38 
       
    39 /*
       
    40 * @publishedPartner
       
    41 * @released
       
    42 */
       
    43 
       
    44 /**
       
    45  *  Monitors changes in KStarterSecurityPhase P&S property.
       
    46  *
       
    47  *  lib : strtsecobs.lib
       
    48  *  @since S60 3.2
       
    49  */
       
    50 NONSHARABLE_CLASS( CStrtSecPhaseObserver ) : public CActive
       
    51     {
       
    52 
       
    53 public:
       
    54 
       
    55     /**
       
    56      * Two-phased constructor.
       
    57      */
       
    58     static CStrtSecPhaseObserver* NewL();
       
    59 
       
    60     /**
       
    61     * Destructor.
       
    62     */
       
    63     virtual ~CStrtSecPhaseObserver();
       
    64     
       
    65     /**
       
    66      * Used to ask is startup SIM phase over.
       
    67      *    
       
    68      * @return TRUE if startup SIM phase is over.
       
    69      */
       
    70     TBool IsSecurityPhaseSimOk() const;
       
    71     
       
    72     /**
       
    73      * Used to ask is startup SEC phase over.
       
    74      *     
       
    75      * @return TRUE if startup SEC phase is over.
       
    76      */
       
    77     TBool IsSecurityPhaseSecOk() const;
       
    78 
       
    79 private:
       
    80 // from base class CActive
       
    81 
       
    82     /**
       
    83      * From CActive.
       
    84      * Implements cancellation of an outstanding request.
       
    85      */
       
    86     void DoCancel();
       
    87 
       
    88     /**
       
    89      * From CActive.
       
    90      * Handles an active object’s request completion event.
       
    91      * This RunL will never leave, so RunError not needed.
       
    92      */
       
    93     void RunL();
       
    94 
       
    95 private:
       
    96 
       
    97     /**
       
    98      * C++ default constructor.
       
    99      */
       
   100     CStrtSecPhaseObserver();
       
   101 
       
   102     /**
       
   103      * Second phase constructor.
       
   104      */
       
   105     void ConstructL();
       
   106 
       
   107     /**
       
   108      * Subscribe to the property and set active. Should not be called if already
       
   109      * active.
       
   110      */
       
   111     void IssueRequest();
       
   112 
       
   113 private: // data
       
   114 
       
   115     /**
       
   116      * Property to observe.
       
   117      */
       
   118     RProperty iProperty;
       
   119 
       
   120     /**
       
   121      * Current value of the property.
       
   122      */
       
   123     TInt iValue;
       
   124 
       
   125 #ifdef TEST_CLAYER_MACRO
       
   126 	friend class CLayerTestSsmEventObserver;
       
   127 #endif //TEST_CLAYER_MACRO
       
   128     };
       
   129 
       
   130 #endif // C_STRTSECPHASEOBSERVER_H