diff options
Diffstat (limited to 'device/bluetooth/bluetooth_profile_mac.h')
-rw-r--r-- | device/bluetooth/bluetooth_profile_mac.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/device/bluetooth/bluetooth_profile_mac.h b/device/bluetooth/bluetooth_profile_mac.h new file mode 100644 index 0000000..34b6b34 --- /dev/null +++ b/device/bluetooth/bluetooth_profile_mac.h @@ -0,0 +1,46 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_MAC_H_ +#define DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_MAC_H_ + +#include <string> + +#include "base/basictypes.h" +#include "base/callback.h" +#include "device/bluetooth/bluetooth_profile.h" + +#ifdef __OBJC__ +@class IOBluetoothDevice; +#else +class IOBluetoothDevice; +#endif + +namespace device { + +class BluetoothProfileMac : public BluetoothProfile { + public: + // BluetoothProfile override. + virtual void Unregister() OVERRIDE; + virtual void SetConnectionCallback(const SocketCallback& callback) OVERRIDE; + + // Makes an outgoing connection to |device|. + // This method runs |socket_callback_| with the socket and returns true if the + // connection is made successfully. + bool Connect(IOBluetoothDevice* device); + + private: + friend BluetoothProfile; + + BluetoothProfileMac(const std::string& uuid, const std::string& name); + virtual ~BluetoothProfileMac(); + + const std::string uuid_; + const std::string name_; + SocketCallback socket_callback_; +}; + +} // namespace device + +#endif // DEVICE_BLUETOOTH_BLUETOOTH_PROFILE_MAC_H_ |