Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Side by Side Diff: device/bluetooth/bluetooth_rfcomm_channel_mac.h

Issue 341433004: [Bluetooth] Improve the adapter's awareness of connected devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't call DeviceRemoved for now Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_RFCOMM_CHANNEL_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_RFCOMM_CHANNEL_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_RFCOMM_CHANNEL_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_RFCOMM_CHANNEL_MAC_H_
7 7
8 #import <IOBluetooth/IOBluetooth.h> 8 #import <IOBluetooth/IOBluetooth.h>
9 #import <IOKit/IOReturn.h> 9 #import <IOKit/IOReturn.h>
10 10
(...skipping 20 matching lines...) Expand all
31 // if the open process was successfully started (or if an existing RFCOMM 31 // if the open process was successfully started (or if an existing RFCOMM
32 // channel was found). Otherwise, sets |status| to an error status. 32 // channel was found). Otherwise, sets |status| to an error status.
33 static scoped_ptr<BluetoothRfcommChannelMac> OpenAsync( 33 static scoped_ptr<BluetoothRfcommChannelMac> OpenAsync(
34 BluetoothSocketMac* socket, 34 BluetoothSocketMac* socket,
35 IOBluetoothDevice* device, 35 IOBluetoothDevice* device,
36 BluetoothRFCOMMChannelID channel_id, 36 BluetoothRFCOMMChannelID channel_id,
37 IOReturn* status); 37 IOReturn* status);
38 38
39 // BluetoothChannelMac: 39 // BluetoothChannelMac:
40 virtual void SetSocket(BluetoothSocketMac* socket) OVERRIDE; 40 virtual void SetSocket(BluetoothSocketMac* socket) OVERRIDE;
41 virtual std::string GetDeviceAddress() OVERRIDE; 41 virtual IOBluetoothDevice* GetDevice() OVERRIDE;
42 virtual uint16_t GetOutgoingMTU() OVERRIDE; 42 virtual uint16_t GetOutgoingMTU() OVERRIDE;
43 virtual IOReturn WriteAsync(void* data, 43 virtual IOReturn WriteAsync(void* data,
44 uint16_t length, 44 uint16_t length,
45 void* refcon) OVERRIDE; 45 void* refcon) OVERRIDE;
46 46
47 void OnChannelOpenComplete(IOBluetoothRFCOMMChannel* channel, 47 void OnChannelOpenComplete(IOBluetoothRFCOMMChannel* channel,
48 IOReturn status); 48 IOReturn status);
49 void OnChannelClosed(IOBluetoothRFCOMMChannel* channel); 49 void OnChannelClosed(IOBluetoothRFCOMMChannel* channel);
50 void OnChannelDataReceived(IOBluetoothRFCOMMChannel* channel, 50 void OnChannelDataReceived(IOBluetoothRFCOMMChannel* channel,
51 void* data, 51 void* data,
52 size_t length); 52 size_t length);
53 void OnChannelWriteComplete(IOBluetoothRFCOMMChannel* channel, 53 void OnChannelWriteComplete(IOBluetoothRFCOMMChannel* channel,
54 void* refcon, 54 void* refcon,
55 IOReturn status); 55 IOReturn status);
56 56
57 private: 57 private:
58 // The wrapped native RFCOMM channel. 58 // The wrapped native RFCOMM channel.
59 base::scoped_nsobject<IOBluetoothRFCOMMChannel> channel_; 59 base::scoped_nsobject<IOBluetoothRFCOMMChannel> channel_;
60 60
61 // The delegate for the native channel. 61 // The delegate for the native channel.
62 base::scoped_nsobject<BluetoothRfcommChannelDelegate> delegate_; 62 base::scoped_nsobject<BluetoothRfcommChannelDelegate> delegate_;
63 63
64 DISALLOW_COPY_AND_ASSIGN(BluetoothRfcommChannelMac); 64 DISALLOW_COPY_AND_ASSIGN(BluetoothRfcommChannelMac);
65 }; 65 };
66 66
67 } // namespace device 67 } // namespace device
68 68
69 #endif // DEVICE_BLUETOOTH_BLUETOOTH_RFCOMM_CHANNEL_MAC_H_ 69 #endif // DEVICE_BLUETOOTH_BLUETOOTH_RFCOMM_CHANNEL_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_l2cap_channel_mac.mm ('k') | device/bluetooth/bluetooth_rfcomm_channel_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698