LibreOffice Module sd (master) 1
Communicator.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9#pragma once
10
11#include <memory>
12
13#include <rtl/ref.hxx>
14#include <salhelper/thread.hxx>
15
16namespace com::sun::star::uno { template <typename > class Reference; }
17namespace com::sun::star::presentation { class XSlideShowController; }
18namespace sd { struct IBluetoothSocket; }
19
20namespace sd
21{
22
23 class Transmitter;
24 class Listener;
25
32 {
33 public:
34 explicit Communicator( std::unique_ptr<IBluetoothSocket> pSocket );
35 virtual ~Communicator() override;
36
37 void presentationStarted( const css::uno::Reference<
38 css::presentation::XSlideShowController > &rController );
40 void disposeListener();
41 void forceClose();
42
43 private:
44 void execute() override;
45 std::unique_ptr<IBluetoothSocket> mpSocket;
46
47 std::unique_ptr<Transmitter> pTransmitter;
49 };
50}
51
52/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Class used for communication with one single client, dealing with all tasks specific to this client.
virtual ~Communicator() override
std::unique_ptr< Transmitter > pTransmitter
void forceClose()
Close the underlying socket from another thread to force an early exit / termination.
void presentationStarted(const css::uno::Reference< css::presentation::XSlideShowController > &rController)
std::unique_ptr< IBluetoothSocket > mpSocket
void execute() override
void informListenerDestroyed()
rtl::Reference< Listener > mListener
Communicator(std::unique_ptr< IBluetoothSocket > pSocket)
Reference