Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ |
michael@0 | 2 | /* vim: set ts=2 et sw=2 tw=80: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, |
michael@0 | 5 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef mozilla_dom_bluetooth_bluetoothutils_h__ |
michael@0 | 8 | #define mozilla_dom_bluetooth_bluetoothutils_h__ |
michael@0 | 9 | |
michael@0 | 10 | #include "BluetoothCommon.h" |
michael@0 | 11 | #include "js/TypeDecls.h" |
michael@0 | 12 | |
michael@0 | 13 | BEGIN_BLUETOOTH_NAMESPACE |
michael@0 | 14 | |
michael@0 | 15 | class BluetoothNamedValue; |
michael@0 | 16 | class BluetoothValue; |
michael@0 | 17 | class BluetoothReplyRunnable; |
michael@0 | 18 | |
michael@0 | 19 | bool |
michael@0 | 20 | SetJsObject(JSContext* aContext, |
michael@0 | 21 | const BluetoothValue& aValue, |
michael@0 | 22 | JS::Handle<JSObject*> aObj); |
michael@0 | 23 | |
michael@0 | 24 | nsString |
michael@0 | 25 | GetObjectPathFromAddress(const nsAString& aAdapterPath, |
michael@0 | 26 | const nsAString& aDeviceAddress); |
michael@0 | 27 | |
michael@0 | 28 | nsString |
michael@0 | 29 | GetAddressFromObjectPath(const nsAString& aObjectPath); |
michael@0 | 30 | |
michael@0 | 31 | bool |
michael@0 | 32 | BroadcastSystemMessage(const nsAString& aType, |
michael@0 | 33 | const InfallibleTArray<BluetoothNamedValue>& aData); |
michael@0 | 34 | |
michael@0 | 35 | void |
michael@0 | 36 | DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable, |
michael@0 | 37 | const BluetoothValue& aValue, |
michael@0 | 38 | const nsAString& aErrorStr); |
michael@0 | 39 | |
michael@0 | 40 | void |
michael@0 | 41 | ParseAtCommand(const nsACString& aAtCommand, const int aStart, |
michael@0 | 42 | nsTArray<nsCString>& aRetValues); |
michael@0 | 43 | |
michael@0 | 44 | void |
michael@0 | 45 | DispatchStatusChangedEvent(const nsAString& aType, |
michael@0 | 46 | const nsAString& aDeviceAddress, |
michael@0 | 47 | bool aStatus); |
michael@0 | 48 | |
michael@0 | 49 | END_BLUETOOTH_NAMESPACE |
michael@0 | 50 | |
michael@0 | 51 | #endif |