{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments/23353142","id":23353142,"diff_hunk":"@@ -239,6 +239,11 @@ extern void amodem_set_gsm_location( AModem modem, int lac, int ci );\n extern int amodem_get_base_port( AModem  modem );\n extern int amodem_get_instance_id( AModem  modem );\n \n+/** Enable/Disable the selected modem feature\n+ **/\n+\n+extern int amodem_enable_disable( AModem  modem, const char*  feature, bool  enable );","path":"telephony/android_modem.h","position":7,"original_position":7,"commit_id":"99919992bcaacb25c0408a59221631322c9ffb37","original_commit_id":"99919992bcaacb25c0408a59221631322c9ffb37","user":{"login":"vicamo","id":159864,"avatar_url":"https://avatars.githubusercontent.com/u/159864?v=3","gravatar_id":"","url":"https://api.github.com/users/vicamo","html_url":"https://github.com/vicamo","followers_url":"https://api.github.com/users/vicamo/followers","following_url":"https://api.github.com/users/vicamo/following{/other_user}","gists_url":"https://api.github.com/users/vicamo/gists{/gist_id}","starred_url":"https://api.github.com/users/vicamo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicamo/subscriptions","organizations_url":"https://api.github.com/users/vicamo/orgs","repos_url":"https://api.github.com/users/vicamo/repos","events_url":"https://api.github.com/users/vicamo/events{/privacy}","received_events_url":"https://api.github.com/users/vicamo/received_events","type":"User","site_admin":false},"body":"If I were you, I would have an enum for these features, rename this function to `amodem_enable_feature`, optionally add `amodem_has_feature`:\r\n```C\r\n/* in telephony/android_modem.h */\r\ntypedef enum {\r\n    A_MODEM_FEATURE_HOLD = (0x01 << 0),\r\n} AModemFeature;\r\n\r\n/*in telephony/android_modem.c */\r\ntypedef struct AModemRec_\r\n{\r\n    uint32_t features;\r\n} AModemRec;\r\n\r\nint\r\namodem_enable_feature(AModem modem, AModemFeature feature, bool on)\r\n{\r\n    if (on)\r\n        // set bit\r\n    else\r\n        // clear bit\r\n}\r\n\r\nbool\r\namodem_has_feature(AModem, AModemFeature)\r\n{\r\n    return modem->features & feature;\r\n}\r\n\r\n/* in android/console.c */\r\nstatic const char* gsm_feature_names[] = { \"call-hold\" };\r\n\r\nstatic int\r\ndo_gsm_enable_disable(ControlClient  client, char  *args, bool enable) { ... }\r\n```","created_at":"2015-01-22T03:11:29Z","updated_at":"2015-01-22T03:11:29Z","html_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/127#discussion_r23353142","pull_request_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments/23353142"},"html":{"href":"https://github.com/mozilla-b2g/platform_external_qemu/pull/127#discussion_r23353142"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127","id":27587285,"html_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/127","diff_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/127.diff","patch_url":"https://github.com/mozilla-b2g/platform_external_qemu/pull/127.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/127","number":127,"state":"open","locked":false,"title":"Bug 1103731 - Fail a dial request when failing to automatically hold the existing call ","user":{"login":"driftersprt","id":9208856,"avatar_url":"https://avatars.githubusercontent.com/u/9208856?v=3","gravatar_id":"","url":"https://api.github.com/users/driftersprt","html_url":"https://github.com/driftersprt","followers_url":"https://api.github.com/users/driftersprt/followers","following_url":"https://api.github.com/users/driftersprt/following{/other_user}","gists_url":"https://api.github.com/users/driftersprt/gists{/gist_id}","starred_url":"https://api.github.com/users/driftersprt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driftersprt/subscriptions","organizations_url":"https://api.github.com/users/driftersprt/orgs","repos_url":"https://api.github.com/users/driftersprt/repos","events_url":"https://api.github.com/users/driftersprt/events{/privacy}","received_events_url":"https://api.github.com/users/driftersprt/received_events","type":"User","site_admin":false},"body":"In this patch, I add a new command to enable/disable the hold feature of a modem, and slightly refactor a function in android_modem.c.","created_at":"2015-01-19T06:28:00Z","updated_at":"2015-01-22T03:11:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5865027351fdce4b7e7867a7976e260e3fffae81","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/127/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/statuses/99919992bcaacb25c0408a59221631322c9ffb37","head":{"label":"driftersprt:BUG-1103731","ref":"BUG-1103731","sha":"99919992bcaacb25c0408a59221631322c9ffb37","user":{"login":"driftersprt","id":9208856,"avatar_url":"https://avatars.githubusercontent.com/u/9208856?v=3","gravatar_id":"","url":"https://api.github.com/users/driftersprt","html_url":"https://github.com/driftersprt","followers_url":"https://api.github.com/users/driftersprt/followers","following_url":"https://api.github.com/users/driftersprt/following{/other_user}","gists_url":"https://api.github.com/users/driftersprt/gists{/gist_id}","starred_url":"https://api.github.com/users/driftersprt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driftersprt/subscriptions","organizations_url":"https://api.github.com/users/driftersprt/orgs","repos_url":"https://api.github.com/users/driftersprt/repos","events_url":"https://api.github.com/users/driftersprt/events{/privacy}","received_events_url":"https://api.github.com/users/driftersprt/received_events","type":"User","site_admin":false},"repo":{"id":29233270,"name":"platform_external_qemu","full_name":"driftersprt/platform_external_qemu","owner":{"login":"driftersprt","id":9208856,"avatar_url":"https://avatars.githubusercontent.com/u/9208856?v=3","gravatar_id":"","url":"https://api.github.com/users/driftersprt","html_url":"https://github.com/driftersprt","followers_url":"https://api.github.com/users/driftersprt/followers","following_url":"https://api.github.com/users/driftersprt/following{/other_user}","gists_url":"https://api.github.com/users/driftersprt/gists{/gist_id}","starred_url":"https://api.github.com/users/driftersprt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/driftersprt/subscriptions","organizations_url":"https://api.github.com/users/driftersprt/orgs","repos_url":"https://api.github.com/users/driftersprt/repos","events_url":"https://api.github.com/users/driftersprt/events{/privacy}","received_events_url":"https://api.github.com/users/driftersprt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/driftersprt/platform_external_qemu","description":null,"fork":true,"url":"https://api.github.com/repos/driftersprt/platform_external_qemu","forks_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/forks","keys_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/teams","hooks_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/hooks","issue_events_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/issues/events{/number}","events_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/events","assignees_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/assignees{/user}","branches_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/branches{/branch}","tags_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/tags","blobs_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/git/refs{/sha}","trees_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/statuses/{sha}","languages_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/languages","stargazers_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/stargazers","contributors_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/contributors","subscribers_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/subscribers","subscription_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/subscription","commits_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/commits{/sha}","git_commits_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/git/commits{/sha}","comments_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/comments{/number}","issue_comment_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/issues/comments/{number}","contents_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/contents/{+path}","compare_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/merges","archive_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/downloads","issues_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/issues{/number}","pulls_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/pulls{/number}","milestones_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/milestones{/number}","notifications_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/labels{/name}","releases_url":"https://api.github.com/repos/driftersprt/platform_external_qemu/releases{/id}","created_at":"2015-01-14T07:46:42Z","updated_at":"2015-01-14T07:46:50Z","pushed_at":"2015-01-22T02:25:50Z","git_url":"git://github.com/driftersprt/platform_external_qemu.git","ssh_url":"git@github.com:driftersprt/platform_external_qemu.git","clone_url":"https://github.com/driftersprt/platform_external_qemu.git","svn_url":"https://github.com/driftersprt/platform_external_qemu","homepage":null,"size":13872,"stargazers_count":0,"watchers_count":0,"language":"C","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":"mozilla-b2g:master","ref":"master","sha":"6fa7a4936414ceb4055fd27f7a30e76790f834fb","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":4523976,"name":"platform_external_qemu","full_name":"mozilla-b2g/platform_external_qemu","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/platform_external_qemu","description":null,"fork":true,"url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu","forks_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/releases{/id}","created_at":"2012-06-01T20:28:56Z","updated_at":"2014-12-09T08:25:12Z","pushed_at":"2015-01-12T13:25:37Z","git_url":"git://github.com/mozilla-b2g/platform_external_qemu.git","ssh_url":"git@github.com:mozilla-b2g/platform_external_qemu.git","clone_url":"https://github.com/mozilla-b2g/platform_external_qemu.git","svn_url":"https://github.com/mozilla-b2g/platform_external_qemu","homepage":null,"size":14846,"stargazers_count":5,"watchers_count":5,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"open_issues_count":14,"forks":26,"open_issues":14,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127"},"html":{"href":"https://github.com/mozilla-b2g/platform_external_qemu/pull/127"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/127"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/platform_external_qemu/statuses/99919992bcaacb25c0408a59221631322c9ffb37"}}}}