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 "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: bool michael@0: SetJsObject(JSContext* aContext, michael@0: const BluetoothValue& aValue, michael@0: JS::Handle aObj); michael@0: michael@0: nsString michael@0: GetObjectPathFromAddress(const nsAString& aAdapterPath, michael@0: const nsAString& aDeviceAddress); michael@0: michael@0: nsString michael@0: GetAddressFromObjectPath(const nsAString& aObjectPath); michael@0: michael@0: bool michael@0: BroadcastSystemMessage(const nsAString& aType, michael@0: const InfallibleTArray& 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: ParseAtCommand(const nsACString& aAtCommand, const int aStart, michael@0: nsTArray& aRetValues); 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