sysstatemgmt/systemstatemgr/cmn/inc/ssmstatemonitor.h
changeset 76 cb32bcc88bad
parent 0 4e1aa6a622a0
equal deleted inserted replaced
73:d38941471f1c 76:cb32bcc88bad
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    46 	CSsmStateAwareSession& iObserver;
    46 	CSsmStateAwareSession& iObserver;
    47 	RSsmStateAwareSession iSas;
    47 	RSsmStateAwareSession iSas;
    48 	TSsmState iState;
    48 	TSsmState iState;
    49 	};
    49 	};
    50 
    50 
       
    51 /**
       
    52 This active object will, once activated, repeatedly attempt to defer
       
    53 a transition deadline.
       
    54 It will stop once an attempt to defer fails eg. because deferral
       
    55 was cancelled or the transition was acknowledged or the deferral limit was reached.
       
    56 @internalComponent
       
    57 @released
       
    58 */
       
    59 NONSHARABLE_CLASS(CSsmDeferralMonitor) : public CActive
       
    60     {
       
    61 public:
       
    62     CSsmDeferralMonitor(RSsmStateAwareSession& aStateAwareSession, CSsmStateAwareSession2& aOwnerActiveObject);
       
    63     ~CSsmDeferralMonitor();
       
    64 
       
    65     /**
       
    66     Request deadline deferral for the last transition
       
    67     notification
       
    68     */
       
    69     void DeferNotification();
       
    70     void NotifyOfAcknowledgement();
       
    71 
       
    72 protected:
       
    73     /**
       
    74     Re-call DeferNotification(), unless the previous
       
    75     call completed with an error.
       
    76     */
       
    77     void RunL();
       
    78 
       
    79     /**
       
    80     Handle errors thrown from RunL() - call HandleDeferralErrror()    
       
    81     */
       
    82     TInt RunError(TInt aError);
       
    83     void DoCancel();
       
    84 private:
       
    85     RSsmStateAwareSession& iSsmStateAwareSession;
       
    86     CSsmStateAwareSession2& iOwnerActiveObject;
       
    87     TBool iCeaseDeferral;
       
    88     };
       
    89 
    51 #endif
    90 #endif
    52 
    91