michael@0: /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_bluetooth_bluetoothutils_h__ michael@0: #define mozilla_dom_bluetooth_bluetoothutils_h__ michael@0: michael@0: #include michael@0: michael@0: #include "BluetoothCommon.h" michael@0: #include "js/TypeDecls.h" michael@0: michael@0: BEGIN_BLUETOOTH_NAMESPACE michael@0: michael@0: class BluetoothNamedValue; michael@0: class BluetoothValue; michael@0: class BluetoothReplyRunnable; michael@0: michael@0: const bt_interface_t* michael@0: GetBluetoothInterface(); michael@0: michael@0: void michael@0: StringToBdAddressType(const nsAString& aBdAddress, michael@0: bt_bdaddr_t *aRetBdAddressType); michael@0: michael@0: void michael@0: BdAddressTypeToString(bt_bdaddr_t* aBdAddressType, michael@0: nsAString& aRetBdAddress); michael@0: michael@0: bool michael@0: SetJsObject(JSContext* aContext, michael@0: const BluetoothValue& aValue, michael@0: JS::Handle aObj); michael@0: michael@0: bool michael@0: BroadcastSystemMessage(const nsAString& aType, michael@0: const BluetoothValue& aData); michael@0: michael@0: void michael@0: DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable, michael@0: const BluetoothValue& aValue, michael@0: const nsAString& aErrorStr); michael@0: michael@0: void michael@0: DispatchStatusChangedEvent(const nsAString& aType, michael@0: const nsAString& aDeviceAddress, michael@0: bool aStatus); michael@0: michael@0: END_BLUETOOTH_NAMESPACE michael@0: michael@0: #endif