Skip to content
Snippets Groups Projects
Commit a0081598 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #27352: daemon: android client has no need for dbus

parent 475c2183
Branches
Tags
No related merge requests found
...@@ -32,57 +32,21 @@ ...@@ -32,57 +32,21 @@
#include "config.h" #include "config.h"
#endif #endif
#include <cstdlib>
#include "client/client.h" #include "client/client.h"
#include "global.h"
#include "manager.h"
#include "logger.h"
#include "instance-glue.h"
#include "client/callmanager.h" #include "client/callmanager.h"
#include "client/configurationmanager.h" #include "client/configurationmanager.h"
#if HAVE_DBUS Client::Client() : callManager_(new CallManager)
#include "client/networkmanager.h" , configurationManager_(new ConfigurationManager)
#endif , instanceManager_(0)
, dispatcher_(0)
#ifdef SFL_VIDEO
#include "video_controls.h"
#endif
Client::Client() : callManager_(0)
, configurationManager_(0)
#ifdef SFL_VIDEO #ifdef SFL_VIDEO
, videoControls_(0) , videoControls_(0)
#endif #endif
#ifdef USE_NETWORKMANAGER #ifdef USE_NETWORKMANAGER
, networkManager_(0) , networkManager_(0)
#endif #endif
{ {}
try {
callManager_ = new CallManager();
configurationManager_ = new ConfigurationManager();
#ifdef SFL_VIDEO
videoControls_ = new VideoControls(sessionConnection);
#endif
#ifdef USE_NETWORKMANAGER
DEBUG("DBUS system connection to system bus");
DBus::Connection systemConnection(DBus::Connection::SystemBus());
DEBUG("DBUS create the network manager from the system bus");
networkManager_ = new NetworkManager(systemConnection, "/org/freedesktop/NetworkManager", "");
#endif
} catch (const DBus::Error &err) {
ERROR("%s: %s, exiting\n", err.name(), err.what());
::exit(EXIT_FAILURE);
}
}
Client::~Client() Client::~Client()
{ {
...@@ -92,34 +56,14 @@ Client::~Client() ...@@ -92,34 +56,14 @@ Client::~Client()
#ifdef SFL_VIDEO #ifdef SFL_VIDEO
delete videoControls_; delete videoControls_;
#endif #endif
delete dispatcher_;
delete instanceManager_; delete instanceManager_;
delete configurationManager_; delete configurationManager_;
delete callManager_; delete callManager_;
delete dispatcher_;
} }
void Client::event_loop() void Client::event_loop()
{ {}
try {
dispatcher_->enter();
} catch (const DBus::Error &err) {
ERROR("%s: %s, quitting\n", err.name(), err.what());
return;
} catch (const std::exception &err) {
ERROR("%s: quitting\n", err.what());
return;
}
}
void Client::exit() void Client::exit()
{ {}
try {
dispatcher_->leave();
} catch (const DBus::Error &err) {
ERROR("%s: %s, quitting\n", err.name(), err.what());
return;
} catch (const std::exception &err) {
ERROR("%s: quitting\n", err.what());
return;
}
}
...@@ -9,20 +9,20 @@ BUILT_SOURCES= \ ...@@ -9,20 +9,20 @@ BUILT_SOURCES= \
if SFL_VIDEO if SFL_VIDEO
BUILT_SOURCES+=video_controls-glue.h BUILT_SOURCES+=video_controls-glue.h
video_controls-glue.h: ../video_controls-introspec.xml Makefile.am video_controls-glue.h: video_controls-introspec.xml Makefile.am
dbusxx-xml2cpp $< --adaptor=$@ dbusxx-xml2cpp $< --adaptor=$@
endif endif
# Rule to generate the binding headers # Rule to generate the binding headers
callmanager-glue.h: ../callmanager-introspec.xml Makefile.am callmanager-glue.h: callmanager-introspec.xml Makefile.am
dbusxx-xml2cpp $< --adaptor=$@ dbusxx-xml2cpp $< --adaptor=$@
# Rule to generate the binding headers # Rule to generate the binding headers
configurationmanager-glue.h: ../configurationmanager-introspec.xml Makefile.am configurationmanager-glue.h: configurationmanager-introspec.xml Makefile.am
dbusxx-xml2cpp $< --adaptor=$@ dbusxx-xml2cpp $< --adaptor=$@
# Rule to generate the binding headers # Rule to generate the binding headers
instance-glue.h: ../instance-introspec.xml Makefile.am instance-glue.h: instance-introspec.xml Makefile.am
dbusxx-xml2cpp $< --adaptor=$@ dbusxx-xml2cpp $< --adaptor=$@
libclient_la_SOURCES = \ libclient_la_SOURCES = \
...@@ -72,13 +72,13 @@ $(service_DATA): $(service_in_files) Makefile ...@@ -72,13 +72,13 @@ $(service_DATA): $(service_in_files) Makefile
sed -e "s|libexec|$(libdir)/sflphone|" $<> $@ sed -e "s|libexec|$(libdir)/sflphone|" $<> $@
EXTRA_DIST = README $(service_in_files) \ EXTRA_DIST = README $(service_in_files) \
../callmanager-introspec.xml \ callmanager-introspec.xml \
../configurationmanager-introspec.xml \ configurationmanager-introspec.xml \
../instance-introspec.xml \ instance-introspec.xml \
../org.freedesktop.NetworkManager.xml org.freedesktop.NetworkManager.xml
if SFL_VIDEO if SFL_VIDEO
EXTRA_DIST += ../video_controls-introspec.xml EXTRA_DIST += video_controls-introspec.xml
endif endif
CLEANFILES= \ CLEANFILES= \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment