mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-10 11:54:40 +00:00
96 lines
2.5 KiB
Plaintext
96 lines
2.5 KiB
Plaintext
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
/* 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/. */
|
|
|
|
using mozilla::dom::bluetooth::BluetoothAttributeHandle
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothGattAttrPerm
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothGattCharAttribute
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothGattCharProp
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothGattId
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothGattResponse
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothGattServiceId
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothGattWriteType
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothSspVariant
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothStatus
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
using mozilla::dom::bluetooth::BluetoothUuid
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
namespace bluetooth {
|
|
|
|
/**
|
|
* Value structure for returns from bluetooth. Currently modeled after dbus
|
|
* returns, which can be a 32-bit int, an UTF16 string, a bool, or an array of
|
|
* UTF16 strings. Can also hold key-value pairs for dictionary-ish access.
|
|
*/
|
|
union BluetoothValue
|
|
{
|
|
int32_t;
|
|
uint32_t;
|
|
nsCString;
|
|
nsString;
|
|
bool;
|
|
nsString[];
|
|
uint8_t[];
|
|
uint32_t[];
|
|
BluetoothNamedValue[];
|
|
BluetoothGattId;
|
|
BluetoothGattId[];
|
|
BluetoothGattServiceId;
|
|
BluetoothGattServiceId[];
|
|
BluetoothGattCharAttribute[];
|
|
BluetoothAttributeHandle;
|
|
BluetoothUuid;
|
|
};
|
|
|
|
/**
|
|
* Key-value pair for dicts returned by the bluetooth backend. Used for things
|
|
* like property updates, where the property will have a name and a type.
|
|
*/
|
|
struct BluetoothNamedValue
|
|
{
|
|
nsString name;
|
|
BluetoothValue value;
|
|
};
|
|
|
|
struct BluetoothSignal
|
|
{
|
|
nsString name;
|
|
nsString path;
|
|
BluetoothValue value;
|
|
};
|
|
|
|
struct BluetoothReplySuccess
|
|
{
|
|
BluetoothValue value;
|
|
};
|
|
|
|
struct BluetoothReplyError
|
|
{
|
|
BluetoothStatus errorStatus;
|
|
nsString errorString;
|
|
};
|
|
|
|
union BluetoothReply
|
|
{
|
|
BluetoothReplySuccess;
|
|
BluetoothReplyError;
|
|
};
|
|
|
|
}
|
|
}
|
|
}
|