Revert "Implemented per device resolution setting and selection"
[harmattan/cameraplus] / src / galleryhelper.cpp
index d2befa1..16d777e 100644 (file)
@@ -1,7 +1,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
  */
 
 #include "galleryhelper.h"
-#include <maemo-meegotouch-interfaces/galleryinterface.h>
 #include <QStringList>
 #include <QUrl>
-#include <QDeclarativeInfo>
 
 GalleryHelper::GalleryHelper(QObject *parent) :
-  QObject(parent),
-  m_iface(new GalleryInterface) {
-
+  DbusService(parent) {
+  setName("gallery");
 }
 
 GalleryHelper::~GalleryHelper() {
-  delete m_iface;
-}
 
-bool GalleryHelper::show(const QUrl& path) {
-  if (!m_iface->isValid()) {
-    qmlInfo(this) << "Failed to get gallery interface";
-    return false;
-  }
-
-  return m_iface->showMediaInFullScreen(QStringList() << path.toLocalFile());
 }
 
 bool GalleryHelper::launch() {
-  if (!m_iface->isValid()) {
-    qmlInfo(this) << "Failed to get gallery interface";
-    return false;
-  }
-
-  return m_iface->showCameraRoll();
+  return asyncCall("camera-roll");
 }