Added qmafw-gst-subtitles-renderer-0.0.55 for Meego Harmattan 1.2
[mafwsubrenderer] / qmafw-gst-subtitles-renderer / inc / MafwMmcMonitor.h
1 /*
2  * This file is part of QMAFW
3  *
4  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights
5  * reserved.
6  *
7  * Contact: Visa Smolander <visa.smolander@nokia.com>
8  *
9  * This software, including documentation, is protected by copyright controlled
10  * by Nokia Corporation. All rights are reserved. Copying, including
11  * reproducing, storing, adapting or translating, any or all of this material
12  * requires the prior written consent of Nokia Corporation. This material also
13  * contains confidential information which may not be disclosed to others
14  * without the prior written consent of Nokia.
15  *
16  */
17
18 #ifndef MAFW_MMC_MONITOR_H
19 #define MAFW_MMC_MONITOR_H
20
21 #include <gio/gio.h>
22
23 #include <QObject>
24
25 /**
26  * Helper class for MMC state.
27  */
28 class MafwMmcMonitor : public QObject
29 {
30     Q_OBJECT
31
32 public:
33     static const QString MMC_URI_PREFIX;
34
35     MafwMmcMonitor(QObject* parent);
36     ~MafwMmcMonitor();
37     bool isMounted();
38
39 Q_SIGNALS:
40     void preUnmount();
41
42 private:
43     static void unmountEvent(GVolumeMonitor* mon,
44                                        GMount* event,
45                                        gpointer userData);
46     static void mountEvent(GVolumeMonitor* mon,
47                                        GMount* event,
48                                        gpointer userData);
49     static bool isMyDocs(GMount* mount);
50
51 private Q_SLOTS:
52     void preUnmountEvent(const QString &state);
53
54 private:
55     GVolumeMonitor* m_gVolMonitor;
56     bool m_mounted;
57 };
58
59 #endif // MAFW_MMC_MONITOR_H