bump product version to 6.3.0.0.beta1
[LibreOffice.git] / sd / source / ui / remotecontrol / OSXBluetooth.mm
blob8b705c50ba62a2b4613286fe8e74d6973ec94b7b
1 /* -*- Mode: ObjC; 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 #include <osl/conditn.hxx>
10 #include <sal/log.hxx>
12 #include <premac.h>
13 #import <IOBluetooth/objc/IOBluetoothRFCOMMChannel.h>
14 #include <postmac.h>
16 #include "OSXBluetooth.h"
18 @implementation ChannelDelegate
20 - (id) initWithCommunicatorAndSocket:(sd::Communicator*)communicator socket:(sd::OSXBluetoothWrapper*)socket
22     pCommunicator = communicator;
23     pSocket = socket;
24     return self;
27 - (void) rfcommChannelData:(IOBluetoothRFCOMMChannel*)rfcommChannel data:(void *)dataPointer length:(size_t)dataLength
29     (void) rfcommChannel;
31     if ( pSocket )
32     {
33         pSocket->appendData(dataPointer, dataLength);
34     }
37 - (void) rfcommChannelClosed:(IOBluetoothRFCOMMChannel*)rfcommChannel 
39     (void) rfcommChannel;
41     SAL_INFO( "sdremote.bluetooth", "ChannelDelegate::rfcommChannelClosed()");
43     if ( pSocket )
44     {
45         pSocket->channelClosed();
46     }
47     pCommunicator = nullptr;
48     pSocket = nullptr;
51 @end
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */