Kaydet (Commit) 9940361f authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

Provide client with state of server on startup.

Change-Id: Ic516afd65025cf4a8c7d3539d9010ad30e05e429
üst 0edc04d2
...@@ -44,6 +44,17 @@ BluetoothServer::~BluetoothServer() ...@@ -44,6 +44,17 @@ BluetoothServer::~BluetoothServer()
{ {
} }
bool BluetoothServer::isDiscoverable()
{
return true;
}
void BluetoothServer::setDiscoverable( bool aDiscoverable )
{
}
void BluetoothServer::execute() void BluetoothServer::execute()
{ {
#if defined(LINUX) && defined(ENABLE_DBUS) #if defined(LINUX) && defined(ENABLE_DBUS)
......
...@@ -21,6 +21,9 @@ namespace sd ...@@ -21,6 +21,9 @@ namespace sd
{ {
public: public:
static void setup( std::vector<Communicator*>* pCommunicators ); static void setup( std::vector<Communicator*>* pCommunicators );
bool isDiscoverable();
void setDiscoverable( bool aDiscoverable );
private: private:
BluetoothServer( std::vector<Communicator*>* pCommunicators ); BluetoothServer( std::vector<Communicator*>* pCommunicators );
~BluetoothServer(); ~BluetoothServer();
......
...@@ -56,6 +56,11 @@ void Communicator::execute() ...@@ -56,6 +56,11 @@ void Communicator::execute()
{ {
presentationStarted( xPresentation->getController() ); presentationStarted( xPresentation->getController() );
} }
else
{
pTransmitter->addMessage( "slideshow_finished\n\n",
Transmitter::PRIORITY_HIGH );
}
} }
catch (uno::RuntimeException &) catch (uno::RuntimeException &)
{ {
...@@ -81,7 +86,6 @@ void Communicator::execute() ...@@ -81,7 +86,6 @@ void Communicator::execute()
aCommand.clear(); aCommand.clear();
} }
} }
// TODO: deal with transmision errors gracefully.
disposeListener(); disposeListener();
pTransmitter->notifyFinished(); pTransmitter->notifyFinished();
......
...@@ -127,6 +127,7 @@ void RemoteServer::execute() ...@@ -127,6 +127,7 @@ void RemoteServer::execute()
// Check if we already have this server. // Check if we already have this server.
Reference< XNameAccess > xConfig = officecfg::Office::Impress::Misc::AuthorisedRemotes::get(); Reference< XNameAccess > xConfig = officecfg::Office::Impress::Misc::AuthorisedRemotes::get();
Sequence< OUString > aNames = xConfig->getElementNames(); Sequence< OUString > aNames = xConfig->getElementNames();
bool aFound = false;
for ( int i = 0; i < aNames.getLength(); i++ ) for ( int i = 0; i < aNames.getLength(); i++ )
{ {
if ( aNames[i].equals( pClient->mName ) ) if ( aNames[i].equals( pClient->mName ) )
...@@ -138,12 +139,15 @@ void RemoteServer::execute() ...@@ -138,12 +139,15 @@ void RemoteServer::execute()
if ( sPin.equals( pClient->mPin ) ) { if ( sPin.equals( pClient->mPin ) ) {
connectClient( pClient, sPin ); 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" ) ); strlen( "LO_SERVER_VALIDATING_PIN\n\n" ) );
} else { } else {
delete pSocket; delete pSocket;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment