summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2012-09-18 11:16:45 +0200
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2012-09-18 11:18:32 +0200
commit9940361f6127617c94bcd65b813f257245b61fcf (patch)
treeda620d40ac57d75d7026b7487f3e9863a5d2db75 /sd
parentWaE: calm android tinderboxen (diff)
downloadcore-9940361f6127617c94bcd65b813f257245b61fcf.tar.gz
core-9940361f6127617c94bcd65b813f257245b61fcf.zip
Provide client with state of server on startup.
Change-Id: Ic516afd65025cf4a8c7d3539d9010ad30e05e429
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx11
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.hxx3
-rw-r--r--sd/source/ui/remotecontrol/Communicator.cxx6
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx8
4 files changed, 25 insertions, 3 deletions
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 01adb96263fa..5c9e1771a788 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 2cd6dbe930fd..e49046a4a204 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 779ccf57cb86..02a39d8df7f1 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 51376f3f5373..e662d3215d24 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;