mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1171868 - Remove GeneratePathFromGattId(aId, aPath, aUuidStr); r=jocelyn
This commit is contained in:
parent
efa6ebbf99
commit
39bbe8ff1d
@ -87,24 +87,16 @@ GenerateUuid(nsAString &aUuidString)
|
||||
aUuidString.Assign(Substring(uuidString, 1, NSID_LENGTH - 3));
|
||||
}
|
||||
|
||||
void
|
||||
GeneratePathFromGattId(const BluetoothGattId& aId,
|
||||
nsAString& aPath,
|
||||
nsAString& aUuidStr)
|
||||
{
|
||||
UuidToString(aId.mUuid, aUuidStr);
|
||||
|
||||
aPath.Assign(aUuidStr);
|
||||
aPath.AppendLiteral("_");
|
||||
aPath.AppendInt(aId.mInstanceId);
|
||||
}
|
||||
|
||||
void
|
||||
GeneratePathFromGattId(const BluetoothGattId& aId,
|
||||
nsAString& aPath)
|
||||
{
|
||||
nsString uuidStr;
|
||||
GeneratePathFromGattId(aId, aPath, uuidStr);
|
||||
UuidToString(aId.mUuid, uuidStr);
|
||||
|
||||
aPath.Assign(uuidStr);
|
||||
aPath.AppendLiteral("_");
|
||||
aPath.AppendInt(aId.mInstanceId);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -50,18 +50,6 @@ GenerateUuid(nsAString &aUuidString);
|
||||
// Generate bluetooth signal path from GattId
|
||||
//
|
||||
|
||||
/**
|
||||
* Generate bluetooth signal path and UUID string from a GattId.
|
||||
*
|
||||
* @param aId [in] GattId value to convert.
|
||||
* @param aPath [out] Bluetooth signal path generated from aId.
|
||||
* @param aUuidStr [out] UUID string generated from aId.
|
||||
*/
|
||||
void
|
||||
GeneratePathFromGattId(const BluetoothGattId& aId,
|
||||
nsAString& aPath,
|
||||
nsAString& aUuidStr);
|
||||
|
||||
/**
|
||||
* Generate bluetooth signal path from a GattId.
|
||||
*
|
||||
|
@ -68,10 +68,11 @@ BluetoothGattCharacteristic::BluetoothGattCharacteristic(
|
||||
MOZ_ASSERT(aOwner);
|
||||
MOZ_ASSERT(mService);
|
||||
|
||||
// Generate bluetooth signal path and a string representation to provide uuid
|
||||
// of this characteristic to applications
|
||||
UuidToString(mCharId.mUuid, mUuidStr);
|
||||
|
||||
// Generate bluetooth signal path of this characteristic to applications
|
||||
nsString path;
|
||||
GeneratePathFromGattId(mCharId, path, mUuidStr);
|
||||
GeneratePathFromGattId(mCharId, path);
|
||||
RegisterBluetoothSignalHandler(path, this);
|
||||
}
|
||||
|
||||
|
@ -63,10 +63,11 @@ BluetoothGattDescriptor::BluetoothGattDescriptor(
|
||||
MOZ_ASSERT(aOwner);
|
||||
MOZ_ASSERT(aCharacteristic);
|
||||
|
||||
// Generate bluetooth signal path and a string representation to provide uuid
|
||||
// of this descriptor to applications
|
||||
UuidToString(mDescriptorId.mUuid, mUuidStr);
|
||||
|
||||
// Generate bluetooth signal path of this descriptor to applications
|
||||
nsString path;
|
||||
GeneratePathFromGattId(mDescriptorId, path, mUuidStr);
|
||||
GeneratePathFromGattId(mDescriptorId, path);
|
||||
RegisterBluetoothSignalHandler(path, this);
|
||||
}
|
||||
|
||||
|
@ -62,10 +62,11 @@ BluetoothGattService::BluetoothGattService(
|
||||
MOZ_ASSERT(aOwner);
|
||||
MOZ_ASSERT(!mAppUuid.IsEmpty());
|
||||
|
||||
// Generate bluetooth signal path and a string representation to provide
|
||||
// uuid of this service to applications
|
||||
UuidToString(mServiceId.mId.mUuid, mUuidStr);
|
||||
|
||||
// Generate bluetooth signal path of this service to applications
|
||||
nsString path;
|
||||
GeneratePathFromGattId(mServiceId.mId, path, mUuidStr);
|
||||
GeneratePathFromGattId(mServiceId.mId, path);
|
||||
RegisterBluetoothSignalHandler(path, this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user