*/
#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");
}