summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2012-10-21 14:54:53 +0200
committerRene Engelhard <rene@debian.org>2012-10-21 23:01:47 +0200
commit7c8c73dd5cf84050a8a2c51b04d7f5278b409fd7 (patch)
treecd340ea358a42b8638377102306b7e12df011e7e /sd
parent22238981b9f271d75f4d4c8b39b56cbc3616bff2 (diff)
fix sdremote related configure switches
sdremote itself apparently works also over IP (WLAN), so we don't need to disable it when we just don't want/have bluetooth. And also dbus is also needed in the bluez case Change-Id: I55ba07cd715d1e9bd641ef28e2391e4fe85b85e0
Diffstat (limited to 'sd')
-rw-r--r--sd/Library_sd.mk11
-rw-r--r--sd/Library_sdui.mk7
-rw-r--r--sd/source/ui/dlg/RemoteDialog.cxx8
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx8
4 files changed, 31 insertions, 3 deletions
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index ba2fe9ef4ff8..ae4b8a59baea 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -513,7 +513,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
ifeq ($(ENABLE_SDREMOTE),YES)
$(eval $(call gb_Library_add_exception_objects,sd,\
- sd/source/ui/remotecontrol/BluetoothServer \
sd/source/ui/remotecontrol/BufferedStreamSocket \
sd/source/ui/remotecontrol/Communicator \
sd/source/ui/remotecontrol/DiscoveryService \
@@ -528,6 +527,16 @@ $(eval $(call gb_Library_add_defs,sd,\
-DENABLE_SDREMOTE \
))
+ifeq ($(ENABLE_BLUETOOTH),YES)
+$(eval $(call gb_Library_add_exception_objects,sd,\
+ sd/source/ui/remotecontrol/BluetoothServer \
+))
+
+$(eval $(call gb_Library_add_defs,sd,\
+ -DENABLE_BLUETOOTH \
+))
+endif
+
endif
ifeq ($(strip $(GUI)),WNT)
diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk
index 98c1fe96c573..9d4ec750fd0b 100644
--- a/sd/Library_sdui.mk
+++ b/sd/Library_sdui.mk
@@ -41,6 +41,13 @@ ifeq ($(ENABLE_SDREMOTE),YES)
$(eval $(call gb_Library_add_defs,sdui,\
-DENABLE_SDREMOTE \
))
+
+ifeq ($(ENABLE_BLUETOOTH),YES)
+$(eval $(call gb_Library_add_defs,sdui,\
+ -DENABLE_BLUETOOTH \
+))
+endif
+
endif
$(eval $(call gb_Library_use_sdk_api,sdui))
diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx
index c04e77b3bf54..1d52dc5448ef 100644
--- a/sd/source/ui/dlg/RemoteDialog.cxx
+++ b/sd/source/ui/dlg/RemoteDialog.cxx
@@ -28,9 +28,13 @@ RemoteDialog::RemoteDialog( Window *pWindow ) :
#ifdef ENABLE_SDREMOTE
FreeResource();
+#ifdef ENABLE_BLUETOOTH
mPreviouslyDiscoverable = RemoteServer::isBluetoothDiscoverable();
if ( !mPreviouslyDiscoverable )
RemoteServer::setBluetoothDiscoverable( true );
+#else
+ RemoteServer::setBluetoothDiscoverable( false );
+#endif
vector<ClientInfo*> aClients( RemoteServer::getClients() );
@@ -57,7 +61,7 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
{
// setBusy( true );
// Fixme: Try and connect
-#ifdef ENABLE_SDREMOTE
+#if defined(ENABLE_SDREMOTE) && defined(ENABLE_BLUETOOTH)
long aSelected = mClientBox.GetActiveEntryIndex();
if ( aSelected < 0 )
return 1;
@@ -75,7 +79,7 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton)
IMPL_LINK_NOARG( RemoteDialog, CloseHdl )
{
-#ifdef ENABLE_SDREMOTE
+#if defined(ENABLE_SDREMOTE) && defined(ENABLE_BLUETOOTH)
if ( !mPreviouslyDiscoverable )
{
RemoteServer::setBluetoothDiscoverable( false );
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index deb881431f82..220a3b237ac5 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -175,7 +175,9 @@ void RemoteServer::setup()
spServer = new RemoteServer();
spServer->launch();
+#ifdef ENABLE_BLUETOOTH
sd::BluetoothServer::setup( &(spServer->mCommunicators) );
+#endif
}
@@ -307,11 +309,17 @@ void SdDLL::RegisterRemotes()
bool RemoteServer::isBluetoothDiscoverable()
{
+#ifdef ENABLE_BLUETOOTH
return BluetoothServer::isDiscoverable();
+#else
+ return false;
+#endif
}
void RemoteServer::setBluetoothDiscoverable( bool aDiscoverable )
{
+#ifdef ENABLE_BLUETOOTH
BluetoothServer::setDiscoverable( aDiscoverable );
+#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */