|
1 /* |
|
2 * Copyright (c) 2007 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: PSM client implementation class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PSMCLIENTIMPL_H |
|
20 #define PSMCLIENTIMPL_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <psmclient.h> |
|
24 #include "psmsession.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MPsmClientObserver; |
|
28 class CPsmSettings; |
|
29 class CPsmClientActive; |
|
30 |
|
31 /** |
|
32 * PSM client implementation class. |
|
33 * |
|
34 * Implementation of power save mode client API. |
|
35 * |
|
36 * @since S60 5.0 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CPsmClientImpl ) : public CPsmClient |
|
39 { |
|
40 |
|
41 friend class CPsmClient; |
|
42 |
|
43 public: // Destructor |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CPsmClientImpl(); |
|
49 |
|
50 public: // API methods |
|
51 |
|
52 /** |
|
53 * From CPsmClient. |
|
54 */ |
|
55 void ChangePowerSaveMode( const TInt aPsmMode ); |
|
56 |
|
57 /** |
|
58 * From CPsmClient. |
|
59 */ |
|
60 void CancelPowerSaveModeChange(); |
|
61 |
|
62 /** |
|
63 * From CPsmClient. |
|
64 */ |
|
65 void RequestPowerSaveModeNotification(); |
|
66 |
|
67 /** |
|
68 * From CPsmClient. |
|
69 */ |
|
70 void CancelPowerSaveModeNotificationRequest(); |
|
71 |
|
72 /** |
|
73 * From CPsmClient. |
|
74 */ |
|
75 CPsmSettings& PsmSettings() const; |
|
76 |
|
77 private: |
|
78 |
|
79 /** |
|
80 * C++ constrcutor. |
|
81 */ |
|
82 CPsmClientImpl( MPsmClientObserver& aObserver ); |
|
83 |
|
84 /** |
|
85 * Symbian 2nd phase constructor. |
|
86 */ |
|
87 void ConstructL(); |
|
88 |
|
89 private: // data |
|
90 |
|
91 /** |
|
92 * Observer of the power save mode completion |
|
93 */ |
|
94 MPsmClientObserver& iObserver; |
|
95 |
|
96 /** |
|
97 * PSM Client Settings API |
|
98 */ |
|
99 CPsmSettings* iSettings; |
|
100 |
|
101 /** |
|
102 * Client-Server session to PSM server |
|
103 */ |
|
104 RPsmServer iPsmServer; |
|
105 |
|
106 /** |
|
107 * PSM Client's active object. |
|
108 */ |
|
109 CPsmClientActive* iActive; |
|
110 |
|
111 }; |
|
112 |
|
113 #endif // PSMCLIENTIMPL_H |