Commit d8bded12 authored by jpetrell's avatar jpetrell

Merge pull request #51 from nemomobile/jb33484

[ssu] Return constant IMEI list that isn't dependent on active modems…
parents a1a3ff48 74a1d215
......@@ -4,7 +4,7 @@
This page contains the protocol definition used between a ssu client on a device and a ssu server. The client-side of this protocol is implemented in libssu and the ssu CLI. The server side heavily depends on the available infrastructure, and is not available in public. See \ref rndssu_implementation_notes "the implementation notes for RnD ssu" for additional details required to implement a ssu server.
$DEVICEID in the following examples is a variable filled by the ssu client before making the request, replaced by the devices IMEI (QSystemDeviceInfo::imei()), or a unique device ID (QSystemDeviceInfo::uniqueDeviceID()), if the IMEI is not available (netbooks, SDK, ...)
$DEVICEID in the following examples is a variable filled by the ssu client before making the request, replaced by the devices IMEI (from oFono ModemManager API), or WLAN mac address or device uid fallback code similar to QDeviceInfo::uniqueDeviceID(), if the IMEI is not available (netbooks, SDK, ...)
@section registration Device registration
......
......@@ -252,30 +252,11 @@ ofonoGetImeis()
QDBusMessage reply = QDBusConnection::systemBus().call(
QDBusMessage::createMethodCall("org.ofono", "/",
"org.ofono.Manager", "GetModems"));
"org.nemomobile.ofono.ModemManager", "GetIMEI"));
foreach (const QVariant &v, reply.arguments()) {
if (v.canConvert<QDBusArgument>()) {
const QDBusArgument arg = v.value<QDBusArgument>();
if (arg.currentType() == QDBusArgument::ArrayType) {
arg.beginArray();
while (!arg.atEnd()) {
if (arg.currentType() == QDBusArgument::StructureType) {
QString path;
QVariantMap props;
arg.beginStructure();
arg >> path >> props;
arg.endStructure();
if (props.contains("Serial")) {
result << props["Serial"].toString();
}
}
}
arg.endArray();
}
}
QList<QVariant> arguments = reply.arguments();
if (arguments.count() > 0) {
result = arguments.at(0).toStringList();
}
return result;
......
......@@ -55,8 +55,7 @@ class SsuDeviceInfo: public QObject {
Q_INVOKABLE QString deviceModel();
/**
* Calculate the device ID used in ssu requests
* @return QSystemDeviceInfo::imei(), if available, or QNetworkInfo::macAddress(QNetworkInfo::WlanMode, 0),
* if available, or QSystemDeviceInfo::uniqueDeviceID()
* @return The first imei from oFono ModemManager API, if available, or WLAN mac address, or device uid fallback code similar to QDeviceInfo::uniqueDeviceID()
*/
Q_INVOKABLE QString deviceUid();
/**
......
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