{"action":"created","comment":{"url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/comments/243214013","pull_request_review_id":186922034,"id":243214013,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzIxNDAxMw==","diff_hunk":"@@ -0,0 +1,599 @@\n+/*\n+ * Copyright (c) 2018 Nordic Semiconductor ASA\n+ *\n+ * SPDX-License-Identifier: LicenseRef-BSD-5-Clause-Nordic\n+ */\n+\n+#ifndef BT_GATT_HIDS_C_H_\n+#define BT_GATT_HIDS_C_H_\n+\n+/**\n+ * @file\n+ * @defgroup bt_gatt_hids_c BLE GATT HIDS Client API\n+ * @{\n+ * @brief API for the BLE GATT HID Service (HIDS) Client.\n+ */\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+#include <bluetooth/gatt.h>\n+#include <bluetooth/conn.h>\n+#include <bluetooth/common/gatt_dm.h>\n+\n+struct bt_gatt_hids_c;\n+struct bt_gatt_hids_c_rep_info;\n+\n+/**\n+ * @brief Protocol mode\n+ *\n+ * Possible values for protocol mode characteristic value\n+ */\n+enum bt_gatt_hids_c_pm {\n+\tBT_GATT_HIDS_C_PM_BOOT   = 0x00,/**< Boot protocol   */\n+\tBT_GATT_HIDS_C_PM_REPORT = 0x1  /**< Report protocol */\n+};\n+\n+/**\n+ * @brief Report types\n+ *\n+ * Report types as as defined in Report Reference characteristic descriptor.\n+ */\n+enum bt_gatt_hids_c_report_type {\n+\tBT_GATT_HIDS_C_REPORT_TYPE_RESERVED = 0x00, /**< Reserved value */\n+\tBT_GATT_HIDS_C_REPORT_TYPE_INPUT    = 0x01, /**< Input Report   */\n+\tBT_GATT_HIDS_C_REPORT_TYPE_OUTPUT   = 0x02, /**< Output Report  */\n+\tBT_GATT_HIDS_C_REPORT_TYPE_FEATURE  = 0x03  /**< Feature Report */\n+};\n+\n+/**\n+ * @brief Callback function when notification or read response is received\n+ *\n+ * Function is called when new data related to the given report object\n+ * appears.\n+ * The data size can be obtained from the report object.\n+ *\n+ * @param hids_c HIDS client object\n+ * @param rep    Report object\n+ * @param err    ATT error code\n+ * @param data   Pointer to the received data\n+ *\n+ * @retval BT_GATT_ITER_STOP     Stop notification\n+ * @retval BT_GATT_ITER_CONTINUE Continue notification\n+ */\n+typedef u8_t (*bt_gatt_hids_c_read_cb)(struct bt_gatt_hids_c *hids_c,\n+\t\t\t\t       struct bt_gatt_hids_c_rep_info *rep,\n+\t\t\t\t       u8_t err,\n+\t\t\t\t       const u8_t *data);","path":"include/bluetooth/services/hids_c.h","position":69,"original_position":68,"commit_id":"b02d03ef23c251d8d1f5a3cb1a0e9b253b952e65","original_commit_id":"32c6fe9638053651f0eb7c7cc512b8cd32a9d13d","user":{"login":"rakons","id":16699877,"node_id":"MDQ6VXNlcjE2Njk5ODc3","avatar_url":"https://avatars0.githubusercontent.com/u/16699877?v=4","gravatar_id":"","url":"https://api.github.com/users/rakons","html_url":"https://github.com/rakons","followers_url":"https://api.github.com/users/rakons/followers","following_url":"https://api.github.com/users/rakons/following{/other_user}","gists_url":"https://api.github.com/users/rakons/gists{/gist_id}","starred_url":"https://api.github.com/users/rakons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakons/subscriptions","organizations_url":"https://api.github.com/users/rakons/orgs","repos_url":"https://api.github.com/users/rakons/repos","events_url":"https://api.github.com/users/rakons/events{/privacy}","received_events_url":"https://api.github.com/users/rakons/received_events","type":"User","site_admin":false},"body":"Comment added.","created_at":"2018-12-20T10:01:18Z","updated_at":"2018-12-20T10:01:18Z","html_url":"https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/355#discussion_r243214013","pull_request_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/comments/243214013"},"html":{"href":"https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/355#discussion_r243214013"},"pull_request":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355"}},"in_reply_to_id":243165471},"pull_request":{"url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355","id":239905550,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5OTA1NTUw","html_url":"https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/355","diff_url":"https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/355.diff","patch_url":"https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/355.patch","issue_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/issues/355","number":355,"state":"open","locked":false,"title":"Hids implementation","user":{"login":"rakons","id":16699877,"node_id":"MDQ6VXNlcjE2Njk5ODc3","avatar_url":"https://avatars0.githubusercontent.com/u/16699877?v=4","gravatar_id":"","url":"https://api.github.com/users/rakons","html_url":"https://github.com/rakons","followers_url":"https://api.github.com/users/rakons/followers","following_url":"https://api.github.com/users/rakons/following{/other_user}","gists_url":"https://api.github.com/users/rakons/gists{/gist_id}","starred_url":"https://api.github.com/users/rakons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakons/subscriptions","organizations_url":"https://api.github.com/users/rakons/orgs","repos_url":"https://api.github.com/users/rakons/repos","events_url":"https://api.github.com/users/rakons/events{/privacy}","received_events_url":"https://api.github.com/users/rakons/received_events","type":"User","site_admin":false},"body":"This is just a simple implementation and only notification is really tested.\r\nAlso ID of the reports is not set properly (it requires additional work after discovery).\r\n\r\nIt was requested by @pdunaj to pull it into the master as a base for his work. Missing features would be added in separate PR.","created_at":"2018-12-19T16:51:31Z","updated_at":"2018-12-20T10:01:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3bd57cad61cda158104e5ae5c8683b4b75977061","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355/commits","review_comments_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355/comments","review_comment_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/issues/355/comments","statuses_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/statuses/b02d03ef23c251d8d1f5a3cb1a0e9b253b952e65","head":{"label":"rakons:hids_implementation","ref":"hids_implementation","sha":"b02d03ef23c251d8d1f5a3cb1a0e9b253b952e65","user":{"login":"rakons","id":16699877,"node_id":"MDQ6VXNlcjE2Njk5ODc3","avatar_url":"https://avatars0.githubusercontent.com/u/16699877?v=4","gravatar_id":"","url":"https://api.github.com/users/rakons","html_url":"https://github.com/rakons","followers_url":"https://api.github.com/users/rakons/followers","following_url":"https://api.github.com/users/rakons/following{/other_user}","gists_url":"https://api.github.com/users/rakons/gists{/gist_id}","starred_url":"https://api.github.com/users/rakons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakons/subscriptions","organizations_url":"https://api.github.com/users/rakons/orgs","repos_url":"https://api.github.com/users/rakons/repos","events_url":"https://api.github.com/users/rakons/events{/privacy}","received_events_url":"https://api.github.com/users/rakons/received_events","type":"User","site_admin":false},"repo":{"id":162465696,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI0NjU2OTY=","name":"fw-nrfconnect-nrf","full_name":"rakons/fw-nrfconnect-nrf","private":false,"owner":{"login":"rakons","id":16699877,"node_id":"MDQ6VXNlcjE2Njk5ODc3","avatar_url":"https://avatars0.githubusercontent.com/u/16699877?v=4","gravatar_id":"","url":"https://api.github.com/users/rakons","html_url":"https://github.com/rakons","followers_url":"https://api.github.com/users/rakons/followers","following_url":"https://api.github.com/users/rakons/following{/other_user}","gists_url":"https://api.github.com/users/rakons/gists{/gist_id}","starred_url":"https://api.github.com/users/rakons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakons/subscriptions","organizations_url":"https://api.github.com/users/rakons/orgs","repos_url":"https://api.github.com/users/rakons/repos","events_url":"https://api.github.com/users/rakons/events{/privacy}","received_events_url":"https://api.github.com/users/rakons/received_events","type":"User","site_admin":false},"html_url":"https://github.com/rakons/fw-nrfconnect-nrf","description":"nRF Connect SDK nrf tree","fork":true,"url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf","forks_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/forks","keys_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/teams","hooks_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/hooks","issue_events_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/issues/events{/number}","events_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/events","assignees_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/assignees{/user}","branches_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/branches{/branch}","tags_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/tags","blobs_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/git/refs{/sha}","trees_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/statuses/{sha}","languages_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/languages","stargazers_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/stargazers","contributors_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/contributors","subscribers_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/subscribers","subscription_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/subscription","commits_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/commits{/sha}","git_commits_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/git/commits{/sha}","comments_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/comments{/number}","issue_comment_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/issues/comments{/number}","contents_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/contents/{+path}","compare_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/merges","archive_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/downloads","issues_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/issues{/number}","pulls_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/pulls{/number}","milestones_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/milestones{/number}","notifications_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/labels{/name}","releases_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/releases{/id}","deployments_url":"https://api.github.com/repos/rakons/fw-nrfconnect-nrf/deployments","created_at":"2018-12-19T16:48:47Z","updated_at":"2018-12-20T08:57:21Z","pushed_at":"2018-12-20T10:01:12Z","git_url":"git://github.com/rakons/fw-nrfconnect-nrf.git","ssh_url":"git@github.com:rakons/fw-nrfconnect-nrf.git","clone_url":"https://github.com/rakons/fw-nrfconnect-nrf.git","svn_url":"https://github.com/rakons/fw-nrfconnect-nrf","homepage":"http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/","size":2602,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NordicPlayground:master","ref":"master","sha":"06b5fb89bfac871782cbe7c6f30b0281320453d2","user":{"login":"NordicPlayground","id":5527425,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1Mjc0MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/5527425?v=4","gravatar_id":"","url":"https://api.github.com/users/NordicPlayground","html_url":"https://github.com/NordicPlayground","followers_url":"https://api.github.com/users/NordicPlayground/followers","following_url":"https://api.github.com/users/NordicPlayground/following{/other_user}","gists_url":"https://api.github.com/users/NordicPlayground/gists{/gist_id}","starred_url":"https://api.github.com/users/NordicPlayground/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NordicPlayground/subscriptions","organizations_url":"https://api.github.com/users/NordicPlayground/orgs","repos_url":"https://api.github.com/users/NordicPlayground/repos","events_url":"https://api.github.com/users/NordicPlayground/events{/privacy}","received_events_url":"https://api.github.com/users/NordicPlayground/received_events","type":"Organization","site_admin":false},"repo":{"id":121516035,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE1MTYwMzU=","name":"fw-nrfconnect-nrf","full_name":"NordicPlayground/fw-nrfconnect-nrf","private":false,"owner":{"login":"NordicPlayground","id":5527425,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1Mjc0MjU=","avatar_url":"https://avatars2.githubusercontent.com/u/5527425?v=4","gravatar_id":"","url":"https://api.github.com/users/NordicPlayground","html_url":"https://github.com/NordicPlayground","followers_url":"https://api.github.com/users/NordicPlayground/followers","following_url":"https://api.github.com/users/NordicPlayground/following{/other_user}","gists_url":"https://api.github.com/users/NordicPlayground/gists{/gist_id}","starred_url":"https://api.github.com/users/NordicPlayground/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NordicPlayground/subscriptions","organizations_url":"https://api.github.com/users/NordicPlayground/orgs","repos_url":"https://api.github.com/users/NordicPlayground/repos","events_url":"https://api.github.com/users/NordicPlayground/events{/privacy}","received_events_url":"https://api.github.com/users/NordicPlayground/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NordicPlayground/fw-nrfconnect-nrf","description":"nRF Connect SDK nrf tree","fork":false,"url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf","forks_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/forks","keys_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/teams","hooks_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/hooks","issue_events_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/issues/events{/number}","events_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/events","assignees_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/assignees{/user}","branches_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/branches{/branch}","tags_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/tags","blobs_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/git/refs{/sha}","trees_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/statuses/{sha}","languages_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/languages","stargazers_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/stargazers","contributors_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/contributors","subscribers_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/subscribers","subscription_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/subscription","commits_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/commits{/sha}","git_commits_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/git/commits{/sha}","comments_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/comments{/number}","issue_comment_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/issues/comments{/number}","contents_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/contents/{+path}","compare_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/merges","archive_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/downloads","issues_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/issues{/number}","pulls_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls{/number}","milestones_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/milestones{/number}","notifications_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/labels{/name}","releases_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/releases{/id}","deployments_url":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/deployments","created_at":"2018-02-14T13:50:55Z","updated_at":"2018-12-20T07:36:47Z","pushed_at":"2018-12-20T10:01:14Z","git_url":"git://github.com/NordicPlayground/fw-nrfconnect-nrf.git","ssh_url":"git@github.com:NordicPlayground/fw-nrfconnect-nrf.git","clone_url":"https://github.com/NordicPlayground/fw-nrfconnect-nrf.git","svn_url":"https://github.com/NordicPlayground/fw-nrfconnect-nrf","homepage":"http://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/","size":2603,"stargazers_count":14,"watchers_count":14,"language":"C","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":23,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355"},"html":{"href":"https://github.com/NordicPlayground/fw-nrfconnect-nrf/pull/355"},"issue":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/issues/355"},"comments":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/issues/355/comments"},"review_comments":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355/comments"},"review_comment":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/pulls/355/commits"},"statuses":{"href":"https://api.github.com/repos/NordicPlayground/fw-nrfconnect-nrf/statuses/b02d03ef23c251d8d1f5a3cb1a0e9b253b952e65"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"rakons"}}