camerauis/cameraxui/cxengine/inc/cxememorymonitorprivate.h
changeset 28 3075d9b614e6
child 29 699651f2666f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxengine/inc/cxememorymonitorprivate.h	Thu May 13 21:30:19 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CXEMEMORYMONITORPRIVATE_H
+#define CXEMEMORYMONITORPRIVATE_H
+
+#include <QObject>
+#include <QTimer>
+#include <QList>
+#ifdef Q_OS_SYMBIAN
+#include <oommonitorsession.h>
+#endif // Q_OS_SYMBIAN
+
+class CxeFeatureManager;
+
+class CxeMemoryMonitorPrivate : public QObject
+{
+    Q_OBJECT
+
+    // Owner of this private implementation.
+    friend class CxeMemoryMonitor;
+
+private:
+    explicit CxeMemoryMonitorPrivate(CxeFeatureManager &features);
+    ~CxeMemoryMonitorPrivate();
+
+private:
+    int free() const;
+    bool requestFreeMemory(int requiredFreeMemory);
+
+    void startMonitoring();
+    void stopMonitoring();
+
+private slots:
+    void checkMemory();
+
+private:
+    CxeFeatureManager &mFeatures;
+    QTimer mTimer;
+    QList<int> mLevels;
+#ifdef Q_OS_SYMBIAN
+    ROomMonitorSession mOomMonitor;
+#endif // Q_OS_SYMBIAN
+};
+
+#endif // CXEMEMORYMONITORPRIVATE_H
+