1 /* -*- Mode: ObjC; 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/.
9 #include <osl/conditn.hxx>
10 #include <sal/log.hxx>
13 #import <IOBluetooth/objc/IOBluetoothRFCOMMChannel.h>
16 #include "OSXBluetooth.h"
18 @implementation ChannelDelegate
20 - (id) initWithCommunicatorAndSocket:(sd::Communicator*)communicator socket:(sd::OSXBluetoothWrapper*)socket
22 pCommunicator = communicator;
27 - (void) rfcommChannelData:(IOBluetoothRFCOMMChannel*)rfcommChannel data:(void *)dataPointer length:(size_t)dataLength
33 pSocket->appendData(dataPointer, dataLength);
37 - (void) rfcommChannelClosed:(IOBluetoothRFCOMMChannel*)rfcommChannel
41 SAL_INFO( "sdremote.bluetooth", "ChannelDelegate::rfcommChannelClosed()");
45 pSocket->channelClosed();
47 pCommunicator = nullptr;
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */