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/.
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>
20 namespace sd
{ struct IBluetoothSocket
; }
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();
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: */