summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmediaoverridesqt/libmediaoverridesqt.pro36
-rw-r--r--libmediaoverridesqt/libmediaoverridesqt1.pc12
-rw-r--r--libmediaoverridesqt/override.cpp63
-rw-r--r--libmediaoverridesqt/override.h32
-rw-r--r--mediaoverrider/main.cpp10
-rw-r--r--mediaoverrider/mediaoverrider.cpp83
-rw-r--r--mediaoverrider/mediaoverrider.desktop7
-rw-r--r--mediaoverrider/mediaoverrider.h38
-rw-r--r--mediaoverrider/mediaoverrider.pro28
-rw-r--r--tests/test-security-with-aegis-token/test-security-with-aegis-token.pro39
-rw-r--r--tests/test-security-with-aegis-token/test-security.cpp70
-rw-r--r--tests/test-security-without-aegis-token/test-security-without-aegis-token.pro41
-rw-r--r--tests/test-security-without-aegis-token/test-security.cpp70
13 files changed, 0 insertions, 529 deletions
diff --git a/libmediaoverridesqt/libmediaoverridesqt.pro b/libmediaoverridesqt/libmediaoverridesqt.pro
deleted file mode 100644
index 20296c4..0000000
--- a/libmediaoverridesqt/libmediaoverridesqt.pro
+++ /dev/null
@@ -1,36 +0,0 @@
-include(../common.pri)
-TEMPLATE = lib
-TARGET = mediaoverridesqt
-DESTDIR = build
-DEPENDPATH += .
-INCLUDEPATH += .
-
-# Input
-PUBLIC_HEADERS = override.h
-
-HEADERS += $${PUBLIC_HEADERS}
-
-SOURCES += override.cpp
-
-QMAKE_CXXFLAGS += -Wall
-LIBS += -L$${LIBDBUSQEVENTLOOP}/build -ldbus-qeventloop
-
-OBJECTS_DIR = build
-MOC_DIR = moc
-
-CONFIG += qt dll
-QT += dbus
-PKGCONFIG += dbus-1 libresource0
-
-QMAKE_DISTCLEAN += -r moc build
-
-# Install directives
-headers.files = $${PUBLIC_HEADERS}
-INSTALLBASE = /usr
-target.path = $${INSTALLBASE}/lib
-headers.path = $${INSTALLBASE}/include/resource/qt4/policy
-pc.files = libmediaoverridesqt1.pc
-pc.path = $${INSTALLBASE}/lib/pkgconfig
-
-INSTALLS = target headers pc
-
diff --git a/libmediaoverridesqt/libmediaoverridesqt1.pc b/libmediaoverridesqt/libmediaoverridesqt1.pc
deleted file mode 100644
index 7666624..0000000
--- a/libmediaoverridesqt/libmediaoverridesqt1.pc
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-exec_prefix=${prefix}
-libdir=${prefix}/lib
-includedir=${prefix}/include/resource/qt4
-
-Name: libmediaoverridesqt1
-Description: Maemo overrides Qt API
-Version: 1.11
-Libs: -L${libdir}
-Cflags: -I${includedir}
-Requires: QtDbus
-
diff --git a/libmediaoverridesqt/override.cpp b/libmediaoverridesqt/override.cpp
deleted file mode 100644
index 71102df..0000000
--- a/libmediaoverridesqt/override.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-#include "override.h"
-
-#define MANAGER_PATH "/org/maemo/Playback/Manager"
-#define MANAGER_SERVICE "org.maemo.Playback.Manager"
-#define MANAGER_INTERFACE "org.maemo.Playback.Manager"
-
-using namespace ResourcePolicy;
-
-Override * ResourcePolicy::createMute(QObject *parent)
-{
- return new Override("Mute", parent);
-}
-
-Override * ResourcePolicy::createPrivacyOverride(QObject *parent)
-{
- return new Override("PrivacyOverride", parent);
-}
-
-Override * ResourcePolicy::createBluetoothOVerride(QObject *parent)
-{
- return new Override("BluetoothOverride", parent);
-}
-
-Override::Override(QString overrideType, QObject *parent):
- QObject(parent), dBusConnection(QDBusConnection::sessionBus()), type(overrideType)
-{
- dBusConnection.connect(MANAGER_SERVICE, MANAGER_PATH, MANAGER_INTERFACE,
- type, this, SLOT(handleChange(bool)));
-}
-
-Override::~Override()
-{
-}
-
-void Override::fetchState()
-{
- QDBusMessage msg;
- QString method = "Get" + type;
-
- msg = QDBusMessage::createMethodCall(MANAGER_SERVICE, MANAGER_PATH,
- MANAGER_INTERFACE, method);
- dBusConnection.send(msg);
-}
-
-void Override::request(bool newState)
-{
- QDBusMessage msg;
- QString method = "Request" + type;
-
- msg = QDBusMessage::createMethodCall(MANAGER_SERVICE, MANAGER_PATH,
- MANAGER_INTERFACE, method);
-
- QVariantList args;
- args.append(newState);
- msg.setArguments(args);
- dBusConnection.send(msg);
-}
-
-void Override::handleChange(bool newState)
-{
- emit changed(newState);
-}
-
diff --git a/libmediaoverridesqt/override.h b/libmediaoverridesqt/override.h
deleted file mode 100644
index c906a55..0000000
--- a/libmediaoverridesqt/override.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#pragma once
-
-#include <QtDBus>
-#include <QDBusConnection>
-#include <QDBusArgument>
-
-namespace ResourcePolicy
-{
- class Override : public QObject
- {
- Q_OBJECT
-public:
- Override(QString overrideType, QObject *parent=NULL);
- virtual ~Override();
- void fetchState();
-
-signals:
- void changed(bool newState);
-
-private slots:
- void handleChange(bool newState);
- void request(bool newState);
-
-private:
- QDBusConnection dBusConnection;
- QString type;
- };
- Override * createMute(QObject *parent=NULL);
- Override * createPrivacyOverride(QObject *parent=NULL);
- Override * createBluetoothOVerride(QObject *parent=NULL);
-}
-
diff --git a/mediaoverrider/main.cpp b/mediaoverrider/main.cpp
deleted file mode 100644
index db13d33..0000000
--- a/mediaoverrider/main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "mediaoverrider.h"
-
-int main(int argc, char **argv)
-{
- MediaOverrider app(argc, argv);
-// MApplication app(argc, argv);
-
- return app.run();
-}
-
diff --git a/mediaoverrider/mediaoverrider.cpp b/mediaoverrider/mediaoverrider.cpp
deleted file mode 100644
index 24d9afc..0000000
--- a/mediaoverrider/mediaoverrider.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "mediaoverrider.h"
-
-MediaOverrider::MediaOverrider(int argc, char **argv, QObject *parent):
- QObject(parent), app(argc, argv)
-{
-// MTheme::loadCSS("MediaOverrider.css");
- window = new MApplicationWindow;
- page = new MApplicationPage;
-
- layout = new MLayout;
- policy = new MGridLayoutPolicy(layout);
- policy->setSpacing(10);
-
- page->setTitle("Resource Overrider");
- MLabel * label = new MLabel("Press the toggle buttons to change overrides");
- policy->addItem(label, 0, 1);
- label->setObjectName("label");
- label->setAlignment(Qt::AlignCenter);
-
- muteButton = new MButton(page->centralWidget());
- muteButton->setText("Mute");
- muteButton->setViewType(MButton::toggleType);
- muteButton->setCheckable(true);
- policy->addItem(muteButton, 1, 0);
- muteButton->setObjectName("button");
-
- privacyButton = new MButton(page->centralWidget());
- privacyButton->setText("Privacy");
- privacyButton->setViewType(MButton::toggleType);
- privacyButton->setCheckable(true);
- policy->addItem(privacyButton, 1, 1);
- privacyButton->setObjectName("button");
-
- btButton = new MButton(page->centralWidget());
- btButton->setText("BT");
- btButton->setViewType(MButton::toggleType);
- btButton->setCheckable(true);
- policy->addItem(btButton, 1, 2);
- btButton->setObjectName("button");
-
- page->centralWidget()->setLayout(layout);
-
- mute = ResourcePolicy::createMute(this);
- privacyOverride = ResourcePolicy::createPrivacyOverride(this);
- btOverride = ResourcePolicy::createBluetoothOVerride(this);
-
- QObject::connect(mute, SIGNAL(changed(bool)), this, SLOT(handleMuteChange(bool)));
- QObject::connect(muteButton, SIGNAL(toggled(bool)), mute, SLOT(request(bool)));
-
- QObject::connect(privacyOverride, SIGNAL(changed(bool)), this, SLOT(handlePrivacyChange(bool)));
- QObject::connect(privacyButton, SIGNAL(toggled(bool)), privacyOverride, SLOT(request(bool)));
-
- QObject::connect(btOverride, SIGNAL(changed(bool)), this, SLOT(handleBtChange(bool)));
- QObject::connect(btButton, SIGNAL(toggled(bool)), btOverride, SLOT(request(bool)));
-
-}
-
-MediaOverrider::~MediaOverrider()
-{}
-
-int MediaOverrider::run()
-{
- page->appear();
- window->show();
-
- return app.exec();
-}
-
-void MediaOverrider::handleMuteChange(bool newState)
-{
- muteButton->setChecked(newState);
-}
-
-void MediaOverrider::handlePrivacyChange(bool newState)
-{
- privacyButton->setChecked(newState);
-}
-
-void MediaOverrider::handleBtChange(bool newState)
-{
- btButton->setChecked(newState);
-}
-
diff --git a/mediaoverrider/mediaoverrider.desktop b/mediaoverrider/mediaoverrider.desktop
deleted file mode 100644
index b257a5e..0000000
--- a/mediaoverrider/mediaoverrider.desktop
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=Policy Media Overrider
-Icon=icon-l-music
-Exec=/usr/bin/mediaoverrider
-OnlyShowIn=X-MeeGo;
-
diff --git a/mediaoverrider/mediaoverrider.h b/mediaoverrider/mediaoverrider.h
deleted file mode 100644
index 052a7e0..0000000
--- a/mediaoverrider/mediaoverrider.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <MApplication>
-#include <MApplicationWindow>
-#include <MApplicationPage>
-#include <MButton>
-#include <MLabel>
-#include <MGridLayoutPolicy>
-#include <MLayout>
-#include <MTheme>
-
-#include <override.h>
-
-class MediaOverrider: public QObject
-{
- Q_OBJECT
-public:
- MediaOverrider(int argc, char **argv, QObject *parent=NULL);
- ~MediaOverrider();
- int run();
-private slots:
- void handleMuteChange(bool newState);
- void handlePrivacyChange(bool newState);
- void handleBtChange(bool newState);
-
-private:
- MApplication app;
- ResourcePolicy::Override *mute;
- ResourcePolicy::Override *privacyOverride;
- ResourcePolicy::Override *btOverride;
-
- MApplicationWindow *window;
- MApplicationPage *page;
- MLayout *layout;
- MGridLayoutPolicy *policy;
- MButton *muteButton;
- MButton *privacyButton;
- MButton *btButton;
-};
-
diff --git a/mediaoverrider/mediaoverrider.pro b/mediaoverrider/mediaoverrider.pro
deleted file mode 100644
index e74679a..0000000
--- a/mediaoverrider/mediaoverrider.pro
+++ /dev/null
@@ -1,28 +0,0 @@
-include(../common.pri)
-
-TEMPLATE = app
-TARGET = mediaoverrider
-MOC_DIR = moc
-OBJECTS_DIR = build
-DEPENDPATH += .
-INCLUDEPATH += $${LIBMEDIAOVERRIDESQT}
-CONFIG += qt meegotouch
-QT += dbus
-
-LIBS += -L$${LIBMEDIAOVERRIDESQT}/build -lmediaoverridesqt
-
-# Input
-HEADERS += mediaoverrider.h
-SOURCES += main.cpp mediaoverrider.cpp
-
-QMAKE_DISTCLEAN += -r moc build
-
-# Install options
-
-target.path = /usr/bin/
-
-desktop.path = /usr/share/applications/
-desktop.files = mediaoverrider.desktop
-
-INSTALLS = target desktop
-
diff --git a/tests/test-security-with-aegis-token/test-security-with-aegis-token.pro b/tests/test-security-with-aegis-token/test-security-with-aegis-token.pro
deleted file mode 100644
index 3a19ddf..0000000
--- a/tests/test-security-with-aegis-token/test-security-with-aegis-token.pro
+++ /dev/null
@@ -1,39 +0,0 @@
-##############################################################################
-# This file is part of libresourceqt #
-# #
-# Copyright (C) 2010 Nokia Corporation. #
-# #
-# This library is free software; you can redistribute #
-# it and/or modify it under the terms of the GNU Lesser General Public #
-# License as published by the Free Software Foundation #
-# version 2.1 of the License. #
-# #
-# This library is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
-# Lesser General Public License for more details. #
-# #
-# You should have received a copy of the GNU Lesser General Public #
-# License along with this library; if not, write to the Free Software #
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 #
-# USA. #
-##############################################################################
-
-include(../../common.pri)
-TEMPLATE = app
-TARGET = test-security-with-aegis-token
-QT = testlib core
-CONFIG -= app_bundle
-DEPENDPATH += $${POLICY} $${BASE}/src .
-INCLUDEPATH += $${LIBRESOURCEQT}/src $${LIBRESOURCEQT}/include $${LIBRESOURCEINC} $${LIBDBUSQEVENTLOOP}
-
-# Input
-SOURCES += test-security.cpp
-
-LIBS += -L$${LIBDBUSQEVENTLOOP}/build -L$${LIBRESOURCEQT}/build -ldbus-qeventloop -lresourceqt
-
-# Install options
-target.path = /usr/lib/libresourceqt-tests/
-#target.files = test-security-with-aegis-token
-
-INSTALLS = target
diff --git a/tests/test-security-with-aegis-token/test-security.cpp b/tests/test-security-with-aegis-token/test-security.cpp
deleted file mode 100644
index 16eedd5..0000000
--- a/tests/test-security-with-aegis-token/test-security.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
-This file is part of libresourceqt
-
-Copyright (C) 2010 Nokia Corporation.
-
-This library is free software; you can redistribute
-it and/or modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation
-version 2.1 of the License.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-USA.
-*************************************************************************/
-
-
-
-#include "qt4/policy/resource-set.h"
-#include <cstdio>
-#include <cstdlib>
-#include <QCoreApplication>
-
-using namespace ResourcePolicy;
-
-class TestSecurity: public QObject
-{
- Q_OBJECT
-
-public:
- void testSecurity() {
-
- ResourceSet *resourceSet = new ResourceSet("call", this);
- resourceSet->addResource(ResourcePolicy::AudioRecorderType);
-
- connect(resourceSet, SIGNAL(resourcesGranted(const QList<ResourcePolicy::ResourceType>&)),
- this, SLOT(resourceAcquiredHandler(const QList<ResourcePolicy::ResourceType>&)));
-
- connect(resourceSet, SIGNAL(errorCallback(quint32, const char*)), this, SLOT(errorCallback(quint32, const char*)));
-
- resourceSet->acquire();
- }
-
-private slots:
- void resourceAcquiredHandler(const QList<ResourcePolicy::ResourceType>& /*grantedOptionalResList*/) {
- printf(">>> resource acquired\n");
- exit(0);
- }
-
- void errorCallback(quint32 code, const char* message) {
- printf(">>> error %u, %s\n", code, message);
- exit(1);
- }
-};
-
-int main(int argc, char* argv[]) {
- QCoreApplication app(argc, argv);
-
- TestSecurity *test = new TestSecurity();
- test->testSecurity();
-
- return app.exec();
-}
-
-#include "test-security.moc"
diff --git a/tests/test-security-without-aegis-token/test-security-without-aegis-token.pro b/tests/test-security-without-aegis-token/test-security-without-aegis-token.pro
deleted file mode 100644
index 8066c88..0000000
--- a/tests/test-security-without-aegis-token/test-security-without-aegis-token.pro
+++ /dev/null
@@ -1,41 +0,0 @@
-##############################################################################
-# This file is part of libresourceqt #
-# #
-# Copyright (C) 2010 Nokia Corporation. #
-# #
-# This library is free software; you can redistribute #
-# it and/or modify it under the terms of the GNU Lesser General Public #
-# License as published by the Free Software Foundation #
-# version 2.1 of the License. #
-# #
-# This library is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
-# Lesser General Public License for more details. #
-# #
-# You should have received a copy of the GNU Lesser General Public #
-# License along with this library; if not, write to the Free Software #
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 #
-# USA. #
-##############################################################################
-
-include(../../common.pri)
-TEMPLATE = app
-TARGET = test-security-without-aegis-token
-QT = testlib core
-CONFIG -= app_bundle
-DEPENDPATH += $${POLICY} $${BASE}/src .
-INCLUDEPATH += $${LIBRESOURCEQT}/src $${LIBRESOURCEQT}/include $${LIBRESOURCEINC} $${LIBDBUSQEVENTLOOP}
-
-# Input
-SOURCES += test-security.cpp
-
-LIBS += -L$${LIBDBUSQEVENTLOOP}/build -L$${LIBRESOURCEQT}/build -ldbus-qeventloop -lresourceqt
-
-# Install options
-# Install options
-target.path = /usr/lib/libresourceqt-tests/
-#target.files = test-security-without-aegis-token
-
-INSTALLS = target
-
diff --git a/tests/test-security-without-aegis-token/test-security.cpp b/tests/test-security-without-aegis-token/test-security.cpp
deleted file mode 100644
index 16eedd5..0000000
--- a/tests/test-security-without-aegis-token/test-security.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/*************************************************************************
-This file is part of libresourceqt
-
-Copyright (C) 2010 Nokia Corporation.
-
-This library is free software; you can redistribute
-it and/or modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation
-version 2.1 of the License.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
-USA.
-*************************************************************************/
-
-
-
-#include "qt4/policy/resource-set.h"
-#include <cstdio>
-#include <cstdlib>
-#include <QCoreApplication>
-
-using namespace ResourcePolicy;
-
-class TestSecurity: public QObject
-{
- Q_OBJECT
-
-public:
- void testSecurity() {
-
- ResourceSet *resourceSet = new ResourceSet("call", this);
- resourceSet->addResource(ResourcePolicy::AudioRecorderType);
-
- connect(resourceSet, SIGNAL(resourcesGranted(const QList<ResourcePolicy::ResourceType>&)),
- this, SLOT(resourceAcquiredHandler(const QList<ResourcePolicy::ResourceType>&)));
-
- connect(resourceSet, SIGNAL(errorCallback(quint32, const char*)), this, SLOT(errorCallback(quint32, const char*)));
-
- resourceSet->acquire();
- }
-
-private slots:
- void resourceAcquiredHandler(const QList<ResourcePolicy::ResourceType>& /*grantedOptionalResList*/) {
- printf(">>> resource acquired\n");
- exit(0);
- }
-
- void errorCallback(quint32 code, const char* message) {
- printf(">>> error %u, %s\n", code, message);
- exit(1);
- }
-};
-
-int main(int argc, char* argv[]) {
- QCoreApplication app(argc, argv);
-
- TestSecurity *test = new TestSecurity();
- test->testSecurity();
-
- return app.exec();
-}
-
-#include "test-security.moc"