Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Untitled diff
Created
10 years ago
Diff never expires
Clear
Export
Share
Explain
20 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
31 lines
Copy
12 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
25 lines
Copy
Copy
Copied
Copy
Copied
Interface per object
:
As opposed to
:
Copy
Copied
Copy
Copied
interface
Service
{
interface
GattRemoteServer
{
GetCharacteristic(CharacteristicId id
);
GetServices() => (array<ServiceInfo> services
);
GetCharacteristics
(
) =>
GetCharacteristics
ForService(ServiceId id
) =>
(array<CharacteristicInfo> characteristics);
(array<CharacteristicInfo> characteristics);
}
}
How Web Bluetooth would use it:
How Web Bluetooth would use it:
// BluetoothRemoteGATTService.cpp
// BluetoothRemoteGATTService.cpp
GetCharacteristic(String uuid) {
GetCharacteristic(String uuid) {
Copy
Copied
Copy
Copied
service
_->GetCharacteristics
(base::Bind(&OnGetCharacteristics, this,
uuid,
gatt
_->GetCharacteristics
ForService
(base::Bind(&OnGetCharacteristics, this,
...));
uuid,
...));
}
);
}
OnGetCharacteristics(uuid, characteristics, promise) {
OnGetCharacteristics(uuid, characteristics, promise) {
for (characteristic : characteristics) {
for (characteristic : characteristics) {
if (characteristic->uuid == uuid) {
if (characteristic->uuid == uuid) {
Copy
Copied
Copy
Copied
service_->GetCharacteristic(base::Bind(&OnGetCharacteristic, this, uuid,
promise.resolve(new BluetoothRemoteGATTCharacteristic(
characteristic
));
characteristic
->id, promise
));
return;
}
}
}
}
Copy
Copied
Copy
Copied
}
promise.
reject("Not Found Error"
);
OnGetCharacteristic(uuid, id, characteristic, promise) {
promise.
resolve(new BluetoothRemoteGATTCharacteristic(id, uuid)
);
}
}
Copy
Copied
Copy
Copied
Saved diffs
Original text
Open file
Interface per object: interface Service { GetCharacteristic(CharacteristicId id); GetCharacteristics() => (array<CharacteristicInfo> characteristics); } How Web Bluetooth would use it: // BluetoothRemoteGATTService.cpp GetCharacteristic(String uuid) { service_->GetCharacteristics(base::Bind(&OnGetCharacteristics, this, uuid, ...)); }); OnGetCharacteristics(uuid, characteristics, promise) { for (characteristic : characteristics) { if (characteristic->uuid == uuid) { service_->GetCharacteristic(base::Bind(&OnGetCharacteristic, this, uuid, characteristic->id, promise)); return; } } } OnGetCharacteristic(uuid, id, characteristic, promise) { promise.resolve(new BluetoothRemoteGATTCharacteristic(id, uuid)); }
Changed text
Open file
As opposed to: interface GattRemoteServer { GetServices() => (array<ServiceInfo> services); GetCharacteristicsForService(ServiceId id) => (array<CharacteristicInfo> characteristics); } How Web Bluetooth would use it: // BluetoothRemoteGATTService.cpp GetCharacteristic(String uuid) { gatt_->GetCharacteristicsForService(base::Bind(&OnGetCharacteristics, this, uuid, ...)); } OnGetCharacteristics(uuid, characteristics, promise) { for (characteristic : characteristics) { if (characteristic->uuid == uuid) { promise.resolve(new BluetoothRemoteGATTCharacteristic(characteristic)); } } promise.reject("Not Found Error"); }
Find difference