{"action":"created","comment":{"url":"https://api.github.com/repos/aseba-community/aseba/pulls/comments/78570286","id":78570286,"diff_hunk":"@@ -0,0 +1,41 @@\n+/*\n+\tAseba - an event-based framework for distributed robot control\n+\tCopyright (C) 2007--2016:\n+\t\tStephane Magnenat <stephane at magnenat dot net>\n+\t\t(http://stephane.magnenat.net)\n+\t\tand other contributors, see authors.txt for details\n+\n+\tThis program is free software: you can redistribute it and/or modify\n+\tit under the terms of the GNU Lesser General Public License as published\n+\tby the Free Software Foundation, version 3 of the License.\n+\n+\tThis program is distributed in the hope that it will be useful,\n+\tbut WITHOUT ANY WARRANTY; without even the implied warranty of\n+\tMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+\tGNU Lesser General Public License for more details.\n+\n+\tYou should have received a copy of the GNU Lesser General Public License\n+\talong with this program. If not, see <http://www.gnu.org/licenses/>.\n+*/\n+\n+#include <dashel/dashel.h>\n+#include \"zeroconf.h\"\n+\n+namespace Aseba\n+{\n+\t//! Use the Dashel run loop to watch the DNS Service for updates, and trigger callback\n+\t//! processing as necessary.\n+\tclass DashelhubZeroconf : Zeroconf, Dashel::Hub\n+\t{\n+\tprotected:\n+\t\t//! Set up function called after a discovery request has been made. The file\n+\t\t//! descriptor associated with zdr.serviceref must be watched, to know when to\n+\t\t//! call DNSServiceProcessResult, which in turn calls the callback that was\n+\t\t//! registered with the discovery request.\n+\t\tvirtual void processDiscoveryRequest(ZeroconfDiscoveryRequest & zdr);\n+\n+\tprivate:\n+\t\t//! Collection of (tcp:) SocketStreams that watch the serviceref file descriptors.\n+\t\tstd::vector<Dashel::Stream *> zeroconfStreams;","path":"common/zeroconf/zeroconf-dashelhub.h","position":39,"original_position":39,"commit_id":"4d195f67e8b369f33d813b7cb1187132a66ba9ea","original_commit_id":"4d195f67e8b369f33d813b7cb1187132a66ba9ea","user":{"login":"davidjsherman","id":9472510,"avatar_url":"https://avatars.githubusercontent.com/u/9472510?v=3","gravatar_id":"","url":"https://api.github.com/users/davidjsherman","html_url":"https://github.com/davidjsherman","followers_url":"https://api.github.com/users/davidjsherman/followers","following_url":"https://api.github.com/users/davidjsherman/following{/other_user}","gists_url":"https://api.github.com/users/davidjsherman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjsherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjsherman/subscriptions","organizations_url":"https://api.github.com/users/davidjsherman/orgs","repos_url":"https://api.github.com/users/davidjsherman/repos","events_url":"https://api.github.com/users/davidjsherman/events{/privacy}","received_events_url":"https://api.github.com/users/davidjsherman/received_events","type":"User","site_admin":false},"body":"The streams provided by the base `Dashel::Hub` may be any streams. We need to remember which ones we created to listen to `ZeroconfDiscoveryRequest` sockets, so that in `incomingData` we can call `DNSServiceProcessResult` on the right servicerefs.\r\n\r\nSo should really be `std::map<Dashel::Stream *, ZeroconfDiscoveryRequest &>`","created_at":"2016-09-13T14:27:03Z","updated_at":"2016-09-13T14:27:03Z","html_url":"https://github.com/aseba-community/aseba/pull/556#discussion_r78570286","pull_request_url":"https://api.github.com/repos/aseba-community/aseba/pulls/556","_links":{"self":{"href":"https://api.github.com/repos/aseba-community/aseba/pulls/comments/78570286"},"html":{"href":"https://github.com/aseba-community/aseba/pull/556#discussion_r78570286"},"pull_request":{"href":"https://api.github.com/repos/aseba-community/aseba/pulls/556"}}},"pull_request":{"url":"https://api.github.com/repos/aseba-community/aseba/pulls/556","id":84800393,"html_url":"https://github.com/aseba-community/aseba/pull/556","diff_url":"https://github.com/aseba-community/aseba/pull/556.diff","patch_url":"https://github.com/aseba-community/aseba/pull/556.patch","issue_url":"https://api.github.com/repos/aseba-community/aseba/issues/556","number":556,"state":"open","locked":false,"title":"Stubs for Aseba::Zeroconf derived classes for asynchronous responses","user":{"login":"davidjsherman","id":9472510,"avatar_url":"https://avatars.githubusercontent.com/u/9472510?v=3","gravatar_id":"","url":"https://api.github.com/users/davidjsherman","html_url":"https://github.com/davidjsherman","followers_url":"https://api.github.com/users/davidjsherman/followers","following_url":"https://api.github.com/users/davidjsherman/following{/other_user}","gists_url":"https://api.github.com/users/davidjsherman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjsherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjsherman/subscriptions","organizations_url":"https://api.github.com/users/davidjsherman/orgs","repos_url":"https://api.github.com/users/davidjsherman/repos","events_url":"https://api.github.com/users/davidjsherman/events{/privacy}","received_events_url":"https://api.github.com/users/davidjsherman/received_events","type":"User","site_admin":false},"body":"The basic `Aseba::Zeroconf` service works synchronously, and will block while waiting for responses from the DNS Service Discovery dæmon. These stubs plan how derived classes can implement different mechanisms for detecting asynchronous updates and triggering callbacks.\r\n\r\n`Aseba::DashelhubZeroconf` proposes a Dashel::Hub that listens to DNS Service Discovery file descriptors using Dashel::SocketStreams.\r\n\r\n`Aseba::ThreadZeroconf` proposes a std::thread that listens to DNS Service Discovery file descriptors using *select(2)*.\r\n\r\n`Aseba::QtZeroconf` proposes using QSocketNotifiers within the QT event loop to listen to DNS Service Discovery file descriptors and trigger callbacks through slots.","created_at":"2016-09-11T22:40:02Z","updated_at":"2016-09-13T14:27:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c20136e3e0292745f30fe0c8c6fea75ff3d80fa5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aseba-community/aseba/pulls/556/commits","review_comments_url":"https://api.github.com/repos/aseba-community/aseba/pulls/556/comments","review_comment_url":"https://api.github.com/repos/aseba-community/aseba/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aseba-community/aseba/issues/556/comments","statuses_url":"https://api.github.com/repos/aseba-community/aseba/statuses/4d195f67e8b369f33d813b7cb1187132a66ba9ea","head":{"label":"davidjsherman:zeroconf-PR-derived","ref":"zeroconf-PR-derived","sha":"4d195f67e8b369f33d813b7cb1187132a66ba9ea","user":{"login":"davidjsherman","id":9472510,"avatar_url":"https://avatars.githubusercontent.com/u/9472510?v=3","gravatar_id":"","url":"https://api.github.com/users/davidjsherman","html_url":"https://github.com/davidjsherman","followers_url":"https://api.github.com/users/davidjsherman/followers","following_url":"https://api.github.com/users/davidjsherman/following{/other_user}","gists_url":"https://api.github.com/users/davidjsherman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjsherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjsherman/subscriptions","organizations_url":"https://api.github.com/users/davidjsherman/orgs","repos_url":"https://api.github.com/users/davidjsherman/repos","events_url":"https://api.github.com/users/davidjsherman/events{/privacy}","received_events_url":"https://api.github.com/users/davidjsherman/received_events","type":"User","site_admin":false},"repo":{"id":27434724,"name":"aseba","full_name":"davidjsherman/aseba","owner":{"login":"davidjsherman","id":9472510,"avatar_url":"https://avatars.githubusercontent.com/u/9472510?v=3","gravatar_id":"","url":"https://api.github.com/users/davidjsherman","html_url":"https://github.com/davidjsherman","followers_url":"https://api.github.com/users/davidjsherman/followers","following_url":"https://api.github.com/users/davidjsherman/following{/other_user}","gists_url":"https://api.github.com/users/davidjsherman/gists{/gist_id}","starred_url":"https://api.github.com/users/davidjsherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidjsherman/subscriptions","organizations_url":"https://api.github.com/users/davidjsherman/orgs","repos_url":"https://api.github.com/users/davidjsherman/repos","events_url":"https://api.github.com/users/davidjsherman/events{/privacy}","received_events_url":"https://api.github.com/users/davidjsherman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidjsherman/aseba","description":"Aseba is a set of tools that allow beginners to program robots easily and efficiently.","fork":true,"url":"https://api.github.com/repos/davidjsherman/aseba","forks_url":"https://api.github.com/repos/davidjsherman/aseba/forks","keys_url":"https://api.github.com/repos/davidjsherman/aseba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidjsherman/aseba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidjsherman/aseba/teams","hooks_url":"https://api.github.com/repos/davidjsherman/aseba/hooks","issue_events_url":"https://api.github.com/repos/davidjsherman/aseba/issues/events{/number}","events_url":"https://api.github.com/repos/davidjsherman/aseba/events","assignees_url":"https://api.github.com/repos/davidjsherman/aseba/assignees{/user}","branches_url":"https://api.github.com/repos/davidjsherman/aseba/branches{/branch}","tags_url":"https://api.github.com/repos/davidjsherman/aseba/tags","blobs_url":"https://api.github.com/repos/davidjsherman/aseba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidjsherman/aseba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidjsherman/aseba/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidjsherman/aseba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidjsherman/aseba/statuses/{sha}","languages_url":"https://api.github.com/repos/davidjsherman/aseba/languages","stargazers_url":"https://api.github.com/repos/davidjsherman/aseba/stargazers","contributors_url":"https://api.github.com/repos/davidjsherman/aseba/contributors","subscribers_url":"https://api.github.com/repos/davidjsherman/aseba/subscribers","subscription_url":"https://api.github.com/repos/davidjsherman/aseba/subscription","commits_url":"https://api.github.com/repos/davidjsherman/aseba/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidjsherman/aseba/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidjsherman/aseba/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidjsherman/aseba/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidjsherman/aseba/contents/{+path}","compare_url":"https://api.github.com/repos/davidjsherman/aseba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidjsherman/aseba/merges","archive_url":"https://api.github.com/repos/davidjsherman/aseba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidjsherman/aseba/downloads","issues_url":"https://api.github.com/repos/davidjsherman/aseba/issues{/number}","pulls_url":"https://api.github.com/repos/davidjsherman/aseba/pulls{/number}","milestones_url":"https://api.github.com/repos/davidjsherman/aseba/milestones{/number}","notifications_url":"https://api.github.com/repos/davidjsherman/aseba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidjsherman/aseba/labels{/name}","releases_url":"https://api.github.com/repos/davidjsherman/aseba/releases{/id}","deployments_url":"https://api.github.com/repos/davidjsherman/aseba/deployments","created_at":"2014-12-02T13:56:28Z","updated_at":"2016-05-27T19:30:19Z","pushed_at":"2016-09-12T19:18:09Z","git_url":"git://github.com/davidjsherman/aseba.git","ssh_url":"git@github.com:davidjsherman/aseba.git","clone_url":"https://github.com/davidjsherman/aseba.git","svn_url":"https://github.com/davidjsherman/aseba","homepage":"http://aseba.wikidot.com","size":15407,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":21,"forks":1,"open_issues":21,"watchers":1,"default_branch":"master"}},"base":{"label":"aseba-community:master","ref":"master","sha":"5d9f23087d843cccdfd7ec50ad90404c5cc2fd69","user":{"login":"aseba-community","id":973992,"avatar_url":"https://avatars.githubusercontent.com/u/973992?v=3","gravatar_id":"","url":"https://api.github.com/users/aseba-community","html_url":"https://github.com/aseba-community","followers_url":"https://api.github.com/users/aseba-community/followers","following_url":"https://api.github.com/users/aseba-community/following{/other_user}","gists_url":"https://api.github.com/users/aseba-community/gists{/gist_id}","starred_url":"https://api.github.com/users/aseba-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseba-community/subscriptions","organizations_url":"https://api.github.com/users/aseba-community/orgs","repos_url":"https://api.github.com/users/aseba-community/repos","events_url":"https://api.github.com/users/aseba-community/events{/privacy}","received_events_url":"https://api.github.com/users/aseba-community/received_events","type":"Organization","site_admin":false},"repo":{"id":2191449,"name":"aseba","full_name":"aseba-community/aseba","owner":{"login":"aseba-community","id":973992,"avatar_url":"https://avatars.githubusercontent.com/u/973992?v=3","gravatar_id":"","url":"https://api.github.com/users/aseba-community","html_url":"https://github.com/aseba-community","followers_url":"https://api.github.com/users/aseba-community/followers","following_url":"https://api.github.com/users/aseba-community/following{/other_user}","gists_url":"https://api.github.com/users/aseba-community/gists{/gist_id}","starred_url":"https://api.github.com/users/aseba-community/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseba-community/subscriptions","organizations_url":"https://api.github.com/users/aseba-community/orgs","repos_url":"https://api.github.com/users/aseba-community/repos","events_url":"https://api.github.com/users/aseba-community/events{/privacy}","received_events_url":"https://api.github.com/users/aseba-community/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aseba-community/aseba","description":"Aseba is a set of tools which allow beginners to program robots easily and efficiently.","fork":false,"url":"https://api.github.com/repos/aseba-community/aseba","forks_url":"https://api.github.com/repos/aseba-community/aseba/forks","keys_url":"https://api.github.com/repos/aseba-community/aseba/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aseba-community/aseba/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aseba-community/aseba/teams","hooks_url":"https://api.github.com/repos/aseba-community/aseba/hooks","issue_events_url":"https://api.github.com/repos/aseba-community/aseba/issues/events{/number}","events_url":"https://api.github.com/repos/aseba-community/aseba/events","assignees_url":"https://api.github.com/repos/aseba-community/aseba/assignees{/user}","branches_url":"https://api.github.com/repos/aseba-community/aseba/branches{/branch}","tags_url":"https://api.github.com/repos/aseba-community/aseba/tags","blobs_url":"https://api.github.com/repos/aseba-community/aseba/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aseba-community/aseba/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aseba-community/aseba/git/refs{/sha}","trees_url":"https://api.github.com/repos/aseba-community/aseba/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aseba-community/aseba/statuses/{sha}","languages_url":"https://api.github.com/repos/aseba-community/aseba/languages","stargazers_url":"https://api.github.com/repos/aseba-community/aseba/stargazers","contributors_url":"https://api.github.com/repos/aseba-community/aseba/contributors","subscribers_url":"https://api.github.com/repos/aseba-community/aseba/subscribers","subscription_url":"https://api.github.com/repos/aseba-community/aseba/subscription","commits_url":"https://api.github.com/repos/aseba-community/aseba/commits{/sha}","git_commits_url":"https://api.github.com/repos/aseba-community/aseba/git/commits{/sha}","comments_url":"https://api.github.com/repos/aseba-community/aseba/comments{/number}","issue_comment_url":"https://api.github.com/repos/aseba-community/aseba/issues/comments{/number}","contents_url":"https://api.github.com/repos/aseba-community/aseba/contents/{+path}","compare_url":"https://api.github.com/repos/aseba-community/aseba/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aseba-community/aseba/merges","archive_url":"https://api.github.com/repos/aseba-community/aseba/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aseba-community/aseba/downloads","issues_url":"https://api.github.com/repos/aseba-community/aseba/issues{/number}","pulls_url":"https://api.github.com/repos/aseba-community/aseba/pulls{/number}","milestones_url":"https://api.github.com/repos/aseba-community/aseba/milestones{/number}","notifications_url":"https://api.github.com/repos/aseba-community/aseba/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aseba-community/aseba/labels{/name}","releases_url":"https://api.github.com/repos/aseba-community/aseba/releases{/id}","deployments_url":"https://api.github.com/repos/aseba-community/aseba/deployments","created_at":"2011-08-11T14:03:08Z","updated_at":"2016-08-25T15:15:21Z","pushed_at":"2016-09-13T06:51:58Z","git_url":"git://github.com/aseba-community/aseba.git","ssh_url":"git@github.com:aseba-community/aseba.git","clone_url":"https://github.com/aseba-community/aseba.git","svn_url":"https://github.com/aseba-community/aseba","homepage":"http://aseba.wikidot.com","size":18474,"stargazers_count":16,"watchers_count":16,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":125,"forks":39,"open_issues":125,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aseba-community/aseba/pulls/556"},"html":{"href":"https://github.com/aseba-community/aseba/pull/556"},"issue":{"href":"https://api.github.com/repos/aseba-community/aseba/issues/556"},"comments":{"href":"https://api.github.com/repos/aseba-community/aseba/issues/556/comments"},"review_comments":{"href":"https://api.github.com/repos/aseba-community/aseba/pulls/556/comments"},"review_comment":{"href":"https://api.github.com/repos/aseba-community/aseba/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aseba-community/aseba/pulls/556/commits"},"statuses":{"href":"https://api.github.com/repos/aseba-community/aseba/statuses/4d195f67e8b369f33d813b7cb1187132a66ba9ea"}}}}
{"actor":{"display_login":"davidjsherman"}}