|
1 // Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: Contains private Domain Member interface internal to the Kernel |
|
14 // & Hardware Services package. |
|
15 // |
|
16 // WARNING: This file contains some APIs which are internal and are subject |
|
17 // to change without notice. Such APIs should therefore not be used |
|
18 // outside the Kernel & Hardware Services package. |
|
19 // |
|
20 |
|
21 #ifndef __DOMAIN_MEMBER_PRIVATE_H__ |
|
22 #define __DOMAIN_MEMBER_PRIVATE_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 class RDmDomain; |
|
27 class CDmDomainKeepAlive; |
|
28 |
|
29 /** |
|
30 This active object will, once activated, repeatedly attempt to defer |
|
31 a transition deadline from the Domain Manager. |
|
32 |
|
33 It will stop once an attempt to defer fails eg. because deferral |
|
34 was cancelled or the transition was acknowledged. |
|
35 */ |
|
36 class CDmKeepAlive : public CActive |
|
37 { |
|
38 public: |
|
39 CDmKeepAlive(RDmDomain& aDomain, CDmDomainKeepAlive& aOwnerActiveObject); |
|
40 ~CDmKeepAlive(); |
|
41 |
|
42 /** |
|
43 Request deadline deferral for the last transition |
|
44 notification |
|
45 */ |
|
46 void DeferNotification(); |
|
47 |
|
48 void NotifyOfAcknowledgment(); |
|
49 |
|
50 protected: |
|
51 /** |
|
52 Re-call DeferNotification(), unless the previous |
|
53 call completed with an error. |
|
54 */ |
|
55 void RunL(); |
|
56 |
|
57 /** |
|
58 Handle errors thrown from RunL() - call HandleDeferralError() |
|
59 hook to permit client to handle it. |
|
60 */ |
|
61 TInt RunError(TInt aError); |
|
62 void DoCancel(); |
|
63 |
|
64 private: |
|
65 RDmDomain& iDomain; |
|
66 CDmDomainKeepAlive& iOwnerActiveObject; |
|
67 |
|
68 TBool iCeaseDeferral; |
|
69 }; |
|
70 |
|
71 #endif |