Revert "Implemented per device resolution setting and selection"
[harmattan/cameraplus] / src / mountprotector.h
index da0b610..33ff379 100644 (file)
@@ -3,7 +3,7 @@
 /*!
  * This file is part of CameraPlus.
  *
- * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
+ * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
 #define MOUNT_PROTECTOR_H
 
 #include <QObject>
+#include <QMultiMap>
+
 class QTemporaryFile;
 
 class MountProtector : public QObject {
   Q_OBJECT
 
-  Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged);
-
 public:
   MountProtector(QObject *parent = 0);
   ~MountProtector();
 
-  QString path() const;
-  void setPath(const QString& path);
-
-  Q_INVOKABLE bool lock();
+  Q_INVOKABLE bool lock(const QString& path);
 
 public slots:
-  void unlock();
-
-signals:
-  void pathChanged();
+  void unlock(const QString& path);
+  void unlockAll();
 
 private:
-  QString m_path;
-  QTemporaryFile *m_file;
+  QMultiMap<QString, QTemporaryFile *> m_locks;
 };
 
 #endif /* MOUNT_PROTECTOR_H */