fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / sd / source / ui / remotecontrol / Transmitter.hxx
blob9412ccc2faa4785b83cbaa7f481cba8bcb0fd726
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 _SD_IMPRESSREMOTE_TRANSMITTER_HXX
11 #define _SD_IMPRESSREMOTE_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 ~Transmitter();
31 void addMessage( const OString& aMessage, const Priority aPriority );
32 void notifyFinished();
34 private:
35 virtual void SAL_CALL run();
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 // _SD_IMPRESSREMOTE_TRANSMITTER_HXX
51 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */