2014-05-21 10:11:31 +04:00
|
|
|
/* -*- 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/. */
|
|
|
|
|
|
|
|
include protocol PBlob;
|
|
|
|
include protocol PBluetoothRequest;
|
|
|
|
include protocol PContent;
|
|
|
|
|
|
|
|
include BluetoothTypes;
|
|
|
|
|
|
|
|
include "mozilla/dom/bluetooth/ipc/BluetoothMessageUtils.h";
|
|
|
|
|
2015-11-13 17:26:50 +03:00
|
|
|
using mozilla::dom::bluetooth::BluetoothAddress
|
|
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
2016-01-15 04:50:54 +03:00
|
|
|
using mozilla::dom::bluetooth::BluetoothGattAdvertisingData
|
|
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
2015-11-13 17:26:50 +03:00
|
|
|
using mozilla::dom::bluetooth::BluetoothObjectType
|
|
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
2015-11-13 17:26:50 +03:00
|
|
|
using mozilla::dom::bluetooth::BluetoothPinCode
|
|
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
2015-11-13 17:26:50 +03:00
|
|
|
using mozilla::dom::bluetooth::ControlPlayStatus
|
|
|
|
from "mozilla/dom/bluetooth/BluetoothCommon.h";
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace bluetooth {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bluetooth request types.
|
|
|
|
*/
|
|
|
|
|
2014-05-29 13:16:20 +04:00
|
|
|
struct GetAdaptersRequest
|
2014-05-21 10:11:31 +04:00
|
|
|
{ };
|
|
|
|
|
2014-06-04 14:30:08 +04:00
|
|
|
struct StartBluetoothRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StopBluetoothRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2014-05-21 10:11:31 +04:00
|
|
|
struct SetPropertyRequest
|
|
|
|
{
|
|
|
|
BluetoothObjectType type;
|
|
|
|
BluetoothNamedValue value;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GetPropertyRequest
|
|
|
|
{
|
|
|
|
BluetoothObjectType type;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct StartDiscoveryRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StopDiscoveryRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2015-05-04 13:59:02 +03:00
|
|
|
struct StartLeScanRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid[] serviceUuids;
|
2015-05-04 13:59:02 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct StopLeScanRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid scanUuid;
|
2015-05-04 13:59:02 +03:00
|
|
|
};
|
|
|
|
|
2016-01-15 04:50:54 +03:00
|
|
|
struct StartAdvertisingRequest
|
|
|
|
{
|
|
|
|
BluetoothUuid appUuid;
|
|
|
|
BluetoothGattAdvertisingData data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StopAdvertisingRequest
|
|
|
|
{
|
|
|
|
BluetoothUuid appUuid;
|
|
|
|
};
|
|
|
|
|
2014-05-21 10:11:31 +04:00
|
|
|
struct PairRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
uint32_t timeoutMS;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct UnpairRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
2015-04-08 08:49:14 +03:00
|
|
|
struct PinReplyRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2015-04-08 08:49:14 +03:00
|
|
|
bool accept;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothPinCode pinCode;
|
2015-04-08 08:49:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SspReplyRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2015-04-08 08:49:14 +03:00
|
|
|
BluetoothSspVariant variant;
|
|
|
|
bool accept;
|
|
|
|
};
|
|
|
|
|
2014-05-21 10:11:31 +04:00
|
|
|
struct SetPinCodeRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothPinCode pincode;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct SetPasskeyRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
uint32_t passkey;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ConfirmPairingConfirmationRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DenyPairingConfirmationRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PairedDevicePropertiesRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress[] addresses;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ConnectedDevicePropertiesRequest
|
|
|
|
{
|
|
|
|
uint16_t serviceUuid;
|
|
|
|
};
|
|
|
|
|
2014-07-14 06:47:19 +04:00
|
|
|
struct FetchUuidsRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-07-14 06:47:19 +04:00
|
|
|
};
|
|
|
|
|
2014-05-21 10:11:31 +04:00
|
|
|
struct ConnectRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
uint32_t cod;
|
|
|
|
uint16_t serviceUuid;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DisconnectRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
uint16_t serviceUuid;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SendFileRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
PBlob blob;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StopSendingFileRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ConfirmReceivingFileRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DenyReceivingFileRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ConnectScoRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DisconnectScoRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IsScoConnectedRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2015-11-10 06:34:11 +03:00
|
|
|
struct SetObexPasswordRequest
|
|
|
|
{
|
|
|
|
nsString password;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct RejectObexAuthRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2015-08-24 05:30:03 +03:00
|
|
|
struct ReplyTovCardPullingRequest
|
|
|
|
{
|
|
|
|
PBlob blob;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ReplyToPhonebookPullingRequest
|
|
|
|
{
|
|
|
|
PBlob blob;
|
|
|
|
uint16_t phonebookSize;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ReplyTovCardListingRequest
|
|
|
|
{
|
|
|
|
PBlob blob;
|
|
|
|
uint16_t phonebookSize;
|
|
|
|
};
|
|
|
|
|
2015-10-12 12:14:54 +03:00
|
|
|
struct ReplyToFolderListingRequest
|
|
|
|
{
|
|
|
|
uint16_t masId;
|
|
|
|
nsString folderList;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ReplyToMessagesListingRequest
|
|
|
|
{
|
|
|
|
uint16_t masId;
|
|
|
|
PBlob blob;
|
|
|
|
bool newMessage;
|
|
|
|
nsString timeStamp;
|
|
|
|
uint16_t size;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ReplyToGetMessageRequest
|
|
|
|
{
|
|
|
|
uint16_t masId;
|
|
|
|
PBlob blob;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ReplyToSetMessageStatusRequest
|
|
|
|
{
|
|
|
|
uint16_t masId;
|
|
|
|
bool messageStatus;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ReplyToSendMessageRequest
|
|
|
|
{
|
|
|
|
uint16_t masId;
|
2015-11-10 14:04:12 +03:00
|
|
|
nsString handleId;
|
2015-10-12 12:14:54 +03:00
|
|
|
bool messageStatus;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ReplyToMessageUpdateRequest
|
|
|
|
{
|
|
|
|
uint16_t masId;
|
|
|
|
bool messageStatus;
|
|
|
|
};
|
|
|
|
|
2014-05-21 10:11:31 +04:00
|
|
|
struct AnswerWaitingCallRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IgnoreWaitingCallRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct ToggleCallsRequest
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SendMetaDataRequest
|
|
|
|
{
|
|
|
|
nsString title;
|
|
|
|
nsString artist;
|
|
|
|
nsString album;
|
|
|
|
int64_t mediaNumber;
|
|
|
|
int64_t totalMediaCount;
|
|
|
|
int64_t duration;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SendPlayStatusRequest
|
|
|
|
{
|
|
|
|
int64_t duration;
|
|
|
|
int64_t position;
|
2015-11-13 17:26:50 +03:00
|
|
|
ControlPlayStatus playStatus;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
2015-02-13 19:13:00 +03:00
|
|
|
struct ConnectGattClientRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress deviceAddress;
|
2015-02-13 19:13:00 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DisconnectGattClientRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress deviceAddress;
|
2015-02-13 19:13:00 +03:00
|
|
|
};
|
|
|
|
|
2015-03-23 10:25:00 +03:00
|
|
|
struct DiscoverGattServicesRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-03-23 10:25:00 +03:00
|
|
|
};
|
|
|
|
|
2015-04-08 08:49:28 +03:00
|
|
|
struct GattClientStartNotificationsRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-04-08 08:49:28 +03:00
|
|
|
BluetoothGattServiceId servId;
|
|
|
|
BluetoothGattId charId;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattClientStopNotificationsRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-04-08 08:49:28 +03:00
|
|
|
BluetoothGattServiceId servId;
|
|
|
|
BluetoothGattId charId;
|
|
|
|
};
|
|
|
|
|
2015-02-13 19:13:00 +03:00
|
|
|
struct UnregisterGattClientRequest
|
|
|
|
{
|
|
|
|
int clientIf;
|
|
|
|
};
|
|
|
|
|
2015-03-16 11:55:50 +03:00
|
|
|
struct GattClientReadRemoteRssiRequest
|
|
|
|
{
|
|
|
|
int clientIf;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress deviceAddress;
|
2015-03-16 11:55:50 +03:00
|
|
|
};
|
|
|
|
|
2015-04-16 11:44:37 +03:00
|
|
|
struct GattClientReadCharacteristicValueRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-04-16 11:44:37 +03:00
|
|
|
BluetoothGattServiceId serviceId;
|
|
|
|
BluetoothGattId charId;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattClientWriteCharacteristicValueRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-04-16 11:44:37 +03:00
|
|
|
BluetoothGattServiceId serviceId;
|
|
|
|
BluetoothGattId charId;
|
|
|
|
BluetoothGattWriteType writeType;
|
|
|
|
uint8_t[] value;
|
|
|
|
};
|
|
|
|
|
2015-04-16 11:45:20 +03:00
|
|
|
struct GattClientReadDescriptorValueRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-04-16 11:45:20 +03:00
|
|
|
BluetoothGattServiceId serviceId;
|
|
|
|
BluetoothGattId charId;
|
|
|
|
BluetoothGattId descId;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattClientWriteDescriptorValueRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-04-16 11:45:20 +03:00
|
|
|
BluetoothGattServiceId serviceId;
|
|
|
|
BluetoothGattId charId;
|
|
|
|
BluetoothGattId descId;
|
|
|
|
uint8_t[] value;
|
|
|
|
};
|
|
|
|
|
2016-01-15 04:50:54 +03:00
|
|
|
struct GattServerRegisterRequest
|
|
|
|
{
|
|
|
|
BluetoothUuid appUuid;
|
|
|
|
};
|
|
|
|
|
2015-08-21 12:11:14 +03:00
|
|
|
struct GattServerConnectPeripheralRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2015-08-21 12:11:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct GattServerDisconnectPeripheralRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2015-08-21 12:11:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct UnregisterGattServerRequest
|
|
|
|
{
|
|
|
|
int serverIf;
|
|
|
|
};
|
|
|
|
|
2015-08-24 11:58:13 +03:00
|
|
|
struct GattServerAddServiceRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-08-24 11:58:13 +03:00
|
|
|
BluetoothGattServiceId serviceId;
|
|
|
|
uint16_t handleCount;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattServerAddIncludedServiceRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-08-24 11:58:13 +03:00
|
|
|
BluetoothAttributeHandle serviceHandle;
|
|
|
|
BluetoothAttributeHandle includedServiceHandle;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattServerAddCharacteristicRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-08-24 11:58:13 +03:00
|
|
|
BluetoothAttributeHandle serviceHandle;
|
|
|
|
BluetoothUuid characteristicUuid;
|
|
|
|
BluetoothGattAttrPerm permissions;
|
|
|
|
BluetoothGattCharProp properties;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattServerAddDescriptorRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-08-24 11:58:13 +03:00
|
|
|
BluetoothAttributeHandle serviceHandle;
|
|
|
|
BluetoothAttributeHandle characteristicHandle;
|
|
|
|
BluetoothUuid descriptorUuid;
|
|
|
|
BluetoothGattAttrPerm permissions;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattServerRemoveServiceRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-08-24 11:58:13 +03:00
|
|
|
BluetoothAttributeHandle serviceHandle;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattServerStartServiceRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-08-24 11:58:13 +03:00
|
|
|
BluetoothAttributeHandle serviceHandle;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct GattServerStopServiceRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-08-24 11:58:13 +03:00
|
|
|
BluetoothAttributeHandle serviceHandle;
|
|
|
|
};
|
|
|
|
|
2015-09-23 09:16:27 +03:00
|
|
|
struct GattServerSendResponseRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2015-09-23 09:16:27 +03:00
|
|
|
uint16_t status;
|
|
|
|
int32_t requestId;
|
|
|
|
BluetoothGattResponse response;
|
|
|
|
};
|
|
|
|
|
2015-09-23 09:18:01 +03:00
|
|
|
struct GattServerSendIndicationRequest
|
|
|
|
{
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothUuid appUuid;
|
2015-11-13 17:26:50 +03:00
|
|
|
BluetoothAddress address;
|
2015-09-23 09:18:01 +03:00
|
|
|
BluetoothAttributeHandle characteristicHandle;
|
|
|
|
bool confirm;
|
|
|
|
uint8_t[] value;
|
|
|
|
};
|
|
|
|
|
2014-05-21 10:11:31 +04:00
|
|
|
union Request
|
|
|
|
{
|
2014-05-29 13:16:20 +04:00
|
|
|
GetAdaptersRequest;
|
2014-06-04 14:30:08 +04:00
|
|
|
StartBluetoothRequest;
|
|
|
|
StopBluetoothRequest;
|
2014-05-21 10:11:31 +04:00
|
|
|
SetPropertyRequest;
|
|
|
|
GetPropertyRequest;
|
|
|
|
StartDiscoveryRequest;
|
|
|
|
StopDiscoveryRequest;
|
2015-05-04 13:59:02 +03:00
|
|
|
StartLeScanRequest;
|
|
|
|
StopLeScanRequest;
|
2016-01-15 04:50:54 +03:00
|
|
|
StartAdvertisingRequest;
|
|
|
|
StopAdvertisingRequest;
|
2014-05-21 10:11:31 +04:00
|
|
|
PairRequest;
|
|
|
|
UnpairRequest;
|
2015-04-08 08:49:14 +03:00
|
|
|
PinReplyRequest;
|
|
|
|
SspReplyRequest;
|
2014-05-21 10:11:31 +04:00
|
|
|
SetPinCodeRequest;
|
|
|
|
SetPasskeyRequest;
|
|
|
|
ConfirmPairingConfirmationRequest;
|
|
|
|
DenyPairingConfirmationRequest;
|
|
|
|
ConnectedDevicePropertiesRequest;
|
|
|
|
PairedDevicePropertiesRequest;
|
2014-07-14 06:47:19 +04:00
|
|
|
FetchUuidsRequest;
|
2014-05-21 10:11:31 +04:00
|
|
|
ConnectRequest;
|
|
|
|
DisconnectRequest;
|
|
|
|
SendFileRequest;
|
|
|
|
StopSendingFileRequest;
|
|
|
|
ConfirmReceivingFileRequest;
|
|
|
|
DenyReceivingFileRequest;
|
|
|
|
ConnectScoRequest;
|
|
|
|
DisconnectScoRequest;
|
|
|
|
IsScoConnectedRequest;
|
2015-11-10 06:34:11 +03:00
|
|
|
SetObexPasswordRequest;
|
|
|
|
RejectObexAuthRequest;
|
2015-08-24 05:30:03 +03:00
|
|
|
ReplyTovCardPullingRequest;
|
|
|
|
ReplyToPhonebookPullingRequest;
|
|
|
|
ReplyTovCardListingRequest;
|
2015-10-12 12:14:54 +03:00
|
|
|
ReplyToFolderListingRequest;
|
|
|
|
ReplyToMessagesListingRequest;
|
|
|
|
ReplyToGetMessageRequest;
|
|
|
|
ReplyToSetMessageStatusRequest;
|
|
|
|
ReplyToSendMessageRequest;
|
|
|
|
ReplyToMessageUpdateRequest;
|
2014-05-21 10:11:31 +04:00
|
|
|
AnswerWaitingCallRequest;
|
|
|
|
IgnoreWaitingCallRequest;
|
|
|
|
ToggleCallsRequest;
|
|
|
|
SendMetaDataRequest;
|
|
|
|
SendPlayStatusRequest;
|
2015-02-13 19:13:00 +03:00
|
|
|
ConnectGattClientRequest;
|
|
|
|
DisconnectGattClientRequest;
|
2015-03-23 10:25:00 +03:00
|
|
|
DiscoverGattServicesRequest;
|
2015-04-08 08:49:28 +03:00
|
|
|
GattClientStartNotificationsRequest;
|
|
|
|
GattClientStopNotificationsRequest;
|
2015-02-13 19:13:00 +03:00
|
|
|
UnregisterGattClientRequest;
|
2015-03-16 11:55:50 +03:00
|
|
|
GattClientReadRemoteRssiRequest;
|
2015-04-16 11:44:37 +03:00
|
|
|
GattClientReadCharacteristicValueRequest;
|
|
|
|
GattClientWriteCharacteristicValueRequest;
|
2015-04-16 11:45:20 +03:00
|
|
|
GattClientReadDescriptorValueRequest;
|
|
|
|
GattClientWriteDescriptorValueRequest;
|
2016-01-15 04:50:54 +03:00
|
|
|
GattServerRegisterRequest;
|
2015-08-21 12:11:14 +03:00
|
|
|
GattServerConnectPeripheralRequest;
|
|
|
|
GattServerDisconnectPeripheralRequest;
|
|
|
|
UnregisterGattServerRequest;
|
2015-08-24 11:58:13 +03:00
|
|
|
GattServerAddServiceRequest;
|
|
|
|
GattServerAddIncludedServiceRequest;
|
|
|
|
GattServerAddCharacteristicRequest;
|
|
|
|
GattServerAddDescriptorRequest;
|
|
|
|
GattServerRemoveServiceRequest;
|
|
|
|
GattServerStartServiceRequest;
|
|
|
|
GattServerStopServiceRequest;
|
2015-09-23 09:16:27 +03:00
|
|
|
GattServerSendResponseRequest;
|
2015-09-23 09:18:01 +03:00
|
|
|
GattServerSendIndicationRequest;
|
2014-05-21 10:11:31 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
protocol PBluetooth
|
|
|
|
{
|
|
|
|
manager PContent;
|
|
|
|
manages PBluetoothRequest;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The potential exists for a racy shutdown so the following sequence of
|
|
|
|
* messages is used to shutdown safely:
|
|
|
|
*
|
|
|
|
* 1. [BeginShutdown] (Parent -> Child [Optional])
|
|
|
|
* 2. StopNotifying (Child -> Parent)
|
|
|
|
* 3. NotificationsStopped (Parent -> Child)
|
|
|
|
* 4. __delete__() (Child -> Parent)
|
|
|
|
*/
|
|
|
|
|
|
|
|
child:
|
|
|
|
/**
|
|
|
|
* Sent when a settings change has enabled or disabled the bluetooth firmware.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async Enabled(bool enabled);
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sent when a bluetooth signal is broadcasted to child processes.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async Notify(BluetoothSignal signal);
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sent when the parent process is about to be shut down. See shutdown note
|
|
|
|
* above.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async BeginShutdown();
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sent to inform the child process that it will no longer receive any
|
|
|
|
* messages from the parent. See shutdown note above.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async NotificationsStopped();
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
parent:
|
|
|
|
/**
|
|
|
|
* Sent when the child no longer needs to use bluetooth. See shutdown note
|
|
|
|
* above.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async __delete__();
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sent when the child needs to receive signals related to the given node.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async RegisterSignalHandler(nsString node);
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sent when the child no longer needs to receive signals related to the given
|
|
|
|
* node.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async UnregisterSignalHandler(nsString node);
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sent when the child no longer needs to receive any messages from the
|
|
|
|
* parent. See shutdown note above.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async StopNotifying();
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sent when the child makes an asynchronous request to the parent.
|
|
|
|
*/
|
2016-01-27 00:51:53 +03:00
|
|
|
async PBluetoothRequest(Request request);
|
2014-05-21 10:11:31 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* FIXME: Bug 547703.
|
|
|
|
*
|
|
|
|
* This is the state machine we want:
|
|
|
|
*
|
|
|
|
* start state NOTIFYING:
|
|
|
|
* send Enabled goto NOTIFYING;
|
|
|
|
* send Notify goto NOTIFYING;
|
|
|
|
* recv RegisterSignalHandler goto NOTIFYING;
|
|
|
|
* recv UnregisterSignalHandler goto NOTIFYING;
|
|
|
|
* send BeginShutdown goto PARENT_DONE;
|
|
|
|
* recv StopNotifying goto CHILD_DONE;
|
|
|
|
*
|
|
|
|
* state PARENT_DONE:
|
|
|
|
* recv RegisterSignalHandler goto PARENT_DONE;
|
|
|
|
* recv UnregisterSignalHandler goto PARENT_DONE;
|
|
|
|
* recv StopNotifying goto CHILD_DONE;
|
|
|
|
*
|
|
|
|
* state CHILD_DONE:
|
|
|
|
* send Enabled goto CHILD_DONE;
|
|
|
|
* send Notify goto CHILD_DONE;
|
|
|
|
* send BeginShutdown goto CHILD_DONE;
|
|
|
|
* send NotificationsStopped goto DONE;
|
|
|
|
*
|
|
|
|
* state DONE:
|
|
|
|
* recv __delete__;
|
|
|
|
*/
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace bluetooth
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|