I have made the following changes intended for : CE:MW:Shared / connman-qt
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/8407 Thank You, rojkov [This message was auto-generated] --- Request # 8407: Messages from BOSS: State: review at 2013-03-12T12:31:03 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:rojkov:branches:CE:MW:Shared / connman-qt -> CE:MW:Shared / connman-qt changes files: -------------- --- connman-qt.changes +++ connman-qt.changes @@ -0,0 +1,3 @@ +* Tue Mar 12 2013 Dmitry Rozhkov <[email protected]> - 1.0.1 +- add Tethering API + old: ---- connman-qt-1.0.0.tar.bz2 new: ---- connman-qt-1.0.1.tar.bz2 spec files: ----------- --- connman-qt.spec +++ connman-qt.spec @@ -9,7 +9,7 @@ # << macros Summary: qt bindings for connman -Version: 1.0.0 +Version: 1.0.1 Release: 1 Group: System/GUI/Other License: Apache License other changes: -------------- ++++++ connman-qt-1.0.0.tar.bz2 -> connman-qt-1.0.1.tar.bz2 --- libconnman-qt/networkmanager.h +++ libconnman-qt/networkmanager.h @@ -38,7 +38,6 @@ Q_PROPERTY(NetworkService* defaultRoute READ defaultRoute NOTIFY defaultRouteChanged) Q_PROPERTY(bool sessionMode READ sessionMode WRITE setSessionMode NOTIFY sessionModeChanged) - Q_PROPERTY(QString serviceAdded NOTIFY serviceAdded) public: NetworkManager(QObject* parent=0); --- libconnman-qt/networktechnology.cpp +++ libconnman-qt/networktechnology.cpp @@ -16,6 +16,10 @@ const QString NetworkTechnology::Type("Type"); const QString NetworkTechnology::Powered("Powered"); const QString NetworkTechnology::Connected("Connected"); +const QString NetworkTechnology::IdleTimeout("IdleTimeout"); +const QString NetworkTechnology::Tethering("Tethering"); +const QString NetworkTechnology::TetheringIdentifier("TetheringIdentifier"); +const QString NetworkTechnology::TetheringPassphrase("TetheringPassphrase"); NetworkTechnology::NetworkTechnology(const QString &path, const QVariantMap &properties, QObject* parent) : QObject(parent), @@ -63,6 +67,8 @@ reply = m_technology->GetProperties(); m_propertiesCache = reply.value(); } + emit poweredChanged(powered()); + emit connectedChanged(connected()); connect(m_technology, SIGNAL(PropertyChanged(const QString&, const QDBusVariant&)), @@ -145,6 +151,14 @@ emit poweredChanged(tmp.toBool()); } else if (name == Connected) { emit connectedChanged(tmp.toBool()); + } else if (name == IdleTimeout) { + emit idleTimeoutChanged(tmp.toUInt()); + } else if (name == Tethering) { + emit tetheringChanged(tmp.toBool()); + } else if (name == TetheringIdentifier) { + emit tetheringIdChanged(tmp.toString()); + } else if (name == TetheringPassphrase) { + emit tetheringPassphraseChanged(tmp.toString()); } } @@ -166,3 +180,61 @@ init(path); } } + +quint32 NetworkTechnology::idleTimetout() const +{ + if (m_propertiesCache.contains(NetworkTechnology::IdleTimeout)) + return m_propertiesCache[NetworkTechnology::IdleTimeout].toUInt(); + else + return 0; +} + +void NetworkTechnology::setIdleTimeout(quint32 timeout) +{ + if (m_technology) + m_technology->SetProperty(IdleTimeout, QDBusVariant(QVariant(timeout))); +} + +bool NetworkTechnology::tethering() const +{ + if (m_propertiesCache.contains(NetworkTechnology::Tethering)) + return m_propertiesCache[NetworkTechnology::Tethering].toBool(); + else + return false; +} + +void NetworkTechnology::setTethering(bool b) +{ + if (m_technology) + m_technology->SetProperty(Tethering, QDBusVariant(QVariant(b))); +} + + +QString NetworkTechnology::tetheringId() const +{ + if (m_propertiesCache.contains(NetworkTechnology::TetheringIdentifier)) + return m_propertiesCache[NetworkTechnology::TetheringIdentifier].toString(); + else + return QString(); +} + +void NetworkTechnology::setTetheringId(const QString &id) +{ + if (m_technology) + m_technology->SetProperty(TetheringIdentifier, QDBusVariant(QVariant(id))); +} + +QString NetworkTechnology::tetheringPassphrase() const +{ + if (m_propertiesCache.contains(NetworkTechnology::TetheringPassphrase)) + return m_propertiesCache[NetworkTechnology::TetheringPassphrase].toString(); + else + return QString(); + +} + +void NetworkTechnology::setTetheringPassphrase(const QString &pass) +{ + if (m_technology) + m_technology->SetProperty(TetheringPassphrase, QDBusVariant(QVariant(pass))); +} --- libconnman-qt/networktechnology.h +++ libconnman-qt/networktechnology.h @@ -24,6 +24,11 @@ Q_PROPERTY(bool powered READ powered WRITE setPowered NOTIFY poweredChanged) Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged) Q_PROPERTY(QString path READ path WRITE setPath) + Q_PROPERTY(quint32 idleTimetout READ idleTimetout WRITE setIdleTimeout NOTIFY idleTimeoutChanged) + + Q_PROPERTY(bool tethering READ tethering WRITE setTethering NOTIFY tetheringChanged) + Q_PROPERTY(QString tetheringId READ tetheringId WRITE setTetheringId NOTIFY tetheringIdChanged) + Q_PROPERTY(QString tetheringPassphrase READ tetheringPassphrase WRITE setTetheringPassphrase NOTIFY tetheringPassphraseChanged) public: NetworkTechnology(const QString &path, const QVariantMap &properties, QObject* parent); @@ -39,6 +44,19 @@ QString path() const; + quint32 idleTimetout() const; + void setIdleTimeout(quint32); + + bool tethering() const; + void setTethering(bool); + + QString tetheringId() const; + void setTetheringId(const QString &id); + + QString tetheringPassphrase() const; + void setTetheringPassphrase(const QString &pass); + + public slots: void setPowered(const bool &powered); void scan(); @@ -48,6 +66,10 @@ void poweredChanged(const bool &powered); void connectedChanged(const bool &connected); void scanFinished(); + void idleTimeoutChanged(quint32 timeout); + void tetheringChanged(bool tetheringEnabled); + void tetheringIdChanged(const QString &tetheringId); + void tetheringPassphraseChanged(const QString &passphrase); private: Technology *m_technology; @@ -58,6 +80,10 @@ static const QString Type; static const QString Powered; static const QString Connected; + static const QString IdleTimeout; + static const QString Tethering; + static const QString TetheringIdentifier; + static const QString TetheringPassphrase; QString m_path; void init(const QString &path); ++++++ connman-qt.yaml --- connman-qt.yaml +++ connman-qt.yaml @@ -1,6 +1,6 @@ Name: connman-qt Summary: qt bindings for connman -Version: 1.0.0 +Version: 1.0.1 Release: 1 Group: System/GUI/Other License: Apache License
