LibreOffice Module sd (master) 1
OSXBluetoothWrapper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 */
9
10#pragma once
11
12#include <rtl/string.hxx>
13#include <osl/conditn.hxx>
14#include <osl/mutex.hxx>
15#include <vector>
16
17#include "IBluetoothSocket.hxx"
18
19namespace sd
20{
22 {
23 IOBluetoothRFCOMMChannel* mpChannel;
24 int mnMTU;
25 osl::Condition mHaveBytes;
26 osl::Mutex mMutex;
27 std::vector<char> mBuffer;
28
29 public:
30 OSXBluetoothWrapper( IOBluetoothRFCOMMChannel* channel );
31 virtual sal_Int32 readLine( OString& aLine ) override;
32 virtual sal_Int32 write( const void* pBuffer, sal_uInt32 len ) override;
33 void appendData(void* pBuffer, size_t len );
35 };
36}
37
38/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< char > mBuffer
IOBluetoothRFCOMMChannel * mpChannel
virtual sal_Int32 readLine(OString &aLine) override
Blocks until a line is read.
void appendData(void *pBuffer, size_t len)
virtual sal_Int32 write(const void *pBuffer, sal_uInt32 len) override
Write a number of bytes.
OSXBluetoothWrapper(IOBluetoothRFCOMMChannel *channel)
Interface for bluetooth data io.