/*!
* 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 <QDBusInterface>
#include <QStringList>
#include <QUrl>
-#include <QDeclarativeInfo>
+#include <QVariant>
ShareHelper::ShareHelper(QObject *parent) :
- QObject(parent) {
+ DbusService(parent) {
+ setName("share");
}
ShareHelper::~ShareHelper() {
-
}
-void ShareHelper::share(const QUrl& path) {
- QDBusInterface iface("com.nokia.ShareUi", "/", "com.nokia.maemo.meegotouch.ShareUiInterface",
- QDBusConnection::sessionBus());
+bool ShareHelper::share(const QUrl& path) {
+ QStringList args;
+ args << path.toLocalFile();
+
+ QVariant var(args);
- iface.call("share", QStringList() << path.toLocalFile());
+ return asyncCall("share", args);
}