bump product version to 5.0.4.1
[LibreOffice.git] / sd / source / ui / remotecontrol / OSXBluetooth.mm
blob93415f712629d59375545701127951306cca5d51
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>
11 #include <premac.h>
12 #import <IOBluetooth/objc/IOBluetoothRFCOMMChannel.h>
13 #include <postmac.h>
15 #include "OSXBluetooth.h"
17 @implementation ChannelDelegate
19 - (id) initWithCommunicatorAndSocket:(sd::Communicator*)communicator socket:(sd::OSXBluetoothWrapper*)socket
21     pCommunicator = communicator;
22     pSocket = socket;
23     return self;
26 - (void) rfcommChannelData:(IOBluetoothRFCOMMChannel*)rfcommChannel data:(void *)dataPointer length:(size_t)dataLength
28     (void) rfcommChannel;
30     if ( pSocket )
31     {
32         pSocket->appendData(dataPointer, dataLength);
33     }
36 - (void) rfcommChannelClosed:(IOBluetoothRFCOMMChannel*)rfcommChannel 
38     (void) rfcommChannel;
40     SAL_INFO( "sdremote.bluetooth", "ChannelDelegate::rfcommChannelClosed()\n");
42     if ( pSocket )
43     {
44         pSocket->channelClosed();
45     }
46     pCommunicator = NULL;
47     pSocket = NULL;
50 @end
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */