Changes of Revision 5
[-] [+] | Changed | _service:tar_git:libqofono.changes |
[-] [+] | Changed | _service:tar_git:libqofono-qt5.spec ^ |
[-] [+] | Changed | _service ^ |
@@ -2,6 +2,6 @@ <service name="tar_git"> <param name="url">https://git.merproject.org/mer-core/libqofono.git</param> <param name="branch">master</param> - <param name="revision">0.91</param> + <param name="revision">0.92</param> </service> </services> | ||
[-] [+] | Changed | _service:tar_git:libqofono-qt5-0.92.tar.bz2/src/qofono.cpp ^ |
@@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013-2015 Jolla Ltd. +** Copyright (C) 2013-2016 Jolla Ltd. ** Contact: lorn.potter@jollamobile.com ** ** GNU Lesser General Public License Usage @@ -21,18 +21,32 @@ char cc[4]; } QOfonoMccListEntry; -// Updated from Wikipedia on October 09, 2014 +// Updated from Wikipedia on July 23 2016 // http://en.wikipedia.org/wiki/Mobile_country_code +// +// The list can also be produced from tzdata/data/MCC file, +// like this: +// +// sed -e 's/$/ *\//' +// -e 's/ /"\}, \/* /3' +// -e 's/ /", "/2' +// -e 's/ /, "/1' +// -e 's/^/ {/' +// static const QOfonoMccListEntry qofonoMccList[] = { {202, "01", "GR"}, /* Greece */ {202, "02", "GR"}, /* Greece */ {202, "03", "GR"}, /* Greece */ - {202, "04", "GR"}, /* Greece */ {202, "05", "GR"}, /* Greece */ {202, "06", "GR"}, /* Greece */ {202, "07", "GR"}, /* Greece */ {202, "09", "GR"}, /* Greece */ {202, "10", "GR"}, /* Greece */ + {202, "11", "GR"}, /* Greece */ + {202, "12", "GR"}, /* Greece */ + {202, "13", "GR"}, /* Greece */ + {202, "15", "GR"}, /* Greece */ + {202, "16", "GR"}, /* Greece */ {204, "01", "NL"}, /* Netherlands (Kingdom of the Netherlands) */ {204, "02", "NL"}, /* Netherlands (Kingdom of the Netherlands) */ {204, "03", "NL"}, /* Netherlands (Kingdom of the Netherlands) */ @@ -71,6 +85,7 @@ {204, "67", "NL"}, /* Netherlands (Kingdom of the Netherlands) */ {204, "68", "NL"}, /* Netherlands (Kingdom of the Netherlands) */ {204, "69", "NL"}, /* Netherlands (Kingdom of the Netherlands) */ + {206, "00", "BE"}, /* Belgium */ {206, "01", "BE"}, /* Belgium */ {206, "02", "BE"}, /* Belgium */ {206, "05", "BE"}, /* Belgium */ @@ -80,6 +95,7 @@ {206, "10", "BE"}, /* Belgium */ {206, "15", "BE"}, /* Belgium */ {206, "20", "BE"}, /* Belgium */ + {206, "40", "BE"}, /* Belgium */ {208, "01", "FR"}, /* France */ {208, "02", "FR"}, /* France */ {208, "03", "FR"}, /* France */ @@ -91,6 +107,7 @@ {208, "09", "FR"}, /* France */ {208, "10", "FR"}, /* France */ {208, "11", "FR"}, /* France */ + {208, "12", "FR"}, /* France */ {208, "13", "FR"}, /* France */ {208, "14", "FR"}, /* France */ {208, "15", "FR"}, /* France */ @@ -115,9 +132,9 @@ {208, "91", "FR"}, /* France */ {208, "92", "FR"}, /* France */ {208, "93", "FR"}, /* France */ + {208, "94", "FR"}, /* France */ {212, "01", "MC"}, /* Monaco */ - {212, "01", "RKS"}, /* Kosovo */ - {213, "03", "AD"}, /* Andorra */ + {212, "01", "XK"}, /* Kosovo */ {214, "01", "ES"}, /* Spain */ {214, "03", "ES"}, /* Spain */ {214, "04", "ES"}, /* Spain */ @@ -126,6 +143,11 @@ {214, "07", "ES"}, /* Spain */ {214, "08", "ES"}, /* Spain */ {214, "09", "ES"}, /* Spain */ + {214, "10", "ES"}, /* Spain */ + {214, "11", "ES"}, /* Spain */ + {214, "12", "ES"}, /* Spain */ + {214, "13", "ES"}, /* Spain */ + {214, "14", "ES"}, /* Spain */ {214, "15", "ES"}, /* Spain */ {214, "16", "ES"}, /* Spain */ {214, "17", "ES"}, /* Spain */ @@ -137,13 +159,19 @@ {214, "23", "ES"}, /* Spain */ {214, "24", "ES"}, /* Spain */ {214, "25", "ES"}, /* Spain */ + {214, "26", "ES"}, /* Spain */ + {214, "27", "ES"}, /* Spain */ {214, "28", "ES"}, /* Spain */ {214, "29", "ES"}, /* Spain */ {214, "30", "ES"}, /* Spain */ {214, "31", "ES"}, /* Spain */ {214, "32", "ES"}, /* Spain */ + {214, "33", "ES"}, /* Spain */ + {214, "34", "ES"}, /* Spain */ + {214, "35", "ES"}, /* Spain */ {216, "01", "HU"}, /* Hungary */ - {216, "20", "HU"}, /* Hungary */ + {216, "02", "HU"}, /* Hungary */ + {216, "03", "HU"}, /* Hungary */ {216, "30", "HU"}, /* Hungary */ {216, "70", "HU"}, /* Hungary */ {216, "71", "HU"}, /* Hungary */ @@ -154,19 +182,30 @@ {219, "01", "HR"}, /* Croatia */ {219, "02", "HR"}, /* Croatia */ {219, "10", "HR"}, /* Croatia */ + {219, "12", "HR"}, /* Croatia */ {220, "01", "RS"}, /* Serbia */ {220, "02", "RS"}, /* Serbia */ {220, "03", "RS"}, /* Serbia */ + {220, "04", "RS"}, /* Serbia */ {220, "05", "RS"}, /* Serbia */ + {220, "07", "RS"}, /* Serbia */ {222, "01", "IT"}, /* Italy */ {222, "02", "IT"}, /* Italy */ {222, "04", "IT"}, /* Italy */ {222, "05", "IT"}, /* Italy */ + {222, "06", "IT"}, /* Italy */ {222, "07", "IT"}, /* Italy */ {222, "10", "IT"}, /* Italy */ {222, "30", "IT"}, /* Italy */ + {222, "33", "IT"}, /* Italy */ {222, "34", "IT"}, /* Italy */ {222, "35", "IT"}, /* Italy */ + {222, "36", "IT"}, /* Italy */ + {222, "37", "IT"}, /* Italy */ + {222, "38", "IT"}, /* Italy */ + {222, "39", "IT"}, /* Italy */ + {222, "43", "IT"}, /* Italy */ + {222, "48", "IT"}, /* Italy */ {222, "77", "IT"}, /* Italy */ {222, "88", "IT"}, /* Italy */ {222, "98", "IT"}, /* Italy */ @@ -180,6 +219,7 @@ {226, "10", "RO"}, /* Romania */ {226, "11", "RO"}, /* Romania */ {226, "15", "RO"}, /* Romania */ + {226, "16", "RO"}, /* Romania */ {228, "01", "CH"}, /* Switzerland */ {228, "02", "CH"}, /* Switzerland */ {228, "03", "CH"}, /* Switzerland */ @@ -194,6 +234,11 @@ {228, "52", "CH"}, /* Switzerland */ {228, "53", "CH"}, /* Switzerland */ {228, "54", "CH"}, /* Switzerland */ + {228, "55", "CH"}, /* Switzerland */ + {228, "56", "CH"}, /* Switzerland */ + {228, "57", "CH"}, /* Switzerland */ + {228, "58", "CH"}, /* Switzerland */ + {228, "60", "CH"}, /* Switzerland */ {228, "99", "CH"}, /* Switzerland */ {230, "01", "CZ"}, /* Czech Republic */ {230, "02", "CZ"}, /* Czech Republic */ @@ -203,15 +248,16 @@ {230, "06", "CZ"}, /* Czech Republic */ {230, "07", "CZ"}, /* Czech Republic */ {230, "08", "CZ"}, /* Czech Republic */ + {230, "09", "CZ"}, /* Czech Republic */ {230, "98", "CZ"}, /* Czech Republic */ {230, "99", "CZ"}, /* Czech Republic */ {231, "01", "SK"}, /* Slovakia */ {231, "02", "SK"}, /* Slovakia */ {231, "03", "SK"}, /* Slovakia */ {231, "04", "SK"}, /* Slovakia */ + {231, "05", "SK"}, /* Slovakia */ {231, "06", "SK"}, /* Slovakia */ {231, "99", "SK"}, /* Slovakia */ - {232, "01", "AT"}, /* Austria */ {232, "02", "AT"}, /* Austria */ {232, "03", "AT"}, /* Austria */ {232, "04", "AT"}, /* Austria */ @@ -227,19 +273,22 @@ {232, "14", "AT"}, /* Austria */ {232, "15", "AT"}, /* Austria */ {232, "16", "AT"}, /* Austria */ + {232, "17", "AT"}, /* Austria */ + {232, "18", "AT"}, /* Austria */ + {232, "19", "AT"}, /* Austria */ + {232, "20", "AT"}, /* Austria */ {232, "91", "AT"}, /* Austria */ + {232, "92", "AT"}, /* Austria */ {234, "00", "GB"}, /* United Kingdom */ {234, "01", "GB"}, /* United Kingdom */ {234, "02", "GB"}, /* United Kingdom */ {234, "03", "GG"}, /* Guernsey (United Kingdom) */ {234, "03", "JE"}, /* Jersey (United Kingdom) */ - {234, "03", "GB"}, /* United Kingdom */ {234, "04", "GB"}, /* United Kingdom */ {234, "05", "GB"}, /* United Kingdom */ {234, "06", "GB"}, /* United Kingdom */ | ||
[-] [+] | Changed | _service:tar_git:libqofono-qt5-0.92.tar.bz2/src/qofonomodem.cpp ^ |
@@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2013-2015 Jolla Ltd. -** Contact: lorn.potter@jollamobile.com +** Copyright (C) 2013-2017 Jolla Ltd. +** Contact: slava.monich@jolla.com ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -24,15 +24,35 @@ Q_GLOBAL_STATIC(ModemMap, modemMap) #define SUPER QOfonoObject +#define MODEM_PROPERTIES(p) \ + p(Online) \ + p(Powered) \ + p(Lockdown) \ + p(Emergency) \ + p(Name) \ + p(Manufacturer) \ + p(Model) \ + p(Revision) \ + p(Serial) \ + p(Type) \ + p(SoftwareVersionNumber) \ + p(Features) \ + p(Interfaces) \ class QOfonoModem::Private : public SUPER::ExtData { public: +#define DECLARE_PROPERTY(p) static const QString p; + MODEM_PROPERTIES(DECLARE_PROPERTY) + bool modemPathValid; QSharedPointer<QOfonoManager> mgr; Private() : modemPathValid(false), mgr(QOfonoManager::instance()) {} }; +#define DEFINE_PROPERTY(p) const QString QOfonoModem::Private::p(QLatin1String(#p)); +MODEM_PROPERTIES(DEFINE_PROPERTY) + QOfonoModem::QOfonoModem(QObject *parent) : SUPER(new Private, parent) { @@ -76,106 +96,113 @@ bool QOfonoModem::powered() const { - return getBool("Powered"); + return getBool(Private::Powered); } bool QOfonoModem::online() const { - return getBool("Online"); + return getBool(Private::Online); } bool QOfonoModem::lockdown() const { - return getBool("Lockdown"); + return getBool(Private::Lockdown); } bool QOfonoModem::emergency() const { - return getBool("Emergency"); + return getBool(Private::Emergency); } QString QOfonoModem::name() const { - return getString("Name"); + return getString(Private::Name); } QString QOfonoModem::manufacturer() const { - return getString("Manufacturer"); + return getString(Private::Manufacturer); } QString QOfonoModem::model() const { - return getString("Model"); + return getString(Private::Model); } QString QOfonoModem::revision() const { - return getString("Revision"); + return getString(Private::Revision); } QString QOfonoModem::serial() const { - return getString("Serial"); + return getString(Private::Serial); } QString QOfonoModem::type() const { - return getString("Type"); + return getString(Private::Type); +} + +QString QOfonoModem::softwareVersionNumber() const +{ + return getString(Private::SoftwareVersionNumber); } QStringList QOfonoModem::features() const { - return getStringList("Features"); + return getStringList(Private::Features); } QStringList QOfonoModem::interfaces() const { - return getStringList("Interfaces"); + return getStringList(Private::Interfaces); } void QOfonoModem::setPowered(bool powered) { - setProperty("Powered", powered); + setProperty(Private::Powered, powered); } void QOfonoModem::setOnline(bool online) { - setProperty("Online", online); + setProperty(Private::Online, online); } void QOfonoModem::setLockdown(bool lockdown) { - setProperty("Lockdown", lockdown); + setProperty(Private::Lockdown, lockdown); } void QOfonoModem::propertyChanged(const QString &property, const QVariant &value) { SUPER::propertyChanged(property, value); - if (property == QLatin1String("Online")) { - Q_EMIT onlineChanged(value.value<bool>()); - } else if (property == QLatin1String("Powered")) { - Q_EMIT poweredChanged(value.value<bool>()); - } else if (property == QLatin1String("Lockdown")) { - Q_EMIT lockdownChanged(value.value<bool>()); - } else if (property == QLatin1String("Emergency")) { - Q_EMIT emergencyChanged(value.value<bool>()); - } else if (property == QLatin1String("Name")) { - Q_EMIT nameChanged(value.value<QString>()); - } else if (property == QLatin1String("Manufacturer")) { - Q_EMIT manufacturerChanged(value.value<QString>()); - } else if (property == QLatin1String("Model")) { - Q_EMIT modelChanged(value.value<QString>()); - } else if (property == QLatin1String("Revision")) { - Q_EMIT revisionChanged(value.value<QString>()); - } else if (property == QLatin1String("Serial")) { - Q_EMIT serialChanged(value.value<QString>()); - } else if (property == QLatin1String("Type")) { - Q_EMIT typeChanged(value.value<QString>()); - } else if (property == QLatin1String("Features")) { - Q_EMIT featuresChanged(value.value<QStringList>()); - } else if (property == QLatin1String("Interfaces")) { - Q_EMIT interfacesChanged(value.value<QStringList>()); + if (property == Private::Online) { + Q_EMIT onlineChanged(value.toBool()); + } else if (property == Private::Powered) { + Q_EMIT poweredChanged(value.toBool()); + } else if (property == Private::Lockdown) { + Q_EMIT lockdownChanged(value.toBool()); + } else if (property == Private::Emergency) { + Q_EMIT emergencyChanged(value.toBool()); + } else if (property == Private::Name) { + Q_EMIT nameChanged(value.toString()); + } else if (property == Private::Manufacturer) { + Q_EMIT manufacturerChanged(value.toString()); + } else if (property == Private::Model) { + Q_EMIT modelChanged(value.toString()); + } else if (property == Private::Revision) { + Q_EMIT revisionChanged(value.toString()); + } else if (property == Private::Serial) { + Q_EMIT serialChanged(value.toString()); + } else if (property == Private::Type) { + Q_EMIT typeChanged(value.toString()); + } else if (property == Private::SoftwareVersionNumber) { + Q_EMIT softwareVersionNumberChanged(value.toString()); + } else if (property == Private::Features) { + Q_EMIT featuresChanged(value.toStringList()); + } else if (property == Private::Interfaces) { + Q_EMIT interfacesChanged(value.toStringList()); } } | ||
[-] [+] | Changed | _service:tar_git:libqofono-qt5-0.92.tar.bz2/src/qofonomodem.h ^ |
@@ -39,6 +39,7 @@ Q_PROPERTY(QString revision READ revision NOTIFY revisionChanged) Q_PROPERTY(QString serial READ serial NOTIFY serialChanged) Q_PROPERTY(QString type READ type NOTIFY typeChanged) + Q_PROPERTY(QString softwareVersionNumber READ softwareVersionNumber NOTIFY softwareVersionNumberChanged) Q_PROPERTY(QStringList features READ features NOTIFY featuresChanged) Q_PROPERTY(QStringList interfaces READ interfaces NOTIFY interfacesChanged) @@ -69,6 +70,7 @@ QString revision() const; QString serial() const; QString type() const; + QString softwareVersionNumber() const; QStringList features() const; QStringList interfaces() const; @@ -89,6 +91,7 @@ void revisionChanged(const QString &revision); void serialChanged(const QString &serial); void typeChanged(const QString &type); + void softwareVersionNumberChanged(const QString &version); void featuresChanged(const QStringList &features); void interfacesChanged(const QStringList &interfaces); void modemPathChanged(const QString &path); | ||
[-] [+] | Changed | _service:tar_git:libqofono-qt5-0.92.tar.bz2/src/version.pri ^ |
@@ -1 +1 @@ -VERSION = 0.91 +VERSION = 0.92 |