From d030c4a2a54418b17e87f837092a33eae21f0588 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 17 Sep 2015 18:59:32 +0100 Subject: revert for mac and win unit case crashes after boost->std Change-Id: I82c7084f203a834c2d42f9527705288e6036019b --- sd/source/ui/remotecontrol/BluetoothServer.cxx | 7 ++++--- sd/source/ui/remotecontrol/BluetoothServer.hxx | 5 +++-- sd/source/ui/remotecontrol/Server.cxx | 14 +++++++------- 3 files changed, 14 insertions(+), 12 deletions(-) (limited to 'sd/source/ui/remotecontrol') diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index fb817ddc443f..0de7b9a8c74e 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -11,9 +11,10 @@ #include #include -#include #include +#include + #include #ifdef LINUX_BLUETOOTH @@ -701,7 +702,7 @@ getDBusBooleanProperty( DBusConnection *pConnection, DBusObject *pAdapter, *pBoolean = false; bool bRet = false; - std::unique_ptr< DBusObject > pProperties ( + ::boost::scoped_ptr< DBusObject > pProperties ( pAdapter->cloneForInterface( "org.freedesktop.DBus.Properties" ) ); DBusMessage *pMsg = pProperties->getMethodCall( "Get" ); @@ -762,7 +763,7 @@ setDBusBooleanProperty( DBusConnection *pConnection, DBusObject *pAdapter, { assert( pAdapter ); - std::unique_ptr< DBusObject > pProperties( + ::boost::scoped_ptr< DBusObject > pProperties( pAdapter->cloneForInterface( "org.freedesktop.DBus.Properties" ) ); DBusMessage *pMsg = pProperties->getMethodCall( "Set" ); diff --git a/sd/source/ui/remotecontrol/BluetoothServer.hxx b/sd/source/ui/remotecontrol/BluetoothServer.hxx index bb24268a000b..2427ed7c1f08 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.hxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.hxx @@ -10,9 +10,10 @@ #define INCLUDED_SD_SOURCE_UI_REMOTECONTROL_BLUETOOTHSERVER_HXX #include -#include #include +#include + #if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS) # define LINUX_BLUETOOTH #endif @@ -46,7 +47,7 @@ namespace sd #ifdef LINUX_BLUETOOTH struct Impl; - std::unique_ptr mpImpl; + boost::scoped_ptr mpImpl; #endif virtual void SAL_CALL run() SAL_OVERRIDE; diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index ad9dcc345df2..0b7f37a62f23 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -129,7 +129,7 @@ void RemoteServer::execute() OUString aAddress = aClientAddr.getHostname(); MutexGuard aGuard( sDataMutex ); - std::shared_ptr< ClientInfoInternal > pClient( + ::boost::shared_ptr< ClientInfoInternal > pClient( new ClientInfoInternal( OStringToOUString( aName, RTL_TEXTENCODING_UTF8 ), aAddress, false, pSocket, OStringToOUString( aPin, @@ -239,10 +239,10 @@ void RemoteServer::removeCommunicator( Communicator* mCommunicator ) } } -std::vector< std::shared_ptr< ClientInfo > > RemoteServer::getClients() +std::vector< ::boost::shared_ptr< ClientInfo > > RemoteServer::getClients() { SAL_INFO( "sdremote", "RemoteServer::getClients() called" ); - std::vector< std::shared_ptr< ClientInfo > > aClients; + std::vector< ::boost::shared_ptr< ClientInfo > > aClients; if ( spServer ) { MutexGuard aGuard( sDataMutex ); @@ -266,13 +266,13 @@ std::vector< std::shared_ptr< ClientInfo > > RemoteServer::getClients() Sequence< OUString > aNames = xConfig->getElementNames(); for ( int i = 0; i < aNames.getLength(); i++ ) { - aClients.push_back( std::shared_ptr< ClientInfo > ( new ClientInfo( aNames[i], "", true ) ) ); + aClients.push_back( ::boost::shared_ptr< ClientInfo > ( new ClientInfo( aNames[i], "", true ) ) ); } return aClients; } -bool RemoteServer::connectClient( std::shared_ptr< ClientInfo > pClient, const OUString& aPin ) +bool RemoteServer::connectClient( ::boost::shared_ptr< ClientInfo > pClient, const OUString& aPin ) { SAL_INFO( "sdremote", "RemoteServer::connectClient called" ); if ( !spServer ) @@ -321,7 +321,7 @@ bool RemoteServer::connectClient( std::shared_ptr< ClientInfo > pClient, const O sCommunicators.push_back( pCommunicator ); - for ( vector< std::shared_ptr< ClientInfoInternal > >::iterator aIt = spServer->mAvailableClients.begin(); + for ( vector< ::boost::shared_ptr< ClientInfoInternal > >::iterator aIt = spServer->mAvailableClients.begin(); aIt != spServer->mAvailableClients.end(); ++aIt ) { if ( pClient == *aIt ) @@ -339,7 +339,7 @@ bool RemoteServer::connectClient( std::shared_ptr< ClientInfo > pClient, const O } } -void RemoteServer::deauthoriseClient( std::shared_ptr< ClientInfo > pClient ) +void RemoteServer::deauthoriseClient( ::boost::shared_ptr< ClientInfo > pClient ) { // TODO: we probably want to forcefully disconnect at this point too? // But possibly via a separate function to allow just disconnecting from -- cgit