2012-08-01 08:53:04 +04:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
2012-08-17 06:53:45 +04:00
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-08-01 08:53:04 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_bluetooth_bluetoothutils_h__
|
|
|
|
#define mozilla_dom_bluetooth_bluetoothutils_h__
|
|
|
|
|
|
|
|
#include "BluetoothCommon.h"
|
|
|
|
|
2012-11-15 06:38:26 +04:00
|
|
|
struct JSContext;
|
2013-01-01 00:40:21 +04:00
|
|
|
class JSObject;
|
2012-08-01 08:53:04 +04:00
|
|
|
|
|
|
|
BEGIN_BLUETOOTH_NAMESPACE
|
|
|
|
|
2012-10-01 11:44:48 +04:00
|
|
|
class BluetoothNamedValue;
|
2012-11-19 11:10:38 +04:00
|
|
|
class BluetoothValue;
|
|
|
|
class BluetoothReplyRunnable;
|
2012-08-17 06:53:45 +04:00
|
|
|
|
2012-10-01 11:44:48 +04:00
|
|
|
bool
|
|
|
|
SetJsObject(JSContext* aContext,
|
2013-01-29 10:52:39 +04:00
|
|
|
const BluetoothValue& aValue,
|
|
|
|
JSObject* aObj);
|
2012-10-01 11:44:48 +04:00
|
|
|
|
|
|
|
nsString
|
|
|
|
GetObjectPathFromAddress(const nsAString& aAdapterPath,
|
|
|
|
const nsAString& aDeviceAddress);
|
|
|
|
|
|
|
|
nsString
|
|
|
|
GetAddressFromObjectPath(const nsAString& aObjectPath);
|
|
|
|
|
2012-10-03 13:06:40 +04:00
|
|
|
bool
|
|
|
|
BroadcastSystemMessage(const nsAString& aType,
|
|
|
|
const InfallibleTArray<BluetoothNamedValue>& aData);
|
|
|
|
|
2012-11-19 11:10:38 +04:00
|
|
|
void
|
|
|
|
DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable,
|
|
|
|
const BluetoothValue& aValue,
|
|
|
|
const nsAString& aErrorStr);
|
|
|
|
|
2012-12-17 19:24:35 +04:00
|
|
|
void
|
|
|
|
ParseAtCommand(const nsACString& aAtCommand, const int aStart,
|
|
|
|
nsTArray<nsCString>& aRetValues);
|
|
|
|
|
2012-08-01 08:53:04 +04:00
|
|
|
END_BLUETOOTH_NAMESPACE
|
|
|
|
|
|
|
|
#endif
|