Fixed VideoPlayerPage.qml failure to set cameraConfig
[harmattan/cameraplus] / src / sharehelper.cpp
index 2df15d0..85b4db5 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 "sharehelper.h"
-#include <maemo-meegotouch-interfaces/shareuiinterface.h>
 #include <QStringList>
 #include <QUrl>
-#include <QDeclarativeInfo>
+#include <QVariant>
 
 ShareHelper::ShareHelper(QObject *parent) :
-  QObject(parent),
-  m_iface(new ShareUiInterface) {
+  DbusService(parent) {
 
+  setName("share");
 }
 
 ShareHelper::~ShareHelper() {
-  delete m_iface;
 }
 
 bool ShareHelper::share(const QUrl& path) {
-  if (!m_iface->isValid()) {
-    qmlInfo(this) << "Failed to get share interface";
-    return false;
-  }
+  QStringList args;
+  args << path.toLocalFile();
 
-  m_iface->share(QStringList() << path.toLocalFile());
+  QVariant var(args);
 
-  return true;
+  return asyncCall("share", args);
 }