{"action":"created","comment":{"url":"https://api.github.com/repos/szeged/servo/pulls/comments/58366365","id":58366365,"diff_hunk":"@@ -127,4 +137,51 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {\n             _ => unreachable!()\n         }\n     }\n+\n+    // http://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-getprimaryservices\n+    fn GetPrimaryServices(&self, service: Option<StringOrUnsignedLong>)\n+                          -> Option<Vec<Root<BluetoothRemoteGATTService>>> {\n+        let uuid: Option<String> = match service {\n+            Some(s) => match BluetoothUUID::GetService(self.global().r(), s.clone()) {\n+                Ok(domstring) => Some(domstring.to_string()),\n+                Err(_) => None\n+            },\n+            None => None\n+        };\n+        let mut services: Vec<Root<BluetoothRemoteGATTService>> = vec!();\n+        let (sender, receiver) = ipc::channel().unwrap();\n+        self.get_bluetooth_thread().send(\n+            BluetoothMethodMsg::GetPrimaryServices(String::from(self.Device().Id()), uuid, sender)).unwrap();\n+        let services_vec = receiver.recv().unwrap();\n+        match services_vec {\n+            BluetoothObjectMsg::BluetoothServices {\n+                services_vec\n+            } => {\n+                for s in services_vec {\n+                    match s {\n+                        BluetoothObjectMsg::BluetoothService {\n+                            uuid,\n+                            is_primary,\n+                            instance_id,\n+                    } => {\n+                        services.push(BluetoothRemoteGATTService::new(self.global().r(),\n+                            &self.device.get(),","path":"components/script/dom/bluetoothremotegattserver.rs","position":85,"original_position":85,"commit_id":"9f5ce0ceccf9e61ca8e49bfead6df4b767149254","original_commit_id":"9f5ce0ceccf9e61ca8e49bfead6df4b767149254","user":{"login":"dati91","id":2149430,"avatar_url":"https://avatars.githubusercontent.com/u/2149430?v=3","gravatar_id":"","url":"https://api.github.com/users/dati91","html_url":"https://github.com/dati91","followers_url":"https://api.github.com/users/dati91/followers","following_url":"https://api.github.com/users/dati91/following{/other_user}","gists_url":"https://api.github.com/users/dati91/gists{/gist_id}","starred_url":"https://api.github.com/users/dati91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dati91/subscriptions","organizations_url":"https://api.github.com/users/dati91/orgs","repos_url":"https://api.github.com/users/dati91/repos","events_url":"https://api.github.com/users/dati91/events{/privacy}","received_events_url":"https://api.github.com/users/dati91/received_events","type":"User","site_admin":false},"body":"Indent","created_at":"2016-04-04T12:16:16Z","updated_at":"2016-04-04T12:16:16Z","html_url":"https://github.com/szeged/servo/pull/11#discussion_r58366365","pull_request_url":"https://api.github.com/repos/szeged/servo/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/szeged/servo/pulls/comments/58366365"},"html":{"href":"https://github.com/szeged/servo/pull/11#discussion_r58366365"},"pull_request":{"href":"https://api.github.com/repos/szeged/servo/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/szeged/servo/pulls/11","id":65105225,"html_url":"https://github.com/szeged/servo/pull/11","diff_url":"https://github.com/szeged/servo/pull/11.diff","patch_url":"https://github.com/szeged/servo/pull/11.patch","issue_url":"https://api.github.com/repos/szeged/servo/issues/11","number":11,"state":"open","locked":false,"title":"Bluetooth ipc","user":{"login":"fokinv","id":16573357,"avatar_url":"https://avatars.githubusercontent.com/u/16573357?v=3","gravatar_id":"","url":"https://api.github.com/users/fokinv","html_url":"https://github.com/fokinv","followers_url":"https://api.github.com/users/fokinv/followers","following_url":"https://api.github.com/users/fokinv/following{/other_user}","gists_url":"https://api.github.com/users/fokinv/gists{/gist_id}","starred_url":"https://api.github.com/users/fokinv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fokinv/subscriptions","organizations_url":"https://api.github.com/users/fokinv/orgs","repos_url":"https://api.github.com/users/fokinv/repos","events_url":"https://api.github.com/users/fokinv/events{/privacy}","received_events_url":"https://api.github.com/users/fokinv/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-04T07:32:27Z","updated_at":"2016-04-04T12:16:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e492dae8d320230862e1380ff5794830f68ba2c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/szeged/servo/pulls/11/commits","review_comments_url":"https://api.github.com/repos/szeged/servo/pulls/11/comments","review_comment_url":"https://api.github.com/repos/szeged/servo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/szeged/servo/issues/11/comments","statuses_url":"https://api.github.com/repos/szeged/servo/statuses/9f5ce0ceccf9e61ca8e49bfead6df4b767149254","head":{"label":"fokinv:bluetooth-ipc","ref":"bluetooth-ipc","sha":"9f5ce0ceccf9e61ca8e49bfead6df4b767149254","user":{"login":"fokinv","id":16573357,"avatar_url":"https://avatars.githubusercontent.com/u/16573357?v=3","gravatar_id":"","url":"https://api.github.com/users/fokinv","html_url":"https://github.com/fokinv","followers_url":"https://api.github.com/users/fokinv/followers","following_url":"https://api.github.com/users/fokinv/following{/other_user}","gists_url":"https://api.github.com/users/fokinv/gists{/gist_id}","starred_url":"https://api.github.com/users/fokinv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fokinv/subscriptions","organizations_url":"https://api.github.com/users/fokinv/orgs","repos_url":"https://api.github.com/users/fokinv/repos","events_url":"https://api.github.com/users/fokinv/events{/privacy}","received_events_url":"https://api.github.com/users/fokinv/received_events","type":"User","site_admin":false},"repo":{"id":54105134,"name":"servo","full_name":"fokinv/servo","owner":{"login":"fokinv","id":16573357,"avatar_url":"https://avatars.githubusercontent.com/u/16573357?v=3","gravatar_id":"","url":"https://api.github.com/users/fokinv","html_url":"https://github.com/fokinv","followers_url":"https://api.github.com/users/fokinv/followers","following_url":"https://api.github.com/users/fokinv/following{/other_user}","gists_url":"https://api.github.com/users/fokinv/gists{/gist_id}","starred_url":"https://api.github.com/users/fokinv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fokinv/subscriptions","organizations_url":"https://api.github.com/users/fokinv/orgs","repos_url":"https://api.github.com/users/fokinv/repos","events_url":"https://api.github.com/users/fokinv/events{/privacy}","received_events_url":"https://api.github.com/users/fokinv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fokinv/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/fokinv/servo","forks_url":"https://api.github.com/repos/fokinv/servo/forks","keys_url":"https://api.github.com/repos/fokinv/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fokinv/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fokinv/servo/teams","hooks_url":"https://api.github.com/repos/fokinv/servo/hooks","issue_events_url":"https://api.github.com/repos/fokinv/servo/issues/events{/number}","events_url":"https://api.github.com/repos/fokinv/servo/events","assignees_url":"https://api.github.com/repos/fokinv/servo/assignees{/user}","branches_url":"https://api.github.com/repos/fokinv/servo/branches{/branch}","tags_url":"https://api.github.com/repos/fokinv/servo/tags","blobs_url":"https://api.github.com/repos/fokinv/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fokinv/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fokinv/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/fokinv/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fokinv/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/fokinv/servo/languages","stargazers_url":"https://api.github.com/repos/fokinv/servo/stargazers","contributors_url":"https://api.github.com/repos/fokinv/servo/contributors","subscribers_url":"https://api.github.com/repos/fokinv/servo/subscribers","subscription_url":"https://api.github.com/repos/fokinv/servo/subscription","commits_url":"https://api.github.com/repos/fokinv/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/fokinv/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/fokinv/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/fokinv/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/fokinv/servo/contents/{+path}","compare_url":"https://api.github.com/repos/fokinv/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fokinv/servo/merges","archive_url":"https://api.github.com/repos/fokinv/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fokinv/servo/downloads","issues_url":"https://api.github.com/repos/fokinv/servo/issues{/number}","pulls_url":"https://api.github.com/repos/fokinv/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/fokinv/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/fokinv/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fokinv/servo/labels{/name}","releases_url":"https://api.github.com/repos/fokinv/servo/releases{/id}","deployments_url":"https://api.github.com/repos/fokinv/servo/deployments","created_at":"2016-03-17T09:25:11Z","updated_at":"2016-01-25T13:06:41Z","pushed_at":"2016-04-04T11:24:49Z","git_url":"git://github.com/fokinv/servo.git","ssh_url":"git@github.com:fokinv/servo.git","clone_url":"https://github.com/fokinv/servo.git","svn_url":"https://github.com/fokinv/servo","homepage":"https://servo.org/","size":178647,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"szeged:bluetooth-ipc","ref":"bluetooth-ipc","sha":"2c35fbbf6abeac6a2d214d442db90f6a1ec79ad4","user":{"login":"szeged","id":1826696,"avatar_url":"https://avatars.githubusercontent.com/u/1826696?v=3","gravatar_id":"","url":"https://api.github.com/users/szeged","html_url":"https://github.com/szeged","followers_url":"https://api.github.com/users/szeged/followers","following_url":"https://api.github.com/users/szeged/following{/other_user}","gists_url":"https://api.github.com/users/szeged/gists{/gist_id}","starred_url":"https://api.github.com/users/szeged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szeged/subscriptions","organizations_url":"https://api.github.com/users/szeged/orgs","repos_url":"https://api.github.com/users/szeged/repos","events_url":"https://api.github.com/users/szeged/events{/privacy}","received_events_url":"https://api.github.com/users/szeged/received_events","type":"Organization","site_admin":false},"repo":{"id":50353354,"name":"servo","full_name":"szeged/servo","owner":{"login":"szeged","id":1826696,"avatar_url":"https://avatars.githubusercontent.com/u/1826696?v=3","gravatar_id":"","url":"https://api.github.com/users/szeged","html_url":"https://github.com/szeged","followers_url":"https://api.github.com/users/szeged/followers","following_url":"https://api.github.com/users/szeged/following{/other_user}","gists_url":"https://api.github.com/users/szeged/gists{/gist_id}","starred_url":"https://api.github.com/users/szeged/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szeged/subscriptions","organizations_url":"https://api.github.com/users/szeged/orgs","repos_url":"https://api.github.com/users/szeged/repos","events_url":"https://api.github.com/users/szeged/events{/privacy}","received_events_url":"https://api.github.com/users/szeged/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/szeged/servo","description":"The Servo Browser Engine","fork":true,"url":"https://api.github.com/repos/szeged/servo","forks_url":"https://api.github.com/repos/szeged/servo/forks","keys_url":"https://api.github.com/repos/szeged/servo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szeged/servo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szeged/servo/teams","hooks_url":"https://api.github.com/repos/szeged/servo/hooks","issue_events_url":"https://api.github.com/repos/szeged/servo/issues/events{/number}","events_url":"https://api.github.com/repos/szeged/servo/events","assignees_url":"https://api.github.com/repos/szeged/servo/assignees{/user}","branches_url":"https://api.github.com/repos/szeged/servo/branches{/branch}","tags_url":"https://api.github.com/repos/szeged/servo/tags","blobs_url":"https://api.github.com/repos/szeged/servo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szeged/servo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szeged/servo/git/refs{/sha}","trees_url":"https://api.github.com/repos/szeged/servo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szeged/servo/statuses/{sha}","languages_url":"https://api.github.com/repos/szeged/servo/languages","stargazers_url":"https://api.github.com/repos/szeged/servo/stargazers","contributors_url":"https://api.github.com/repos/szeged/servo/contributors","subscribers_url":"https://api.github.com/repos/szeged/servo/subscribers","subscription_url":"https://api.github.com/repos/szeged/servo/subscription","commits_url":"https://api.github.com/repos/szeged/servo/commits{/sha}","git_commits_url":"https://api.github.com/repos/szeged/servo/git/commits{/sha}","comments_url":"https://api.github.com/repos/szeged/servo/comments{/number}","issue_comment_url":"https://api.github.com/repos/szeged/servo/issues/comments{/number}","contents_url":"https://api.github.com/repos/szeged/servo/contents/{+path}","compare_url":"https://api.github.com/repos/szeged/servo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szeged/servo/merges","archive_url":"https://api.github.com/repos/szeged/servo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szeged/servo/downloads","issues_url":"https://api.github.com/repos/szeged/servo/issues{/number}","pulls_url":"https://api.github.com/repos/szeged/servo/pulls{/number}","milestones_url":"https://api.github.com/repos/szeged/servo/milestones{/number}","notifications_url":"https://api.github.com/repos/szeged/servo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szeged/servo/labels{/name}","releases_url":"https://api.github.com/repos/szeged/servo/releases{/id}","deployments_url":"https://api.github.com/repos/szeged/servo/deployments","created_at":"2016-01-25T13:48:48Z","updated_at":"2016-01-25T13:06:41Z","pushed_at":"2016-04-04T11:24:50Z","git_url":"git://github.com/szeged/servo.git","ssh_url":"git@github.com:szeged/servo.git","clone_url":"https://github.com/szeged/servo.git","svn_url":"https://github.com/szeged/servo","homepage":"https://servo.org/","size":178792,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/szeged/servo/pulls/11"},"html":{"href":"https://github.com/szeged/servo/pull/11"},"issue":{"href":"https://api.github.com/repos/szeged/servo/issues/11"},"comments":{"href":"https://api.github.com/repos/szeged/servo/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/szeged/servo/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/szeged/servo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/szeged/servo/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/szeged/servo/statuses/9f5ce0ceccf9e61ca8e49bfead6df4b767149254"}}}}