diff --git a/connd/com.jollamobile.Connectiond.xml b/connd/com.jollamobile.Connectiond.xml
index 1e4f17e..3b76516 100644
--- a/connd/com.jollamobile.Connectiond.xml
+++ b/connd/com.jollamobile.Connectiond.xml
@@ -17,6 +17,7 @@
+
diff --git a/connd/conn.xml b/connd/conn.xml
deleted file mode 100644
index 53d8392..0000000
--- a/connd/conn.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/connd/connadaptor.h b/connd/connadaptor.h
index bad84e4..583db3c 100644
--- a/connd/connadaptor.h
+++ b/connd/connadaptor.h
@@ -46,6 +46,7 @@ class ConnAdaptor: public QDBusAbstractAdaptor
" \n"
" \n"
" \n"
+" \n"
" \n"
" \n"
" \n"
@@ -71,7 +72,7 @@ public Q_SLOTS: // METHODS
void sendUserReply(const QVariantMap &input);
Q_SIGNALS: // SIGNALS
void connectionRequest();
- void connectionState(const QString &state);
+ void connectionState(const QString &state, const QString &type);
void errorReported(const QString &error);
void requestBrowser(const QString &url);
void userInputCanceled();
diff --git a/connd/connd.pro b/connd/connd.pro
index 6e3b784..6fd2411 100644
--- a/connd/connd.pro
+++ b/connd/connd.pro
@@ -13,7 +13,7 @@ QT -= gui
INCLUDEPATH += libconnman-qt
-#INCLUDEPATH += lipstick
+INCLUDEPATH += lipstick
OTHER_FILES += com.jolla.Connectiond.xml
@@ -30,7 +30,7 @@ HEADERS+= \
connadaptor.h
LIBS += -lconnman-qt4
-#LIBS += -llipstick
+LIBS += -llipstick
target.path = /usr/bin
INSTALLS += target
diff --git a/connd/qconnectionmanager.cpp b/connd/qconnectionmanager.cpp
index d7afcda..934493e 100644
--- a/connd/qconnectionmanager.cpp
+++ b/connd/qconnectionmanager.cpp
@@ -25,31 +25,48 @@
//#include
//#include
+#include
+
#include
#include
#include
+#include
//#include
QConnectionManager* QConnectionManager::self = NULL;
+#define CONND_SERVICE "com.jolla.Connectiond"
+#define CONND_PATH "/Connectiond"
+
+
+// TODO single connection
+
QConnectionManager::QConnectionManager(QObject *parent) :
QObject(parent),
netman(NetworkManagerFactory::createInstance()),
- netService(0),
+ // netService(0),
okToConnect(0),
currentNetworkState(QString()),
currentType(QString()),
- serviceConnect(0)
+ serviceConnect(0),
+ currentNotification(0)
{
+ bool available = QDBusConnection::sessionBus().interface()->isServiceRegistered(CONND_SERVICE);
+
+ qDebug() << Q_FUNC_INFO << available;
connectionAdaptor = new ConnAdaptor(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
- if (!dbus.registerObject("/Connectiond", this)) {
- qDebug() << "XXXXXXXXXXX could not register object XXXXXXXXXXXXXXXXXX";
- }
- if (!dbus.registerService("com.jolla.Connectiond")) {
+
+ if (!dbus.registerService(CONND_SERVICE)/*,
+ QDBusConnectionInterface::ReplaceExistingService,
+ QDBusConnectionInterface::DontAllowReplacement*/) {
qDebug() << "XXXXXXXXXXX could not register service XXXXXXXXXXXXXXXXXX";
}
+
+ if (!dbus.registerObject(CONND_PATH, this)) {
+ qDebug() << "XXXXXXXXXXX could not register object XXXXXXXXXXXXXXXXXX";
+ }
qDebug() << "XXXXXXXXXXX everything hunky dory XXXXXXXXXXXXXXXXXX";
ua = new UserAgent(this);
@@ -66,8 +83,23 @@ QConnectionManager::QConnectionManager(QObject *parent) :
ua->sendConnectReply("Clear");
connect(netman,SIGNAL(serviceAdded(QString)),this,SLOT(onServiceAdded(QString)));
- connect(netman,SIGNAL(stateChanged(QString)),this,SLOT(networkStateChanged(QString)));
+ connect(netman,SIGNAL(serviceRemoved(QString)),this,SLOT(onServiceRemoved(QString)));
+
+ connect(netman,SIGNAL(defaultRouteChanged(NetworkService*)),
+ this,SLOT(defaultRouteChanged(NetworkService*)));
+
+ updateServicesMap();
currentNetworkState = netman->state();
+
+ // let me control autoconnect
+ netman->setSessionMode(true);
+
+// sessionAgent = new SessionAgent("/ConnectionSessionAgent",this);
+// sessionAgent->setConnectionType("internet");
+// sessionAgent->setAllowedBearers(QStringList() << "wifi" << "cellular" << "bluetooth");
+// connect(sessionAgent,SIGNAL(settingsUpdated(QVariantMap)),
+// this,SLOT(sessionSettingsUpdated(QVariantMap)));
+
}
QConnectionManager::~QConnectionManager()
@@ -130,51 +162,47 @@ void QConnectionManager::sendUserReply(const QVariantMap &input)
ua->sendUserReply(input);
}
-void QConnectionManager::networkStateChanged(const QString &state)
+void QConnectionManager::onServiceAdded(const QString &servicePath)
{
- if (serviceConnect)
- return;
- QString msg;
- if (currentNetworkState == "idle" && state == "ready") {
- msg = "Connecting...";
- } else if (currentNetworkState == "ready" && state == "online") {
- msg = "Connected";
- } else if (state == "offline") {
- msg = "Offline";
- } else if (state == "idle") {
- msg = "Disconnected";
- }
- qDebug() << Q_FUNC_INFO << currentNetworkState << state << msg;
- Q_EMIT connectionState(msg);
+ //TODO connection migration?
- // if (!msg.isEmpty()) {
- // emit serviceStateChanged(msg);
- // }
- currentNetworkState = state;
-}
+ // qDebug() << Q_FUNC_INFO << servicePath << okToConnect << currentType;
+ // qDebug() << "connected services" << connectedServices;
-void QConnectionManager::onServiceAdded(const QString &servicePath)
-{
-// qDebug() << Q_FUNC_INFO << servicePath;
- if (okToConnect) {
- if (netService) {
- delete netService;
- netService = 0;
- }
- netService = new NetworkService(this);
- netService->setPath(servicePath);
- if (netService->favorite()) {
- serviceConnect = true;
- QObject::connect(netService, SIGNAL(stateChanged(QString)),
- this,SLOT(stateChanged(QString)), Qt::UniqueConnection);
- QObject::connect(netService, SIGNAL(connectRequestFailed(QString)),
- this,SLOT(serviceErrorChanged(QString)), Qt::UniqueConnection);
+ if (!servicesMap.contains(servicePath)) {
+ updateServicesMap();
+
+ // NetworkService *netService = new NetworkService(this);
+ // netService->setPath(servicePath);
+ // qDebug() << Q_FUNC_INFO << "add" << netService->name();
+ ////TODO sort ?
+
+ // servicesMap.insert(servicePath, netService);
+
+ // QObject::connect(servicesMap.value(servicePath), SIGNAL(stateChanged(QString)),
+ // this,SLOT(stateChanged(QString)), Qt::UniqueConnection);
+ }
- netService->requestConnect();
+
+ if (okToConnect && !currentType.isEmpty()) {
+ if (servicesMap.contains(servicePath)
+ && servicesMap.value(servicePath)->type() == currentType
+ && servicesMap.value(servicePath)->favorite()) {
+ connectToNetworkService(servicePath);
+ } else {
+ Q_EMIT wlanConfigurationNeeded();
+ serviceConnect = false;
}
}
}
+void QConnectionManager::onServiceRemoved(const QString &servicePath)
+{
+ qDebug() << Q_FUNC_INFO << servicePath;
+ updateServicesMap();
+ qDebug() << servicesMap.keys();
+}
+
void QConnectionManager::serviceErrorChanged(const QString &error)
{
qDebug() << Q_FUNC_INFO << error;
@@ -183,46 +211,71 @@ void QConnectionManager::serviceErrorChanged(const QString &error)
void QConnectionManager::stateChanged(const QString &state)
{
- Q_UNUSED(state)
- QString msg;
- if ((currentNetworkState == "idle" && state == "association")
- || (currentNetworkState == "association" && state == "configuration")
- || (currentNetworkState == "configuration" && state == "ready")) {
- msg = "Connecting...";
- } else if (currentNetworkState == "ready" && state == "online") {
- msg = "Connected";
- serviceConnect = false;
- } else if (state == "offline") {
- msg = "Offline";
- }
- qDebug() << Q_FUNC_INFO << currentNetworkState << state << msg;
- Q_EMIT connectionState(msg);
- // if (!msg.isEmpty()) {
- // emit serviceStateChanged(msg);
- // }
- currentNetworkState = state;
+ NetworkService *service = qobject_cast(sender());
+
+ qDebug() << Q_FUNC_INFO << state << service->name();
+
+// qDebug() << Q_FUNC_INFO << currentNetworkState << state;
+// if (state == "online" || state == "association" || state == "idle"))
+
+ if (!(currentNetworkState == "online" && state == "association"))
+ Q_EMIT connectionState(state, service->type());
+
+ currentNetworkState = state;
+ qDebug() << Q_FUNC_INFO << state ;
}
bool QConnectionManager::autoConnect()
{
- QStringList techList = netman->technologiesList();
- Q_FOREACH (const QString &tech, techList) {
+ qDebug() << Q_FUNC_INFO << servicesMap.keys() << servicesMap.keys().count();
+
+ QString selectedService;
+ uint strength = 0;
+ QString currentType;
+
+ Q_FOREACH (const QString &servicePath, servicesMap.keys()) {
- QVector serviceList = netman->getServices(tech);
+ if(servicesMap.value(servicePath)->autoConnect()
+ && servicesMap.value(servicePath)->favorite()) {
- Q_FOREACH (NetworkService *service, serviceList) {
- if(service->autoConnect() && service->favorite()) {
- serviceConnect = true;
- QObject::connect(service, SIGNAL(stateChanged(QString)),
- this,SLOT(stateChanged(QString)), Qt::UniqueConnection);
- QObject::connect(service, SIGNAL(connectRequestFailed(QString)),
- this,SLOT(serviceErrorChanged(QString)), Qt::UniqueConnection);
+ qDebug() << servicesMap.value(servicePath)->name()
+ << servicesMap.value(servicePath)->strength();
- service->requestConnect();
- return true;
+ if (!selectedService.isEmpty()
+ && (!currentType.isEmpty()
+ && servicesMap.value(servicePath)->type() != currentType)) {
+ qDebug() << "break here";
+ break;
}
+ if ((servicesMap.value(servicePath)->strength() > strength)) {
+
+ selectedService = servicePath;
+ strength = servicesMap.value(servicePath)->strength();
+ }
+ currentType = servicesMap.value(servicePath)->type();
+
+ // sessionAgent->setAllowedBearers(QStringList() <type());//<< "wifi" << "cellular");
+ // sessionAgent->setAllowedBearers(QStringList() << "cellular" << "wifi");
+ // sessionAgent->requestConnect();
+
+ // QObject::connect(service, SIGNAL(stateChanged(QString)),
+ // this,SLOT(stateChanged(QString)), Qt::UniqueConnection);
+ // QObject::connect(service, SIGNAL(connectRequestFailed(QString)),
+ // this,SLOT(serviceErrorChanged(QString)), Qt::UniqueConnection);
+
}
}
+
+ qDebug() << "out of loop now";
+ if (!selectedService.isEmpty()) {
+ qDebug() << Q_FUNC_INFO << selectedService;
+ qDebug() << Q_FUNC_INFO << servicesMap.value(selectedService)->name();
+ serviceConnect = true;
+ servicesMap.value(selectedService)->requestConnect();
+ return true;
+ }
+
+ qDebug() << Q_FUNC_INFO << false;
return false;
}
@@ -235,7 +288,7 @@ void QConnectionManager::connectToType(const QString &type)
NetworkTechnology netTech;
netTech.setPath(techPath);
- if (!netTech.powered()) {
+ if (!netTech.powered()) { //?
netTech.setPowered(true);
}
QStringList servicesList = netman->servicesList(type);
@@ -244,53 +297,120 @@ void QConnectionManager::connectToType(const QString &type)
if (servicesList.isEmpty()) {
if (type == "wifi") {
+ okToConnect = true;
QObject::connect(&netTech,SIGNAL(scanFinished()),this,SLOT(onScanFinished()));
netTech.scan();
} else {
onScanFinished();
}
} else {
- if (netService) {
- delete netService;
- netService = 0;
- }
- netService = new NetworkService(this);
+ currentType = "";
bool needConfig = false;
- Q_FOREACH (const QString path, servicesList) {
+qDebug() << Q_FUNC_INFO << servicesMap.keys();
- netService->setPath(path);
+ Q_FOREACH (const QString path, servicesList) {
+ qDebug() << Q_FUNC_INFO << path << servicesMap.contains(path);
- if (netService->favorite()) {
+ if (servicesMap.contains(path) && servicesMap.value(path)->favorite()) {
qDebug() << "power on, fav";
+ connectToNetworkService(path);
needConfig = false;
- serviceConnect = true;
- QObject::connect(netService, SIGNAL(stateChanged(QString)),
- this,SLOT(stateChanged(QString)), Qt::UniqueConnection);
-
- QObject::connect(netService, SIGNAL(connectRequestFailed(QString)),
- this,SLOT(serviceErrorChanged(QString)), Qt::UniqueConnection);
-
- qDebug() << Q_FUNC_INFO << "just connect to this thing";
-
-// NetworkTechnology *tech = netman->getTechnology(netService->type());
-// tech->setIdleTimeout(120);
-
- netService->requestConnect();
- okToConnect = false;
return;
} else {
needConfig = true;
}
}
+
if (needConfig) {
qDebug() << Q_FUNC_INFO << "no favorite service found. Configuration needed";
Q_EMIT wlanConfigurationNeeded();
+ serviceConnect = false;
+ okToConnect = false;
}
}
+}
+
+void QConnectionManager::connectToNetworkService(const QString &servicePath)
+{
+ serviceConnect = true;
+
+ QObject::connect(servicesMap.value(servicePath), SIGNAL(connectRequestFailed(QString)),
+ this,SLOT(serviceErrorChanged(QString)), Qt::UniqueConnection);
+
+ qDebug() << Q_FUNC_INFO << "just connect to this thing"
+ << servicesMap.value(servicePath)->type();
+ qDebug() << Q_FUNC_INFO << "set idle timeout";
+ NetworkTechnology *tech = netman->getTechnology(servicesMap.value(servicePath)->type());
+ tech->setIdleTimeout(120);
+ qDebug() << Q_FUNC_INFO << "idle timeout set";
+
+ servicesMap.value(servicePath)->requestConnect();
+
+// if (servicesMap.value(servicePath)->type() == "wifi")
+// sessionAgent->setAllowedBearers(QStringList() << "wifi");// << "cellular" << "bluetooth");
+// else if (servicesMap.value(servicePath)->type() == "cellular")
+// sessionAgent->setAllowedBearers(QStringList() << "cellular");// << "wifi" << "bluetooth");
+// sessionAgent->requestConnect();
+
+ okToConnect = false;
}
+
void QConnectionManager::onScanFinished()
{
qDebug() << Q_FUNC_INFO;
}
+
+void QConnectionManager::showNotification(const QString &/*message*/,int /*timeout*/)
+{
+// qDebug() << Q_FUNC_INFO << message;
+// if (message.isEmpty())
+// return;
+
+// NotificationManager *manager = NotificationManager::instance();
+// QVariantHash hints;
+// hints.insert(NotificationManager::HINT_URGENCY, 2);
+// hints.insert(NotificationManager::HINT_CATEGORY, "connection.mobile");
+// uint tmpUint;
+// // hints.insert(NotificationManager::HINT_PREVIEW_BODY, message);
+
+// tmpUint = manager->Notify(qApp->applicationName(), 0, QString(), QString(),
+// QString(), QStringList(), hints, -1);
+// currentNotification = tmpUint;
+}
+
+void QConnectionManager::defaultRouteChanged(NetworkService* defaultRoute)
+{
+ qDebug() << Q_FUNC_INFO << defaultRoute;
+
+ if (defaultRoute) //this apparently can be null
+ Q_EMIT connectionState(defaultRoute->state(), defaultRoute->type());
+ else
+ Q_EMIT connectionState(QString(), QString());
+
+}
+
+void QConnectionManager::updateServicesMap()
+{
+ QStringList techPreferenceList;
+ techPreferenceList << "wifi" << "cellular" << "bluetooth";
+ //TODO settings
+ servicesMap.clear();
+
+ Q_FOREACH (const QString &tech,techPreferenceList) {
+ QVector services = netman->getServices(tech);
+
+ Q_FOREACH (NetworkService *serv, services) {
+ servicesMap.insert(serv->path(), serv);
+ qDebug() << Q_FUNC_INFO <<"::::::::::::::::::::: "<< serv->path();
+ QObject::connect(serv, SIGNAL(stateChanged(QString)),
+ this,SLOT(stateChanged(QString)), Qt::UniqueConnection);
+ }
+ }
+}
+
+void QConnectionManager::sessionSettingsUpdated(const QVariantMap &map)
+{
+ qDebug() < servicePaths;
+ QHash servicesMap;
private slots:
void onScanFinished();
+ void updateServicesMap();
+ void sessionSettingsUpdated(const QVariantMap &map);
};
diff --git a/connectionagent.pro.user b/connectionagent.pro.user
index d349692..d741061 100644
--- a/connectionagent.pro.user
+++ b/connectionagent.pro.user
@@ -1,6 +1,6 @@
-
+
ProjectExplorer.Project.ActiveTarget
diff --git a/connectionagentplugin/connectionagentplugin.cpp b/connectionagentplugin/connectionagentplugin.cpp
index 1fdb1c9..f4bb693 100644
--- a/connectionagentplugin/connectionagentplugin.cpp
+++ b/connectionagentplugin/connectionagentplugin.cpp
@@ -47,6 +47,55 @@ ConnectionAgentPlugin::~ConnectionAgentPlugin()
{
}
+void ConnectionAgentPlugin::connectToConnectiond(QString)
+{
+ qDebug() << Q_FUNC_INFO << connManagerInterface;
+ if (connManagerInterface) {
+ delete connManagerInterface;
+ connManagerInterface = 0;
+ }
+
+ bool available = QDBusConnection::sessionBus().interface()->isServiceRegistered(CONND_SERVICE);
+ qDebug() << Q_FUNC_INFO << available;
+
+// if(!available) {
+ QDBusReply reply = QDBusConnection::sessionBus().interface()->startService(CONND_SERVICE);
+ if (!reply.isValid()) {
+ qDebug() << Q_FUNC_INFO << reply.error().message();
+ return;
+ }
+// }
+
+ if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(CONND_SERVICE)) {
+ qDebug() << Q_FUNC_INFO << QString("XXXXXXXXXXXXXXXXXXXXXXXXXX %1 not available").arg(CONND_SERVICE);
+ }
+
+ connManagerInterface = new com::jolla::Connectiond(CONND_SERVICE, CONND_PATH,
+ QDBusConnection::sessionBus(), this);
+ if (!connManagerInterface->isValid()) {
+ qDebug() << Q_FUNC_INFO << "is not valid interface";
+ }
+ connect(connManagerInterface,SIGNAL(connectionRequest()),
+ this,SLOT(onConnectionRequested()));
+ connect(connManagerInterface,SIGNAL(wlanConfigurationNeeded()),
+ this,SIGNAL(wlanConfigurationNeeded()));
+
+ connect(connManagerInterface,SIGNAL(userInputCanceled()),
+ this,SIGNAL(userInputCanceled()));
+
+ connect(connManagerInterface,SIGNAL(errorReported(QString)),
+ this,SLOT(onErrorReported(QString)));
+
+ connect(connManagerInterface,SIGNAL(connectionState(QString, QString)),
+ this,SLOT(onConnectionState(QString, QString)));
+
+ connect(connManagerInterface,SIGNAL(requestBrowser(QString)),
+ this,SLOT(onRequestBrowser(QString)));
+
+ connect(connManagerInterface,SIGNAL(userInputRequested(QString,QVariantMap)),
+ this,SLOT(onUserInputRequested(QString,QVariantMap)), Qt::UniqueConnection);
+}
+
void ConnectionAgentPlugin::sendUserReply(const QVariantMap &input)
{
qDebug() << Q_FUNC_INFO;
@@ -99,45 +148,6 @@ void ConnectionAgentPlugin::onConnectionRequested()
Q_EMIT connectionRequest();
}
-void ConnectionAgentPlugin::connectToConnectiond(QString)
-{
- if (connManagerInterface) {
- delete connManagerInterface;
- connManagerInterface = 0;
- }
-
- bool available = QDBusConnection::sessionBus().interface()->isServiceRegistered(CONND_SERVICE);
-
- if(!available) {
- QDBusReply reply = QDBusConnection::sessionBus().interface()->startService(CONND_SERVICE);
- if (!reply.isValid()) {
- qDebug() << Q_FUNC_INFO << reply.error().message();
- return;
- }
- }
-
- connManagerInterface = new com::jolla::Connectiond(CONND_SERVICE, CONND_PATH, QDBusConnection::sessionBus(), this);
-
- connect(connManagerInterface,SIGNAL(connectionRequest()),
- this,SLOT(onConnectionRequested()));
- connect(connManagerInterface,SIGNAL(wlanConfigurationNeeded()),
- this,SIGNAL(wlanConfigurationNeeded()));
-
- connect(connManagerInterface,SIGNAL(userInputCanceled()),
- this,SIGNAL(userInputCanceled()));
-
- connect(connManagerInterface,SIGNAL(errorReported(QString)),
- this,SLOT(onErrorReported(QString)));
-
- connect(connManagerInterface,SIGNAL(connectionState(QString)),
- this,SLOT(onConnectionState(QString)));
-
- connect(connManagerInterface,SIGNAL(requestBrowser(QString)),
- this,SLOT(onRequestBrowser(QString)));
-
- connect(connManagerInterface,SIGNAL(userInputRequested(QString,QVariantMap)),
- this,SLOT(onUserInputRequested(QString,QVariantMap)), Qt::UniqueConnection);
-}
void ConnectionAgentPlugin::connectiondUnregistered(QString)
{
@@ -153,8 +163,8 @@ void ConnectionAgentPlugin::onWlanConfigurationNeeded()
Q_EMIT wlanConfigurationNeeded();
}
-void ConnectionAgentPlugin::onConnectionState(const QString &state)
+void ConnectionAgentPlugin::onConnectionState(const QString &state, const QString &type)
{
- qDebug() << Q_FUNC_INFO << state;
- Q_EMIT connectionState(state);
+ qDebug() << Q_FUNC_INFO << state << type;
+ Q_EMIT connectionState(state, type);
}
diff --git a/connectionagentplugin/connectionagentplugin.h b/connectionagentplugin/connectionagentplugin.h
index e372fc3..3e0976a 100644
--- a/connectionagentplugin/connectionagentplugin.h
+++ b/connectionagentplugin/connectionagentplugin.h
@@ -42,7 +42,7 @@ public slots:
void errorReported(const QString &error);
void connectionRequest();
void wlanConfigurationNeeded();
- void connectionState(const QString &state);
+ void connectionState(const QString &state, const QString &type);
private:
com::jolla::Connectiond *connManagerInterface;
@@ -54,7 +54,7 @@ private slots:
void onUserInputRequested(const QString &service, const QVariantMap &fields);
void onConnectionRequested();
void onWlanConfigurationNeeded();
- void onConnectionState(const QString &state);
+ void onConnectionState(const QString &state, const QString &type);
void connectToConnectiond(const QString = QString());
void connectiondUnregistered(const QString = QString());
diff --git a/connectionagentplugin/connectionamanagerinterface.h b/connectionagentplugin/connectionamanagerinterface.h
index 2f47828..8d983b5 100644
--- a/connectionagentplugin/connectionamanagerinterface.h
+++ b/connectionagentplugin/connectionamanagerinterface.h
@@ -59,7 +59,7 @@ public Q_SLOTS: // METHODS
Q_SIGNALS: // SIGNALS
void connectionRequest();
- void connectionState(const QString &state);
+ void connectionState(const QString &state, const QString &type);
void errorReported(const QString &error);
void requestBrowser(const QString &url);
void userInputCanceled();
diff --git a/rpm/com.jolla.Connectiond.service b/rpm/com.jolla.Connectiond.service
index 5f78dc3..bd11ad6 100644
--- a/rpm/com.jolla.Connectiond.service
+++ b/rpm/com.jolla.Connectiond.service
@@ -1,6 +1,5 @@
-# (Lines starting with hash marks are comments)
-
-# Fixed section header (do not change):
[D-BUS Service]
Name=com.jolla.Connectiond
Exec=/usr/bin/connectionagent
+SystemdService=connectionagent.service
+Interface=/Connectiond
diff --git a/rpm/connectionagent.conf b/rpm/connectionagent.conf
index 7871fdc..f4a2057 100644
--- a/rpm/connectionagent.conf
+++ b/rpm/connectionagent.conf
@@ -1,11 +1,12 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
diff --git a/rpm/connectionagent.yaml b/rpm/connectionagent.yaml
index 50e5078..a383423 100644
--- a/rpm/connectionagent.yaml
+++ b/rpm/connectionagent.yaml
@@ -19,13 +19,13 @@ PkgConfigBR:
- QtCore
- QtDBus
-
+BuildRequires: pkgconfig(connman-qt)
+
Configure: none
Builder: qmake
Files:
- - "%{_usr}/bin/connectionagent"
- - "%{_usr}/share/dbus-1/services/com.jolla.Connectiond.service"
-
+ - "%{_bindir}/connectionagent"
+ - "%{_datadir}/dbus-1/services/com.jolla.Connectiond.service"
SubPackages:
- Name: declarative
Summary: Declarative plugin for connection agent.