X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=src%2Fsharehelper.cpp;h=85b4db5fde6158df9a681970e1317ed6eafc9d3e;hb=9e2fef3185dcb1ffe1622e226f0064bef5f547c9;hp=2df15d0609bcc983c8a0b7cb735a23ab497bf635;hpb=9ca204e924b6c980bc4834dd4e398bce1a355774;p=harmattan%2Fcameraplus diff --git a/src/sharehelper.cpp b/src/sharehelper.cpp index 2df15d0..85b4db5 100644 --- a/src/sharehelper.cpp +++ b/src/sharehelper.cpp @@ -1,7 +1,7 @@ /*! * This file is part of CameraPlus. * - * Copyright (C) 2012 Mohammed Sameer + * Copyright (C) 2012-2013 Mohammed Sameer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,28 +19,24 @@ */ #include "sharehelper.h" -#include #include #include -#include +#include 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); }