mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
748ecff12f
--- dom/bluetooth/BluetoothCommon.h | 8 + dom/bluetooth/BluetoothService.h | 17 + dom/bluetooth/linux/BluetoothDBusService.cpp | 561 ++++++++++++++++++++++++- dom/bluetooth/linux/BluetoothDBusService.h | 23 + 4 files changed, 586 insertions(+), 23 deletions(-)
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
/* vim: set ts=2 et sw=2 tw=40: */
|
|
/* 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_bluetoothcommon_h__
|
|
#define mozilla_dom_bluetooth_bluetoothcommon_h__
|
|
|
|
#include "nsString.h"
|
|
#include "nsTArray.h"
|
|
#include "mozilla/Observer.h"
|
|
|
|
#define BEGIN_BLUETOOTH_NAMESPACE \
|
|
namespace mozilla { namespace dom { namespace bluetooth {
|
|
#define END_BLUETOOTH_NAMESPACE \
|
|
} /* namespace bluetooth */ } /* namespace dom */ } /* namespace mozilla */
|
|
#define USING_BLUETOOTH_NAMESPACE \
|
|
using namespace mozilla::dom::bluetooth;
|
|
|
|
#define LOCAL_AGENT_PATH "/B2G/bluetooth/agent"
|
|
#define REMOTE_AGENT_PATH "/B2G/bluetooth/remote_device_agent"
|
|
|
|
// Bluetooth address format: xx:xx:xx:xx:xx:xx (or xx_xx_xx_xx_xx_xx)
|
|
#define BLUETOOTH_ADDRESS_LENGTH 17
|
|
|
|
#define DOM_BLUETOOTH_URL_PREF "dom.mozBluetooth.whitelist"
|
|
|
|
class nsCString;
|
|
|
|
BEGIN_BLUETOOTH_NAMESPACE
|
|
|
|
class BluetoothSignal;
|
|
typedef mozilla::Observer<BluetoothSignal> BluetoothSignalObserver;
|
|
|
|
// Enums for object types, currently used for shared function lookups
|
|
// (get/setproperty, etc...). Possibly discernable via dbus paths, but this
|
|
// method is future-proofed for platform independence.
|
|
enum BluetoothObjectType {
|
|
TYPE_MANAGER = 0,
|
|
TYPE_ADAPTER = 1,
|
|
TYPE_DEVICE = 2
|
|
};
|
|
|
|
END_BLUETOOTH_NAMESPACE
|
|
|
|
#endif // mozilla_dom_bluetooth_bluetoothcommon_h__
|