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 "IBluetoothSocket.hxx"
16 #include <osl/thread.hxx>
17 #include <rtl/string.hxx>
28 enum Priority
{ PRIORITY_LOW
= 1, PRIORITY_HIGH
};
29 Transmitter( ::sd::IBluetoothSocket
* aSocket
);
30 virtual ~Transmitter();
31 void addMessage( const OString
& aMessage
, const Priority aPriority
);
32 void notifyFinished();
35 virtual void SAL_CALL
run() SAL_OVERRIDE
;
37 ::sd::IBluetoothSocket
* pStreamSocket
;
39 ::osl::Condition mQueuesNotEmpty
;
40 ::osl::Condition mFinishRequested
;
42 ::osl::Mutex mQueueMutex
;
44 std::queue
<OString
> mLowPriority
;
45 std::queue
<OString
> mHighPriority
;
49 #endif // INCLUDED_SD_SOURCE_UI_REMOTECONTROL_TRANSMITTER_HXX
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */