2012-08-01 04:53:04 +00:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
2012-08-17 02:53:45 +00:00
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-08-01 04:53:04 +00: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/. */
|
|
|
|
|
2014-11-28 10:49:40 +00:00
|
|
|
#ifndef mozilla_dom_bluetooth_bluetoothutils_h
|
|
|
|
#define mozilla_dom_bluetooth_bluetoothutils_h
|
2012-08-01 04:53:04 +00:00
|
|
|
|
|
|
|
#include "BluetoothCommon.h"
|
2013-08-28 02:59:14 +00:00
|
|
|
#include "js/TypeDecls.h"
|
2012-08-01 04:53:04 +00:00
|
|
|
|
|
|
|
BEGIN_BLUETOOTH_NAMESPACE
|
|
|
|
|
2012-10-01 07:44:48 +00:00
|
|
|
class BluetoothNamedValue;
|
2012-11-19 07:10:38 +00:00
|
|
|
class BluetoothValue;
|
|
|
|
class BluetoothReplyRunnable;
|
2012-08-17 02:53:45 +00:00
|
|
|
|
2012-10-01 07:44:48 +00:00
|
|
|
bool
|
|
|
|
SetJsObject(JSContext* aContext,
|
2013-01-29 06:52:39 +00:00
|
|
|
const BluetoothValue& aValue,
|
2013-07-25 12:57:00 +00:00
|
|
|
JS::Handle<JSObject*> aObj);
|
2012-10-01 07:44:48 +00:00
|
|
|
|
2014-11-28 10:49:40 +00:00
|
|
|
bool
|
|
|
|
BroadcastSystemMessage(const nsAString& aType,
|
|
|
|
const BluetoothValue& aData);
|
|
|
|
|
2012-10-03 09:06:40 +00:00
|
|
|
bool
|
|
|
|
BroadcastSystemMessage(const nsAString& aType,
|
|
|
|
const InfallibleTArray<BluetoothNamedValue>& aData);
|
|
|
|
|
2012-11-19 07:10:38 +00:00
|
|
|
void
|
|
|
|
DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable,
|
|
|
|
const BluetoothValue& aValue,
|
|
|
|
const nsAString& aErrorStr);
|
|
|
|
|
2013-08-02 10:32:57 +00:00
|
|
|
void
|
|
|
|
DispatchStatusChangedEvent(const nsAString& aType,
|
|
|
|
const nsAString& aDeviceAddress,
|
|
|
|
bool aStatus);
|
|
|
|
|
2012-08-01 04:53:04 +00:00
|
|
|
END_BLUETOOTH_NAMESPACE
|
|
|
|
|
|
|
|
#endif
|