diff options
author | Tomas Junnonen <tomas.junnonen@nokia.com> | 2010-04-12 13:50:25 +0300 |
---|---|---|
committer | Tomas Junnonen <tomas.junnonen@nokia.com> | 2010-04-12 13:52:31 +0300 |
commit | da73676c8a5af66b55523a9cdfbfbea2baa88a2a (patch) | |
tree | 0a3b8933a1817c152116da5fa8a7b5cdd8102e60 /mservicemapper/mservicemapper_p.cpp | |
parent | 8832674482d3b9a7fcf77b0cfdcb8e6fe4960b4d (diff) |
Changes: Renamed dui to meegotouch
By: Holger, Daniel, Janne
RevBy: Tomas, Holger
Diffstat (limited to 'mservicemapper/mservicemapper_p.cpp')
-rw-r--r-- | mservicemapper/mservicemapper_p.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/mservicemapper/mservicemapper_p.cpp b/mservicemapper/mservicemapper_p.cpp new file mode 100644 index 00000000..7413dbb9 --- /dev/null +++ b/mservicemapper/mservicemapper_p.cpp @@ -0,0 +1,48 @@ +/*************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (directui@nokia.com) +** +** This file is part of libmeegotouch. +** +** If you have questions regarding the use of this file, please contact +** Nokia at directui@nokia.com. +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation +** and appearing in the file LICENSE.LGPL included in the packaging +** of this file. +** +****************************************************************************/ + +#include <QStringList> +#include <QDir> +#include <QFile> +#include <QTextStream> +#include <QIODevice> +#include <QString> +#include <QStringList> + +#include "mservicemapper_p.h" + +QStringList MServiceMapperPrivate::fillServiceFileList() const +{ + QDir dir = QDir(serviceFileDir); + dir.setNameFilters(QStringList("*.service")); + return dir.entryList(QDir::Files | QDir::NoSymLinks, QDir::Name); +} + +bool MServiceMapperPrivate::fileExistsAndReadable(const QString &fileName) const +{ + bool fileExists = QFile::exists(fileName); + bool fileIsReadable = (QFile::permissions(fileName) & QFile::ReadUser); + + return fileExists && fileIsReadable; +} + +QIODevice *MServiceMapperPrivate::accessFile(const QString &fileName) const +{ + return new QFile(fileName); +} |