[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,6 +2,6 @@
<service name="tar_git">
<param name="url">https://github.com/monich/harbour-logger</param>
<param name="branch">master</param>
- <param name="revision">f163c9f</param>
+ <param name="revision">6f7586c</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/harbour-lib/src/org.nemo.transferengine.xml
^
|
@@ -1,11 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node name="/org/nemo/transferengine">
- <interface name="org.nemo.transferengine">
- <method name="transferMethods">
- <arg name="methods" type="a(ssssasi)" direction="out" />
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="HarbourTransferMethodInfoList"/>
- </method>
- <signal name="transferMethodListChanged"/>
- </interface>
-</node>
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt
^
|
-(directory)
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/.gitignore
^
|
@@ -1,18 +0,0 @@
-# temp files
-*.swp
-\#*#
-
-# binaries
-*.o
-moc_*.cpp
-*.moc
-*.so*
-testconnman-qt
-
-# make files and pkgconfig
-Makefile*
-*.pc
-*.prl
-
-libconnman-qt/connman_*_interface.*
-connman-qt.pro.user
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/build/.gitignore
^
|
@@ -1 +0,0 @@
-*
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/connman-qt.pro
^
|
@@ -1,19 +0,0 @@
-TEMPLATE = subdirs
-CONFIG += ordered
-SUBDIRS += libconnman-qt
-
-check.depends = all
-check.CONFIG = phony recursive
-QMAKE_EXTRA_TARGETS += check
-
-# Adds 'coverage' target
-include(coverage.pri)
-# CONFIG flag to disable qml plugin
-!noplugin {
- SUBDIRS += plugin
-}
-example {
- SUBDIRS += examples/counters
-}
-
-OTHER_FILES += rpm/connman-qt5.spec
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/commondbustypes.h
^
|
@@ -1,42 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#ifndef COMMONDBUSTYPES_H
-#define COMMONDBUSTYPES_H
-
-#include <QtCore/QMap>
-#include <QtCore/QList>
-#include <QtCore/QString>
-#include <QtCore/QMetaType>
-#include <QtDBus/QtDBus>
-#include <QtDBus/QDBusObjectPath>
-
-typedef QMap<QString, QString> StringMap;
-Q_DECLARE_METATYPE ( StringMap )
-
-// TODO: re-implement with better interface i.e. "const QString path() const" instead of objpath
-struct ConnmanObject {
- QDBusObjectPath objpath;
- QVariantMap properties;
-};
-Q_DECLARE_METATYPE ( ConnmanObject )
-QDBusArgument &operator<<(QDBusArgument &argument, const ConnmanObject &obj);
-const QDBusArgument &operator>>(const QDBusArgument &argument, ConnmanObject &obj);
-
-typedef QList<ConnmanObject> ConnmanObjectList;
-Q_DECLARE_METATYPE ( ConnmanObjectList )
-
-inline void registerCommonDataTypes() {
- qDBusRegisterMetaType<StringMap>();
- qDBusRegisterMetaType<ConnmanObject>();
- qDBusRegisterMetaType<ConnmanObjectList>();
- qRegisterMetaType<ConnmanObjectList>("ConnmanObjectList");
-}
-
-#endif //COMMONDBUSTYPES_H
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/connman_manager.xml
^
|
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<node name="/Manager" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <interface name="net.connman.Manager">
-
- <method name="GetProperties" tp:name-for-bindings="Get_Properties">
- <arg name="properties" type="a{sv}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
- </method>
-
- <method name="SetProperty" tp:name-for-bindings="Set_Property">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </method>
-
- <method name="GetTechnologies" tp:name-for-bindings="Get_Technologies">
- <arg name="technologies" type="a(oa{sv})" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="ConnmanObjectList"/>
- </method>
-
- <method name="GetServices" tp:name-for-bindings="Get_Services">
- <arg name="services" type="a(oa{sv})" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="ConnmanObjectList"/>
- </method>
-
- <method name="GetSavedServices" tp:name-for-bindings="Get_Saved_Services">
- <arg name="services" type="a(oa{sv})" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="ConnmanObjectList"/>
- </method>
-
- <method name="RemoveSavedService" tp:name-for-bindings="Remove_Saved_Services">
- <arg name="identifier" type="s" direction="in"/>
- </method>
-
- <method name="RegisterAgent" tp:name-for-bindings="Register_Agent">
- <arg name="path" type="o"/>
- </method>
-
- <method name="UnregisterAgent" tp:name-for-bindings="Unregister_Agent">
- <arg name="path" type="o"/>
- </method>
-
- <method name="RegisterCounter" tp:name-for-bindings="Register_Counter">
- <arg name="path" type="o"/>
- <arg name="accuracy" type="u"/>
- <arg name="period" type="u"/>
- </method>
-
- <method name="UnregisterCounter" tp:name-for-bindings="Unregister_Counter">
- <arg name="path" type="o"/>
- </method>
-
- <method name="ResetCounters" tp:name-for-bindings="Reset_Counters">
- <arg name="type" type="s"/>
- </method>
-
- <method name="CreateSession" tp:name-for-bindings="Create_Session">
- <arg name="settings" type="a{sv}"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
- <arg name="notifier" type="o"/>
- <arg name="session" type="o" direction="out"/>
- </method>
-
- <method name="DestroySession" tp:name-for-bindings="Destroy_Session">
- <arg name="session" type="o"/>
- </method>
-
- <method name="RequestPrivateNetwork" tp:name-for-bindings="Request_Privete_Network">
- <arg name="options" type="a{sv}"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
- <arg name="path" type="o" direction="out"/>
- <arg name="dict" type="a{sv}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
- <arg name="fd" type="i" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
- </method>
-
- <method name="ReleasePrivateNetwork" tp:name-for-bindings="Release_Private_Network">
- <arg name="path" type="o"/>
- </method>
-
- <signal name="TechnologyAdded" tp:name-for-bindings="Technology_Added">
- <arg name="technology" type="o"/>
- <arg name="properties" type="a{sv}"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QVariantMap"/>
- </signal>
-
- <signal name="TechnologyRemoved" tp:name-for-bindings="Technology_Removed">
- <arg name="technology" type="o"/>
- </signal>
-
- <signal name="ServicesChanged" tp:name-for-bindings="Services_Changed">
- <arg name="changed" type="a(oa{sv})"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="ConnmanObjectList"/>
- <arg name="removed" type="ao"/>
- </signal>
-
- <signal name="SavedServicesChanged" tp:name-for-bindings="SavedServices_Changed">
- <arg name="changed" type="a(oa{sv})"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="ConnmanObjectList"/>
- </signal>
-
- <signal name="PropertyChanged" tp:name-for-bindings="Property_Changed">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </signal>
-
- </interface>
-</node>
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/connman_service.xml
^
|
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<node name="/Service" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <interface name="net.connman.Service">
-
- <method name="GetProperties" tp:name-for-bindings="Get_Properties">
- <arg name="properties" type="a{sv}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
- </method>
-
- <method name="SetProperty" tp:name-for-bindings="Set_Property">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </method>
-
- <method name="ClearProperty" tp:name-for-bindings="Clear_Property">
- <arg name="name" type="s" />
- </method>
-
- <method name="Connect" tp:name-for-bindings="Connect" />
-
- <method name="Disconnect" tp:name-for-bindings="Disconnect" />
-
- <method name="Remove" tp:name-for-bindings="Remove" />
-
- <method name="MoveBefore" tp:name-for-bindings="Move_Before">
- <arg name="service" type="o"/>
- </method>
-
- <method name="MoveAfter" tp:name-for-bindings="Move_After">
- <arg name="service" type="o"/>
- </method>
-
- <method name="ResetCounters" tp:name-for-bindings="Reset_Counters" />
-
- <signal name="PropertyChanged" tp:name-for-bindings="Property_Changed">
- <arg name="name" type="s"/>
- <arg name="value" type="v"/>
- </signal>
-
- </interface>
-</node>
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/libconnman-qt.pro
^
|
@@ -1,67 +0,0 @@
-TEMPLATE = lib
-CONFIG += qt debug
-CONFIG += create_pc create_prl
-QT += core dbus network
-QT -= gui
-
-isEmpty(VERSION):warning(VERSION unset. Run qmake with \'qmake VERSION=x.y.z\')
-
-isEmpty(PREFIX) {
- PREFIX=/usr
-}
-
-isEmpty(TARGET_SUFFIX) {
- TARGET_SUFFIX = qt$$QT_MAJOR_VERSION
-}
-
-TARGET = $$qtLibraryTarget(connman-$$TARGET_SUFFIX)
-headers.path = $$INSTALL_ROOT$$PREFIX/include/connman-$$TARGET_SUFFIX
-
-DBUS_INTERFACES = \
- connman_clock.xml \
- connman_manager.xml \
- connman_service.xml \
- connman_session.xml \
- connman_technology.xml \
-
-HEADERS += \
- networkmanager.h \
- networktechnology.h \
- networkservice.h \
- commondbustypes.h \
- connmannetworkproxyfactory.h \
- clockmodel.h \
- useragent.h \
- sessionagent.h \
- networksession.h \
- counter.h
-
-SOURCES += \
- networkmanager.cpp \
- networktechnology.cpp \
- networkservice.cpp \
- clockmodel.cpp \
- commondbustypes.cpp \
- connmannetworkproxyfactory.cpp \
- useragent.cpp \
- sessionagent.cpp \
- networksession.cpp \
- counter.cpp
-
-target.path = $$INSTALL_ROOT$$PREFIX/lib
-
-headers.files = $$HEADERS
-
-QMAKE_PKGCONFIG_DESCRIPTION = Qt Connman Library
-QMAKE_PKGCONFIG_DESTDIR = pkgconfig
-QMAKE_PKGCONFIG_INCDIR = $$headers.path
-
-INSTALLS += target headers
-
-OTHER_FILES = connman_service.xml \
- connman_technology.xml \
- connman_clock.xml \
- connman_manager.xml \
- connman_session.xml \
- connman_notification.xml
-
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/networkmanager.cpp
^
|
@@ -1,777 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#include "networkmanager.h"
-
-#include "commondbustypes.h"
-#include "connman_manager_interface.h"
-#include "connman_manager_interface.cpp" // not bug
-#include "moc_connman_manager_interface.cpp" // not bug
-#include <QRegExp>
-
-static NetworkManager* staticInstance = NULL;
-
-NetworkManager* NetworkManagerFactory::createInstance()
-{
- if (!staticInstance)
- staticInstance = new NetworkManager;
-
- return staticInstance;
-}
-
-NetworkManager* NetworkManagerFactory::instance()
-{
- return createInstance();
-}
-
-// NetworkManager implementation
-
-const QString NetworkManager::State("State");
-const QString NetworkManager::OfflineMode("OfflineMode");
-const QString NetworkManager::SessionMode("SessionMode");
-
-NetworkManager::NetworkManager(QObject* parent)
- : QObject(parent),
- m_manager(NULL),
- m_defaultRoute(NULL),
- m_invalidDefaultRoute(new NetworkService("/", QVariantMap(), this)),
- watcher(NULL),
- m_available(false),
- m_servicesEnabled(true),
- m_technologiesEnabled(true)
-{
- registerCommonDataTypes();
- watcher = new QDBusServiceWatcher("net.connman",QDBusConnection::systemBus(),
- QDBusServiceWatcher::WatchForRegistration |
- QDBusServiceWatcher::WatchForUnregistration, this);
- connect(watcher, SIGNAL(serviceRegistered(QString)),
- this, SLOT(connectToConnman(QString)));
- connect(watcher, SIGNAL(serviceUnregistered(QString)),
- this, SLOT(connmanUnregistered(QString)));
-
-
- m_available = QDBusConnection::systemBus().interface()->isServiceRegistered("net.connman");
-
- if (m_available)
- connectToConnman();
- else
- qDebug() << "connman not AVAILABLE";
-}
-
-NetworkManager::~NetworkManager()
-{
-}
-
-void NetworkManager::connectToConnman(QString)
-{
- disconnectFromConnman();
- m_manager = new NetConnmanManagerInterface("net.connman", "/",
- QDBusConnection::systemBus(), this);
-
- if (!m_manager->isValid()) {
-
- delete m_manager;
- m_manager = NULL;
-
- // shouldn't happen but in this case service isn't available
- if (m_available)
- Q_EMIT availabilityChanged(m_available = false);
- } else {
- connect(m_manager, SIGNAL(PropertyChanged(QString,QDBusVariant)),
- this, SLOT(propertyChanged(QString,QDBusVariant)));
-
- QDBusPendingReply<QVariantMap> props_reply = m_manager->GetProperties();
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(props_reply, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(getPropertiesFinished(QDBusPendingCallWatcher*)));
-
- if (!m_available)
- Q_EMIT availabilityChanged(m_available = true);
- }
-}
-
-void NetworkManager::disconnectFromConnman(QString)
-{
- delete m_manager;
- m_manager = NULL;
-
- disconnectTechnologies();
- disconnectServices();
-}
-
-void NetworkManager::disconnectTechnologies()
-{
- if (m_manager) {
- disconnect(m_manager, SIGNAL(TechnologyAdded(QDBusObjectPath,QVariantMap)),
- this, SLOT(technologyAdded(QDBusObjectPath,QVariantMap)));
- disconnect(m_manager, SIGNAL(TechnologyRemoved(QDBusObjectPath)),
- this, SLOT(technologyRemoved(QDBusObjectPath)));
- }
-
- Q_FOREACH (NetworkTechnology *tech, m_technologiesCache)
- tech->deleteLater();
-
- if (!m_technologiesCache.isEmpty()) {
- m_technologiesCache.clear();
- Q_EMIT technologiesChanged();
- }
-}
-
-void NetworkManager::disconnectServices()
-{
- if (m_manager) {
- disconnect(m_manager, SIGNAL(ServicesChanged(ConnmanObjectList,QList<QDBusObjectPath>)),
- this, SLOT(updateServices(ConnmanObjectList,QList<QDBusObjectPath>)));
- disconnect(m_manager, SIGNAL(SavedServicesChanged(ConnmanObjectList)),
- this, SLOT(updateSavedServices(ConnmanObjectList)));
- }
-
- Q_FOREACH (NetworkService *service, m_servicesCache)
- service->deleteLater();
-
- m_servicesCache.clear();
-
- if (m_defaultRoute != m_invalidDefaultRoute) {
- m_defaultRoute = m_invalidDefaultRoute;
- Q_EMIT defaultRouteChanged(m_defaultRoute);
- }
-
- if (!m_servicesOrder.isEmpty()) {
- m_servicesOrder.clear();
- Q_EMIT servicesChanged();
- }
-
- if (!m_savedServicesOrder.isEmpty()) {
- m_savedServicesOrder.clear();
- Q_EMIT savedServicesChanged();
- }
-}
-
-void NetworkManager::connmanUnregistered(QString)
-{
- disconnectFromConnman();
-
- if (m_available)
- Q_EMIT availabilityChanged(m_available = false);
-}
-
-void NetworkManager::setupTechnologies()
-{
- if (!m_available)
- return;
- connect(m_manager, SIGNAL(TechnologyAdded(QDBusObjectPath,QVariantMap)),
- this, SLOT(technologyAdded(QDBusObjectPath,QVariantMap)));
- connect(m_manager, SIGNAL(TechnologyRemoved(QDBusObjectPath)),
- this, SLOT(technologyRemoved(QDBusObjectPath)));
-
- QDBusPendingReply<ConnmanObjectList> reply = m_manager->GetTechnologies();
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(getTechnologiesFinished(QDBusPendingCallWatcher*)));
-}
-
-void NetworkManager::setupServices()
-{
- if (!m_available)
- return;
-
- connect(m_manager, SIGNAL(ServicesChanged(ConnmanObjectList,QList<QDBusObjectPath>)),
- this, SLOT(updateServices(ConnmanObjectList,QList<QDBusObjectPath>)));
- connect(m_manager, SIGNAL(SavedServicesChanged(ConnmanObjectList)),
- this, SLOT(updateSavedServices(ConnmanObjectList)));
-
- QDBusPendingReply<ConnmanObjectList> reply = m_manager->GetServices();
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(getServicesFinished(QDBusPendingCallWatcher*)));
-
- reply = m_manager->GetSavedServices();
- watcher = new QDBusPendingCallWatcher(reply, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(getSavedServicesFinished(QDBusPendingCallWatcher*)));
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/networkmanager.h
^
|
@@ -1,166 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#ifndef NETWORKMANAGER_H
-#define NETWORKMANAGER_H
-
-#include "commondbustypes.h"
-
-#include "networktechnology.h"
-#include "networkservice.h"
-#include <QtDBus>
-
-class NetConnmanManagerInterface;
-class NetworkManager;
-
-class NetworkManagerFactory : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(NetworkManager* instance READ instance CONSTANT)
-
-public:
- static NetworkManager* createInstance();
- NetworkManager* instance();
-};
-
-class NetworkManager : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(bool available READ isAvailable NOTIFY availabilityChanged)
- Q_PROPERTY(QString state READ state NOTIFY stateChanged)
- Q_PROPERTY(bool offlineMode READ offlineMode WRITE setOfflineMode NOTIFY offlineModeChanged)
- Q_PROPERTY(NetworkService* defaultRoute READ defaultRoute NOTIFY defaultRouteChanged)
-
- Q_PROPERTY(bool sessionMode READ sessionMode WRITE setSessionMode NOTIFY sessionModeChanged)
-
- Q_PROPERTY(bool servicesEnabled READ servicesEnabled WRITE setServicesEnabled NOTIFY servicesEnabledChanged)
- Q_PROPERTY(bool technologiesEnabled READ technologiesEnabled WRITE setTechnologiesEnabled NOTIFY technologiesEnabledChanged)
-
-public:
- NetworkManager(QObject* parent=0);
- virtual ~NetworkManager();
-
- bool isAvailable() const;
-
- Q_INVOKABLE NetworkTechnology* getTechnology(const QString &type) const;
- const QVector<NetworkTechnology *> getTechnologies() const;
- const QVector<NetworkService*> getServices(const QString &tech = QString()) const;
- const QVector<NetworkService*> getSavedServices(const QString &tech = QString()) const;
- void removeSavedService(const QString &identifier) const;
-
- Q_INVOKABLE QStringList servicesList(const QString &tech);
- Q_INVOKABLE QStringList savedServicesList(const QString &tech = QString());
- Q_INVOKABLE QStringList technologiesList();
- Q_INVOKABLE QString technologyPathForService(const QString &path);
- Q_INVOKABLE QString technologyPathForType(const QString &type);
-
-
- const QString state() const;
- bool offlineMode() const;
- NetworkService* defaultRoute() const;
-
- bool sessionMode() const;
-
- bool servicesEnabled() const;
- void setServicesEnabled(bool enabled);
-
- bool technologiesEnabled() const;
- void setTechnologiesEnabled(bool enabled);
-
- Q_INVOKABLE void resetCountersForType(const QString &type);
-
-public Q_SLOTS:
- void setOfflineMode(const bool &offlineMode);
- void registerAgent(const QString &path);
- void unregisterAgent(const QString &path);
- void registerCounter(const QString &path, quint32 accuracy,quint32 period);
- void unregisterCounter(const QString &path);
- QDBusObjectPath createSession(const QVariantMap &settings, const QString &sessionNotifierPath);
- void destroySession(const QString &sessionAgentPath);
-
- void setSessionMode(const bool &sessionMode);
-
-Q_SIGNALS:
- void availabilityChanged(bool available);
-
- void stateChanged(const QString &state);
- void offlineModeChanged(bool offlineMode);
- void technologiesChanged();
- void servicesChanged();
- void savedServicesChanged();
- void defaultRouteChanged(NetworkService* defaultRoute);
- void sessionModeChanged(bool);
- void servicesListChanged(const QStringList &list);
- void serviceAdded(const QString &servicePath);
- void serviceRemoved(const QString &servicePath);
-
- void servicesEnabledChanged();
- void technologiesEnabledChanged();
-
-private:
- void propertyChanged(const QString &name, const QVariant &value);
-
- NetConnmanManagerInterface *m_manager;
-
- /* Contains all property related to this net.connman.Manager object */
- QVariantMap m_propertiesCache;
-
- /* Not just for cache, but actual containers of Network* type objects */
- QHash<QString, NetworkTechnology *> m_technologiesCache;
- QHash<QString, NetworkService *> m_servicesCache;
-
- /* Define the order of services returned in service lists */
- QStringList m_servicesOrder;
- QStringList m_savedServicesOrder;
-
- /* This variable is used just to send signal if changed */
- NetworkService* m_defaultRoute;
-
- /* Invalid default route service for use when there is no default route */
- NetworkService *m_invalidDefaultRoute;
-
- QDBusServiceWatcher *watcher;
-
- static const QString State;
- static const QString OfflineMode;
- static const QString SessionMode;
-
- bool m_available;
-
- bool m_servicesEnabled;
- bool m_technologiesEnabled;
-
-
-private Q_SLOTS:
- void connectToConnman(QString = QString());
- void disconnectFromConnman(QString = QString());
- void connmanUnregistered(QString = QString());
- void disconnectTechnologies();
- void setupTechnologies();
- void disconnectServices();
- void setupServices();
- void propertyChanged(const QString &name, const QDBusVariant &value);
- void updateServices(const ConnmanObjectList &changed, const QList<QDBusObjectPath> &removed);
- void updateSavedServices(const ConnmanObjectList &changed);
- void technologyAdded(const QDBusObjectPath &technology, const QVariantMap &properties);
- void technologyRemoved(const QDBusObjectPath &technology);
- void getPropertiesFinished(QDBusPendingCallWatcher *watcher);
- void updateDefaultRoute();
- void getTechnologiesFinished(QDBusPendingCallWatcher *watcher);
- void getServicesFinished(QDBusPendingCallWatcher *watcher);
- void getSavedServicesFinished(QDBusPendingCallWatcher *watcher);
-
-private:
- Q_DISABLE_COPY(NetworkManager)
-};
-
-#endif //NETWORKMANAGER_H
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/networkservice.cpp
^
|
@@ -1,669 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-#include <QSettings>
-
-#include "networkservice.h"
-#include "commondbustypes.h"
-#include "connman_manager_interface.h"
-#include "connman_service_interface.h"
-
-/*
- * JS returns arrays as QVariantList or a(v) in terms of D-Bus,
- * but ConnMan requires some properties to be lists of strings
- * or a(s) thus this function.
- */
-QVariantMap adaptToConnmanProperties(const QVariantMap &map)
-{
- QVariantMap buffer;
- Q_FOREACH (const QString &key, map.keys()) {
- if (map.value(key).type() == QVariant::List) {
- QStringList strList;
- Q_FOREACH (const QVariant &value, map.value(key).toList()) {
- strList.append(value.toString());
- }
- buffer.insert(key, strList);
- } else {
- buffer.insert(key, map.value(key));
- }
- }
- return buffer;
-}
-
-const QString NetworkService::Name("Name");
-const QString NetworkService::State("State");
-const QString NetworkService::Type("Type");
-const QString NetworkService::Security("Security");
-const QString NetworkService::Strength("Strength");
-const QString NetworkService::Error("Error");
-const QString NetworkService::Favorite("Favorite");
-const QString NetworkService::AutoConnect("AutoConnect");
-const QString NetworkService::IPv4("IPv4");
-const QString NetworkService::IPv4Config("IPv4.Configuration");
-const QString NetworkService::IPv6("IPv6");
-const QString NetworkService::IPv6Config("IPv6.Configuration");
-const QString NetworkService::Nameservers("Nameservers");
-const QString NetworkService::NameserversConfig("Nameservers.Configuration");
-const QString NetworkService::Domains("Domains");
-const QString NetworkService::DomainsConfig("Domains.Configuration");
-const QString NetworkService::Proxy("Proxy");
-const QString NetworkService::ProxyConfig("Proxy.Configuration");
-const QString NetworkService::Ethernet("Ethernet");
-const QString NetworkService::Roaming("Roaming");
-//const QString NetworkService::Immutable("Immutable");
-//const QString NetworkService::Privacy("Privacy");
-const QString NetworkService::Timeservers("Timeservers");
-const QString NetworkService::TimeserversConfig("Timeservers.Configuration");
-//const QString NetworkService::Provider("Provider");
-
-const QString NetworkService::BSSID("BSSID");
-const QString NetworkService::MaxRate("MaxRate");
-const QString NetworkService::Frequency("Frequency");
-const QString NetworkService::EncryptionMode("EncryptionMode");
-const QString NetworkService::Hidden("Hidden");
-
-NetworkService::NetworkService(const QString &path, const QVariantMap &properties, QObject* parent)
- : QObject(parent),
- m_service(NULL),
- m_path(path),
- m_propertiesCache(properties),
- isConnected(false)
-{
- qRegisterMetaType<NetworkService *>();
-
- Q_ASSERT(!path.isEmpty());
- reconnectServiceInterface();
-}
-
-NetworkService::NetworkService(QObject* parent)
- : QObject(parent),
- m_service(NULL),
- m_path(QString()),
- isConnected(false)
-{
- qRegisterMetaType<NetworkService *>();
-}
-
-NetworkService::~NetworkService() {}
-
-const QString NetworkService::name() const
-{
- if (m_propertiesCache.contains(Name))
- return m_propertiesCache.value(Name).toString();
- return QString();
-}
-
-const QString NetworkService::state() const
-{
- if (m_propertiesCache.contains(State))
- return m_propertiesCache.value(State).toString();
- return QString();
-}
-
-const QString NetworkService::error() const
-{
- if (m_propertiesCache.contains(Error))
- return m_propertiesCache.value(Error).toString();
- return QString();
-}
-
-const QString NetworkService::type() const
-{
- if (m_propertiesCache.contains(Type))
- return m_propertiesCache.value(Type).toString();
- return QString();
-}
-
-const QStringList NetworkService::security() const
-{
- if (m_propertiesCache.contains(Security))
- return m_propertiesCache.value(Security).toStringList();
- return QStringList();
-}
-
-uint NetworkService::strength() const
-{
- if (m_propertiesCache.contains(Strength))
- return m_propertiesCache.value(Strength).toUInt();
- return 0;
-}
-
-bool NetworkService::favorite() const
-{
- if (m_propertiesCache.contains(Favorite))
- return m_propertiesCache.value(Favorite).toBool();
- return false;
-}
-
-bool NetworkService::autoConnect() const
-{
- if (m_propertiesCache.contains(AutoConnect))
- return m_propertiesCache.value(AutoConnect).toBool();
- return false;
-}
-
-const QString NetworkService::path() const
-{
- return m_path;
-}
-
-const QVariantMap NetworkService::ipv4() const
-{
- if (m_propertiesCache.contains(IPv4))
- return qdbus_cast<QVariantMap>(m_propertiesCache.value(IPv4));
- return QVariantMap();
-}
-
-const QVariantMap NetworkService::ipv4Config() const
-{
- if (m_propertiesCache.contains(IPv4Config))
- return qdbus_cast<QVariantMap>(m_propertiesCache.value(IPv4Config));
- return QVariantMap();
-}
-
-const QVariantMap NetworkService::ipv6() const
-{
- if (m_propertiesCache.contains(IPv6))
- return qdbus_cast<QVariantMap>(m_propertiesCache.value(IPv6));
- return QVariantMap();
-}
-
-const QVariantMap NetworkService::ipv6Config() const
-{
- if (m_propertiesCache.contains(IPv6Config))
- return qdbus_cast<QVariantMap>(m_propertiesCache.value(IPv6Config));
- return QVariantMap();
-}
-
-const QStringList NetworkService::nameservers() const
-{
- if (m_propertiesCache.contains(Nameservers))
- return m_propertiesCache.value(Nameservers).toStringList();
- return QStringList();
-}
-
-const QStringList NetworkService::nameserversConfig() const
-{
- if (m_propertiesCache.contains(NameserversConfig))
- return m_propertiesCache.value(NameserversConfig).toStringList();
- return QStringList();
-}
-
-const QStringList NetworkService::domains() const
-{
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/networkservice.h
^
|
@@ -1,204 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#ifndef NETWORKSERVICE_H
-#define NETWORKSERVICE_H
-
-#include <QtDBus>
-
-#define CONNECT_TIMEOUT 300000 // user is supposed to provide input for unconfigured networks
-#define CONNECT_TIMEOUT_FAVORITE 60000
-
-class NetConnmanServiceInterface;
-
-class NetworkService : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QString name READ name NOTIFY nameChanged)
- Q_PROPERTY(QString state READ state NOTIFY stateChanged)
- Q_PROPERTY(QString type READ type NOTIFY typeChanged)
- Q_PROPERTY(QString error READ error NOTIFY errorChanged)
- Q_PROPERTY(QStringList security READ security NOTIFY securityChanged)
- Q_PROPERTY(uint strength READ strength NOTIFY strengthChanged)
- Q_PROPERTY(bool favorite READ favorite NOTIFY favoriteChanged)
- Q_PROPERTY(bool autoConnect READ autoConnect WRITE setAutoConnect NOTIFY autoConnectChanged)
- Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged)
- Q_PROPERTY(QVariantMap ipv4 READ ipv4 NOTIFY ipv4Changed)
- Q_PROPERTY(QVariantMap ipv4Config READ ipv4Config WRITE setIpv4Config NOTIFY ipv4ConfigChanged)
- Q_PROPERTY(QVariantMap ipv6 READ ipv6 NOTIFY ipv6Changed)
- Q_PROPERTY(QVariantMap ipv6Config READ ipv6Config WRITE setIpv6Config NOTIFY ipv6ConfigChanged)
- Q_PROPERTY(QStringList nameservers READ nameservers NOTIFY nameserversChanged)
- Q_PROPERTY(QStringList nameserversConfig READ nameserversConfig WRITE setNameserversConfig NOTIFY nameserversConfigChanged)
- Q_PROPERTY(QStringList domains READ domains NOTIFY domainsChanged)
- Q_PROPERTY(QStringList domainsConfig READ domainsConfig WRITE setDomainsConfig NOTIFY domainsConfigChanged)
- Q_PROPERTY(QVariantMap proxy READ proxy NOTIFY proxyChanged)
- Q_PROPERTY(QVariantMap proxyConfig READ proxyConfig WRITE setProxyConfig NOTIFY proxyConfigChanged)
- Q_PROPERTY(QVariantMap ethernet READ ethernet NOTIFY ethernetChanged)
- Q_PROPERTY(bool roaming READ roaming NOTIFY roamingChanged)
- Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
- Q_PROPERTY(QStringList timeservers READ timeservers NOTIFY timeserversChanged)
- Q_PROPERTY(QStringList timeserversConfig READ timeserversConfig WRITE setTimeserversConfig NOTIFY timeserversConfigChanged)
-
- Q_PROPERTY(QString bssid READ bssid NOTIFY bssidChanged)
- Q_PROPERTY(quint32 maxRate READ maxRate NOTIFY maxRateChanged)
- Q_PROPERTY(quint16 frequency READ frequency NOTIFY frequencyChanged)
- Q_PROPERTY(QString encryptionMode READ encryptionMode NOTIFY encryptionModeChanged)
- Q_PROPERTY(bool hidden READ hidden NOTIFY hiddenChanged)
-
-public:
- NetworkService(const QString &path, const QVariantMap &properties, QObject* parent);
- NetworkService(QObject* parent = 0);
-
- virtual ~NetworkService();
-
- const QString name() const;
- const QString type() const;
- const QString state() const;
- const QString error() const;
- const QStringList security() const;
- bool autoConnect() const;
- uint strength() const;
- bool favorite() const;
- const QString path() const;
- const QVariantMap ipv4() const;
- const QVariantMap ipv4Config() const;
- const QVariantMap ipv6() const;
- const QVariantMap ipv6Config() const;
- const QStringList nameservers() const;
- const QStringList nameserversConfig() const;
- const QStringList domains() const;
- const QStringList domainsConfig() const;
- const QVariantMap proxy() const;
- const QVariantMap proxyConfig() const;
- const QVariantMap ethernet() const;
- bool roaming() const;
-
- void setPath(const QString &path);
- void updateProperties(const QVariantMap &properties);
- bool connected();
-
- QStringList timeservers() const;
- QStringList timeserversConfig() const;
- void setTimeserversConfig(const QStringList &servers);
-
- const QString bssid();
- quint32 maxRate();
- quint16 frequency();
- const QString encryptionMode();
- bool hidden() const;
-
-Q_SIGNALS:
- void nameChanged(const QString &name);
- void stateChanged(const QString &state);
- void errorChanged(const QString &error);
- void securityChanged(const QStringList &security);
- void strengthChanged(const uint strength);
- void favoriteChanged(const bool &favorite);
- void autoConnectChanged(bool autoconnect);
- void pathChanged(const QString &path);
- void ipv4Changed(const QVariantMap &ipv4);
- void ipv4ConfigChanged(const QVariantMap &ipv4);
- void ipv6Changed(const QVariantMap &ipv6);
- void ipv6ConfigChanged(const QVariantMap &ipv6);
- void nameserversChanged(const QStringList &nameservers);
- void nameserversConfigChanged(const QStringList &nameservers);
- void domainsChanged(const QStringList &domains);
- void domainsConfigChanged(const QStringList &domains);
- void proxyChanged(const QVariantMap &proxy);
- void proxyConfigChanged(const QVariantMap &proxy);
- void ethernetChanged(const QVariantMap ðernet);
- void connectRequestFailed(const QString &error);
- void typeChanged(const QString &type);
- void roamingChanged(bool roaming);
- void timeserversChanged(const QStringList ×ervers);
- void timeserversConfigChanged(const QStringList ×ervers);
-
- void serviceConnectionStarted();
- void serviceDisconnectionStarted();
- void connectedChanged(bool connected);
-
- void propertiesReady();
-
- void bssidChanged(const QString &bssid);
- void maxRateChanged(quint32 rate);
- void frequencyChanged(quint16 frequency);
- void encryptionModeChanged(const QString &mode);
- void hiddenChanged(bool);
-
-public Q_SLOTS:
- void requestConnect();
- void requestDisconnect();
- void remove();
-
- void setAutoConnect(const bool autoconnect);
- void setIpv4Config(const QVariantMap &ipv4);
- void setIpv6Config(const QVariantMap &ipv6);
- void setNameserversConfig(const QStringList &nameservers);
- void setDomainsConfig(const QStringList &domains);
- void setProxyConfig(const QVariantMap &proxy);
-
- void resetCounters();
-
-private:
- NetConnmanServiceInterface *m_service;
- QString m_path;
- QVariantMap m_propertiesCache;
-
- static const QString Name;
- static const QString State;
- static const QString Type;
- static const QString Security;
- static const QString Strength;
- static const QString Error;
- static const QString Favorite;
- static const QString AutoConnect;
- static const QString IPv4;
- static const QString IPv4Config;
- static const QString IPv6;
- static const QString IPv6Config;
- static const QString Nameservers;
- static const QString NameserversConfig;
- static const QString Domains;
- static const QString DomainsConfig;
- static const QString Proxy;
- static const QString ProxyConfig;
- static const QString Ethernet;
- static const QString Roaming;
- static const QString Timeservers;
- static const QString TimeserversConfig;
-
- static const QString BSSID;
- static const QString MaxRate;
- static const QString Frequency;
- static const QString EncryptionMode;
- static const QString Hidden;
-
- bool isConnected;
-
-private Q_SLOTS:
- void updateProperty(const QString &name, const QDBusVariant &value);
- void emitPropertyChange(const QString &name, const QVariant &value);
- void getPropertiesFinished(QDBusPendingCallWatcher *call);
-
- void handleConnectReply(QDBusPendingCallWatcher *call);
- void handleRemoveReply(QDBusPendingCallWatcher *watcher);
- void handleAutoConnectReply(QDBusPendingCallWatcher*);
-
-private:
- void resetProperties();
- void reconnectServiceInterface();
-
- Q_DISABLE_COPY(NetworkService)
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/networktechnology.cpp
^
|
@@ -1,261 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#include "networktechnology.h"
-#include "connman_technology_interface.h"
-
-const QString NetworkTechnology::Name("Name");
-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),
- m_technology(NULL),
- m_path(QString())
-{
- Q_ASSERT(!path.isEmpty());
- m_propertiesCache = properties;
- init(path);
-}
-
-NetworkTechnology::NetworkTechnology(QObject* parent)
- : QObject(parent),
- m_technology(NULL),
- m_path(QString())
-{
-}
-
-NetworkTechnology::~NetworkTechnology()
-{
-}
-
-void NetworkTechnology::init(const QString &path)
-{
- if (path != m_path) {
- m_path = path;
-
- if (m_technology) {
- delete m_technology;
- m_technology = 0;
- m_propertiesCache.clear();
- }
- Q_EMIT pathChanged(m_path);
- if (m_path.isEmpty())
- return;
- m_technology = new NetConnmanTechnologyInterface("net.connman", path,
- QDBusConnection::systemBus(), this);
- if (!m_technology->isValid()) {
- qWarning() << "Invalid technology: " << path;
- qFatal("Cannot init with invalid technology");
- }
-
- QDBusPendingReply<QVariantMap> reply = m_technology->GetProperties();
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
-
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(getPropertiesFinished(QDBusPendingCallWatcher*)));
-
- connect(m_technology,
- SIGNAL(PropertyChanged(const QString&, const QDBusVariant&)),
- this,
- SLOT(propertyChanged(const QString&, const QDBusVariant&)));
- }
-
-}
-
-void NetworkTechnology::getPropertiesFinished(QDBusPendingCallWatcher *call)
-{
- QDBusPendingReply<QVariantMap> reply = *call;
- call->deleteLater();
-
- if (!reply.isError()) {
-
- QVariantMap tmpCache = reply.value();
- Q_FOREACH(const QString &name, tmpCache.keys()) {
- m_propertiesCache.insert(name, tmpCache[name]);
- emitPropertyChange(name, tmpCache[name]);
- }
- Q_EMIT propertiesReady();
- } else {
- qWarning() << reply.error().message();
- }
-}
-
-// Public API
-
-// Getters
-
-const QString NetworkTechnology::name() const
-{
- if (m_propertiesCache.contains(NetworkTechnology::Name))
- return m_propertiesCache[NetworkTechnology::Name].toString();
- else
- return QString();
-}
-
-const QString NetworkTechnology::type() const
-{
- if (m_propertiesCache.contains(NetworkTechnology::Type))
- return m_propertiesCache[NetworkTechnology::Type].toString();
- else
- return QString();
-}
-
-bool NetworkTechnology::powered() const
-{
- if (m_propertiesCache.contains(NetworkTechnology::Powered))
- return m_propertiesCache[NetworkTechnology::Powered].toBool();
- else
- return false;
-}
-
-bool NetworkTechnology::connected() const
-{
- if (m_propertiesCache.contains(NetworkTechnology::Connected))
- return m_propertiesCache[NetworkTechnology::Connected].toBool();
- else
- return false;
-}
-
-const QString NetworkTechnology::objPath() const
-{
- if (m_technology)
- return m_technology->path();
- return QString();
-}
-
-// Setters
-
-void NetworkTechnology::setPowered(const bool &powered)
-{
- if (m_technology)
- m_technology->SetProperty(Powered, QDBusVariant(QVariant(powered)));
-}
-
-void NetworkTechnology::scan()
-{
- if (!m_technology)
- return;
-
- QDBusPendingReply<> reply = m_technology->Scan();
- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
- connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
- this, SLOT(scanReply(QDBusPendingCallWatcher*)));
-}
-
-// Private
-void NetworkTechnology::emitPropertyChange(const QString &name, const QVariant &value)
-{
- if (name == Powered) {
- Q_EMIT poweredChanged(value.toBool());
- } else if (name == Connected) {
- Q_EMIT connectedChanged(value.toBool());
- } else if (name == IdleTimeout) {
- Q_EMIT idleTimeoutChanged(value.toUInt());
- } else if (name == Tethering) {
- Q_EMIT tetheringChanged(value.toBool());
- } else if (name == TetheringIdentifier) {
- Q_EMIT tetheringIdChanged(value.toString());
- } else if (name == TetheringPassphrase) {
- Q_EMIT tetheringPassphraseChanged(value.toString());
- }
-}
-
-void NetworkTechnology::propertyChanged(const QString &name, const QDBusVariant &value)
-{
- QVariant tmp = value.variant();
-
- Q_ASSERT(m_technology);
-
- m_propertiesCache[name] = tmp;
- emitPropertyChange(name,tmp);
-}
-
-void NetworkTechnology::scanReply(QDBusPendingCallWatcher *call)
-{
- Q_EMIT scanFinished();
-
- call->deleteLater();
-}
-
-QString NetworkTechnology::path() const
-{
- return m_path;
-}
-
-void NetworkTechnology::setPath(const QString &path)
-{
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/libconnman-qt/networktechnology.h
^
|
@@ -1,104 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#ifndef NETWORKTECHNOLOGY_H
-#define NETWORKTECHNOLOGY_H
-
-#include <QtDBus>
-
-class NetConnmanTechnologyInterface;
-
-class NetworkTechnology : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QString name READ name)
- Q_PROPERTY(QString type READ type)
- 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 NOTIFY pathChanged)
- Q_PROPERTY(quint32 idleTimeout READ idleTimeout 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);
- NetworkTechnology(QObject* parent=0);
-
- virtual ~NetworkTechnology();
-
- const QString name() const;
- const QString type() const;
- bool powered() const;
- bool connected() const;
- const QString objPath() const;
-
- QString path() const;
-
- quint32 idleTimeout() 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 Q_SLOTS:
- void setPowered(const bool &powered);
- void scan();
- void setPath(const QString &path);
-
-Q_SIGNALS:
- 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);
- void pathChanged(const QString &path);
- void propertiesReady();
-
-private:
- NetConnmanTechnologyInterface *m_technology;
- QVariantMap m_propertiesCache;
-
- static const QString Name;
- 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);
-
-
-private Q_SLOTS:
- void propertyChanged(const QString &name, const QDBusVariant &value);
- void emitPropertyChange(const QString &name, const QVariant &value);
-
- void scanReply(QDBusPendingCallWatcher *call);
- void getPropertiesFinished(QDBusPendingCallWatcher *call);
-
-private:
- Q_DISABLE_COPY(NetworkTechnology)
-};
-
-#endif //NETWORKTECHNOLOGY_H
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/plugin/savedservicemodel.cpp
^
|
@@ -1,159 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2013, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#include <QDebug>
-#include "savedservicemodel.h"
-
-namespace
-{
-
-bool compareServiceStrength(NetworkService *a, NetworkService *b)
-{
- if ((a->strength() > 0 && b->strength() > 0) || (a->strength() == 0 && b->strength() == 0))
- return a->name() < b->name();
-
- return b->strength() < a->strength();
-}
-
-}
-
-SavedServiceModel::SavedServiceModel(QAbstractListModel* parent)
-: QAbstractListModel(parent), m_sort(false)
-{
- m_manager = NetworkManagerFactory::createInstance();
-
- connect(m_manager,
- SIGNAL(savedServicesChanged()),
- this,
- SLOT(updateServiceList()));
-}
-
-SavedServiceModel::~SavedServiceModel()
-{
-}
-
-QHash<int, QByteArray> SavedServiceModel::roleNames() const
-{
- QHash<int, QByteArray> roles;
- roles[ServiceRole] = "networkService";
- return roles;
-}
-
-QVariant SavedServiceModel::data(const QModelIndex &index, int role) const
-{
- switch (role) {
- case ServiceRole:
- return QVariant::fromValue(static_cast<QObject *>(m_services.value(index.row())));
- }
-
- return QVariant();
-}
-
-int SavedServiceModel::rowCount(const QModelIndex &parent) const
-{
- Q_UNUSED(parent);
-
- return m_services.count();
-}
-
-const QString SavedServiceModel::name() const
-{
- return m_techname;
-}
-
-void SavedServiceModel::setName(const QString &name)
-{
- if (m_techname == name) {
- return;
- }
-
- m_techname = name;
- Q_EMIT nameChanged(m_techname);
-
- QStringList netTypes = m_manager->technologiesList();
- if (!netTypes.contains(name)) {
- qDebug() << name << "is not a known technology name:" << netTypes;
- return;
- }
-
- updateServiceList();
-}
-
-bool SavedServiceModel::sort() const
-{
- return m_sort;
-}
-
-void SavedServiceModel::setSort(bool sortList)
-{
- if (m_sort == sortList)
- return;
-
- m_sort = sortList;
- emit sortChanged();
-
- updateServiceList();
-}
-
-NetworkService *SavedServiceModel::get(int index) const
-{
- if (index < 0 || index > m_services.count())
- return 0;
- return m_services.value(index);
-}
-
-int SavedServiceModel::indexOf(const QString &dbusObjectPath) const
-{
- int idx(-1);
-
- Q_FOREACH (NetworkService *service, m_services) {
- idx++;
- if (service->path() == dbusObjectPath) return idx;
- }
-
- return -1;
-}
-
-void SavedServiceModel::updateServiceList()
-{
- QVector<NetworkService *> new_services = m_manager->getSavedServices(m_techname);
- if (m_sort)
- std::stable_sort(new_services.begin(), new_services.end(), compareServiceStrength);
-
- int num_new = new_services.count();
-
- for (int i = 0; i < num_new; i++) {
- int j = m_services.indexOf(new_services.value(i));
- if (j == -1) {
- // wifi service not found -> remove from list
- beginInsertRows(QModelIndex(), i, i);
- m_services.insert(i, new_services.value(i));
- endInsertRows();
- } else if (i != j) {
- // wifi service changed its position -> move it
- NetworkService* service = m_services.value(j);
- beginMoveRows(QModelIndex(), j, j, QModelIndex(), i);
- m_services.remove(j);
- m_services.insert(i, service);
- endMoveRows();
- } else {
- QModelIndex changedIndex(this->index(j, 0, QModelIndex()));
- Q_EMIT dataChanged(changedIndex, changedIndex);
- }
- }
-
- int num_old = m_services.count();
- if (num_old > num_new) {
- beginRemoveRows(QModelIndex(), num_new, num_old - 1);
- m_services.remove(num_new, num_old - num_new);
- endRemoveRows();
- }
-}
-
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/plugin/savedservicemodel.h
^
|
@@ -1,68 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2013, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * WARNING: this class is experimetal and is about to be refactored in order
- * to deprecate NetworkingModel.
- */
-
-#ifndef SAVEDSERVICEMODEL_H
-#define SAVEDSERVICEMODEL_H
-
-#include <QAbstractListModel>
-#include <networkmanager.h>
-#include <networkservice.h>
-
-/*
- * SavedServiceModel is a list model containing saved wifi services.
- */
-class SavedServiceModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_DISABLE_COPY(SavedServiceModel)
-
- Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
- Q_PROPERTY(bool sort READ sort WRITE setSort NOTIFY sortChanged)
-
-public:
- enum ItemRoles {
- ServiceRole = Qt::UserRole + 1
- };
-
- SavedServiceModel(QAbstractListModel* parent = 0);
- virtual ~SavedServiceModel();
-
- QVariant data(const QModelIndex &index, int role) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
-
- const QString name() const;
- void setName(const QString &name);
-
- bool sort() const;
- void setSort(bool sortList);
-
- Q_INVOKABLE int indexOf(const QString &dbusObjectPath) const;
-
- Q_INVOKABLE NetworkService *get(int index) const;
-
-Q_SIGNALS:
- void nameChanged(const QString &name);
- void sortChanged();
-
-private:
- QString m_techname;
- NetworkManager* m_manager;
- QVector<NetworkService *> m_services;
- bool m_sort;
-
- QHash<int, QByteArray> roleNames() const;
-
-private Q_SLOTS:
- void updateServiceList();
-};
-
-#endif // SAVEDSERVICEMODEL_H
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/plugin/technologymodel.cpp
^
|
@@ -1,346 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- */
-
-#include <QDebug>
-#include "technologymodel.h"
-
-TechnologyModel::TechnologyModel(QAbstractListModel* parent)
- : QAbstractListModel(parent),
- m_manager(NULL),
- m_tech(NULL),
- m_scanning(false),
- m_changesInhibited(false),
- m_uneffectedChanges(false)
-{
- m_manager = NetworkManagerFactory::createInstance();
-
- connect(m_manager, SIGNAL(availabilityChanged(bool)),
- this, SLOT(managerAvailabilityChanged(bool)));
-
- connect(m_manager,
- SIGNAL(technologiesChanged()),
- this,
- SLOT(updateTechnologies()));
-
- connect(m_manager,
- SIGNAL(servicesChanged()),
- this,
- SLOT(updateServiceList()));
-}
-
-TechnologyModel::~TechnologyModel()
-{
-}
-
-QHash<int, QByteArray> TechnologyModel::roleNames() const
-{
- QHash<int, QByteArray> roles;
- roles[ServiceRole] = "networkService";
- return roles;
-}
-
-QVariant TechnologyModel::data(const QModelIndex &index, int role) const
-{
- switch (role) {
- case ServiceRole:
- return QVariant::fromValue(static_cast<QObject *>(m_services.value(index.row())));
- }
-
- return QVariant();
-}
-
-int TechnologyModel::rowCount(const QModelIndex &parent) const
-{
- Q_UNUSED(parent);
-
- return m_services.count();
-}
-
-int TechnologyModel::count() const
-{
- return rowCount();
-}
-
-const QString TechnologyModel::name() const
-{
- return m_techname;
-}
-
-bool TechnologyModel::isAvailable() const
-{
- return m_manager->isAvailable() && m_tech;
-}
-
-bool TechnologyModel::isConnected() const
-{
- if (m_tech) {
- return m_tech->connected();
- } else {
- qWarning() << "Can't get: technology is NULL";
- return false;
- }
-}
-
-bool TechnologyModel::isPowered() const
-{
- if (m_tech) {
- return m_tech->powered();
- } else {
- qWarning() << "Can't get: technology is NULL";
- return false;
- }
-}
-
-bool TechnologyModel::isScanning() const
-{
- return m_scanning;
-}
-
-bool TechnologyModel::changesInhibited() const
-{
- return m_changesInhibited;
-}
-
-void TechnologyModel::setPowered(const bool &powered)
-{
- if (m_tech) {
- m_tech->setPowered(powered);
- } else {
- qWarning() << "Can't set: technology is NULL";
- }
-}
-
-void TechnologyModel::setName(const QString &name)
-{
- if (m_techname == name || name.isEmpty()) {
- return;
- }
- m_techname = name;
- Q_EMIT nameChanged(m_techname);
-
- updateTechnologies();
-}
-
-void TechnologyModel::setChangesInhibited(bool b)
-{
- if (m_changesInhibited != b) {
- m_changesInhibited = b;
- Q_EMIT changesInhibitedChanged(m_changesInhibited);
-
- if (!m_changesInhibited && m_uneffectedChanges) {
- m_uneffectedChanges = false;
- updateServiceList();
- }
- }
-}
-
-void TechnologyModel::requestScan()
-{
- if (m_tech && !m_tech->tethering()) {
- m_tech->scan();
- m_scanning = true;
- Q_EMIT scanningChanged(m_scanning);
- }
-}
-
-void TechnologyModel::updateTechnologies()
-{
- bool wasAvailable = m_manager->isAvailable() && m_tech;
-
- doUpdateTechnologies();
-
- bool isAvailable = m_manager->isAvailable() && m_tech;
-
- if (wasAvailable != isAvailable)
- Q_EMIT availabilityChanged(isAvailable);
-}
-
-void TechnologyModel::doUpdateTechnologies()
-{
- NetworkTechnology *newTech = m_manager->getTechnology(m_techname);
- if (m_tech == newTech)
- return;
-
- bool oldPowered = false;
- bool oldConnected = false;
-
- if (m_tech) {
- oldPowered = m_tech->powered();
- oldConnected = m_tech->connected();
-
- disconnect(m_tech, SIGNAL(poweredChanged(bool)), this, SLOT(changedPower(bool)));
- disconnect(m_tech, SIGNAL(connectedChanged(bool)), this, SLOT(changedConnected(bool)));
- disconnect(m_tech, SIGNAL(scanFinished()), this, SLOT(finishedScan()));
- }
-
- if (m_scanning) {
- m_scanning = false;
- Q_EMIT scanningChanged(m_scanning);
- }
-
- m_tech = newTech;
-
- if (m_tech) {
- connect(m_tech, SIGNAL(poweredChanged(bool)), this, SLOT(changedPower(bool)));
- connect(m_tech, SIGNAL(connectedChanged(bool)), this, SLOT(changedConnected(bool)));
- connect(m_tech, SIGNAL(scanFinished()), this, SLOT(finishedScan()));
-
- bool b = m_tech->powered();
- if (b != oldPowered)
- Q_EMIT poweredChanged(b);
- b = m_tech->connected();
- if (b != oldConnected)
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/plugin/technologymodel.h
^
|
@@ -1,101 +0,0 @@
-/*
- * Copyright © 2010, Intel Corporation.
- * Copyright © 2012, Jolla.
- *
- * This program is licensed under the terms and conditions of the
- * Apache License, version 2.0. The full text of the Apache License is at
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * WARNING: this class is experimetal and is about to be refactored in order
- * to deprecate NetworkingModel.
- */
-
-#ifndef TECHNOLOGYMODEL_H
-#define TECHNOLOGYMODEL_H
-
-#include <QAbstractListModel>
-#include <networkmanager.h>
-#include <networktechnology.h>
-#include <networkservice.h>
-
-/*
- * TechnologyModel is a list model specific to a certain technology (wifi by default).
- */
-class TechnologyModel : public QAbstractListModel
-{
- Q_OBJECT
- Q_DISABLE_COPY(TechnologyModel)
-
- Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
- Q_PROPERTY(bool available READ isAvailable NOTIFY availabilityChanged)
- Q_PROPERTY(bool connected READ isConnected NOTIFY connectedChanged)
- Q_PROPERTY(bool powered READ isPowered WRITE setPowered NOTIFY poweredChanged)
- Q_PROPERTY(bool scanning READ isScanning NOTIFY scanningChanged)
- Q_PROPERTY(bool changesInhibited READ changesInhibited WRITE setChangesInhibited NOTIFY changesInhibitedChanged)
- Q_PROPERTY(int count READ count NOTIFY countChanged)
-
-public:
- enum ItemRoles {
- ServiceRole = Qt::UserRole + 1
- };
-
- TechnologyModel(QAbstractListModel* parent = 0);
- virtual ~TechnologyModel();
-
- QVariant data(const QModelIndex &index, int role) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
-
- int count() const;
-
- const QString name() const;
- bool isAvailable() const;
- bool isConnected() const;
- bool isPowered() const;
- bool isScanning() const;
- bool changesInhibited() const;
-
- void setName(const QString &name);
- void setChangesInhibited(bool b);
-
- Q_INVOKABLE int indexOf(const QString &dbusObjectPath) const;
-
- Q_INVOKABLE NetworkService *get(int index) const;
-
-public Q_SLOTS:
- void setPowered(const bool &powered);
- void requestScan();
-
-Q_SIGNALS:
- void nameChanged(const QString &name);
- void availabilityChanged(const bool &available);
- void connectedChanged(const bool &connected);
- void poweredChanged(const bool &powered);
- void scanningChanged(const bool &scanning);
- void changesInhibitedChanged(const bool &changesInhibited);
- void technologiesChanged();
- void countChanged();
-
- void scanRequestFinished();
-
-private:
- QString m_techname;
- NetworkManager* m_manager;
- NetworkTechnology* m_tech;
- QVector<NetworkService *> m_services;
- bool m_scanning;
- bool m_changesInhibited;
- bool m_uneffectedChanges;
- QHash<int, QByteArray> roleNames() const;
- void doUpdateTechnologies();
-
-private Q_SLOTS:
- void updateTechnologies();
- void updateServiceList();
- void managerAvailabilityChanged(bool available);
- void changedPower(bool);
- void changedConnected(bool);
- void finishedScan();
- void networkServiceDestroyed(QObject *);
-};
-
-#endif // TECHNOLOGYMODEL_H
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/rpm/connman-qt5.spec
^
|
@@ -1,75 +0,0 @@
-Name: connman-qt5
-Summary: Qt bindings for connman
-Version: 1.0.91
-Release: 1
-Group: System/GUI/Other
-License: ASL 2.0
-URL: https://github.com/nemomobile/libconnman-qt.git
-Source0: %{name}-%{version}.tar.bz2
-Requires: connman >= 1.24+git8
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-BuildRequires: pkgconfig(Qt5Core)
-BuildRequires: pkgconfig(Qt5Network)
-BuildRequires: pkgconfig(Qt5Qml)
-BuildRequires: pkgconfig(Qt5DBus)
-BuildRequires: pkgconfig(dbus-1)
-
-%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
-%{!?qtc_make:%define qtc_make make}
-
-
-%description
-This is a library for working with connman using Qt
-
-
-%package declarative
-Summary: Declarative plugin for Qt Quick for connman-qt
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: connman-qt5
-
-%description declarative
-This package contains the files necessary to develop
-applications using libconnman-qt
-
-
-%package devel
-Summary: Development files for connman-qt
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-This package contains the files necessary to develop
-applications using libconnman-qt
-
-
-%prep
-%setup -q -n %{name}-%{version}
-
-%build
-%qtc_qmake5 -r VERSION=%{version}
-%qtc_make %{?_smp_mflags}
-
-%install
-rm -rf %{buildroot}
-%qmake5_install
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-%files
-%defattr(-,root,root,-)
-%{_libdir}/libconnman-qt5.so.*
-
-%files declarative
-%defattr(-,root,root,-)
-%{_usr}/lib/qt5/qml/MeeGo/Connman
-
-%files devel
-%defattr(-,root,root,-)
-%{_usr}/include/connman-qt5
-%{_usr}/lib/pkgconfig/connman-qt5.pc
-%{_usr}/lib/libconnman-qt5.prl
-%{_usr}/lib/libconnman-qt5.so
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/tests/ut_agent.pro
^
|
@@ -1 +0,0 @@
-include(testapplication.pri)
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/tests/ut_clock.pro
^
|
@@ -1 +0,0 @@
-include(testapplication.pri)
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/tests/ut_manager.pro
^
|
@@ -1 +0,0 @@
-include(testapplication.pri)
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/tests/ut_service.pro
^
|
@@ -1 +0,0 @@
-include(testapplication.pri)
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-logger-ofono-1.0.8.tar.bz2/ofono/src/libconnman-qt/tests/ut_session.pro
^
|
@@ -1 +0,0 @@
-include(testapplication.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/.gitmodules
^
|
@@ -11,5 +11,5 @@
path = ofono/src/libqofonoext
url = https://git.merproject.org/mer-core/libqofonoext.git
[submodule "libconnman-qt"]
- path = ofono/src/libconnman-qt
+ path = libconnman-qt
url = https://git.merproject.org/mer-core/libconnman-qt.git
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/harbour-lib.pro
^
|
@@ -40,14 +40,7 @@
$$PUBLIC_HEADERS
OTHER_FILES += \
- rpm/harbour-lib-devel.spec \
- src/org.nemo.transferengine.xml
-
-# D-Bus interfaces
-DBUS_INTERFACES += transferengine
-transferengine.files = src/org.nemo.transferengine.xml
-transferengine.header_flags = -N -c OrgNemoTransferEngine -i HarbourTransferMethodInfo.h
-transferengine.source_flags = -N -c OrgNemoTransferEngine
+ rpm/harbour-lib-devel.spec
headers.path = $$INSTALL_ROOT$$PREFIX/include/$$TARGET
headers.files = $$PUBLIC_HEADERS
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/include/HarbourDebug.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Jolla Ltd.
+ * Copyright (C) 2015-2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * * Neither the name of Nemo Mobile nor the names of its contributors
+ * * Neither the name of Jolla Ltd nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
@@ -38,8 +38,22 @@
# define HARBOUR_DEBUG 0
#endif // HARBOUR_DEBUG
+#ifndef HARBOUR_VERBOSE
+# define HARBOUR_VERBOSE 0
+#endif // HARBOUR_VERBOSE
+
#include <QDebug>
+#if HARBOUR_VERBOSE
+#if QT_VERSION >= 0x050000
+# define HVERBOSE(x) qDebug() << x
+#else
+# define HVERBOSE(x) qDebug() << Q_FUNC_INFO << x
+#endif
+#else
+# define HVERBOSE(expr) ((void)0)
+#endif // HARBOUR_VERBOSE
+
#if HARBOUR_DEBUG
#if QT_VERSION >= 0x050000
# define HDEBUG(x) qDebug() << x
@@ -60,6 +74,4 @@
# define HWARN(x) qWarning() << Q_FUNC_INFO << x
#endif
-#define HVERBOSE(expr) ((void)0)
-
#endif // HARBOUR_DEBUG_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/include/HarbourSystemState.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Jolla Ltd.
+ * Copyright (C) 2015-2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
@@ -8,13 +8,13 @@
* modification, are permitted provided that the following conditions
* are met:
*
- * * Redistributions of source code must retain the above copyright
+ * - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
+ * - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * * Neither the name of Nemo Mobile nor the names of its contributors
+ * - Neither the name of Jolla Ltd nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
@@ -36,8 +36,7 @@
#include <QObject>
#include <QString>
-
-class QDBusPendingCallWatcher;
+#include <QSharedPointer>
class HarbourSystemState: public QObject
{
@@ -62,25 +61,18 @@
explicit HarbourSystemState(QObject* aParent = NULL);
~HarbourSystemState();
- QString displayStatus() const { return iDisplayStatus; }
- QString lockMode() const { return iLockMode; }
+ static QSharedPointer<HarbourSystemState> sharedInstance();
-private:
- void setupProperty(QString aQueryMethod, QString aSignal,
- const char* aQuerySlot, const char* aSignalSlot);
- void setDisplayStatus(QString aStatus);
- void setLockMode(QString aStatus);
+ QString displayStatus() const;
+ QString lockMode() const;
+
+ bool displayOff() const;
+ bool locked() const;
Q_SIGNALS:
void displayStatusChanged();
void lockModeChanged();
-private Q_SLOTS:
- void onDisplayStatusChanged(QString);
- void onDisplayStatusQueryDone(QDBusPendingCallWatcher*);
- void onLockModeChanged(QString);
- void onLockModeQueryDone(QDBusPendingCallWatcher*);
-
private:
// Getters for QML constants
QString _MCE_DISPLAY_ON() const { return MCE_DISPLAY_ON; }
@@ -90,8 +82,8 @@
QString _MCE_TK_UNLOCKED() const { return MCE_TK_UNLOCKED; }
private:
- QString iDisplayStatus;
- QString iLockMode;
+ class Private;
+ Private* iPrivate;
};
#endif // HARBOUR_SYSTEM_STATE_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/include/HarbourTransferMethodInfo.h
^
|
@@ -66,5 +66,6 @@
const QDBusArgument& operator>>(const QDBusArgument& aArg, HarbourTransferMethodInfo& aInfo);
Q_DECLARE_METATYPE(HarbourTransferMethodInfo)
+Q_DECLARE_METATYPE(QList<HarbourTransferMethodInfo>)
#endif // HARBOUR_TRANSFER_METHOD_INFO_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/include/HarbourTransferMethodsModel.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Jolla Ltd.
+ * Copyright (C) 2016-2017 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
@@ -38,7 +38,6 @@
#include <QRegExp>
class QTranslator;
-class OrgNemoTransferEngine;
class HarbourTransferMethodsModel: public QAbstractListModel
{
@@ -84,7 +83,8 @@
void filterChanged();
private:
- OrgNemoTransferEngine* iTransferEngine;
+ class TransferEngine;
+ TransferEngine* iTransferEngine;
QString iFilter;
QList<HarbourTransferMethodInfo> iMethodList;
QList<int> iFilteredList;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/src/HarbourLib.cpp
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Jolla Ltd.
+ * Copyright (C) 2015-2017 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * * Neither the name of Nemo Mobile nor the names of its contributors
+ * * Neither the name of Jolla Ltd nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
@@ -34,6 +34,7 @@
#include "HarbourLib.h"
#include "HarbourDebug.h"
#include "HarbourSystemState.h"
+#include "HarbourTransferMethodsModel.h"
#if QT_VERSION >= 0x050000
# include <QtQml>
@@ -42,6 +43,7 @@
#endif
QML_DECLARE_TYPE(HarbourSystemState)
+QML_DECLARE_TYPE(HarbourTransferMethodsModel)
void
HarbourLib::registerTypes(
@@ -51,4 +53,5 @@
{
HDEBUG(aUri << aMinor << aMajor);
qmlRegisterType<HarbourSystemState>(aUri, aMajor, aMinor, "SystemState");
+ qmlRegisterType<HarbourTransferMethodsModel>(aUri, aMajor, aMinor, "TransferMethodsModel");
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/src/HarbourSystemState.cpp
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Jolla Ltd.
+ * Copyright (C) 2015-2016 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of the BSD license as follows:
@@ -8,13 +8,13 @@
* modification, are permitted provided that the following conditions
* are met:
*
- * * Redistributions of source code must retain the above copyright
+ * - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
+ * - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * * Neither the name of Nemo Mobile nor the names of its contributors
+ * - Neither the name of Jolla Ltd nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
@@ -48,9 +48,40 @@
const QString HarbourSystemState::MCE_TK_LOCKED("locked");
const QString HarbourSystemState::MCE_TK_UNLOCKED("unlocked");
-HarbourSystemState::HarbourSystemState(
- QObject* aParent) :
- QObject(aParent)
+// ==========================================================================
+// HarbourSystemState::Private
+// ==========================================================================
+class HarbourSystemState::Private : public QObject
+{
+ Q_OBJECT
+
+public:
+ static QWeakPointer<HarbourSystemState> sSharedInstance;
+ HarbourSystemState* iParent;
+ QString iDisplayStatus;
+ QString iLockMode;
+
+ Private(HarbourSystemState* aParent);
+
+private:
+ void setupProperty(QString aQueryMethod, QString aSignal,
+ const char* aQuerySlot, const char* aSignalSlot);
+ void setDisplayStatus(QString aStatus);
+ void setLockMode(QString aStatus);
+
+public Q_SLOTS:
+ void onDisplayStatusChanged(QString);
+ void onDisplayStatusQueryDone(QDBusPendingCallWatcher*);
+ void onLockModeChanged(QString);
+ void onLockModeQueryDone(QDBusPendingCallWatcher*);
+};
+
+QWeakPointer<HarbourSystemState> HarbourSystemState::Private::sSharedInstance;
+
+HarbourSystemState::Private::Private(
+ HarbourSystemState* aParent) :
+ QObject(aParent),
+ iParent(aParent)
{
HDEBUG("created");
setupProperty("get_display_status", "display_status_ind",
@@ -61,13 +92,8 @@
SLOT(onLockModeChanged(QString)));
}
-HarbourSystemState::~HarbourSystemState()
-{
- HDEBUG("destroyed");
-}
-
void
-HarbourSystemState::setupProperty(
+HarbourSystemState::Private::setupProperty(
QString aQueryMethod,
QString aSignal,
const char* aQuerySlot,
@@ -83,17 +109,17 @@
}
void
-HarbourSystemState::setDisplayStatus(
+HarbourSystemState::Private::setDisplayStatus(
QString aStatus)
{
if (iDisplayStatus != aStatus) {
iDisplayStatus = aStatus;
- emit displayStatusChanged();
+ Q_EMIT iParent->displayStatusChanged();
}
}
void
-HarbourSystemState::onDisplayStatusChanged(
+HarbourSystemState::Private::onDisplayStatusChanged(
QString aStatus)
{
HDEBUG(aStatus);
@@ -101,7 +127,7 @@
}
void
-HarbourSystemState::onDisplayStatusQueryDone(
+HarbourSystemState::Private::onDisplayStatusQueryDone(
QDBusPendingCallWatcher* aWatcher)
{
QDBusPendingReply<QString> reply(*aWatcher);
@@ -113,17 +139,17 @@
}
void
-HarbourSystemState::setLockMode(
+HarbourSystemState::Private::setLockMode(
QString aMode)
{
if (iLockMode != aMode) {
iLockMode = aMode;
- emit lockModeChanged();
+ Q_EMIT iParent->lockModeChanged();
}
}
void
-HarbourSystemState::onLockModeChanged(
+HarbourSystemState::Private::onLockModeChanged(
QString aMode)
{
HDEBUG(aMode);
@@ -131,7 +157,7 @@
}
void
-HarbourSystemState::onLockModeQueryDone(
+HarbourSystemState::Private::onLockModeQueryDone(
QDBusPendingCallWatcher* aWatcher)
{
QDBusPendingReply<QString> reply(*aWatcher);
@@ -141,3 +167,60 @@
}
aWatcher->deleteLater();
}
+
+// ==========================================================================
+// HarbourSystemState
+// ==========================================================================
+
+HarbourSystemState::HarbourSystemState(
+ QObject* aParent) :
+ QObject(aParent),
+ iPrivate(new Private(this))
+{
+ HDEBUG("created");
+}
+
+HarbourSystemState::~HarbourSystemState()
+{
+ HDEBUG("destroyed");
+}
+
+QSharedPointer<HarbourSystemState>
+HarbourSystemState::sharedInstance()
+{
+ QSharedPointer<HarbourSystemState> instance = Private::sSharedInstance;
+ if (instance.isNull()) {
+ // QObject::deleteLater protects against trouble in case if the
+ // recipient of the signal drops the last shared reference.
+ instance = QSharedPointer<HarbourSystemState>(new HarbourSystemState,
+ &QObject::deleteLater);
+ Private::sSharedInstance = instance;
+ }
+ return instance;
+}
+
+QString
+HarbourSystemState::displayStatus() const
+{
+ return iPrivate->iDisplayStatus;
+}
+
+QString
+HarbourSystemState::lockMode() const
+{
+ return iPrivate->iLockMode;
+}
+
+bool
+HarbourSystemState::displayOff() const
+{
+ return iPrivate->iDisplayStatus == MCE_DISPLAY_OFF;
+}
+
+bool
+HarbourSystemState::locked() const
+{
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/harbour-lib/src/HarbourTransferMethodsModel.cpp
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Jolla Ltd.
+ * Copyright (C) 2016-2017 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
@@ -33,15 +33,44 @@
#include "HarbourTransferMethodsModel.h"
#include "HarbourDebug.h"
-#include "transferengine_interface.h"
-
#include <QTranslator>
+// ==========================================================================
+// HarbourTransferMethodsModel::TransferEngine
+// ==========================================================================
+
+class HarbourTransferMethodsModel::TransferEngine: public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+ static const char SERVICE[];
+ static const char PATH[];
+ static const char INTERFACE[];
+
+public:
+ TransferEngine(QObject* aParent) : QDBusAbstractInterface(SERVICE, PATH,
+ INTERFACE, QDBusConnection::sessionBus(), aParent) {}
+
+public: // METHODS
+ inline QDBusPendingCall transferMethods()
+ { return asyncCall("transferMethods"); }
+
+Q_SIGNALS: // SIGNALS
+ void transferMethodListChanged();
+};
+
+const char HarbourTransferMethodsModel::TransferEngine::SERVICE[] = "org.nemo.transferengine";
+const char HarbourTransferMethodsModel::TransferEngine::PATH[] = "/org/nemo/transferengine";
+const char HarbourTransferMethodsModel::TransferEngine::INTERFACE[] = "org.nemo.transferengine";
+
+// ==========================================================================
+// HarbourTransferMethodsModel
+// ==========================================================================
+
HarbourTransferMethodsModel::HarbourTransferMethodsModel(QObject* aParent):
QAbstractListModel(aParent)
{
- iTransferEngine = new OrgNemoTransferEngine("org.nemo.transferengine",
- "/org/nemo/transferengine", QDBusConnection::sessionBus(), this);
+ iTransferEngine = new TransferEngine(this);
connect(iTransferEngine,
SIGNAL(transferMethodListChanged()),
SLOT(requestUpdate()));
@@ -184,3 +213,5 @@
}
endResetModel();
}
+
+#include "HarbourTransferMethodsModel.moc"
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt
^
|
+(directory)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/.dir-locals.el
^
|
(renamed from ofono/src/libconnman-qt/.dir-locals.el)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/.gitignore
^
|
@@ -0,0 +1,19 @@
+# temp files
+*.swp
+\#*#
+
+# binaries
+*.o
+moc_*.cpp
+*.moc
+*.so*
+testconnman-qt
+
+# make files and pkgconfig
+Makefile*
+*.pc
+*.prl
+
+libconnman-qt/connman_*_interface.*
+connman-qt.pro.user
+build
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/README.rst
^
|
(renamed from ofono/src/libconnman-qt/README.rst)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/connman-qt.pro
^
|
@@ -0,0 +1,16 @@
+TEMPLATE = subdirs
+SUBDIRS += libconnman-qt
+
+# Adds 'coverage' target
+include(coverage.pri)
+# CONFIG flag to disable qml plugin
+!noplugin {
+ SUBDIRS += plugin
+ libconnman-qt.target = lib-target
+ plugin.depends = lib-target
+}
+example {
+ SUBDIRS += examples/counters
+}
+
+OTHER_FILES += rpm/connman-qt5.spec
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/coverage.pri
^
|
(renamed from ofono/src/libconnman-qt/coverage.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/examples/counters/counters.pro
^
|
(renamed from ofono/src/libconnman-qt/examples/counters/counters.pro)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/examples/counters/main.cpp
^
|
(renamed from ofono/src/libconnman-qt/examples/counters/main.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/examples/counters/networkcounter.cpp
^
|
(renamed from ofono/src/libconnman-qt/examples/counters/networkcounter.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/examples/counters/networkcounter.h
^
|
(renamed from ofono/src/libconnman-qt/examples/counters/networkcounter.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/clockmodel.cpp
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/clockmodel.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/clockmodel.h
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/clockmodel.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/commondbustypes.cpp
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/commondbustypes.cpp)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/commondbustypes.h
^
|
@@ -0,0 +1,42 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#ifndef COMMONDBUSTYPES_H
+#define COMMONDBUSTYPES_H
+
+#include <QtCore/QMap>
+#include <QtCore/QList>
+#include <QtCore/QString>
+#include <QtCore/QMetaType>
+#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusObjectPath>
+
+typedef QMap<QString, QString> StringMap;
+Q_DECLARE_METATYPE ( StringMap )
+
+// TODO: re-implement with better interface i.e. "const QString path() const" instead of objpath
+struct ConnmanObject {
+ QDBusObjectPath objpath;
+ QVariantMap properties;
+};
+Q_DECLARE_METATYPE ( ConnmanObject )
+QDBusArgument &operator<<(QDBusArgument &argument, const ConnmanObject &obj);
+const QDBusArgument &operator>>(const QDBusArgument &argument, ConnmanObject &obj);
+
+typedef QList<ConnmanObject> ConnmanObjectList;
+Q_DECLARE_METATYPE ( ConnmanObjectList )
+
+inline void registerCommonDataTypes() {
+ qDBusRegisterMetaType<StringMap>();
+ qDBusRegisterMetaType<ConnmanObject>();
+ qDBusRegisterMetaType<ConnmanObjectList>();
+ qRegisterMetaType<ConnmanObjectList>("ConnmanObjectList");
+}
+
+#endif //COMMONDBUSTYPES_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/connman_clock.xml
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/connman_clock.xml)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/connman_notification.xml
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/connman_notification.xml)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/connman_session.xml
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/connman_session.xml)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/connman_technology.xml
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/connman_technology.xml)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/connmannetworkproxyfactory.cpp
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/connmannetworkproxyfactory.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/connmannetworkproxyfactory.h
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/connmannetworkproxyfactory.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/counter.cpp
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/counter.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/counter.h
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/counter.h)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/libconnman-qt.pro
^
|
@@ -0,0 +1,88 @@
+TEMPLATE = lib
+QT += core dbus network
+QT -= gui
+CONFIG += qt create_pc create_prl link_pkgconfig
+
+isEmpty(VERSION) {
+ VERSION = 1.1.10
+ message("VERSION is unset, assuming $$VERSION")
+}
+
+isEmpty(HAVE_LIBDBUSACCESS) {
+ packagesExist(libdbusaccess) {
+ HAVE_LIBDBUSACCESS = 1
+ } else {
+ HAVE_LIBDBUSACCESS = 0
+ }
+}
+
+equals(HAVE_LIBDBUSACCESS, 1) {
+ PKGCONFIG += libdbusaccess libglibutil
+ DEFINES += HAVE_LIBDBUSACCESS=1
+} else {
+ DEFINES += HAVE_LIBDBUSACCESS=0
+}
+
+isEmpty(PREFIX) {
+ PREFIX=/usr
+}
+
+isEmpty(TARGET_SUFFIX) {
+ TARGET_SUFFIX = qt$$QT_MAJOR_VERSION
+}
+
+CONFIG(debug, debug|release) {
+ DEFINES += CONNMAN_DEBUG=1
+}
+
+TARGET = $$qtLibraryTarget(connman-$$TARGET_SUFFIX)
+headers.path = $$INSTALL_ROOT$$PREFIX/include/connman-$$TARGET_SUFFIX
+
+DBUS_INTERFACES = \
+ connman_clock.xml \
+ connman_session.xml \
+ connman_technology.xml \
+
+PUBLIC_HEADERS += \
+ networkmanager.h \
+ networktechnology.h \
+ networkservice.h \
+ commondbustypes.h \
+ connmannetworkproxyfactory.h \
+ clockmodel.h \
+ useragent.h \
+ sessionagent.h \
+ networksession.h \
+ counter.h
+
+HEADERS += \
+ $$PUBLIC_HEADERS \
+ libconnman_p.h \
+
+SOURCES += \
+ networkmanager.cpp \
+ networktechnology.cpp \
+ networkservice.cpp \
+ clockmodel.cpp \
+ commondbustypes.cpp \
+ connmannetworkproxyfactory.cpp \
+ useragent.cpp \
+ sessionagent.cpp \
+ networksession.cpp \
+ counter.cpp
+
+target.path = $$INSTALL_ROOT$$PREFIX/lib
+
+headers.files = $$PUBLIC_HEADERS
+
+QMAKE_PKGCONFIG_DESCRIPTION = Qt Connman Library
+QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+QMAKE_PKGCONFIG_INCDIR = $$headers.path
+
+INSTALLS += target headers
+
+OTHER_FILES = connman_service.xml \
+ connman_technology.xml \
+ connman_clock.xml \
+ connman_session.xml \
+ connman_notification.xml
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/libconnman_p.h
^
|
@@ -0,0 +1,37 @@
+/*
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#ifndef LIBCONNMAN_PRIVATE_H
+#define LIBCONNMAN_PRIVATE_H
+
+#include "commondbustypes.h"
+
+#define CONNMAN_BUS QDBusConnection::systemBus()
+#define CONNMAN_SERVICE QLatin1String("net.connman")
+
+#ifndef CONNMAN_DEBUG
+# define CONNMAN_DEBUG 0
+#endif // CONNMAN_DEBUG
+
+#include <QDebug>
+
+#if CONNMAN_DEBUG
+# define DBG_(x) qDebug() << x
+# define ASSERT_(x) ((x) ? ((void)0) : qt_assert(#x,__FILE__,__LINE__))
+# define VERIFY_(x) ASSERT(x)
+#else
+# define DBG_(expr) ((void)0)
+# define ASSERT_(expr) ((void)0)
+# define VERIFY_(x) (x)
+#endif // CONNMAN_DEBUG
+
+#define WARN_(x) qWarning() << x
+#define VERBOSE_(expr) ((void)0)
+
+#endif // LIBCONNMAN_PRIVATE_H
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networkmanager.cpp
^
|
@@ -0,0 +1,897 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#include "networkmanager.h"
+
+#include "libconnman_p.h"
+#include <QRegExp>
+
+// ==========================================================================
+// NetworkManagerFactory
+// ==========================================================================
+
+static NetworkManager* staticInstance = NULL;
+
+NetworkManager* NetworkManagerFactory::createInstance()
+{
+ if (!staticInstance)
+ staticInstance = new NetworkManager;
+
+ return staticInstance;
+}
+
+NetworkManager* NetworkManagerFactory::instance()
+{
+ return createInstance();
+}
+
+// ==========================================================================
+// NetworkManager::Private
+// ==========================================================================
+
+class NetworkManager::Private : QObject
+{
+ Q_OBJECT
+
+public:
+ static const QString Ethernet;
+ static const QString WifiTechnology;
+ static const QString CellularTechnology;
+ static const QString BluetoothTechnology;
+ static const QString GpsTechnology;
+
+ static bool selectAll(NetworkService *service);
+ static bool selectSaved(NetworkService *service);
+ static bool selectAvailable(NetworkService *service);
+
+ bool m_registered;
+
+public:
+ Private(NetworkManager *parent) :
+ QObject(parent), m_registered(false) {}
+ NetworkManager* manager()
+ { return (NetworkManager*)parent(); }
+ void maybeCreateInterfaceProxyLater()
+ { QMetaObject::invokeMethod(this, "maybeCreateInterfaceProxy"); }
+
+public Q_SLOTS:
+ void maybeCreateInterfaceProxy();
+};
+
+const QString NetworkManager::Private::Ethernet("ethernet");
+const QString NetworkManager::Private::WifiTechnology("/net/connman/technology/wifi");
+const QString NetworkManager::Private::CellularTechnology("/net/connman/technology/cellular");
+const QString NetworkManager::Private::BluetoothTechnology("/net/connman/technology/bluetooth");
+const QString NetworkManager::Private::GpsTechnology("/net/connman/technology/gps");
+
+bool NetworkManager::Private::selectAll(NetworkService *service)
+{
+ return service != NULL;
+}
+
+bool NetworkManager::Private::selectSaved(NetworkService *service)
+{
+ return service && service->saved();
+}
+
+bool NetworkManager::Private::selectAvailable(NetworkService *service)
+{
+ return service && service->available();
+}
+
+void NetworkManager::Private::maybeCreateInterfaceProxy()
+{
+ // Theoretically, connman may have become unregistered while this call
+ // was sitting in the queue. We need to re-check the m_registered flag.
+ if (m_registered) {
+ NetworkManager* mgr = manager();
+ if (!mgr->m_available) {
+ mgr->setConnmanAvailable(true);
+ }
+ }
+}
+
+// ==========================================================================
+// NetworkManager::InterfaceProxy
+//
+// qdbusxml2cpp doesn't really do much, it's easier to write these proxies
+// by hand. Basically, this is what we have here:
+//
+// <interface name="net.connman.Manager">
+// <method name="GetProperties">
+// <arg name="properties" type="a{sv}" direction="out"/>
+// </method>
+// <method name="SetProperty">
+// <arg name="name" type="s"/>
+// <arg name="value" type="v"/>
+// </method>
+// <method name="GetTechnologies">
+// <arg name="technologies" type="a(oa{sv})" direction="out"/>
+// </method>
+// <method name="GetServices">
+// <arg name="services" type="a(oa{sv})" direction="out"/>
+// </method>
+// <method name="RegisterAgent">
+// <arg name="path" type="o"/>
+// </method>
+// <method name="UnregisterAgent">
+// <arg name="path" type="o"/>
+// </method>
+// <method name="RegisterCounter">
+// <arg name="path" type="o"/>
+// <arg name="accuracy" type="u"/>
+// <arg name="period" type="u"/>
+// </method>
+// <method name="UnregisterCounter">
+// <arg name="path" type="o"/>
+// </method>
+// <method name="ResetCounters">
+// <arg name="type" type="s"/>
+// </method>
+// <method name="CreateSession">
+// <arg name="settings" type="a{sv}"/>
+// <arg name="notifier" type="o"/>
+// <arg name="session" type="o" direction="out"/>
+// </method>
+// <method name="DestroySession">
+// <arg name="session" type="o"/>
+// </method>
+// <signal name="TechnologyAdded">
+// <arg name="technology" type="o"/>
+// <arg name="properties" type="a{sv}"/>
+// </signal>
+// <signal name="TechnologyRemoved">
+// <arg name="technology" type="o"/>
+// </signal>
+// <signal name="ServicesChanged">
+// <arg name="changed" type="a(oa{sv})"/>
+// <arg name="removed" type="ao"/>
+// </signal>
+// <signal name="PropertyChanged">
+// <arg name="name" type="s"/>
+// <arg name="value" type="v"/>
+// </signal>
+// </interface>
+//
+// ==========================================================================
+
+class NetworkManager::InterfaceProxy: public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+ InterfaceProxy(NetworkManager *parent) :
+ QDBusAbstractInterface(CONNMAN_SERVICE, "/", "net.connman.Manager",
+ CONNMAN_BUS, parent) {}
+
+public:
+ QDBusPendingCall GetProperties()
+ { return asyncCall("GetProperties"); }
+ QDBusPendingCall SetProperty(QString name, QVariant value)
+ { return asyncCall("SetProperty", name, qVariantFromValue(QDBusVariant(value))); }
+ QDBusPendingCall GetTechnologies()
+ { return asyncCall("GetTechnologies"); }
+ QDBusPendingCall GetServices()
+ { return asyncCall("GetServices"); }
+ QDBusPendingCall RegisterAgent(const QString &path)
+ { return asyncCall("RegisterAgent", qVariantFromValue(QDBusObjectPath(path))); }
+ QDBusPendingCall UnregisterAgent(const QString &path)
+ { return asyncCall("UnregisterAgent", qVariantFromValue(QDBusObjectPath(path))); }
+ QDBusPendingCall RegisterCounter(const QString &path, uint accuracy, uint period)
+ { return asyncCall("RegisterCounter", qVariantFromValue(QDBusObjectPath(path)), accuracy, period); }
+ QDBusPendingCall ResetCounters(const QString &type)
+ { return asyncCall("ResetCounters", type); }
+ QDBusPendingCall UnregisterCounter(const QString &path)
+ { return asyncCall("UnregisterCounter", qVariantFromValue(QDBusObjectPath(path))); }
+ QDBusPendingReply<QDBusObjectPath> CreateSession(const QVariantMap &settings, const QString &path)
+ { return asyncCall("CreateSession", settings, qVariantFromValue(QDBusObjectPath(path))); }
+ QDBusPendingCall DestroySession(const QString &path)
+ { return asyncCall("DestroySession", qVariantFromValue(QDBusObjectPath(path))); }
+
+Q_SIGNALS:
+ void PropertyChanged(const QString &name, const QDBusVariant &value);
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networkmanager.h
^
|
@@ -0,0 +1,180 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#ifndef NETWORKMANAGER_H
+#define NETWORKMANAGER_H
+
+#include "commondbustypes.h"
+
+#include "networktechnology.h"
+#include "networkservice.h"
+#include <QtDBus>
+
+class NetConnmanManagerInterface;
+class NetworkManager;
+
+class NetworkManagerFactory : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(NetworkManager* instance READ instance CONSTANT)
+
+public:
+ static NetworkManager* createInstance();
+ NetworkManager* instance();
+};
+
+class NetworkManager : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(bool available READ isAvailable NOTIFY availabilityChanged)
+ Q_PROPERTY(QString state READ state NOTIFY stateChanged)
+ Q_PROPERTY(bool offlineMode READ offlineMode WRITE setOfflineMode NOTIFY offlineModeChanged)
+ Q_PROPERTY(NetworkService* defaultRoute READ defaultRoute NOTIFY defaultRouteChanged)
+
+ Q_PROPERTY(bool sessionMode READ sessionMode WRITE setSessionMode NOTIFY sessionModeChanged)
+
+ Q_PROPERTY(bool servicesEnabled READ servicesEnabled WRITE setServicesEnabled NOTIFY servicesEnabledChanged)
+ Q_PROPERTY(bool technologiesEnabled READ technologiesEnabled WRITE setTechnologiesEnabled NOTIFY technologiesEnabledChanged)
+
+ Q_PROPERTY(QString WifiTechnology READ wifiTechnologyPath CONSTANT)
+ Q_PROPERTY(QString CellularTechnology READ cellularTechnologyPath CONSTANT)
+ Q_PROPERTY(QString BluetoothTechnology READ bluetoothTechnologyPath CONSTANT)
+ Q_PROPERTY(QString GpsTechnology READ gpsTechnologyPath CONSTANT)
+
+public:
+ NetworkManager(QObject* parent=0);
+ virtual ~NetworkManager();
+
+ bool isAvailable() const;
+
+ Q_INVOKABLE NetworkTechnology* getTechnology(const QString &type) const;
+ const QVector<NetworkTechnology *> getTechnologies() const;
+ const QVector<NetworkService*> getServices(const QString &tech = QString()) const;
+ const QVector<NetworkService*> getSavedServices(const QString &tech = QString()) const;
+ const QVector<NetworkService*> getAvailableServices(const QString &tech = QString()) const;
+ void removeSavedService(const QString &identifier) const;
+
+ Q_INVOKABLE QStringList servicesList(const QString &tech);
+ Q_INVOKABLE QStringList savedServicesList(const QString &tech = QString());
+ Q_INVOKABLE QStringList availableServices(const QString &tech = QString());
+ Q_INVOKABLE QStringList technologiesList();
+ Q_INVOKABLE QString technologyPathForService(const QString &path);
+ Q_INVOKABLE QString technologyPathForType(const QString &type);
+
+ const QString state() const;
+ bool offlineMode() const;
+ NetworkService* defaultRoute() const;
+
+ bool sessionMode() const;
+
+ bool servicesEnabled() const;
+ void setServicesEnabled(bool enabled);
+
+ bool technologiesEnabled() const;
+ void setTechnologiesEnabled(bool enabled);
+
+ Q_INVOKABLE void resetCountersForType(const QString &type);
+
+ QString wifiTechnologyPath() const;
+ QString cellularTechnologyPath() const;
+ QString bluetoothTechnologyPath() const;
+ QString gpsTechnologyPath() const;
+
+public Q_SLOTS:
+ void setOfflineMode(const bool &offlineMode);
+ void registerAgent(const QString &path);
+ void unregisterAgent(const QString &path);
+ void registerCounter(const QString &path, quint32 accuracy,quint32 period);
+ void unregisterCounter(const QString &path);
+ QDBusObjectPath createSession(const QVariantMap &settings, const QString &sessionNotifierPath);
+ void destroySession(const QString &sessionAgentPath);
+ void setSessionMode(const bool &sessionMode);
+
+Q_SIGNALS:
+ void availabilityChanged(bool available);
+
+ void stateChanged(const QString &state);
+ void offlineModeChanged(bool offlineMode);
+ void technologiesChanged();
+ void servicesChanged();
+ void savedServicesChanged();
+ void defaultRouteChanged(NetworkService* defaultRoute);
+ void sessionModeChanged(bool);
+ void servicesListChanged(const QStringList &list);
+ void serviceAdded(const QString &servicePath);
+ void serviceRemoved(const QString &servicePath);
+
+ void servicesEnabledChanged();
+ void technologiesEnabledChanged();
+
+private:
+ class Private;
+ class InterfaceProxy;
+ friend class Private;
+ typedef bool (*ServiceSelector)(NetworkService*);
+ void propertyChanged(const QString &name, const QVariant &value);
+ void setConnmanAvailable(bool available);
+ bool connectToConnman();
+ void disconnectFromConnman();
+ const QVector<NetworkService*> selectServices(const QString &tech, ServiceSelector selector) const;
+ QStringList selectServiceList(const QString &tech, ServiceSelector selector) const;
+
+ InterfaceProxy *m_proxy;
+
+ /* Contains all property related to this net.connman.Manager object */
+ QVariantMap m_propertiesCache;
+
+ /* Not just for cache, but actual containers of Network* type objects */
+ QHash<QString, NetworkTechnology *> m_technologiesCache;
+ QHash<QString, NetworkService *> m_servicesCache;
+
+ /* Define the order of services returned in service lists */
+ QStringList m_servicesOrder;
+ QStringList m_savedServicesOrder;
+
+ /* This variable is used just to send signal if changed */
+ NetworkService* m_defaultRoute;
+
+ /* Invalid default route service for use when there is no default route */
+ NetworkService *m_invalidDefaultRoute;
+
+ Private *m_priv;
+
+ static const QString State;
+ static const QString OfflineMode;
+ static const QString SessionMode;
+
+ bool m_available;
+ bool m_servicesEnabled;
+ bool m_technologiesEnabled;
+
+private Q_SLOTS:
+ void onConnmanRegistered();
+ void onConnmanUnregistered();
+ void disconnectTechnologies();
+ void setupTechnologies();
+ void disconnectServices();
+ void setupServices();
+ void propertyChanged(const QString &name, const QDBusVariant &value);
+ void updateServices(const ConnmanObjectList &changed, const QList<QDBusObjectPath> &removed);
+ void technologyAdded(const QDBusObjectPath &technology, const QVariantMap &properties);
+ void technologyRemoved(const QDBusObjectPath &technology);
+ void getPropertiesFinished(QDBusPendingCallWatcher *watcher);
+ void updateDefaultRoute();
+ void getTechnologiesFinished(QDBusPendingCallWatcher *watcher);
+ void getServicesFinished(QDBusPendingCallWatcher *watcher);
+
+private:
+ Q_DISABLE_COPY(NetworkManager)
+};
+
+#endif //NETWORKMANAGER_H
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networkservice.cpp
^
|
@@ -0,0 +1,1251 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#include <QSettings>
+
+#include "networkservice.h"
+#include "libconnman_p.h"
+
+class NetworkService::Private: public QObject
+{
+ Q_OBJECT
+
+public:
+ class InterfaceProxy;
+ class GetPropertyWatcher;
+ typedef QHash<QString,EapMethod> EapMethodMap;
+ typedef QSharedPointer<EapMethodMap> EapMethodMapRef;
+
+ static const int NUM_EAP_METHODS = 4; // None, PEAP, TTLS, TLS
+ static const QString EapMethodName[NUM_EAP_METHODS];
+
+ static const int NUM_SECURITY_TYPES = 5; // Unknown, None, WEP, PSK, IEEE802.1x
+ static const QString SecurityTypeName[NUM_SECURITY_TYPES];
+
+ static const QString Access;
+ static const QString DefaultAccess;
+ static const QString Identity;
+ static const QString Passphrase;
+ static const QString EAP;
+ static const QString Available;
+ static const QString Saved;
+
+ static const QString PolicyPrefix;
+
+ enum PropertyFlags {
+ PropertyNone = 0x00000000,
+ PropertyAccess = 0x00000001,
+ PropertyDefaultAccess = 0x00000002,
+ PropertyPassphrase = 0x00000004,
+ PropertyIdentity = 0x00000008,
+ PropertyEAP = 0x00000010,
+ PropertyAll = 0x0000001f
+ };
+
+ enum CallFlags {
+ CallNone = 0x00000000,
+ CallClearProperty = 0x00000001,
+ CallConnect = 0x00000002,
+ CallDisconnect = 0x00000004,
+ CallRemove = 0x00000008,
+ CallResetCounters = 0x00000010,
+ CallGetProperties = 0x00000020,
+ CallGetProperty = 0x00000040,
+ CallSetProperty = 0x00000080,
+ CallAll = 0x000000ff
+ };
+
+ struct PropertyInfo {
+ const QString &name;
+ PropertyFlags flag;
+ void (NetworkService::*notify)();
+ };
+
+ static const int NUM_PROPERTIES = 5;
+ static const PropertyInfo* Properties[NUM_PROPERTIES];
+ static const PropertyInfo PropAccess;
+ static const PropertyInfo PropDefaultAccess;
+ static const PropertyInfo PropIdentity;
+ static const PropertyInfo PropPassphrase;
+ static const PropertyInfo PropEAP;
+
+ static QVariantMap adaptToConnmanProperties(const QVariantMap& map);
+
+ Private(NetworkService* parent);
+
+ void deleteProxy();
+ InterfaceProxy* createProxy(QString path);
+ NetworkService* service();
+ EapMethodMapRef eapMethodMap();
+ EapMethod eapMethod();
+ bool updateSecurityType();
+ void setEapMethod(EapMethod method);
+ void setProperty(QString name, QVariant value);
+ void setPropertyAvailable(const PropertyInfo* prop, bool available);
+
+#if HAVE_LIBDBUSACCESS
+ void policyCheck(QString rules);
+#endif // HAVE_LIBDBUSACCESS
+
+private:
+ void checkAccess();
+
+private Q_SLOTS:
+ void onRestrictedPropertyChanged(QString name);
+ void onGetPropertyFinished(QDBusPendingCallWatcher* call);
+ void onCheckAccessFinished(QDBusPendingCallWatcher* call);
+
+public:
+ InterfaceProxy* m_proxy;
+ EapMethodMapRef m_eapMethodMapRef;
+ SecurityType m_securityType;
+ uint m_propGetFlags;
+ uint m_propSetFlags;
+ uint m_callFlags;
+};
+
+// ==========================================================================
+// NetworkService::Private::InterfaceProxy
+//
+// qdbusxml2cpp doesn't really do much, it's easier to write these proxies
+// by hand. Basically, this is what we have here:
+//
+// <interface name="net.connman.Service">
+// <method name="GetProperties">
+// <arg name="properties" type="a{sv}" direction="out"/>
+// </method>
+// <method name="GetProperty">
+// <arg name="value" type="v" direction="out"/>
+// </method>
+// <method name="SetProperty">
+// <arg name="name" type="s"/>
+// <arg name="value" type="v" direction="out"/>
+// </method>
+// <method name="ClearProperty">
+// <arg name="name" type="s" />
+// </method>
+// <method name="Connect"/>
+// <method name="Disconnect"/>
+// <method name="Remove"/>
+// <method name="MoveBefore">
+// <arg name="service" type="o"/>
+// </method>
+// <method name="MoveAfter">
+// <arg name="service" type="o"/>
+// </method>
+// <method name="ResetCounters"/>
+// <method name="CheckAccess">
+// <arg name="get_properties" type="u" direction="out"/>
+// <arg name="set_properties" type="u" direction="out"/>
+// <arg name="calls" type="u" direction="out"/>
+// </method>
+// <signal name="PropertyChanged">
+// <arg name="name" type="s"/>
+// <arg name="value" type="v"/>
+// </signal>
+// <signal name="RestrictedPropertyChanged">
+// <arg name="name" type="s"/>
+// </signal>
+// </interface>
+//
+// ==========================================================================
+
+class NetworkService::Private::InterfaceProxy: public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+ InterfaceProxy(QString path, NetworkService::Private* parent) :
+ QDBusAbstractInterface(CONNMAN_SERVICE, path, "net.connman.Service",
+ CONNMAN_BUS, parent) {}
+
+public Q_SLOTS:
+ QDBusPendingCall GetProperties()
+ { return asyncCall("GetProperties"); }
+ QDBusPendingCall GetProperty(QString name)
+ { return asyncCall("GetProperty", name); }
+ QDBusPendingCall SetProperty(QString name, QVariant value)
+ { return asyncCall("SetProperty", name, qVariantFromValue(QDBusVariant(value))); }
+ QDBusPendingCall ClearProperty(QString name)
+ { return asyncCall("ClearProperty", name); }
+ QDBusPendingCall Connect()
+ { return asyncCall("Connect"); }
+ QDBusPendingCall Disconnect()
+ { return asyncCall("Disconnect"); }
+ QDBusPendingCall Remove()
+ { return asyncCall("Remove"); }
+ QDBusPendingCall ResetCounters()
+ { return asyncCall("ResetCounters"); }
+ QDBusPendingCall CheckAccess()
+ { return asyncCall("CheckAccess"); }
+
+Q_SIGNALS:
+ void PropertyChanged(QString name, QDBusVariant value);
+ void RestrictedPropertyChanged(QString name);
+};
+
+// ==========================================================================
+// NetworkService::Private::GetPropertyWatcher
+// ==========================================================================
+
+class NetworkService::Private::GetPropertyWatcher : public QDBusPendingCallWatcher {
+public:
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networkservice.h
^
|
@@ -0,0 +1,266 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#ifndef NETWORKSERVICE_H
+#define NETWORKSERVICE_H
+
+#include <QtDBus>
+
+#define CONNECT_TIMEOUT 300000 // user is supposed to provide input for unconfigured networks
+#define CONNECT_TIMEOUT_FAVORITE 60000
+
+class NetworkService : public QObject
+{
+ Q_OBJECT
+
+ Q_ENUMS(EapMethod)
+ Q_ENUMS(SecurityType)
+
+ Q_PROPERTY(QString name READ name NOTIFY nameChanged)
+ Q_PROPERTY(QString state READ state NOTIFY stateChanged)
+ Q_PROPERTY(QString type READ type NOTIFY typeChanged)
+ Q_PROPERTY(QString error READ error NOTIFY errorChanged)
+ Q_PROPERTY(QStringList security READ security NOTIFY securityChanged)
+ Q_PROPERTY(SecurityType securityType READ securityType NOTIFY securityTypeChanged)
+ Q_PROPERTY(uint strength READ strength NOTIFY strengthChanged)
+ Q_PROPERTY(bool favorite READ favorite NOTIFY favoriteChanged)
+ Q_PROPERTY(bool autoConnect READ autoConnect WRITE setAutoConnect NOTIFY autoConnectChanged)
+ Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged)
+ Q_PROPERTY(QVariantMap ipv4 READ ipv4 NOTIFY ipv4Changed)
+ Q_PROPERTY(QVariantMap ipv4Config READ ipv4Config WRITE setIpv4Config NOTIFY ipv4ConfigChanged)
+ Q_PROPERTY(QVariantMap ipv6 READ ipv6 NOTIFY ipv6Changed)
+ Q_PROPERTY(QVariantMap ipv6Config READ ipv6Config WRITE setIpv6Config NOTIFY ipv6ConfigChanged)
+ Q_PROPERTY(QStringList nameservers READ nameservers NOTIFY nameserversChanged)
+ Q_PROPERTY(QStringList nameserversConfig READ nameserversConfig WRITE setNameserversConfig NOTIFY nameserversConfigChanged)
+ Q_PROPERTY(QStringList domains READ domains NOTIFY domainsChanged)
+ Q_PROPERTY(QStringList domainsConfig READ domainsConfig WRITE setDomainsConfig NOTIFY domainsConfigChanged)
+ Q_PROPERTY(QVariantMap proxy READ proxy NOTIFY proxyChanged)
+ Q_PROPERTY(QVariantMap proxyConfig READ proxyConfig WRITE setProxyConfig NOTIFY proxyConfigChanged)
+ Q_PROPERTY(QVariantMap ethernet READ ethernet NOTIFY ethernetChanged)
+ Q_PROPERTY(bool roaming READ roaming NOTIFY roamingChanged)
+ Q_PROPERTY(bool connected READ connected NOTIFY connectedChanged)
+ Q_PROPERTY(QStringList timeservers READ timeservers NOTIFY timeserversChanged)
+ Q_PROPERTY(QStringList timeserversConfig READ timeserversConfig WRITE setTimeserversConfig NOTIFY timeserversConfigChanged)
+
+ Q_PROPERTY(EapMethod eapMethod READ eapMethod WRITE setEapMethod NOTIFY eapMethodChanged)
+ Q_PROPERTY(QString identity READ identity WRITE setIdentity NOTIFY identityChanged)
+ Q_PROPERTY(QString passphrase READ passphrase WRITE setPassphrase NOTIFY passphraseChanged)
+ Q_PROPERTY(bool eapMethodAvailable READ eapMethodAvailable NOTIFY eapMethodAvailableChanged)
+ Q_PROPERTY(bool identityAvailable READ identityAvailable NOTIFY identityAvailableChanged)
+ Q_PROPERTY(bool passphraseAvailable READ passphraseAvailable NOTIFY passphraseAvailableChanged)
+ Q_PROPERTY(QString bssid READ bssid NOTIFY bssidChanged)
+ Q_PROPERTY(quint32 maxRate READ maxRate NOTIFY maxRateChanged)
+ Q_PROPERTY(quint16 frequency READ frequency NOTIFY frequencyChanged)
+ Q_PROPERTY(QString encryptionMode READ encryptionMode NOTIFY encryptionModeChanged)
+ Q_PROPERTY(bool hidden READ hidden NOTIFY hiddenChanged)
+ Q_PROPERTY(bool available READ available NOTIFY availableChanged)
+ Q_PROPERTY(bool managed READ managed NOTIFY managedChanged)
+ Q_PROPERTY(bool saved READ saved NOTIFY savedChanged)
+
+ class Private;
+ friend class Private;
+
+public:
+ enum SecurityType {
+ SecurityUnknown,
+ SecurityNone,
+ SecurityWEP,
+ SecurityPSK,
+ SecurityIEEE802
+ };
+
+ enum EapMethod {
+ EapNone,
+ EapPEAP,
+ EapTTLS,
+ EapTLS
+ };
+
+ NetworkService(const QString &path, const QVariantMap &properties, QObject* parent);
+ NetworkService(QObject* parent = 0);
+
+ virtual ~NetworkService();
+
+ const QString name() const;
+ const QString type() const;
+ const QString state() const;
+ const QString error() const;
+ const QStringList security() const;
+ SecurityType securityType() const;
+ bool autoConnect() const;
+ uint strength() const;
+ bool favorite() const;
+ const QString path() const;
+ const QVariantMap ipv4() const;
+ const QVariantMap ipv4Config() const;
+ const QVariantMap ipv6() const;
+ const QVariantMap ipv6Config() const;
+ const QStringList nameservers() const;
+ const QStringList nameserversConfig() const;
+ const QStringList domains() const;
+ const QStringList domainsConfig() const;
+ const QVariantMap proxy() const;
+ const QVariantMap proxyConfig() const;
+ const QVariantMap ethernet() const;
+ bool roaming() const;
+
+ void setPath(const QString &path);
+ void updateProperties(const QVariantMap &properties);
+ bool connected();
+ bool connected() const;
+ bool available() const;
+ bool managed() const;
+ bool saved() const;
+
+ QStringList timeservers() const;
+ QStringList timeserversConfig() const;
+ void setTimeserversConfig(const QStringList &servers);
+
+ const QString bssid();
+ quint32 maxRate();
+ quint16 frequency();
+ const QString encryptionMode();
+ bool hidden() const;
+
+ // Canonical variants of the above with const in the right place
+ QString bssid() const;
+ quint32 maxRate() const;
+ quint16 frequency() const;
+ QString encryptionMode() const;
+
+ QString passphrase() const;
+ void setPassphrase(QString passphrase);
+ bool passphraseAvailable() const;
+
+ QString identity() const;
+ void setIdentity(QString identity);
+ bool identityAvailable() const;
+
+ EapMethod eapMethod() const;
+ void setEapMethod(EapMethod method);
+ bool eapMethodAvailable() const;
+
+Q_SIGNALS:
+ void nameChanged(const QString &name);
+ void stateChanged(const QString &state);
+ void errorChanged(const QString &error);
+ void securityChanged(const QStringList &security);
+ void strengthChanged(const uint strength);
+ void favoriteChanged(const bool &favorite);
+ void autoConnectChanged(bool autoconnect);
+ void pathChanged(const QString &path);
+ void ipv4Changed(const QVariantMap &ipv4);
+ void ipv4ConfigChanged(const QVariantMap &ipv4);
+ void ipv6Changed(const QVariantMap &ipv6);
+ void ipv6ConfigChanged(const QVariantMap &ipv6);
+ void nameserversChanged(const QStringList &nameservers);
+ void nameserversConfigChanged(const QStringList &nameservers);
+ void domainsChanged(const QStringList &domains);
+ void domainsConfigChanged(const QStringList &domains);
+ void proxyChanged(const QVariantMap &proxy);
+ void proxyConfigChanged(const QVariantMap &proxy);
+ void ethernetChanged(const QVariantMap ðernet);
+ void connectRequestFailed(const QString &error);
+ void typeChanged(const QString &type);
+ void roamingChanged(bool roaming);
+ void timeserversChanged(const QStringList ×ervers);
+ void timeserversConfigChanged(const QStringList ×ervers);
+
+ void serviceConnectionStarted();
+ void serviceDisconnectionStarted();
+ void connectedChanged(bool connected);
+
+ void propertiesReady();
+
+ void bssidChanged(const QString &bssid);
+ void maxRateChanged(quint32 rate);
+ void frequencyChanged(quint16 frequency);
+ void encryptionModeChanged(const QString &mode);
+ void hiddenChanged(bool);
+
+ void managedChanged();
+ void passphraseChanged(QString);
+ void passphraseAvailableChanged();
+ void identityChanged(QString);
+ void identityAvailableChanged();
+ void securityTypeChanged();
+ void eapMethodChanged();
+ void eapMethodAvailableChanged();
+ void availableChanged();
+ void savedChanged();
+
+public Q_SLOTS:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networksession.cpp
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/networksession.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networksession.h
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/networksession.h)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networktechnology.cpp
^
|
@@ -0,0 +1,239 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#include "networktechnology.h"
+#include "connman_technology_interface.h"
+#include "libconnman_p.h"
+
+const QString NetworkTechnology::Name("Name");
+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),
+ m_technology(NULL)
+{
+ Q_ASSERT(!path.isEmpty());
+ m_propertiesCache = properties;
+ init(path);
+}
+
+NetworkTechnology::NetworkTechnology(QObject* parent)
+ : QObject(parent),
+ m_technology(NULL)
+{
+}
+
+NetworkTechnology::~NetworkTechnology()
+{
+}
+
+void NetworkTechnology::init(const QString &path)
+{
+ if (path != m_path) {
+ m_path = path;
+
+ if (m_technology) {
+ delete m_technology;
+ m_technology = 0;
+ }
+
+ // Clear the property cache (only) if the path is becoming empty.
+ if (m_path.isEmpty()) {
+ QStringList keys = m_propertiesCache.keys();
+ m_propertiesCache.clear();
+ Q_EMIT pathChanged(m_path);
+ const int n = keys.count();
+ for (int i=0; i<n; i++) {
+ emitPropertyChange(keys.at(i), QVariant());
+ }
+ return;
+ }
+
+ // Emit the signal after creating NetConnmanTechnologyInterface
+ m_technology = new NetConnmanTechnologyInterface(CONNMAN_SERVICE, path,
+ CONNMAN_BUS, this);
+ Q_EMIT pathChanged(m_path);
+
+ connect(m_technology,
+ SIGNAL(PropertyChanged(QString,QDBusVariant)),
+ SLOT(propertyChanged(QString,QDBusVariant)));
+
+ connect(new QDBusPendingCallWatcher(m_technology->GetProperties(), m_technology),
+ SIGNAL(finished(QDBusPendingCallWatcher*)),
+ SLOT(getPropertiesFinished(QDBusPendingCallWatcher*)));
+ }
+}
+
+void NetworkTechnology::getPropertiesFinished(QDBusPendingCallWatcher *call)
+{
+ QDBusPendingReply<QVariantMap> reply = *call;
+ call->deleteLater();
+
+ if (!reply.isError()) {
+ QVariantMap tmpCache = reply.value();
+ Q_FOREACH(const QString &name, tmpCache.keys()) {
+ m_propertiesCache.insert(name, tmpCache[name]);
+ emitPropertyChange(name, tmpCache[name]);
+ }
+ Q_EMIT propertiesReady();
+ } else {
+ qWarning() << reply.error().message();
+ }
+}
+
+// Public API
+
+// Getters
+
+QString NetworkTechnology::path() const
+{
+ return m_path;
+}
+
+const QString NetworkTechnology::name() const
+{
+ return m_propertiesCache.value(Name).toString();
+}
+
+const QString NetworkTechnology::type() const
+{
+ return m_propertiesCache.value(Type).toString();
+}
+
+bool NetworkTechnology::powered() const
+{
+ return m_propertiesCache.value(Powered).toBool();
+}
+
+bool NetworkTechnology::connected() const
+{
+ return m_propertiesCache.value(Connected).toBool();
+}
+
+const QString NetworkTechnology::objPath() const
+{
+ if (m_technology)
+ return m_technology->path();
+ return QString();
+}
+
+quint32 NetworkTechnology::idleTimeout() const
+{
+ return m_propertiesCache.value(IdleTimeout).toUInt();
+}
+
+bool NetworkTechnology::tethering() const
+{
+ return m_propertiesCache.value(Tethering).toBool();
+}
+
+QString NetworkTechnology::tetheringId() const
+{
+ return m_propertiesCache.value(TetheringIdentifier).toString();
+}
+
+QString NetworkTechnology::tetheringPassphrase() const
+{
+ return m_propertiesCache.value(TetheringPassphrase).toString();
+}
+
+// Setters
+
+void NetworkTechnology::setPowered(const bool &powered)
+{
+ if (m_technology)
+ m_technology->SetProperty(Powered, QDBusVariant(QVariant(powered)));
+}
+
+void NetworkTechnology::setPath(const QString &path)
+{
+ init(path);
+}
+
+void NetworkTechnology::setIdleTimeout(quint32 timeout)
+{
+ if (m_technology)
+ m_technology->SetProperty(IdleTimeout, QDBusVariant(QVariant(timeout)));
+}
+
+void NetworkTechnology::setTethering(bool b)
+{
+ if (m_technology)
+ m_technology->SetProperty(Tethering, QDBusVariant(QVariant(b)));
+}
+
+void NetworkTechnology::setTetheringId(const QString &id)
+{
+ if (m_technology)
+ m_technology->SetProperty(TetheringIdentifier, QDBusVariant(QVariant(id)));
+}
+
+void NetworkTechnology::setTetheringPassphrase(const QString &pass)
+{
+ if (m_technology)
+ m_technology->SetProperty(TetheringPassphrase, QDBusVariant(QVariant(pass)));
+}
+
+// Private
+
+void NetworkTechnology::scan()
+{
+ if (!m_technology)
+ return;
+
+ QDBusPendingReply<> reply = m_technology->Scan();
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, m_technology);
+ connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/networktechnology.h
^
|
@@ -0,0 +1,103 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#ifndef NETWORKTECHNOLOGY_H
+#define NETWORKTECHNOLOGY_H
+
+#include <QtDBus>
+
+class NetConnmanTechnologyInterface;
+
+class NetworkTechnology : public QObject
+{
+ Q_OBJECT
+
+ Q_PROPERTY(QString name READ name NOTIFY nameChanged)
+ Q_PROPERTY(QString type READ type NOTIFY typeChanged)
+ 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 NOTIFY pathChanged)
+ Q_PROPERTY(quint32 idleTimeout READ idleTimeout 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);
+ NetworkTechnology(QObject* parent=0);
+
+ virtual ~NetworkTechnology();
+
+ const QString name() const;
+ const QString type() const;
+ bool powered() const;
+ bool connected() const;
+ const QString objPath() const;
+
+ QString path() const;
+
+ quint32 idleTimeout() 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 Q_SLOTS:
+ void setPowered(const bool &powered);
+ void scan();
+ void setPath(const QString &path);
+
+Q_SIGNALS:
+ 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);
+ void pathChanged(const QString &path);
+ void propertiesReady();
+ void nameChanged(const QString &name);
+ void typeChanged(const QString &type);
+
+private:
+ NetConnmanTechnologyInterface *m_technology;
+ QVariantMap m_propertiesCache;
+
+ static const QString Name;
+ 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);
+
+private Q_SLOTS:
+ void propertyChanged(const QString &name, const QDBusVariant &value);
+ void emitPropertyChange(const QString &name, const QVariant &value);
+
+ void scanReply(QDBusPendingCallWatcher *call);
+ void getPropertiesFinished(QDBusPendingCallWatcher *call);
+
+private:
+ Q_DISABLE_COPY(NetworkTechnology)
+};
+
+#endif //NETWORKTECHNOLOGY_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/sessionagent.cpp
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/sessionagent.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/sessionagent.h
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/sessionagent.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/useragent.cpp
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/useragent.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/libconnman-qt/useragent.h
^
|
(renamed from ofono/src/libconnman-qt/libconnman-qt/useragent.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/makedist
^
|
(renamed from ofono/src/libconnman-qt/makedist)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/components.cpp
^
|
(renamed from ofono/src/libconnman-qt/plugin/components.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/components.h
^
|
(renamed from ofono/src/libconnman-qt/plugin/components.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/networkingmodel.cpp
^
|
(renamed from ofono/src/libconnman-qt/plugin/networkingmodel.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/networkingmodel.h
^
|
(renamed from ofono/src/libconnman-qt/plugin/networkingmodel.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/plugin.json
^
|
(renamed from ofono/src/libconnman-qt/plugin/plugin.json)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/plugin.pro
^
|
(renamed from ofono/src/libconnman-qt/plugin/plugin.pro)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/qmldir
^
|
(renamed from ofono/src/libconnman-qt/plugin/qmldir)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/savedservicemodel.cpp
^
|
@@ -0,0 +1,199 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#include <QDebug>
+#include "savedservicemodel.h"
+
+namespace
+{
+
+bool compareServices(NetworkService *a, NetworkService *b)
+{
+ if (a->available() && !b->available())
+ return true;
+
+ if (b->available() && !a->available())
+ return false;
+
+ if (a->available() && b->available() && a->strength() > 0 && b->strength() > 0)
+ return b->strength() < a->strength();
+
+ return a->name() < b->name();
+}
+
+bool compareManagedServices(NetworkService *a, NetworkService *b)
+{
+ if (a->managed() && !b->managed())
+ return true;
+
+ if (b->managed() && !a->managed())
+ return false;
+
+ return compareServices(a, b);
+}
+
+}
+
+SavedServiceModel::SavedServiceModel(QAbstractListModel* parent)
+: QAbstractListModel(parent), m_sort(false), m_groupByCategory(false)
+{
+ m_manager = NetworkManagerFactory::createInstance();
+ connect(m_manager, SIGNAL(technologiesChanged()), SLOT(updateServiceList()));
+ connect(m_manager, SIGNAL(servicesChanged()), SLOT(updateServiceList()));
+}
+
+SavedServiceModel::~SavedServiceModel()
+{
+}
+
+QHash<int, QByteArray> SavedServiceModel::roleNames() const
+{
+ QHash<int, QByteArray> roles;
+ roles[ServiceRole] = "networkService";
+ roles[ManagedRole] = "managed";
+ return roles;
+}
+
+QVariant SavedServiceModel::data(const QModelIndex &index, int role) const
+{
+ switch (role) {
+ case ServiceRole:
+ return QVariant::fromValue(static_cast<NetworkService *>(m_services.value(index.row())));
+ case ManagedRole:
+ return m_services.value(index.row())->managed();
+ }
+
+ return QVariant();
+}
+
+int SavedServiceModel::rowCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+
+ return m_services.count();
+}
+
+const QString SavedServiceModel::name() const
+{
+ return m_techname;
+}
+
+void SavedServiceModel::setName(const QString &name)
+{
+ if (m_techname == name) {
+ return;
+ }
+
+ m_techname = name;
+ Q_EMIT nameChanged(m_techname);
+
+ QStringList netTypes = m_manager->technologiesList();
+ if (!netTypes.contains(name)) {
+ qDebug() << name << "is not a known technology name:" << netTypes;
+ return;
+ }
+
+ updateServiceList();
+}
+
+bool SavedServiceModel::sort() const
+{
+ return m_sort;
+}
+
+void SavedServiceModel::setSort(bool sortList)
+{
+ if (m_sort == sortList)
+ return;
+
+ m_sort = sortList;
+ emit sortChanged();
+
+ updateServiceList();
+}
+
+
+bool SavedServiceModel::groupByCategory() const
+{
+ return m_groupByCategory;
+}
+
+void SavedServiceModel::setGroupByCategory(bool groupByCategory)
+{
+ if (m_groupByCategory == groupByCategory)
+ return;
+
+ m_groupByCategory = groupByCategory;
+ emit groupByCategoryChanged();
+
+ updateServiceList();
+}
+
+
+NetworkService *SavedServiceModel::get(int index) const
+{
+ if (index < 0 || index > m_services.count())
+ return 0;
+ return m_services.value(index);
+}
+
+int SavedServiceModel::indexOf(const QString &dbusObjectPath) const
+{
+ int idx(-1);
+
+ Q_FOREACH (NetworkService *service, m_services) {
+ idx++;
+ if (service->path() == dbusObjectPath) return idx;
+ }
+
+ return -1;
+}
+
+void SavedServiceModel::updateServiceList()
+{
+ QVector<NetworkService *> new_services = m_manager->getSavedServices(m_techname);
+ if (m_sort) {
+ if (m_groupByCategory) {
+ std::stable_sort(new_services.begin(), new_services.end(), compareManagedServices);
+ } else {
+ std::stable_sort(new_services.begin(), new_services.end(), compareServices);
+ }
+ }
+
+ int num_new = new_services.count();
+
+ for (int i = 0; i < num_new; i++) {
+ int j = m_services.indexOf(new_services.value(i));
+ if (j == -1) {
+ // wifi service not found -> remove from list
+ beginInsertRows(QModelIndex(), i, i);
+ m_services.insert(i, new_services.value(i));
+ endInsertRows();
+ } else if (i != j) {
+ // wifi service changed its position -> move it
+ NetworkService* service = m_services.value(j);
+ beginMoveRows(QModelIndex(), j, j, QModelIndex(), i);
+ m_services.remove(j);
+ m_services.insert(i, service);
+ endMoveRows();
+ } else {
+ QModelIndex changedIndex(this->index(j, 0, QModelIndex()));
+ Q_EMIT dataChanged(changedIndex, changedIndex);
+ }
+ }
+
+ int num_old = m_services.count();
+ if (num_old > num_new) {
+ beginRemoveRows(QModelIndex(), num_new, num_old - 1);
+ m_services.remove(num_new, num_old - num_new);
+ endRemoveRows();
+ }
+}
+
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/savedservicemodel.h
^
|
@@ -0,0 +1,75 @@
+/*
+ * Copyright © 2010, Intel Corporation.
+ * Copyright © 2013, Jolla.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * WARNING: this class is experimetal and is about to be refactored in order
+ * to deprecate NetworkingModel.
+ */
+
+#ifndef SAVEDSERVICEMODEL_H
+#define SAVEDSERVICEMODEL_H
+
+#include <QAbstractListModel>
+#include <networkmanager.h>
+#include <networkservice.h>
+
+/*
+ * SavedServiceModel is a list model containing saved wifi services.
+ */
+class SavedServiceModel : public QAbstractListModel
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(SavedServiceModel)
+
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(bool sort READ sort WRITE setSort NOTIFY sortChanged)
+ Q_PROPERTY(bool groupByCategory READ groupByCategory WRITE setGroupByCategory NOTIFY groupByCategoryChanged)
+
+public:
+ enum ItemRoles {
+ ServiceRole = Qt::UserRole + 1,
+ ManagedRole
+ };
+
+ SavedServiceModel(QAbstractListModel* parent = 0);
+ virtual ~SavedServiceModel();
+
+ QVariant data(const QModelIndex &index, int role) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+
+ const QString name() const;
+ void setName(const QString &name);
+
+ bool sort() const;
+ void setSort(bool sortList);
+
+ bool groupByCategory() const;
+ void setGroupByCategory(bool groupByCategory);
+
+ Q_INVOKABLE int indexOf(const QString &dbusObjectPath) const;
+
+ Q_INVOKABLE NetworkService *get(int index) const;
+
+Q_SIGNALS:
+ void nameChanged(const QString &name);
+ void sortChanged();
+ void groupByCategoryChanged();
+
+private:
+ QString m_techname;
+ NetworkManager* m_manager;
+ QVector<NetworkService *> m_services;
+ bool m_sort;
+ bool m_groupByCategory;
+
+ QHash<int, QByteArray> roleNames() const;
+
+private Q_SLOTS:
+ void updateServiceList();
+};
+
+#endif // SAVEDSERVICEMODEL_H
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/technologymodel.cpp
^
|
@@ -0,0 +1,364 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#include <QDebug>
+#include "technologymodel.h"
+
+TechnologyModel::TechnologyModel(QAbstractListModel* parent)
+ : QAbstractListModel(parent),
+ m_manager(NULL),
+ m_tech(NULL),
+ m_scanning(false),
+ m_changesInhibited(false),
+ m_uneffectedChanges(false),
+ m_filter(AvailableServices)
+{
+ m_manager = NetworkManagerFactory::createInstance();
+
+ connect(m_manager, SIGNAL(availabilityChanged(bool)),
+ this, SLOT(managerAvailabilityChanged(bool)));
+
+ connect(m_manager,
+ SIGNAL(technologiesChanged()),
+ this,
+ SLOT(updateTechnologies()));
+
+ connect(m_manager,
+ SIGNAL(servicesChanged()),
+ this,
+ SLOT(updateServiceList()));
+}
+
+TechnologyModel::~TechnologyModel()
+{
+}
+
+QHash<int, QByteArray> TechnologyModel::roleNames() const
+{
+ QHash<int, QByteArray> roles;
+ roles[ServiceRole] = "networkService";
+ return roles;
+}
+
+QVariant TechnologyModel::data(const QModelIndex &index, int role) const
+{
+ switch (role) {
+ case ServiceRole:
+ return QVariant::fromValue(static_cast<QObject *>(m_services.value(index.row())));
+ }
+
+ return QVariant();
+}
+
+int TechnologyModel::rowCount(const QModelIndex &parent) const
+{
+ Q_UNUSED(parent);
+
+ return m_services.count();
+}
+
+int TechnologyModel::count() const
+{
+ return rowCount();
+}
+
+const QString TechnologyModel::name() const
+{
+ return m_techname;
+}
+
+bool TechnologyModel::isAvailable() const
+{
+ return m_manager->isAvailable() && m_tech;
+}
+
+bool TechnologyModel::isConnected() const
+{
+ if (m_tech) {
+ return m_tech->connected();
+ } else {
+ qWarning() << "Can't get: technology is NULL";
+ return false;
+ }
+}
+
+bool TechnologyModel::isPowered() const
+{
+ if (m_tech) {
+ return m_tech->powered();
+ } else {
+ qWarning() << "Can't get: technology is NULL";
+ return false;
+ }
+}
+
+bool TechnologyModel::isScanning() const
+{
+ return m_scanning;
+}
+
+bool TechnologyModel::changesInhibited() const
+{
+ return m_changesInhibited;
+}
+
+TechnologyModel::ServiceFilter TechnologyModel::filter() const
+{
+ return m_filter;
+}
+
+void TechnologyModel::setFilter(ServiceFilter filter)
+{
+ if (m_filter != filter) {
+ m_filter = filter;
+ updateServiceList();
+ Q_EMIT filterChanged();
+ }
+}
+
+void TechnologyModel::setPowered(const bool &powered)
+{
+ if (m_tech) {
+ m_tech->setPowered(powered);
+ } else {
+ qWarning() << "Can't set: technology is NULL";
+ }
+}
+
+void TechnologyModel::setName(const QString &name)
+{
+ if (m_techname == name || name.isEmpty()) {
+ return;
+ }
+ m_techname = name;
+ Q_EMIT nameChanged(m_techname);
+
+ updateTechnologies();
+}
+
+void TechnologyModel::setChangesInhibited(bool b)
+{
+ if (m_changesInhibited != b) {
+ m_changesInhibited = b;
+ Q_EMIT changesInhibitedChanged(m_changesInhibited);
+
+ if (!m_changesInhibited && m_uneffectedChanges) {
+ m_uneffectedChanges = false;
+ updateServiceList();
+ }
+ }
+}
+
+void TechnologyModel::requestScan()
+{
+ if (m_tech && !m_tech->tethering()) {
+ m_tech->scan();
+ m_scanning = true;
+ Q_EMIT scanningChanged(m_scanning);
+ }
+}
+
+void TechnologyModel::updateTechnologies()
+{
+ bool wasAvailable = m_manager->isAvailable() && m_tech;
+
+ doUpdateTechnologies();
+
+ bool isAvailable = m_manager->isAvailable() && m_tech;
+
+ if (wasAvailable != isAvailable)
+ Q_EMIT availabilityChanged(isAvailable);
+}
+
+void TechnologyModel::doUpdateTechnologies()
+{
+ NetworkTechnology *newTech = m_manager->getTechnology(m_techname);
+ if (m_tech == newTech)
+ return;
+
+ bool oldPowered = false;
+ bool oldConnected = false;
+
+ if (m_tech) {
+ oldPowered = m_tech->powered();
+ oldConnected = m_tech->connected();
+
+ disconnect(m_tech, SIGNAL(poweredChanged(bool)), this, SLOT(changedPower(bool)));
+ disconnect(m_tech, SIGNAL(connectedChanged(bool)), this, SLOT(changedConnected(bool)));
+ disconnect(m_tech, SIGNAL(scanFinished()), this, SLOT(finishedScan()));
+ }
+
+ if (m_scanning) {
+ m_scanning = false;
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/plugin/technologymodel.h
^
|
@@ -0,0 +1,111 @@
+/*
+ * Copyright © 2010 Intel Corporation.
+ * Copyright © 2012-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0. The full text of the Apache License
+ * is at http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+#ifndef TECHNOLOGYMODEL_H
+#define TECHNOLOGYMODEL_H
+
+#include <QAbstractListModel>
+#include <networkmanager.h>
+#include <networktechnology.h>
+#include <networkservice.h>
+
+/*
+ * TechnologyModel is a list model specific to a certain technology (wifi by default).
+ */
+class TechnologyModel : public QAbstractListModel
+{
+ Q_OBJECT
+ Q_DISABLE_COPY(TechnologyModel)
+
+ Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
+ Q_PROPERTY(bool available READ isAvailable NOTIFY availabilityChanged)
+ Q_PROPERTY(bool connected READ isConnected NOTIFY connectedChanged)
+ Q_PROPERTY(bool powered READ isPowered WRITE setPowered NOTIFY poweredChanged)
+ Q_PROPERTY(bool scanning READ isScanning NOTIFY scanningChanged)
+ Q_PROPERTY(bool changesInhibited READ changesInhibited WRITE setChangesInhibited NOTIFY changesInhibitedChanged)
+ Q_PROPERTY(int count READ count NOTIFY countChanged)
+ Q_PROPERTY(ServiceFilter filter READ filter WRITE setFilter NOTIFY filterChanged)
+ Q_ENUMS(ServiceFilter)
+
+public:
+ enum ServiceFilter {
+ AllServices,
+ SavedServices,
+ AvailableServices
+ };
+
+ enum ItemRoles {
+ ServiceRole = Qt::UserRole + 1
+ };
+
+ TechnologyModel(QAbstractListModel* parent = 0);
+ virtual ~TechnologyModel();
+
+ QVariant data(const QModelIndex &index, int role) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+
+ int count() const;
+
+ const QString name() const;
+ bool isAvailable() const;
+ bool isConnected() const;
+ bool isPowered() const;
+ bool isScanning() const;
+ bool changesInhibited() const;
+ ServiceFilter filter() const;
+
+ void setName(const QString &name);
+ void setChangesInhibited(bool b);
+ void setFilter(ServiceFilter filter);
+
+ Q_INVOKABLE int indexOf(const QString &dbusObjectPath) const;
+ Q_INVOKABLE NetworkService *get(int index) const;
+
+public Q_SLOTS:
+ void setPowered(const bool &powered);
+ void requestScan();
+
+Q_SIGNALS:
+ void nameChanged(const QString &name);
+ void availabilityChanged(const bool &available);
+ void connectedChanged(const bool &connected);
+ void poweredChanged(const bool &powered);
+ void scanningChanged(const bool &scanning);
+ void changesInhibitedChanged(const bool &changesInhibited);
+ void technologiesChanged();
+ void countChanged();
+ void filterChanged();
+
+ void scanRequestFinished();
+
+private:
+ QString m_techname;
+ NetworkManager* m_manager;
+ NetworkTechnology* m_tech;
+ QVector<NetworkService *> m_services;
+ bool m_scanning;
+ bool m_changesInhibited;
+ bool m_uneffectedChanges;
+ ServiceFilter m_filter;
+
+ QHash<int, QByteArray> roleNames() const;
+ void doUpdateTechnologies();
+
+private Q_SLOTS:
+ void updateTechnologies();
+ void updateServiceList();
+ void managerAvailabilityChanged(bool available);
+ void changedPower(bool);
+ void changedConnected(bool);
+ void finishedScan();
+ void networkServiceDestroyed(QObject *);
+};
+
+#endif // TECHNOLOGYMODEL_H
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/rpm/connman-qt5.spec
^
|
@@ -0,0 +1,77 @@
+Name: connman-qt5
+Summary: Qt bindings for connman
+Version: 1.1.10
+Release: 1
+Group: System/GUI/Other
+License: ASL 2.0
+URL: https://git.merproject.org/mer-core/libconnman-qt
+Source0: %{name}-%{version}.tar.bz2
+Requires: connman >= 1.31+git20
+Requires: libdbusaccess >= 1.0.4
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires: pkgconfig(Qt5Core)
+BuildRequires: pkgconfig(Qt5Network)
+BuildRequires: pkgconfig(Qt5Qml)
+BuildRequires: pkgconfig(Qt5DBus)
+BuildRequires: pkgconfig(dbus-1)
+BuildRequires: pkgconfig(libdbusaccess) >= 1.0.4
+
+%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
+%{!?qtc_make:%define qtc_make make}
+
+
+%description
+This is a library for working with connman using Qt
+
+
+%package declarative
+Summary: Declarative plugin for Qt Quick for connman-qt
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: connman-qt5
+
+%description declarative
+This package contains the files necessary to develop
+applications using libconnman-qt
+
+
+%package devel
+Summary: Development files for connman-qt
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+This package contains the files necessary to develop
+applications using libconnman-qt
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+%build
+%qtc_qmake5 -r VERSION=%{version}
+%qtc_make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+%qmake5_install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libconnman-qt5.so.*
+
+%files declarative
+%defattr(-,root,root,-)
+%{_usr}/lib/qt5/qml/MeeGo/Connman
+
+%files devel
+%defattr(-,root,root,-)
+%{_usr}/include/connman-qt5
+%{_usr}/lib/pkgconfig/connman-qt5.pc
+%{_usr}/lib/libconnman-qt5.prl
+%{_usr}/lib/libconnman-qt5.so
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/runtest.sh
^
|
(renamed from ofono/src/libconnman-qt/tests/runtest.sh)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/testapplication.pri
^
|
(renamed from ofono/src/libconnman-qt/tests/testapplication.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/testbase.h
^
|
(renamed from ofono/src/libconnman-qt/tests/testbase.h)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/tests.pro
^
|
(renamed from ofono/src/libconnman-qt/tests/tests.pro)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/tests.xml.in
^
|
(renamed from ofono/src/libconnman-qt/tests/tests.xml.in)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/tests_common.pri
^
|
(renamed from ofono/src/libconnman-qt/tests/tests_common.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_agent.cpp
^
|
(renamed from ofono/src/libconnman-qt/tests/ut_agent.cpp)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_agent.pro
^
|
(renamed from ofono/src/libconnman-qt/tests/ut_technology.pro)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_clock.cpp
^
|
(renamed from ofono/src/libconnman-qt/tests/ut_clock.cpp)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_clock.pro
^
|
@@ -0,0 +1 @@
+include(testapplication.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_manager.cpp
^
|
(renamed from ofono/src/libconnman-qt/tests/ut_manager.cpp)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_manager.pro
^
|
@@ -0,0 +1 @@
+include(testapplication.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_service.cpp
^
|
(renamed from ofono/src/libconnman-qt/tests/ut_service.cpp)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_service.pro
^
|
@@ -0,0 +1 @@
+include(testapplication.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_session.cpp
^
|
(renamed from ofono/src/libconnman-qt/tests/ut_session.cpp)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_session.pro
^
|
@@ -0,0 +1 @@
+include(testapplication.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_technology.cpp
^
|
(renamed from ofono/src/libconnman-qt/tests/ut_technology.cpp)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/libconnman-qt/tests/ut_technology.pro
^
|
@@ -0,0 +1 @@
+include(testapplication.pri)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/logger/settings/settings.qml
^
|
@@ -1,33 +1,34 @@
/*
- Copyright (C) 2015-2016 Jolla Ltd.
- Contact: Slava Monich <slava.monich@jolla.com>
-
- You may use this file under the terms of BSD license as follows:
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the Jolla Ltd nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- THE POSSIBILITY OF SUCH DAMAGE.
-*/
+ * Copyright (C) 2016-2017 Jolla Ltd.
+ * Contact: Slava Monich <slava.monich@jolla.com>
+ *
+ * You may use this file under the terms of BSD license as follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Jolla Ltd nor the names of its contributors may
+ * be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
import QtQuick 2.0
import Sailfish.Silica 1.0
@@ -35,7 +36,19 @@
Page {
id: page
- readonly property string rootPath: "/apps/harbour-logger-conf/"
+ readonly property string rootPath: "/apps/" + appName() + "/"
+
+ // Deduce package name from the path
+ function appName() {
+ var parts = Qt.resolvedUrl("dummy").split('/')
+ if (parts.length > 2) {
+ var name = parts[parts.length-3]
+ if (name.indexOf("-logger") >= 0) {
+ return name
+ }
+ }
+ return "harbour-logger"
+ }
SilicaFlickable {
anchors.fill: parent
@@ -46,11 +59,13 @@
width: parent.width
PageHeader {
+ //: Page header
//% "Logger"
title: qsTrId("logger-settings-page-header")
}
SectionHeader {
+ //: Section header
//% "Display"
text: qsTrId("logger-settings-section-header-display")
}
@@ -112,22 +127,71 @@
Slider {
id: fontSizeSlider
width: parent.width
- minimumValue: Theme.fontSizeTiny
- maximumValue: Theme.fontSizeLarge
+ minimumValue: 0
+ maximumValue: Theme.fontSizeLarge - Theme.fontSizeTiny
stepSize: 1
//% "Font size"
label: qsTrId("logger-settings-fontsize-label")
- valueText: minimumValue + sliderValue
- onSliderValueChanged: fontSizeAdjustment.value = sliderValue - minimumValue
- Component.onCompleted: value = minimumValue + fontSizeAdjustment.value
+ valueText: Theme.fontSizeTiny + sliderValue
+ onSliderValueChanged: fontSizeAdjustment.value = sliderValue
+ Component.onCompleted: value = fontSizeAdjustment.value
ConfigurationValue {
id: fontSizeAdjustment
key: rootPath + "fontSizeAdjustment"
- onValueChanged: fontSizeSlider.value = fontSizeSlider.minimumValue + value
+ onValueChanged: fontSizeSlider.value = value
defaultValue: 0
}
}
+
+ SectionHeader {
+ //: Section header
+ //% "Logging"
+ text: qsTrId("logger-settings-section-header-logging")
+ }
+
+ TextSwitch {
+ id: autoEnableLoggingSwitch
+ automaticCheck: false
+ //: Text switch label
+ //% "Automatically enable logging"
+ text: qsTrId("logger-settings-autoenable_logging-switch-label")
+ //: Text switch description
+ //% "Enable all logging categories when the application starts."
+ description: qsTrId("logger-settings-autoenable_logging-switch-description")
+ onClicked: autoEnableLogging.value = checked ? autoEnableLogging.autoEnableNone : autoEnableLogging.autoEnableAll
+ Component.onCompleted: updateCheck()
+ function updateCheck() { checked = (autoEnableLogging.value !== autoEnableLogging.autoEnableNone) }
+
+ ConfigurationValue {
+ id: autoEnableLogging
+ key: rootPath + "autoEnableLogging"
+ readonly property int autoEnableNone: 0
+ readonly property int autoEnableAll: 1
+ onValueChanged: autoEnableLoggingSwitch.updateCheck()
+ defaultValue: autoEnableAll
+ }
+ }
+
+ TextSwitch {
+ id: autoResetLoggingSwitch
+ automaticCheck: false
+ //: Text switch label
+ //% "Automatically reset logging on exit"
+ text: qsTrId("logger-settings-autoreset_logging-switch-label")
+ //: Text switch description
+ //% "Reset all logging categories to their default values when the application is exiting. Otherwise logging would continue in the background, wasting the system resources and eating up your battery."
+ description: qsTrId("logger-settings-autoreset_logging-switch-description")
+ onClicked: autoResetLogging.value = !checked
+ Component.onCompleted: checked = autoResetLogging.value
+
+ ConfigurationValue {
+ id: autoResetLogging
+ key: rootPath + "autoResetLogging"
+ onValueChanged: autoResetLoggingSwitch.checked = value
+ defaultValue: true
+ }
+ }
}
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/logger/src/LoggerCategoryListModel.cpp
^
|
@@ -31,6 +31,7 @@
*/
#include "LoggerCategoryListModel.h"
+#include "LoggerSettings.h"
#include "HarbourDebug.h"
#include "gutil_strv.h"
@@ -40,8 +41,9 @@
#define SUPER QAbstractListModel
-LoggerCategoryListModel::LoggerCategoryListModel(DBusLogClient* aClient,
- QObject* aParent) : SUPER(aParent),
+LoggerCategoryListModel::LoggerCategoryListModel(LoggerSettings* aSettings,
+ DBusLogClient* aClient, QObject* aParent) : SUPER(aParent),
+ iSettings(aSettings),
iClient(dbus_log_client_ref(aClient)),
iHaveDefaults(false)
{
@@ -224,6 +226,11 @@
updateDefaults();
Q_EMIT countChanged();
Q_EMIT connectedChanged();
+
+ // Automatically enable all categories if necessary
+ if (iSettings->autoEnableLogging() == LoggerSettings::AutoEnableAll) {
+ enableAll();
+ }
}
void LoggerCategoryListModel::handleCategoryAdded(DBusLogCategory* aCategory, uint aIndex)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/logger/src/LoggerCategoryListModel.h
^
|
@@ -40,6 +40,7 @@
#include <QAbstractListModel>
+class LoggerSettings;
class LoggerCategoryListModel : public QAbstractListModel
{
Q_OBJECT
@@ -55,7 +56,8 @@
IdRole
};
- LoggerCategoryListModel(DBusLogClient* aClient, QObject* aParent);
+ LoggerCategoryListModel(LoggerSettings* aSettings, DBusLogClient* aClient,
+ QObject* aParent);
~LoggerCategoryListModel();
virtual QHash<int,QByteArray> roleNames() const;
@@ -103,6 +105,7 @@
DBusLogClientSignalCount
};
+ LoggerSettings* iSettings;
DBusLogClient* iClient;
gulong iClientSignals[DBusLogClientSignalCount];
QHash<guint32,LoggerCategory> iCategories;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/logger/src/LoggerLogModel.cpp
^
|
@@ -48,7 +48,7 @@
QObject* aParent) : SUPER(aParent),
iSettings(aSettings),
iClient(dbus_log_client_ref(aClient)),
- iBuffer(LoggerSettings::DEFAULT_LOG_SIZE_LIMIT)
+ iBuffer(aSettings->logSizeLimit())
{
// updateLogSizeLimit() will initialize iLogSizeLimit and iLogRemoveCount:
updateLogSizeLimit();
@@ -71,7 +71,7 @@
void LoggerLogModel::updateLogSizeLimit()
{
- iLogSizeLimit = LoggerSettings::DEFAULT_LOG_SIZE_LIMIT;
+ iLogSizeLimit = LoggerSettings::defaultLogSizeLimit();
int value = iSettings->logSizeLimit();
if (value <= 0) {
iLogSizeLimit = LOG_SIZE_LIMIT_NONE;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/logger/src/LoggerMain.cpp
^
|
@@ -159,8 +159,9 @@
void LoggerMain::saveFilesAtStartup(QString aDir)
{
- // Copy OS version
+ // Copy OS and hardware versions
QFile::copy("/etc/sailfish-release", aDir + "/sailfish-release");
+ QFile::copy("/etc/hw-release", aDir + "/hw-release");
// And the package version
saveOutput("rpm", "-q", qPrintable(iPackage),
@@ -181,7 +182,7 @@
// Models and stuff
LoggerSettings* logSettings = new LoggerSettings(iFullAppName, iApp);
LoggerLogModel* logModel = new LoggerLogModel(logSettings, iClient, iApp);
- LoggerCategoryListModel* categoryModel = new LoggerCategoryListModel(iClient, iApp);
+ LoggerCategoryListModel* categoryModel = new LoggerCategoryListModel(logSettings, iClient, iApp);
LoggerLogSaver* logSaver = new LoggerLogSaver(iPackage, iApp);
logSaver->connect(logModel, SIGNAL(entryAdded(LoggerEntry)), SLOT(addEntry(LoggerEntry)));
logSaver->connect(sigChild, SIGNAL(processDied(int,int)), SLOT(onProcessDied(int,int)));
@@ -204,6 +205,10 @@
int ret = iApp->exec();
+ if (logSettings->autoResetLogging()) {
+ categoryModel->reset();
+ }
+
delete view;
return ret;
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/logger/src/LoggerSettings.cpp
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Jolla Ltd.
+ * Copyright (C) 2016-2017 Jolla Ltd.
* Contact: Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
@@ -38,33 +38,112 @@
#define DCONF_KEY(app,key) QString("/apps/%1/%2").arg(app).arg(key)
#define DCONF_LOG_SIZE_LIMIT(app) DCONF_KEY(app,"logSizeLimit")
#define DCONF_FONT_SIZE_ADJUSTMENT(app) DCONF_KEY(app,"fontSizeAdjustment")
+#define DCONF_AUTO_ENABLE_LOGGING(app) DCONF_KEY(app,"autoEnableLogging")
+#define DCONF_AUTO_RESET_LOGGING(app) DCONF_KEY(app,"autoResetLogging")
-const int LoggerSettings::DEFAULT_LOG_SIZE_LIMIT = 1000;
-const int LoggerSettings::DEFAULT_FONT_SIZE_ADJUSTMENT = 0;
+//===========================================================================
+// LoggerSettings::Private
+//===========================================================================
-LoggerSettings::LoggerSettings(QString aApp, QObject* aParent) :
+class LoggerSettings::Private : public QObject
+{
+ Q_OBJECT
+public:
+ Private(QString aApp, QObject* aParent);
+
+ int logSizeLimit() const;
+ int fontSizeAdjustment() const;
+ AutoEnable autoEnableLogging() const;
+ bool autoResetLogging() const;
+
+public:
+ static const int DEFAULT_LOG_SIZE_LIMIT = 1000;
+ static const int DEFAULT_FONT_SIZE_ADJUSTMENT = 0;
+ static const int DEFAULT_AUTO_ENABLE_LOGGING = AutoEnableAll;
+ static const bool DEFAULT_AUTO_RESET_LOGGING = true;
+
+ MGConfItem* iLogSizeLimit;
+ MGConfItem* iFontSizeAdjustment;
+ MGConfItem* iAutoEnableLogging;
+ MGConfItem* iAutoResetLogging;
+};
+
+LoggerSettings::Private::Private(QString aApp, QObject* aParent) :
QObject(aParent),
iLogSizeLimit(new MGConfItem(DCONF_LOG_SIZE_LIMIT(aApp), this)),
- iFontSizeAdjustment(new MGConfItem(DCONF_FONT_SIZE_ADJUSTMENT(aApp), this))
+ iFontSizeAdjustment(new MGConfItem(DCONF_FONT_SIZE_ADJUSTMENT(aApp), this)),
+ iAutoEnableLogging(new MGConfItem(DCONF_AUTO_ENABLE_LOGGING(aApp), this)),
+ iAutoResetLogging(new MGConfItem(DCONF_AUTO_RESET_LOGGING(aApp), this))
{
- connect(iLogSizeLimit, SIGNAL(valueChanged()), SIGNAL(logSizeLimitChanged()));
- connect(iFontSizeAdjustment, SIGNAL(valueChanged()), SIGNAL(fontSizeAdjustmentChanged()));
}
-int LoggerSettings::logSizeLimit() const
+inline int LoggerSettings::Private::logSizeLimit() const
+{
+ return iLogSizeLimit->value(DEFAULT_LOG_SIZE_LIMIT).toInt();
+}
+
+inline int LoggerSettings::Private::fontSizeAdjustment() const
+{
+ return iFontSizeAdjustment->value(DEFAULT_FONT_SIZE_ADJUSTMENT).toInt();
+}
+
+inline LoggerSettings::AutoEnable LoggerSettings::Private::autoEnableLogging() const
{
- QVariant value = iLogSizeLimit->value();
- if (value.isValid()) {
- bool ok = false;
- int ival = value.toInt(&ok);
- if (ok) {
- return ival;
- }
+ int value = iAutoEnableLogging->value(DEFAULT_AUTO_ENABLE_LOGGING).toInt();
+ switch(value) {
+ case AutoEnableNone:
+ case AutoEnableAll:
+ return (AutoEnable)value;
}
- return DEFAULT_LOG_SIZE_LIMIT;
+ return (AutoEnable)DEFAULT_AUTO_ENABLE_LOGGING;
+}
+
+inline bool LoggerSettings::Private::autoResetLogging() const
+{
+ return iAutoResetLogging->value(DEFAULT_AUTO_RESET_LOGGING).toBool();
+}
+
+//===========================================================================
+// LoggerSettings::Private
+//===========================================================================
+
+LoggerSettings::LoggerSettings(QString aApp, QObject* aParent) :
+ QObject(aParent),
+ iPrivate(new Private(aApp, this))
+{
+ connect(iPrivate->iLogSizeLimit, SIGNAL(valueChanged()),
+ this, SIGNAL(logSizeLimitChanged()));
+ connect(iPrivate->iFontSizeAdjustment, SIGNAL(valueChanged()),
+ this, SIGNAL(fontSizeAdjustmentChanged()));
+ connect(iPrivate->iAutoEnableLogging, SIGNAL(valueChanged()),
+ this, SIGNAL(autoEnableLoggingChanged()));
+ connect(iPrivate->iAutoResetLogging, SIGNAL(valueChanged()),
+ this, SIGNAL(autoResetLoggingChanged()));
+}
+
+int LoggerSettings::defaultLogSizeLimit()
+{
+ return Private::DEFAULT_LOG_SIZE_LIMIT;
+}
+
+int LoggerSettings::logSizeLimit() const
+{
+ return iPrivate->logSizeLimit();
}
int LoggerSettings::fontSizeAdjustment() const
{
- return iFontSizeAdjustment->value(DEFAULT_FONT_SIZE_ADJUSTMENT).toInt();
+ return iPrivate->fontSizeAdjustment();
+}
+
+LoggerSettings::AutoEnable LoggerSettings::autoEnableLogging() const
+{
+ return iPrivate->autoEnableLogging();
}
+
+bool LoggerSettings::autoResetLogging() const
+{
+ return iPrivate->autoResetLogging();
+}
+
+#include "LoggerSettings.moc"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/logger/src/LoggerSettings.h
^
|
@@ -35,29 +35,38 @@
#include <QtQml>
-class MGConfItem;
class LoggerSettings : public QObject
{
Q_OBJECT
Q_PROPERTY(int logSizeLimit READ logSizeLimit NOTIFY logSizeLimitChanged)
Q_PROPERTY(int fontSizeAdjustment READ fontSizeAdjustment NOTIFY fontSizeAdjustmentChanged)
+ Q_PROPERTY(bool autoEnableLogging READ autoEnableLogging NOTIFY autoEnableLoggingChanged)
+ Q_PROPERTY(bool autoResetLogging READ autoResetLogging NOTIFY autoResetLoggingChanged)
public:
+ enum AutoEnable {
+ AutoEnableNone,
+ AutoEnableAll
+ };
+
explicit LoggerSettings(QString aAppName, QObject* aParent = NULL);
- static const int DEFAULT_LOG_SIZE_LIMIT;
- static const int DEFAULT_FONT_SIZE_ADJUSTMENT;
+ static int defaultLogSizeLimit();
int logSizeLimit() const;
int fontSizeAdjustment() const;
+ AutoEnable autoEnableLogging() const;
+ bool autoResetLogging() const;
Q_SIGNALS:
void logSizeLimitChanged();
void fontSizeAdjustmentChanged();
+ void autoEnableLoggingChanged();
+ void autoResetLoggingChanged();
private:
- MGConfItem* iLogSizeLimit;
- MGConfItem* iFontSizeAdjustment;
+ class Private;
+ Private* iPrivate;
};
QML_DECLARE_TYPE(LoggerSettings)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/ofono/ofono.pro
^
|
@@ -36,7 +36,7 @@
HARBOUR_LIB_DIR = $$_PRO_FILE_PWD_/../harbour-lib
LOGGER_LIB_DIR = $$_PRO_FILE_PWD_/../logger
QOFONOEXT_LIB_DIR = $$_PRO_FILE_PWD_/src/libqofonoext
-QCONNMAN_LIB_DIR = $$_PRO_FILE_PWD_/src/libconnman-qt
+QCONNMAN_LIB_DIR = $$_PRO_FILE_PWD_/..//libconnman-qt
# Libraries
HARBOUR_LIB = $$OUT_PWD/../harbour-lib/libharbour-lib.a
@@ -125,7 +125,7 @@
$${LOGGER_LIB_DIR}/qml \
$${LOGGER_LIB_DIR}/settings
-TRANSLATION_FILES = $${NAME} $${NAME}-ru
+TRANSLATION_FILES = $${NAME} $${NAME}-ru $${NAME}-sv
for(t, TRANSLATION_FILES) {
suffix = $$replace(t,-,_)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/ofono/translations/harbour-logger-ofono-ru.ts
^
|
@@ -109,10 +109,12 @@
</message>
<message id="logger-settings-page-header">
<source>Logger</source>
+ <extracomment>Page header</extracomment>
<translation>Журнал ofono</translation>
</message>
<message id="logger-settings-section-header-display">
<source>Display</source>
+ <extracomment>Section header</extracomment>
<translation>Вывод на экран</translation>
</message>
<message id="logger-settings-logsizelimit">
@@ -131,5 +133,30 @@
<source>Font size</source>
<translation>Размер шрифта</translation>
</message>
+ <message id="logger-settings-section-header-logging">
+ <source>Logging</source>
+ <extracomment>Section header</extracomment>
+ <translation>Сбор информации</translation>
+ </message>
+ <message id="logger-settings-autoenable_logging-switch-label">
+ <source>Automatically enable logging</source>
+ <extracomment>Text switch label</extracomment>
+ <translation>Автоматически начинать сбор отладочной информации</translation>
+ </message>
+ <message id="logger-settings-autoenable_logging-switch-description">
+ <source>Enable all logging categories when the application starts.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation>Эта опция позволяет включать сбор и вывод на экран всей доступной отладочной информации всякий раз, когда приложение запускается.</translation>
+ </message>
+ <message id="logger-settings-autoreset_logging-switch-label">
+ <source>Automatically reset logging on exit</source>
+ <extracomment>Text switch label</extracomment>
+ <translation>Автоматически отключать сбор отладочной информации</translation>
+ </message>
+ <message id="logger-settings-autoreset_logging-switch-description">
+ <source>Reset all logging categories to their default values when the application is exiting. Otherwise logging would continue in the background, wasting the system resources and eating up your battery.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation>Отключать сбор отладочной информации, когда приложение закрывается. Иначе всё это будет продолжать форматироваться и записываться в журнал в фоновом режиме, что в большинстве случаев бесполезно и только разряжает аккумулятор.</translation>
+ </message>
</context>
</TS>
|
[-]
[+]
|
Added |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/ofono/translations/harbour-logger-ofono-sv.ts
^
|
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="sv">
+<context>
+ <name></name>
+ <message id="logger-cover-title">
+ <source>Log</source>
+ <translation>Logg</translation>
+ </message>
+ <message id="logger-mainpage-swipe-left-hint">
+ <source>Swipe left to configure log categories</source>
+ <translation>Svep vänster för att konfigurera loggkategorier</translation>
+ </message>
+ <message id="ofono-logger-pm-fix-mobile-data">
+ <source>Fix mobile data</source>
+ <extracomment>Pull-down menu item</extracomment>
+ <translation>Fixa mobildata</translation>
+ </message>
+ <message id="ofono-logger-pm-enable-mobile-data">
+ <source>Enable mobile data</source>
+ <extracomment>Pull-down menu item</extracomment>
+ <translation type="unfinished">Aktivera mobildata</translation>
+ </message>
+ <message id="logger-logpage-pm-clear-log">
+ <source>Clear log</source>
+ <translation>Rensa loggen</translation>
+ </message>
+ <message id="logger-logpage-pm-pack-and-send">
+ <source>Pack and send</source>
+ <translation>Paketera och sänd</translation>
+ </message>
+ <message id="logger-logpage-title">
+ <source>Log</source>
+ <translation>Logg</translation>
+ </message>
+ <message id="logger-logpage-msg-connected">
+ <source>Connected.</source>
+ <translation>Ansluten.</translation>
+ </message>
+ <message id="logger-logpage-msg-connect-error">
+ <source>We are having trouble connecting to the service.</source>
+ <translation>Vi har problem med att ansluta till tjänsten.</translation>
+ </message>
+ <message id="logger-logpage-msg-disconnected">
+ <source>Connection lost.</source>
+ <translation>Anslutning avbröts.</translation>
+ </message>
+ <message id="logger-logpage-msg-log-cleared">
+ <source>Log cleared</source>
+ <translation>Loggen rensad</translation>
+ </message>
+ <message id="logger-categories-title">
+ <source>Log categories</source>
+ <translation>Loggkategorier</translation>
+ </message>
+ <message id="logger-categories-pm-enable-all">
+ <source>Enable all</source>
+ <translation>Aktivera alla</translation>
+ </message>
+ <message id="logger-categories-pm-disable-all">
+ <source>Disable all</source>
+ <translation>Inaktivera alla</translation>
+ </message>
+ <message id="logger-categories-pm-default">
+ <source>Reset to default</source>
+ <translation>Återställ standard</translation>
+ </message>
+ <message id="logger-categories-not-connected">
+ <source>Not connected</source>
+ <translation>Ej ansluten</translation>
+ </message>
+ <message id="logger-sharemethodlist-add-account">
+ <source>Add account</source>
+ <translation>Lägg till konto</translation>
+ </message>
+ <message id="logger-sharepage-save-ok">
+ <source>Saved %1</source>
+ <translation>Sparade %1</translation>
+ </message>
+ <message id="logger-sharepage-save-error">
+ <source>Failed to save %1</source>
+ <translation>Kunde inte spara %1</translation>
+ </message>
+ <message id="logger-sharepage-pm-save-to-documents">
+ <source>Save to documents</source>
+ <translation>Spara i Dokument</translation>
+ </message>
+ <message id="logger-sharepage-header">
+ <source>Pack and send</source>
+ <translation>Paketera och sänd</translation>
+ </message>
+ <message id="logger-sharepage-default-subject">
+ <source>Log</source>
+ <extracomment>Default email subject</extracomment>
+ <translation>Logg</translation>
+ </message>
+ <message id="logger-sharepage-default-email">
+ <source></source>
+ <extracomment>Default email recipient</extracomment>
+ <translation></translation>
+ </message>
+ <message id="logger-sharepage-warning">
+ <source>Keep in mind that some of the information contained in this archive may be considered private. If you would like to check what you are about to send, please consider sending it to yourself and checking its contents first.</source>
+ <translation>Notera att viss information i detta arkiv kan anses vara av privat natur. Om du vill veta vad du är på väg att skicka, kan du skicka det till dig själv och kontrollera innehållet först.</translation>
+ </message>
+ <message id="logger-sharepage-please-wait">
+ <source>Please wait</source>
+ <translation>Vänta</translation>
+ </message>
+ <message id="logger-settings-page-header">
+ <source>Logger</source>
+ <extracomment>Page header</extracomment>
+ <translation>Datalogger</translation>
+ </message>
+ <message id="logger-settings-section-header-display">
+ <source>Display</source>
+ <extracomment>Section header</extracomment>
+ <translation>Visa</translation>
+ </message>
+ <message id="logger-settings-logsizelimit">
+ <source>Screen buffer size</source>
+ <translation>Skärmbuffertstorlek</translation>
+ </message>
+ <message id="logger-settings-logsizelimit-description">
+ <source>Don't worry, everything will be written to the log file regardless of the screen buffer size.</source>
+ <translation>Oroa dig inte, allt kommer att skrivas till loggfilen oavsett skärmbuffertstorlek.</translation>
+ </message>
+ <message id="logger-settings-logsizelimit-unlimited">
+ <source>Unlimited</source>
+ <translation>Obegränsad</translation>
+ </message>
+ <message id="logger-settings-fontsize-label">
+ <source>Font size</source>
+ <translation>Teckenstorlek</translation>
+ </message>
+ <message id="logger-settings-section-header-logging">
+ <source>Logging</source>
+ <extracomment>Section header</extracomment>
+ <translation type="unfinished">Logg</translation>
+ </message>
+ <message id="logger-settings-autoenable_logging-switch-label">
+ <source>Automatically enable logging</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Aktivera loggning automatiskt</translation>
+ </message>
+ <message id="logger-settings-autoenable_logging-switch-description">
+ <source>Enable all logging categories when the application starts.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Enable all logging categories when the application starts.</translation>
+ </message>
+ <message id="logger-settings-autoreset_logging-switch-label">
+ <source>Automatically reset logging on exit</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Återställ automatiskt loggning på utgång</translation>
+ </message>
+ <message id="logger-settings-autoreset_logging-switch-description">
+ <source>Reset all logging categories to their default values when the application is exiting. Otherwise logging would continue in the background, wasting the system resources and eating up your battery.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Reset all logging categories to their default values when the application is exiting. Otherwise logging would continue in the background, wasting the system resources and eating up your battery.</translation>
+ </message>
+</context>
+</TS>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-logger-ofono-1.0.9.tar.bz2/ofono/translations/harbour-logger-ofono.ts
^
|
@@ -109,10 +109,12 @@
</message>
<message id="logger-settings-page-header">
<source>Logger</source>
+ <extracomment>Page header</extracomment>
<translation>Ofono Log</translation>
</message>
<message id="logger-settings-section-header-display">
<source>Display</source>
+ <extracomment>Section header</extracomment>
<translation>Display</translation>
</message>
<message id="logger-settings-logsizelimit">
@@ -131,5 +133,30 @@
<source>Font size</source>
<translation>Font size</translation>
</message>
+ <message id="logger-settings-section-header-logging">
+ <source>Logging</source>
+ <extracomment>Section header</extracomment>
+ <translation>Logging</translation>
+ </message>
+ <message id="logger-settings-autoenable_logging-switch-label">
+ <source>Automatically enable logging</source>
+ <extracomment>Text switch label</extracomment>
+ <translation>Automatically enable logging</translation>
+ </message>
+ <message id="logger-settings-autoenable_logging-switch-description">
+ <source>Enable all logging categories when the application starts.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation>Enable all logging categories when the application starts.</translation>
+ </message>
+ <message id="logger-settings-autoreset_logging-switch-label">
+ <source>Automatically reset logging on exit</source>
+ <extracomment>Text switch label</extracomment>
+ <translation>Automatically reset logging on exit</translation>
+ </message>
+ <message id="logger-settings-autoreset_logging-switch-description">
+ <source>Reset all logging categories to their default values when the application is exiting. Otherwise logging would continue in the background, wasting the system resources and eating up your battery.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation>Reset all logging categories to their default values when the application is exiting. Otherwise logging would continue in the background, wasting the system resources and eating up your battery.</translation>
+ </message>
</context>
</TS>
|