Commit 0b1a2487 authored by sage's avatar sage

Merge pull request #34 from nemomobile/jb22308

Drop boardname support from ssu
parents 5325fcf6 22dd2dc2
......@@ -10,3 +10,4 @@ doc/latex
/rndssucli/ssuproxy.cpp
/rndssucli/ssuproxy.h
/.nodocs
ssucli/ssuproxy.h
......@@ -13,10 +13,6 @@
#
# Valid categories for determining the model:
# - file.exists -- checks for existince of a file in the filesystem
# - boardname.equals -- compares with boardname
# - boardname.contains -- searches for substring in boardname
# NOTE: only use boardname if none of the other options match
# use the boardname command to set/check the current value
# - hwrelease.device -- Compares MER_HA_DEVICE in /etc/hw-release
# - cpuinfo.contains -- searches /proc/cpuinfo for a string
# - uname-release.contains -- searches the kernels release string for
......
......@@ -29,7 +29,7 @@ SOURCES = \
CONFIG += link_pkgconfig
QT += network xml dbus
PKGCONFIG += libsystemd-journal boardname libshadowutils
PKGCONFIG += libsystemd-journal libshadowutils
install_headers.files = $${public_headers}
......
......@@ -15,10 +15,6 @@
#include <sys/utsname.h>
extern "C" {
#include <boardname.h>
}
#include "sandbox_p.h"
#include "ssudeviceinfo.h"
#include "ssucoreconfig.h"
......@@ -157,7 +153,6 @@ QString SsuDeviceInfo::deviceModel(){
QDir dir;
QFile procCpuinfo;
QStringList keys;
QStringList sections;
if (!cachedModel.isEmpty())
return cachedModel;
......@@ -176,33 +171,6 @@ QString SsuDeviceInfo::deviceModel(){
boardMappings->endGroup();
if (!cachedModel.isEmpty()) return cachedModel;
// check if boardname matches/contains
QString boardName(getboardname());
boardName = boardName.trimmed();
sections.clear();
sections << "boardname.equals" << "boardname.contains";
foreach (const QString &section, sections){
boardMappings->beginGroup(section);
keys = boardMappings->allKeys();
foreach (const QString &key, keys){
QString value = boardMappings->value(key).toString();
if (section.endsWith(".contains")){
if (boardName.contains(value)){
cachedModel = key;
break;
}
} else if (section.endsWith(".equals")){
if (boardName == value){
cachedModel = key;
break;
}
}
}
boardMappings->endGroup();
if (!cachedModel.isEmpty()) break;
}
if (!cachedModel.isEmpty()) return cachedModel;
// check if the device can be identified by a string in /proc/cpuinfo
procCpuinfo.setFileName(Sandbox::map("/proc/cpuinfo"));
procCpuinfo.open(QIODevice::ReadOnly | QIODevice::Text);
......
Name: ssu
Version: 0.39.6
Version: 0.40.5
Release: 1
Summary: SSU enabler for RND
Group: System/Base
License: GPLv2
Source0: %{name}-%{version}.tar.gz
URL: https://github.com/nemomobile/ssu
BuildRequires: pkgconfig(boardname)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Network)
......
/*
* This file was generated by qdbusxml2cpp version 0.8
* Command line was: qdbusxml2cpp -c SsuProxy -p ssucli/ssuproxy.h:ssucli/ssuproxy.cpp dbus/org.nemo.ssu.xml
*
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*/
#ifndef SSUPROXY_H_1383958410
#define SSUPROXY_H_1383958410
#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
/*
* Proxy class for interface org.nemo.ssu
*/
class SsuProxy: public QDBusAbstractInterface
{
Q_OBJECT
public:
static inline const char *staticInterfaceName()
{ return "org.nemo.ssu"; }
public:
SsuProxy(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
~SsuProxy();
public Q_SLOTS: // METHODS
inline QDBusPendingReply<> addRepo(const QString &repo, const QString &url)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(repo) << QVariant::fromValue(url);
return asyncCallWithArgumentList(QLatin1String("addRepo"), argumentList);
}
inline QDBusPendingReply<QString> deviceFamily()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("deviceFamily"), argumentList);
}
inline QDBusPendingReply<int> deviceMode()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("deviceMode"), argumentList);
}
inline QDBusPendingReply<QString> deviceModel()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("deviceModel"), argumentList);
}
inline QDBusPendingReply<QString> deviceUid()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("deviceUid"), argumentList);
}
inline QDBusPendingReply<QString> deviceVariant()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("deviceVariant"), argumentList);
}
inline QDBusPendingReply<QString> displayName(int type)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(type);
return asyncCallWithArgumentList(QLatin1String("displayName"), argumentList);
}
inline QDBusPendingReply<bool> error()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("error"), argumentList);
}
inline QDBusPendingReply<QString> flavour()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("flavour"), argumentList);
}
inline QDBusPendingReply<bool> isRegistered()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("isRegistered"), argumentList);
}
inline QDBusPendingReply<QString> lastError()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("lastError"), argumentList);
}
inline QDBusPendingReply<> modifyRepo(int action, const QString &repo)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(action) << QVariant::fromValue(repo);
return asyncCallWithArgumentList(QLatin1String("modifyRepo"), argumentList);
}
inline QDBusPendingReply<> quit()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("quit"), argumentList);
}
inline QDBusPendingReply<> registerDevice(const QString &username, const QString &password)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(username) << QVariant::fromValue(password);
return asyncCallWithArgumentList(QLatin1String("registerDevice"), argumentList);
}
inline QDBusPendingReply<QString> release(bool rnd)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(rnd);
return asyncCallWithArgumentList(QLatin1String("release"), argumentList);
}
inline QDBusPendingReply<> setDeviceMode(int mode)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(mode);
return asyncCallWithArgumentList(QLatin1String("setDeviceMode"), argumentList);
}
inline QDBusPendingReply<> setFlavour(const QString &flavour)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(flavour);
return asyncCallWithArgumentList(QLatin1String("setFlavour"), argumentList);
}
inline QDBusPendingReply<> setRelease(const QString &release, bool rnd)
{
QList<QVariant> argumentList;
argumentList << QVariant::fromValue(release) << QVariant::fromValue(rnd);
return asyncCallWithArgumentList(QLatin1String("setRelease"), argumentList);
}
inline QDBusPendingReply<> unregisterDevice()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("unregisterDevice"), argumentList);
}
inline QDBusPendingReply<> updateRepos()
{
QList<QVariant> argumentList;
return asyncCallWithArgumentList(QLatin1String("updateRepos"), argumentList);
}
Q_SIGNALS: // SIGNALS
void credentialsChanged();
void done();
void registrationStatusChanged();
};
namespace org {
namespace nemo {
typedef ::SsuProxy ssu;
}
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment