|
1 /* |
|
2 * Copyright (c) 2010 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: This file contains STIFUnit implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "oomfriendclass.h" |
|
19 #include <../../../inc/oommemorymonitor.h> |
|
20 #include <oomwindowgrouplist.h> |
|
21 #include <oomconfig.h> |
|
22 #include <oomclientrequestqueue.h> |
|
23 #include <oommemorymonitorserver.h> |
|
24 #include <oomactionlist.h> |
|
25 #include <oomlog.h> |
|
26 #include <oomoutofmemorywatcher.h> |
|
27 #include <oomwserveventreceiver.h> |
|
28 |
|
29 |
|
30 COomFriendClass::COomFriendClass() |
|
31 { |
|
32 |
|
33 } |
|
34 |
|
35 COomFriendClass::~COomFriendClass() |
|
36 { |
|
37 |
|
38 } |
|
39 |
|
40 COomFriendClass* COomFriendClass::COomFriendClass::NewLC() |
|
41 { |
|
42 COomFriendClass* self=new(ELeave) COomFriendClass(); |
|
43 CleanupStack::PushL(self); |
|
44 self->ConstructL(); |
|
45 return self; |
|
46 } |
|
47 |
|
48 COomFriendClass* COomFriendClass::COomFriendClass::NewL() |
|
49 { |
|
50 COomFriendClass* self=COomFriendClass::NewLC(); |
|
51 CleanupStack::Pop(self); |
|
52 return self; |
|
53 } |
|
54 |
|
55 void COomFriendClass::ConstructL() |
|
56 { |
|
57 |
|
58 } |
|
59 |
|
60 COomWindowGroupList* COomFriendClass::GetWindowGroupList(CMemoryMonitor* aMemoryMonitor) |
|
61 { |
|
62 return aMemoryMonitor->iOomWindowGroupList; |
|
63 } |
|
64 |
|
65 COomConfig* COomFriendClass::GetOomConfig(CMemoryMonitor* aMemoryMonitor) |
|
66 { |
|
67 return aMemoryMonitor->iConfig; |
|
68 } |
|
69 |
|
70 COomClientRequestQueue* COomFriendClass::GetClientRequestQueue(CMemoryMonitor* aMemoryMonitor) |
|
71 { |
|
72 return aMemoryMonitor->iQueue; |
|
73 } |
|
74 |
|
75 CMemoryMonitorServer* COomFriendClass::GetMemoryMonitorServer(CMemoryMonitor* aMemoryMonitor) |
|
76 { |
|
77 return aMemoryMonitor->iServer; |
|
78 } |
|
79 |
|
80 COomActionList* COomFriendClass::GetOomActionList(CMemoryMonitor* aMemoryMonitor) |
|
81 { |
|
82 return aMemoryMonitor->iOomActionList; |
|
83 } |
|
84 |
|
85 #ifdef _DEBUG |
|
86 COomLogger* COomFriendClass::GetOomLogger(CMemoryMonitor* aMemoryMonitor) |
|
87 { |
|
88 return aMemoryMonitor->iLogger; |
|
89 } |
|
90 #endif |
|
91 |
|
92 COutOfMemoryWatcher* COomFriendClass::GetOutOfMemoryWatcher(CMemoryMonitor* aMemoryMonitor) |
|
93 { |
|
94 return aMemoryMonitor->iOOMWatcher; |
|
95 } |
|
96 |
|
97 CWservEventReceiver* COomFriendClass::GetEventReceiver(CMemoryMonitor* aMemoryMonitor) |
|
98 { |
|
99 return aMemoryMonitor->iWservEventReceiver; |
|
100 } |
|
101 |
|
102 void COomFriendClass::CallRefreshThresholds(CMemoryMonitor* aMemoryMonitor) |
|
103 { |
|
104 aMemoryMonitor->RefreshThresholds(); |
|
105 } |
|
106 |
|
107 TInt COomFriendClass::GetGoodRamThreshold(CMemoryMonitor* aMemoryMonitor) |
|
108 { |
|
109 return aMemoryMonitor->iGoodRamThreshold; |
|
110 } |
|
111 |
|
112 TInt COomFriendClass::GetLowRamThreshold(CMemoryMonitor* aMemoryMonitor) |
|
113 { |
|
114 return aMemoryMonitor->iLowRamThreshold; |
|
115 } |
|
116 |
|
117 TInt COomFriendClass::GetGoodSwapThreshold(CMemoryMonitor* aMemoryMonitor) |
|
118 { |
|
119 return aMemoryMonitor->iGoodSwapThreshold; |
|
120 } |
|
121 |
|
122 TInt COomFriendClass::GetLowSwapThreshold(CMemoryMonitor* aMemoryMonitor) |
|
123 { |
|
124 return aMemoryMonitor->iLowSwapThreshold; |
|
125 } |
|
126 |
|
127 TInt COomFriendClass::GetCurrentRamTarget(CMemoryMonitor* aMemoryMonitor) |
|
128 { |
|
129 return aMemoryMonitor->iCurrentRamTarget; |
|
130 } |
|
131 |
|
132 TInt COomFriendClass::GetCurrentSwapTarget(CMemoryMonitor* aMemoryMonitor) |
|
133 { |
|
134 return aMemoryMonitor->iCurrentSwapTarget; |
|
135 } |
|
136 |
|
137 TInt COomFriendClass::GetActionTrigger(CMemoryMonitor* aMemoryMonitor) |
|
138 { |
|
139 return STATIC_CAST(TInt, aMemoryMonitor->iActionTrigger); |
|
140 } |
|
141 |
|
142 TBool COomFriendClass::GetDataPaged(CMemoryMonitor* aMemoryMonitor) |
|
143 { |
|
144 return aMemoryMonitor->iDataPaged; |
|
145 } |
|
146 |
|
147 TInt COomFriendClass::GetLastMemoryMonitorStatusProperty(CMemoryMonitor* aMemoryMonitor) |
|
148 { |
|
149 return aMemoryMonitor->iLastMemoryMonitorStatusProperty; |
|
150 } |