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/.
12 #include <rtl/string.hxx>
16 /** Interface for bluetooth data io
18 struct IBluetoothSocket
20 IBluetoothSocket() = default;
21 virtual ~IBluetoothSocket() {}
22 IBluetoothSocket(const IBluetoothSocket
&) = delete;
23 IBluetoothSocket
& operator=(const IBluetoothSocket
&) = delete;
25 /** Blocks until a line is read.
27 @return whatever the last call of recv returned, i.e. 0 or less
28 if there was a problem in communications.
30 virtual sal_Int32
readLine(OString
& aLine
) = 0;
32 /** Write a number of bytes
34 @return number of bytes actually written
36 virtual sal_Int32
write( const void* pBuffer
, sal_uInt32 n
) = 0;
38 virtual void close() {};
42 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */