equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 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 * |
|
16 */ |
|
17 |
|
18 #ifndef CXEMEMORYMONITORPRIVATE_H |
|
19 #define CXEMEMORYMONITORPRIVATE_H |
|
20 |
|
21 #include <QObject> |
|
22 #include <QTimer> |
|
23 #include <QList> |
|
24 #ifdef Q_OS_SYMBIAN |
|
25 #include <oommonitorsession.h> |
|
26 #endif // Q_OS_SYMBIAN |
|
27 |
|
28 class CxeFeatureManager; |
|
29 |
|
30 class CxeMemoryMonitorPrivate : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 private: |
|
35 explicit CxeMemoryMonitorPrivate(CxeFeatureManager &features); |
|
36 ~CxeMemoryMonitorPrivate(); |
|
37 |
|
38 private: |
|
39 int free() const; |
|
40 bool requestFreeMemory(int requiredFreeMemory); |
|
41 |
|
42 void startMonitoring(); |
|
43 void stopMonitoring(); |
|
44 |
|
45 private slots: |
|
46 void checkMemory(); |
|
47 |
|
48 private: |
|
49 CxeFeatureManager &mFeatures; |
|
50 QTimer mTimer; |
|
51 QList<int> mLevels; |
|
52 #ifdef Q_OS_SYMBIAN |
|
53 ROomMonitorSession mOomMonitor; |
|
54 #endif // Q_OS_SYMBIAN |
|
55 |
|
56 friend class CxeMemoryMonitor; |
|
57 }; |
|
58 |
|
59 #endif // CXEMEMORYMONITORPRIVATE_H |
|
60 |