--- /dev/null
+/*
+ * This file is part of QMAFW
+ *
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
+ * reserved.
+ *
+ * Contact: Visa Smolander <visa.smolander@nokia.com>
+ *
+ * This software, including documentation, is protected by copyright controlled
+ * by Nokia Corporation. All rights are reserved. Copying, including
+ * reproducing, storing, adapting or translating, any or all of this material
+ * requires the prior written consent of Nokia Corporation. This material also
+ * contains confidential information which may not be disclosed to others
+ * without the prior written consent of Nokia.
+ *
+ */
+
+#ifndef MAFW_MMC_MONITOR_H
+#define MAFW_MMC_MONITOR_H
+
+#include <gio/gio.h>
+
+#include <QObject>
+
+/**
+ * Helper class for MMC state.
+ */
+class MafwMmcMonitor : public QObject
+{
+ Q_OBJECT
+
+public:
+ static const QString MMC_URI_PREFIX;
+
+ MafwMmcMonitor(QObject* parent);
+ ~MafwMmcMonitor();
+ bool isMounted();
+
+Q_SIGNALS:
+ void preUnmount();
+
+private:
+ static void unmountEvent(GVolumeMonitor* mon,
+ GMount* event,
+ gpointer userData);
+ static void mountEvent(GVolumeMonitor* mon,
+ GMount* event,
+ gpointer userData);
+ static bool isMyDocs(GMount* mount);
+
+private Q_SLOTS:
+ void preUnmountEvent(const QString &state);
+
+private:
+ GVolumeMonitor* m_gVolMonitor;
+ bool m_mounted;
+};
+
+#endif // MAFW_MMC_MONITOR_H