bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / remotecontrol / Transmitter.hxx
blob74cbc45bf102bb51e909f2ee0735c92a28ddbb48
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 "IBluetoothSocket.hxx"
16 #include <osl/thread.hxx>
17 #include <rtl/string.hxx>
19 #include <queue>
21 namespace sd
24 class Transmitter
25 : public osl::Thread
27 public:
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();
34 private:
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: */