sd/source/ui/remotecontrol/BluetoothServer.cxx | 11 +++++++++++ sd/source/ui/remotecontrol/BluetoothServer.hxx | 3 +++ sd/source/ui/remotecontrol/Communicator.cxx | 6 +++++- sd/source/ui/remotecontrol/Server.cxx | 8 ++++++-- 4 files changed, 25 insertions(+), 3 deletions(-)
New commits: commit 9940361f6127617c94bcd65b813f257245b61fcf Author: Andrzej J.R. Hunt <[email protected]> Date: Tue Sep 18 11:16:45 2012 +0200 Provide client with state of server on startup. Change-Id: Ic516afd65025cf4a8c7d3539d9010ad30e05e429 diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 01adb96..5c9e177 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -44,6 +44,17 @@ BluetoothServer::~BluetoothServer() { } +bool BluetoothServer::isDiscoverable() +{ + return true; +} + +void BluetoothServer::setDiscoverable( bool aDiscoverable ) +{ + +} + + void BluetoothServer::execute() { #if defined(LINUX) && defined(ENABLE_DBUS) diff --git a/sd/source/ui/remotecontrol/BluetoothServer.hxx b/sd/source/ui/remotecontrol/BluetoothServer.hxx index 2cd6dbe..e49046a 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.hxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.hxx @@ -21,6 +21,9 @@ namespace sd { public: static void setup( std::vector<Communicator*>* pCommunicators ); + + bool isDiscoverable(); + void setDiscoverable( bool aDiscoverable ); private: BluetoothServer( std::vector<Communicator*>* pCommunicators ); ~BluetoothServer(); diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx index 779ccf5..02a39d8 100644 --- a/sd/source/ui/remotecontrol/Communicator.cxx +++ b/sd/source/ui/remotecontrol/Communicator.cxx @@ -56,6 +56,11 @@ void Communicator::execute() { presentationStarted( xPresentation->getController() ); } + else + { + pTransmitter->addMessage( "slideshow_finished\n\n", + Transmitter::PRIORITY_HIGH ); + } } catch (uno::RuntimeException &) { @@ -81,7 +86,6 @@ void Communicator::execute() aCommand.clear(); } } - // TODO: deal with transmision errors gracefully. disposeListener(); pTransmitter->notifyFinished(); diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 51376f3..e662d32 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -127,6 +127,7 @@ void RemoteServer::execute() // Check if we already have this server. Reference< XNameAccess > xConfig = officecfg::Office::Impress::Misc::AuthorisedRemotes::get(); Sequence< OUString > aNames = xConfig->getElementNames(); + bool aFound = false; for ( int i = 0; i < aNames.getLength(); i++ ) { if ( aNames[i].equals( pClient->mName ) ) @@ -138,12 +139,15 @@ void RemoteServer::execute() if ( sPin.equals( pClient->mPin ) ) { connectClient( pClient, sPin ); + aFound = true; + break; } - break; } } - pSocket->write( "LO_SERVER_VALIDATING_PIN\n\n", + // Pin not found so inform the client. + if ( !aFound ) + pSocket->write( "LO_SERVER_VALIDATING_PIN\n\n", strlen( "LO_SERVER_VALIDATING_PIN\n\n" ) ); } else { delete pSocket; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
