dom/bluetooth/bluez/BluetoothUtils.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/bluetooth/bluez/BluetoothUtils.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
     1.5 +/* vim: set ts=2 et sw=2 tw=80: */
     1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.8 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef mozilla_dom_bluetooth_bluetoothutils_h__
    1.11 +#define mozilla_dom_bluetooth_bluetoothutils_h__
    1.12 +
    1.13 +#include "BluetoothCommon.h"
    1.14 +#include "js/TypeDecls.h"
    1.15 +
    1.16 +BEGIN_BLUETOOTH_NAMESPACE
    1.17 +
    1.18 +class BluetoothNamedValue;
    1.19 +class BluetoothValue;
    1.20 +class BluetoothReplyRunnable;
    1.21 +
    1.22 +bool
    1.23 +SetJsObject(JSContext* aContext,
    1.24 +            const BluetoothValue& aValue,
    1.25 +            JS::Handle<JSObject*> aObj);
    1.26 +
    1.27 +nsString
    1.28 +GetObjectPathFromAddress(const nsAString& aAdapterPath,
    1.29 +                         const nsAString& aDeviceAddress);
    1.30 +
    1.31 +nsString
    1.32 +GetAddressFromObjectPath(const nsAString& aObjectPath);
    1.33 +
    1.34 +bool
    1.35 +BroadcastSystemMessage(const nsAString& aType,
    1.36 +                       const InfallibleTArray<BluetoothNamedValue>& aData);
    1.37 +
    1.38 +void
    1.39 +DispatchBluetoothReply(BluetoothReplyRunnable* aRunnable,
    1.40 +                       const BluetoothValue& aValue,
    1.41 +                       const nsAString& aErrorStr);
    1.42 +
    1.43 +void
    1.44 +ParseAtCommand(const nsACString& aAtCommand, const int aStart,
    1.45 +               nsTArray<nsCString>& aRetValues);
    1.46 +
    1.47 +void
    1.48 +DispatchStatusChangedEvent(const nsAString& aType,
    1.49 +                           const nsAString& aDeviceAddress,
    1.50 +                           bool aStatus);
    1.51 +
    1.52 +END_BLUETOOTH_NAMESPACE
    1.53 +
    1.54 +#endif

mercurial