bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / remotecontrol / Transmitter.hxx
blob7044d8f1c852e35b41a3a3e2c7d473b820f31b35
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #ifndef INCLUDED_SD_SOURCE_UI_REMOTECONTROL_TRANSMITTER_HXX
11 #define INCLUDED_SD_SOURCE_UI_REMOTECONTROL_TRANSMITTER_HXX
13 #include <osl/conditn.hxx>
14 #include <osl/mutex.hxx>
15 #include <osl/thread.hxx>
16 #include <rtl/string.hxx>
18 #include <queue>
20 namespace sd { struct IBluetoothSocket; }
22 namespace sd
25 class Transmitter
26 : public osl::Thread
28 public:
29 enum Priority { PRIORITY_LOW = 1, PRIORITY_HIGH };
30 explicit Transmitter( ::sd::IBluetoothSocket* aSocket );
31 virtual ~Transmitter() override;
32 void addMessage( const OString& aMessage, const Priority aPriority );
33 void notifyFinished();
35 private:
36 virtual void SAL_CALL run() override;
38 ::sd::IBluetoothSocket* pStreamSocket;
40 ::osl::Condition mQueuesNotEmpty;
41 ::osl::Condition mFinishRequested;
43 ::osl::Mutex mQueueMutex;
45 std::queue<OString> mLowPriority;
46 std::queue<OString> mHighPriority;
50 #endif // INCLUDED_SD_SOURCE_UI_REMOTECONTROL_TRANSMITTER_HXX
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */