Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement GetGATTChildren #14593
Implement GetGATTChildren #14593
Conversation
highfive
commented
Dec 14, 2016
|
Heads up! This PR modifies the following files:
|
|
Note: it depends on #14567 and also needs a rebase. |
|
r? @jdm |
|
What does WIP in the title mean? |
|
work in progress, maybe i should have used [do not merge yet] or something |
|
We can use the S-blocked-on-external label for that. WIP usually means that it's not necessarily ready for review yet. |
|
This is a nice improvement that reduces code complexity. |
| if !self.device_is_cached(&device_id) { | ||
| return drop(sender.send(Err(BluetoothError::InvalidState))); | ||
| } | ||
| fn get_gatt_children(&mut self, |
This comment has been minimized.
This comment has been minimized.
jdm
Dec 15, 2016
Member
Let's add the https://webbluetoothcg.github.io/web-bluetooth/#getgattchildren link back.
| let p_cx = p.global().get_cx(); | ||
|
|
||
| let mut result_uuid: Option<String> = None; | ||
| if let Some(u) = uuid { |
This comment has been minimized.
This comment has been minimized.
jdm
Dec 15, 2016
Member
let result_uuid = if let Some(u) = uuid {
let canonicalized = match uuid_canonicalizer(u) {
Ok(canonicalized_uuid) => canonicalized_uuid.to_string(),
Err(e) => {
...
}
};
if uuid_is_blocklisted(canonicalized.as_ref(), Blocklist::All) {
...
}
Some(canonicalized)
} else {
None
};|
|
|
@bors-servo: delegate+ |
|
|
|
@bors-servo r=jdm |
|
|
Implement GetGATTChildren <!-- Please describe your changes on the following line: --> Implement the [GetGATTChildren](https://webbluetoothcg.github.io/web-bluetooth/#getgattchildren) function for webbluetooth. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14593) <!-- Reviewable:end -->
|
|
dati91 commentedDec 14, 2016
•
edited by larsbergstrom
Implement the GetGATTChildren function for webbluetooth.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is