{"action":"created","comment":{"url":"https://api.github.com/repos/kaaproject/kaa/pulls/comments/46805080","id":46805080,"diff_hunk":"@@ -0,0 +1,64 @@\n+/*\n+ * Copyright 2014-2015 CyberVision, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#import \"ConnectivityChecker.h\"\n+#import <SystemConfiguration/SystemConfiguration.h>\n+\n+@implementation ConnectivityChecker\n+\n+- (BOOL)isConnected {\n+    BOOL returnValue = NO;\n+    \n+#ifdef TARGET_OS_MAC\n+    \n+    struct sockaddr zeroAddress;\n+    bzero(&zeroAddress, sizeof(zeroAddress));\n+    zeroAddress.sa_len = sizeof(zeroAddress);\n+    zeroAddress.sa_family = AF_INET;\n+    \n+    SCNetworkReachabilityRef reachabilityRef = SCNetworkReachabilityCreateWithAddress(NULL, (const struct sockaddr*)&zeroAddress);\n+    \n+    \n+#elif TARGET_OS_IPHONE\n+    \n+    struct sockaddr_in address;\n+    size_t address_len = sizeof(address);\n+    memset(&address, 0, address_len);\n+    address.sin_len = address_len;\n+    address.sin_family = AF_INET;\n+    \n+    SCNetworkReachabilityRef reachabilityRef = SCNetworkReachabilityCreateWithAddress(NULL, (const struct sockaddr*)&address);\n+    \n+#endif\n+    \n+    if (reachabilityRef != NULL)\n+    {\n+        SCNetworkReachabilityFlags flags = 0;\n+        \n+        if(SCNetworkReachabilityGetFlags(reachabilityRef, &flags))\n+        {","path":"client/client-multi/client-objective-c/Kaa/ConnectivityChecker.m","position":52,"original_position":52,"commit_id":"5f0db5cc1922eeb2a47a99ab2d9dd2e07d345f62","original_commit_id":"5f0db5cc1922eeb2a47a99ab2d9dd2e07d345f62","user":{"login":"dyosick","id":712449,"avatar_url":"https://avatars.githubusercontent.com/u/712449?v=3","gravatar_id":"","url":"https://api.github.com/users/dyosick","html_url":"https://github.com/dyosick","followers_url":"https://api.github.com/users/dyosick/followers","following_url":"https://api.github.com/users/dyosick/following{/other_user}","gists_url":"https://api.github.com/users/dyosick/gists{/gist_id}","starred_url":"https://api.github.com/users/dyosick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyosick/subscriptions","organizations_url":"https://api.github.com/users/dyosick/orgs","repos_url":"https://api.github.com/users/dyosick/repos","events_url":"https://api.github.com/users/dyosick/events{/privacy}","received_events_url":"https://api.github.com/users/dyosick/received_events","type":"User","site_admin":false},"body":"Code  style ","created_at":"2015-12-07T10:22:42Z","updated_at":"2015-12-07T10:22:42Z","html_url":"https://github.com/kaaproject/kaa/pull/379#discussion_r46805080","pull_request_url":"https://api.github.com/repos/kaaproject/kaa/pulls/379","_links":{"self":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/comments/46805080"},"html":{"href":"https://github.com/kaaproject/kaa/pull/379#discussion_r46805080"},"pull_request":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/379"}}},"pull_request":{"url":"https://api.github.com/repos/kaaproject/kaa/pulls/379","id":52679214,"html_url":"https://github.com/kaaproject/kaa/pull/379","diff_url":"https://github.com/kaaproject/kaa/pull/379.diff","patch_url":"https://github.com/kaaproject/kaa/pull/379.patch","issue_url":"https://api.github.com/repos/kaaproject/kaa/issues/379","number":379,"state":"open","locked":false,"title":"Implemented Objective-C endpoint SDK. Extended Avro code generator with ability to generate Objective-C classes. ","user":{"login":"abohomol","id":11644527,"avatar_url":"https://avatars.githubusercontent.com/u/11644527?v=3","gravatar_id":"","url":"https://api.github.com/users/abohomol","html_url":"https://github.com/abohomol","followers_url":"https://api.github.com/users/abohomol/followers","following_url":"https://api.github.com/users/abohomol/following{/other_user}","gists_url":"https://api.github.com/users/abohomol/gists{/gist_id}","starred_url":"https://api.github.com/users/abohomol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abohomol/subscriptions","organizations_url":"https://api.github.com/users/abohomol/orgs","repos_url":"https://api.github.com/users/abohomol/repos","events_url":"https://api.github.com/users/abohomol/events{/privacy}","received_events_url":"https://api.github.com/users/abohomol/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-04T15:03:25Z","updated_at":"2015-12-07T10:22:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a10f71c25c552180e9077355d421fb8a98629a1c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kaaproject/kaa/pulls/379/commits","review_comments_url":"https://api.github.com/repos/kaaproject/kaa/pulls/379/comments","review_comment_url":"https://api.github.com/repos/kaaproject/kaa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaaproject/kaa/issues/379/comments","statuses_url":"https://api.github.com/repos/kaaproject/kaa/statuses/5f0db5cc1922eeb2a47a99ab2d9dd2e07d345f62","head":{"label":"kaaproject:feature/KAA-292","ref":"feature/KAA-292","sha":"5f0db5cc1922eeb2a47a99ab2d9dd2e07d345f62","user":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":17839346,"name":"kaa","full_name":"kaaproject/kaa","owner":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaaproject/kaa","description":"Kaa open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.","fork":false,"url":"https://api.github.com/repos/kaaproject/kaa","forks_url":"https://api.github.com/repos/kaaproject/kaa/forks","keys_url":"https://api.github.com/repos/kaaproject/kaa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaaproject/kaa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaaproject/kaa/teams","hooks_url":"https://api.github.com/repos/kaaproject/kaa/hooks","issue_events_url":"https://api.github.com/repos/kaaproject/kaa/issues/events{/number}","events_url":"https://api.github.com/repos/kaaproject/kaa/events","assignees_url":"https://api.github.com/repos/kaaproject/kaa/assignees{/user}","branches_url":"https://api.github.com/repos/kaaproject/kaa/branches{/branch}","tags_url":"https://api.github.com/repos/kaaproject/kaa/tags","blobs_url":"https://api.github.com/repos/kaaproject/kaa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaaproject/kaa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaaproject/kaa/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaaproject/kaa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaaproject/kaa/statuses/{sha}","languages_url":"https://api.github.com/repos/kaaproject/kaa/languages","stargazers_url":"https://api.github.com/repos/kaaproject/kaa/stargazers","contributors_url":"https://api.github.com/repos/kaaproject/kaa/contributors","subscribers_url":"https://api.github.com/repos/kaaproject/kaa/subscribers","subscription_url":"https://api.github.com/repos/kaaproject/kaa/subscription","commits_url":"https://api.github.com/repos/kaaproject/kaa/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaaproject/kaa/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaaproject/kaa/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaaproject/kaa/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaaproject/kaa/contents/{+path}","compare_url":"https://api.github.com/repos/kaaproject/kaa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaaproject/kaa/merges","archive_url":"https://api.github.com/repos/kaaproject/kaa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaaproject/kaa/downloads","issues_url":"https://api.github.com/repos/kaaproject/kaa/issues{/number}","pulls_url":"https://api.github.com/repos/kaaproject/kaa/pulls{/number}","milestones_url":"https://api.github.com/repos/kaaproject/kaa/milestones{/number}","notifications_url":"https://api.github.com/repos/kaaproject/kaa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaaproject/kaa/labels{/name}","releases_url":"https://api.github.com/repos/kaaproject/kaa/releases{/id}","created_at":"2014-03-17T18:48:31Z","updated_at":"2015-12-04T11:54:09Z","pushed_at":"2015-12-07T09:20:53Z","git_url":"git://github.com/kaaproject/kaa.git","ssh_url":"git@github.com:kaaproject/kaa.git","clone_url":"https://github.com/kaaproject/kaa.git","svn_url":"https://github.com/kaaproject/kaa","homepage":"http://www.kaaproject.org","size":109635,"stargazers_count":171,"watchers_count":171,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":35,"mirror_url":null,"open_issues_count":4,"forks":35,"open_issues":4,"watchers":171,"default_branch":"master"}},"base":{"label":"kaaproject:develop/v0.8.0","ref":"develop/v0.8.0","sha":"a29688179e26d6e355908288d0e84099ea1b0b7d","user":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":17839346,"name":"kaa","full_name":"kaaproject/kaa","owner":{"login":"kaaproject","id":6984613,"avatar_url":"https://avatars.githubusercontent.com/u/6984613?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaproject","html_url":"https://github.com/kaaproject","followers_url":"https://api.github.com/users/kaaproject/followers","following_url":"https://api.github.com/users/kaaproject/following{/other_user}","gists_url":"https://api.github.com/users/kaaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaproject/subscriptions","organizations_url":"https://api.github.com/users/kaaproject/orgs","repos_url":"https://api.github.com/users/kaaproject/repos","events_url":"https://api.github.com/users/kaaproject/events{/privacy}","received_events_url":"https://api.github.com/users/kaaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaaproject/kaa","description":"Kaa open-source middleware platform for building, managing, and integrating connected products with the Internet of Everything.","fork":false,"url":"https://api.github.com/repos/kaaproject/kaa","forks_url":"https://api.github.com/repos/kaaproject/kaa/forks","keys_url":"https://api.github.com/repos/kaaproject/kaa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaaproject/kaa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaaproject/kaa/teams","hooks_url":"https://api.github.com/repos/kaaproject/kaa/hooks","issue_events_url":"https://api.github.com/repos/kaaproject/kaa/issues/events{/number}","events_url":"https://api.github.com/repos/kaaproject/kaa/events","assignees_url":"https://api.github.com/repos/kaaproject/kaa/assignees{/user}","branches_url":"https://api.github.com/repos/kaaproject/kaa/branches{/branch}","tags_url":"https://api.github.com/repos/kaaproject/kaa/tags","blobs_url":"https://api.github.com/repos/kaaproject/kaa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaaproject/kaa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaaproject/kaa/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaaproject/kaa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaaproject/kaa/statuses/{sha}","languages_url":"https://api.github.com/repos/kaaproject/kaa/languages","stargazers_url":"https://api.github.com/repos/kaaproject/kaa/stargazers","contributors_url":"https://api.github.com/repos/kaaproject/kaa/contributors","subscribers_url":"https://api.github.com/repos/kaaproject/kaa/subscribers","subscription_url":"https://api.github.com/repos/kaaproject/kaa/subscription","commits_url":"https://api.github.com/repos/kaaproject/kaa/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaaproject/kaa/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaaproject/kaa/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaaproject/kaa/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaaproject/kaa/contents/{+path}","compare_url":"https://api.github.com/repos/kaaproject/kaa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaaproject/kaa/merges","archive_url":"https://api.github.com/repos/kaaproject/kaa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaaproject/kaa/downloads","issues_url":"https://api.github.com/repos/kaaproject/kaa/issues{/number}","pulls_url":"https://api.github.com/repos/kaaproject/kaa/pulls{/number}","milestones_url":"https://api.github.com/repos/kaaproject/kaa/milestones{/number}","notifications_url":"https://api.github.com/repos/kaaproject/kaa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaaproject/kaa/labels{/name}","releases_url":"https://api.github.com/repos/kaaproject/kaa/releases{/id}","created_at":"2014-03-17T18:48:31Z","updated_at":"2015-12-04T11:54:09Z","pushed_at":"2015-12-07T09:20:53Z","git_url":"git://github.com/kaaproject/kaa.git","ssh_url":"git@github.com:kaaproject/kaa.git","clone_url":"https://github.com/kaaproject/kaa.git","svn_url":"https://github.com/kaaproject/kaa","homepage":"http://www.kaaproject.org","size":109635,"stargazers_count":171,"watchers_count":171,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":35,"mirror_url":null,"open_issues_count":4,"forks":35,"open_issues":4,"watchers":171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/379"},"html":{"href":"https://github.com/kaaproject/kaa/pull/379"},"issue":{"href":"https://api.github.com/repos/kaaproject/kaa/issues/379"},"comments":{"href":"https://api.github.com/repos/kaaproject/kaa/issues/379/comments"},"review_comments":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/379/comments"},"review_comment":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaaproject/kaa/pulls/379/commits"},"statuses":{"href":"https://api.github.com/repos/kaaproject/kaa/statuses/5f0db5cc1922eeb2a47a99ab2d9dd2e07d345f62"}}}}