diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-03-01 12:19:22 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-03-01 12:19:22 +0100 |
commit | 846e0f15635bfa361d2ff32dbd77b2edcef7854f (patch) | |
tree | ecf4f2d99b40d68fb20f40808e6a7f172f93fc5a /sd | |
parent | 2ee838d7ad7091fb3e24f362d791b7b59ca983f7 (diff) |
sd: BluetoothServer: put the ifdeffery in the right place
Change-Id: Ide62e3624271c3550e17ea2386363cffe8c2897d
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/remotecontrol/BluetoothServer.cxx | 23 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/BluetoothServer.hxx | 8 |
2 files changed, 13 insertions, 18 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 0c6b208fc670..fa919ab403e0 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -14,10 +14,6 @@ #include <sal/log.hxx> -#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS) -# define LINUX_BLUETOOTH -#endif - #ifdef LINUX_BLUETOOTH #include <glib.h> #include <dbus/dbus.h> @@ -93,18 +89,18 @@ struct DBusObject { } }; -struct sd::BluetoothServerImpl { +struct sd::BluetoothServer::Impl { // the glib mainloop running in the thread GMainContext *mpContext; DBusConnection *mpConnection; DBusObject *mpService; volatile bool mbExitMainloop; - BluetoothServerImpl() : - mpContext( g_main_context_new() ), - mpConnection( NULL ), - mpService( NULL ), - mbExitMainloop( false ) + Impl() + : mpContext( g_main_context_new() ) + , mpConnection( NULL ) + , mpService( NULL ) + , mbExitMainloop( false ) { } DBusObject *getAdapter() @@ -579,11 +575,6 @@ registerWithDefaultAdapter( DBusConnection *pConnection ) return pService; } -#else - -// MSVC needs this definition even though it's never used -struct sd::BluetoothServerImpl { }; - #endif // LINUX_BLUETOOTH BluetoothServer::BluetoothServer( std::vector<Communicator*>* pCommunicators ) @@ -591,7 +582,7 @@ BluetoothServer::BluetoothServer( std::vector<Communicator*>* pCommunicators ) mpCommunicators( pCommunicators ) { #ifdef LINUX_BLUETOOTH - mpImpl.reset(new BluetoothServerImpl()); + mpImpl.reset(new BluetoothServer::Impl()); #endif } diff --git a/sd/source/ui/remotecontrol/BluetoothServer.hxx b/sd/source/ui/remotecontrol/BluetoothServer.hxx index 756129a61796..9d417d431405 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.hxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.hxx @@ -14,11 +14,14 @@ #include <boost/scoped_ptr.hpp> +#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS) +# define LINUX_BLUETOOTH +#endif + namespace sd { class Communicator; - struct BluetoothServerImpl; class BluetoothServer: public osl::Thread { @@ -43,7 +46,8 @@ namespace sd static BluetoothServer *spServer; #ifdef LINUX_BLUETOOTH - boost::scoped_ptr<BluetoothServerImpl> mpImpl; + struct Impl; + boost::scoped_ptr<Impl> mpImpl; #endif virtual void SAL_CALL run(); |