Add missing capability.cpp
[harmattan/cameraplus] / src / galleryhelper.cpp
index 724550a..16d777e 100644 (file)
  */
 
 #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");
 }