mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 786596 - v1: get device type information. r=qdot, sr=mrbkap
This commit is contained in:
parent
ebd9d07ef7
commit
e1df45386c
@ -115,6 +115,8 @@ BluetoothDevice::SetPropertyByValue(const BluetoothNamedValue& aValue)
|
||||
bs->GetDevicePath(mAdapterPath, mAddress, mPath);
|
||||
} else if (name.EqualsLiteral("Class")) {
|
||||
mClass = value.get_uint32_t();
|
||||
} else if (name.EqualsLiteral("Icon")) {
|
||||
mIcon = value.get_nsString();
|
||||
} else if (name.EqualsLiteral("Connected")) {
|
||||
mConnected = value.get_bool();
|
||||
} else if (name.EqualsLiteral("Paired")) {
|
||||
@ -221,6 +223,13 @@ BluetoothDevice::GetName(nsAString& aName)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BluetoothDevice::GetIcon(nsAString& aIcon)
|
||||
{
|
||||
aIcon = mIcon;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
BluetoothDevice::GetDeviceClass(uint32_t* aClass)
|
||||
{
|
||||
|
@ -68,6 +68,7 @@ private:
|
||||
nsString mAdapterPath;
|
||||
nsString mAddress;
|
||||
nsString mName;
|
||||
nsString mIcon;
|
||||
uint32_t mClass;
|
||||
bool mConnected;
|
||||
bool mPaired;
|
||||
|
@ -6,11 +6,12 @@
|
||||
|
||||
#include "nsIDOMEventTarget.idl"
|
||||
|
||||
[scriptable, builtinclass, uuid(647bb64c-8d45-4642-b86b-b3b80d4c8c25)]
|
||||
[scriptable, builtinclass, uuid(4a271533-6a09-4a65-ae2b-086794c7852c)]
|
||||
interface nsIDOMBluetoothDevice : nsIDOMEventTarget
|
||||
{
|
||||
readonly attribute DOMString address;
|
||||
readonly attribute DOMString name;
|
||||
readonly attribute DOMString icon;
|
||||
[binaryname(DeviceClass)] readonly attribute unsigned long class;
|
||||
[implicit_jscontext] readonly attribute jsval uuids;
|
||||
readonly attribute bool connected;
|
||||
|
Loading…
Reference in New Issue
Block a user