1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #ifndef INCLUDED_SD_SOURCE_UI_REMOTECONTROL_COMMUNICATOR_HXX
10 #define INCLUDED_SD_SOURCE_UI_REMOTECONTROL_COMMUNICATOR_HXX
14 #include <rtl/ref.hxx>
15 #include <salhelper/thread.hxx>
17 namespace com
{ namespace sun
{ namespace star
{ namespace uno
{ template <typename
> class Reference
; } } } }
18 namespace com
{ namespace sun
{ namespace star
{ namespace presentation
{ class XSlideShowController
; } } } }
19 namespace sd
{ struct IBluetoothSocket
; }
21 #define CHARSET RTL_TEXTENCODING_UTF8
28 /** Class used for communication with one single client, dealing with all
29 * tasks specific to this client.
31 * Needs to be created, then started using launch(), disposes itself.
33 class Communicator
: public salhelper::Thread
36 explicit Communicator( std::unique_ptr
<IBluetoothSocket
> pSocket
);
37 virtual ~Communicator() override
;
39 void presentationStarted( const css::uno::Reference
<
40 css::presentation::XSlideShowController
> &rController
);
41 void informListenerDestroyed();
42 void disposeListener();
46 void execute() override
;
47 std::unique_ptr
<IBluetoothSocket
> mpSocket
;
49 std::unique_ptr
<Transmitter
> pTransmitter
;
50 rtl::Reference
<Listener
> mListener
;
54 #endif // INCLUDED_SD_SOURCE_UI_REMOTECONTROL_COMMUNICATOR_HXX
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */