{"action":"created","comment":{"url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/comments/34263137","id":34263137,"diff_hunk":"@@ -0,0 +1,80 @@\n+/* @file snmp_success_fail_count_table.h\n+ *\n+ * Project Clearwater - IMS in the Cloud\n+ * Copyright (C) 2015 Metaswitch Networks Ltd\n+ *\n+ * This program is free software: you can redistribute it and/or modify it\n+ * under the terms of the GNU General Public License as published by the\n+ * Free Software Foundation, either version 3 of the License, or (at your\n+ * option) any later version, along with the \"Special Exception\" for use of\n+ * the program along with SSL, set forth below. This program is distributed\n+ * in the hope that it will be useful, but WITHOUT ANY WARRANTY;\n+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n+ * A PARTICULAR PURPOSE.  See the GNU General Public License for more\n+ * details. You should have received a copy of the GNU General Public\n+ * License along with this program.  If not, see\n+ * <http://www.gnu.org/licenses/>.\n+ *\n+ * The author can be reached by email at clearwater@metaswitch.com or by\n+ * post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK\n+ *\n+ * Special Exception\n+ * Metaswitch Networks Ltd  grants you permission to copy, modify,\n+ * propagate, and distribute a work formed by combining OpenSSL with The\n+ * Software, or a work derivative of such a combination, even if such\n+ * copying, modification, propagation, or distribution would otherwise\n+ * violate the terms of the GPL. You must comply with the GPL in all\n+ * respects for all of the code used other than OpenSSL.\n+ * \"OpenSSL\" means OpenSSL toolkit software distributed by the OpenSSL\n+ * Project and licensed under the OpenSSL Licenses, or a work based on such\n+ * software and licensed und er the OpenSSL Licenses.\n+ * \"OpenSSL Licenses\" means the OpenSSL License and Original SSLeay License\n+ * under which the OpenSSL Project distributes the OpenSSL toolkit software,\n+ * as those licenses appear in the file LICENSE-OPENSSL.\n+ */\n+\n+#include <vector>\n+#include <map>\n+#include <string>\n+\n+#ifndef SNMP_SUCCESS_FAIL_COUNT_TABLE_H\n+#define SNMP_SUCCESS_FAIL_COUNT_TABLE_H\n+\n+// This file contains the interface for tables which:\n+//   - are indexed by time period\n+//   - increment a count of the attempts, successes and failures over time\n+//   - report a count of the attempts, successes and failures\n+//\n+// This is defined as an interface in order not to pollute the codebase with netsnmp include files\n+// (which indiscriminately #define things like READ and WRITE).\n+\n+namespace SNMP\n+{\n+class SuccessFailCountTable\n+{\n+public:\n+  static SuccessFailCountTable* create(std::string name, std::string oid);\n+  virtual void increment_attempts() = 0;\n+  virtual void increment_successes() = 0;\n+  virtual void increment_failures() = 0;\n+  virtual ~SuccessFailCountTable() {};\n+\n+protected:\n+  SuccessFailCountTable() {};\n+};\n+\n+struct RegistrationStatsTables\n+{\n+  SuccessFailCountTable* init_reg_tbl;\n+  SuccessFailCountTable* re_reg_tbl;\n+  SuccessFailCountTable* de_reg_tbl;\n+};\n+\n+struct AuthenticationStatsTables\n+{\n+  SuccessFailCountTable* SIP_digest_auth_tbl;","path":"include/snmp_success_fail_count_table.h","position":75,"original_position":75,"commit_id":"210178456ad2585e02e3520a407f37f4c9e79d04","original_commit_id":"210178456ad2585e02e3520a407f37f4c9e79d04","user":{"login":"rkd-msw","id":4363492,"avatar_url":"https://avatars.githubusercontent.com/u/4363492?v=3","gravatar_id":"","url":"https://api.github.com/users/rkd-msw","html_url":"https://github.com/rkd-msw","followers_url":"https://api.github.com/users/rkd-msw/followers","following_url":"https://api.github.com/users/rkd-msw/following{/other_user}","gists_url":"https://api.github.com/users/rkd-msw/gists{/gist_id}","starred_url":"https://api.github.com/users/rkd-msw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkd-msw/subscriptions","organizations_url":"https://api.github.com/users/rkd-msw/orgs","repos_url":"https://api.github.com/users/rkd-msw/repos","events_url":"https://api.github.com/users/rkd-msw/events{/privacy}","received_events_url":"https://api.github.com/users/rkd-msw/received_events","type":"User","site_admin":false},"body":"We usually make variable names all-lowercase - even for acronyms like SIP, IMS and AKA which would normally be capitalised.","created_at":"2015-07-09T14:50:12Z","updated_at":"2015-07-09T14:50:12Z","html_url":"https://github.com/Metaswitch/cpp-common/pull/327#discussion_r34263137","pull_request_url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327","_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/comments/34263137"},"html":{"href":"https://github.com/Metaswitch/cpp-common/pull/327#discussion_r34263137"},"pull_request":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327"}}},"pull_request":{"url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327","id":39582106,"html_url":"https://github.com/Metaswitch/cpp-common/pull/327","diff_url":"https://github.com/Metaswitch/cpp-common/pull/327.diff","patch_url":"https://github.com/Metaswitch/cpp-common/pull/327.patch","issue_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues/327","number":327,"state":"open","locked":false,"title":"Added successFailCountTable class [reviewer: Rob]","user":{"login":"alango","id":13100348,"avatar_url":"https://avatars.githubusercontent.com/u/13100348?v=3","gravatar_id":"","url":"https://api.github.com/users/alango","html_url":"https://github.com/alango","followers_url":"https://api.github.com/users/alango/followers","following_url":"https://api.github.com/users/alango/following{/other_user}","gists_url":"https://api.github.com/users/alango/gists{/gist_id}","starred_url":"https://api.github.com/users/alango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alango/subscriptions","organizations_url":"https://api.github.com/users/alango/orgs","repos_url":"https://api.github.com/users/alango/repos","events_url":"https://api.github.com/users/alango/events{/privacy}","received_events_url":"https://api.github.com/users/alango/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-09T13:22:30Z","updated_at":"2015-07-09T14:50:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4a68c341d6b6b3a0b95b358d5a996656848f6d6","assignee":{"login":"rkd-msw","id":4363492,"avatar_url":"https://avatars.githubusercontent.com/u/4363492?v=3","gravatar_id":"","url":"https://api.github.com/users/rkd-msw","html_url":"https://github.com/rkd-msw","followers_url":"https://api.github.com/users/rkd-msw/followers","following_url":"https://api.github.com/users/rkd-msw/following{/other_user}","gists_url":"https://api.github.com/users/rkd-msw/gists{/gist_id}","starred_url":"https://api.github.com/users/rkd-msw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkd-msw/subscriptions","organizations_url":"https://api.github.com/users/rkd-msw/orgs","repos_url":"https://api.github.com/users/rkd-msw/repos","events_url":"https://api.github.com/users/rkd-msw/events{/privacy}","received_events_url":"https://api.github.com/users/rkd-msw/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327/commits","review_comments_url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327/comments","review_comment_url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues/327/comments","statuses_url":"https://api.github.com/repos/Metaswitch/cpp-common/statuses/210178456ad2585e02e3520a407f37f4c9e79d04","head":{"label":"Metaswitch:successFailCountTable","ref":"successFailCountTable","sha":"210178456ad2585e02e3520a407f37f4c9e79d04","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":15284898,"name":"cpp-common","full_name":"Metaswitch/cpp-common","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/cpp-common","description":"Common C/C++ modules for Clearwater components","fork":false,"url":"https://api.github.com/repos/Metaswitch/cpp-common","forks_url":"https://api.github.com/repos/Metaswitch/cpp-common/forks","keys_url":"https://api.github.com/repos/Metaswitch/cpp-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/cpp-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/cpp-common/teams","hooks_url":"https://api.github.com/repos/Metaswitch/cpp-common/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/cpp-common/events","assignees_url":"https://api.github.com/repos/Metaswitch/cpp-common/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/cpp-common/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/cpp-common/tags","blobs_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/cpp-common/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/cpp-common/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/cpp-common/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/cpp-common/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/cpp-common/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/cpp-common/subscription","commits_url":"https://api.github.com/repos/Metaswitch/cpp-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/cpp-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/cpp-common/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/cpp-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/cpp-common/merges","archive_url":"https://api.github.com/repos/Metaswitch/cpp-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/cpp-common/downloads","issues_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/cpp-common/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/cpp-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/cpp-common/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/cpp-common/releases{/id}","created_at":"2013-12-18T14:11:57Z","updated_at":"2015-05-07T12:01:06Z","pushed_at":"2015-07-09T13:22:30Z","git_url":"git://github.com/Metaswitch/cpp-common.git","ssh_url":"git@github.com:Metaswitch/cpp-common.git","clone_url":"https://github.com/Metaswitch/cpp-common.git","svn_url":"https://github.com/Metaswitch/cpp-common","homepage":null,"size":3990,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":15,"forks":3,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"Metaswitch:master","ref":"master","sha":"16134feb9b3e67d3af3b9a42e6d523419c7ab3bb","user":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"repo":{"id":15284898,"name":"cpp-common","full_name":"Metaswitch/cpp-common","owner":{"login":"Metaswitch","id":453759,"avatar_url":"https://avatars.githubusercontent.com/u/453759?v=3","gravatar_id":"","url":"https://api.github.com/users/Metaswitch","html_url":"https://github.com/Metaswitch","followers_url":"https://api.github.com/users/Metaswitch/followers","following_url":"https://api.github.com/users/Metaswitch/following{/other_user}","gists_url":"https://api.github.com/users/Metaswitch/gists{/gist_id}","starred_url":"https://api.github.com/users/Metaswitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Metaswitch/subscriptions","organizations_url":"https://api.github.com/users/Metaswitch/orgs","repos_url":"https://api.github.com/users/Metaswitch/repos","events_url":"https://api.github.com/users/Metaswitch/events{/privacy}","received_events_url":"https://api.github.com/users/Metaswitch/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Metaswitch/cpp-common","description":"Common C/C++ modules for Clearwater components","fork":false,"url":"https://api.github.com/repos/Metaswitch/cpp-common","forks_url":"https://api.github.com/repos/Metaswitch/cpp-common/forks","keys_url":"https://api.github.com/repos/Metaswitch/cpp-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Metaswitch/cpp-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Metaswitch/cpp-common/teams","hooks_url":"https://api.github.com/repos/Metaswitch/cpp-common/hooks","issue_events_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues/events{/number}","events_url":"https://api.github.com/repos/Metaswitch/cpp-common/events","assignees_url":"https://api.github.com/repos/Metaswitch/cpp-common/assignees{/user}","branches_url":"https://api.github.com/repos/Metaswitch/cpp-common/branches{/branch}","tags_url":"https://api.github.com/repos/Metaswitch/cpp-common/tags","blobs_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Metaswitch/cpp-common/statuses/{sha}","languages_url":"https://api.github.com/repos/Metaswitch/cpp-common/languages","stargazers_url":"https://api.github.com/repos/Metaswitch/cpp-common/stargazers","contributors_url":"https://api.github.com/repos/Metaswitch/cpp-common/contributors","subscribers_url":"https://api.github.com/repos/Metaswitch/cpp-common/subscribers","subscription_url":"https://api.github.com/repos/Metaswitch/cpp-common/subscription","commits_url":"https://api.github.com/repos/Metaswitch/cpp-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/Metaswitch/cpp-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/Metaswitch/cpp-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/Metaswitch/cpp-common/contents/{+path}","compare_url":"https://api.github.com/repos/Metaswitch/cpp-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Metaswitch/cpp-common/merges","archive_url":"https://api.github.com/repos/Metaswitch/cpp-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Metaswitch/cpp-common/downloads","issues_url":"https://api.github.com/repos/Metaswitch/cpp-common/issues{/number}","pulls_url":"https://api.github.com/repos/Metaswitch/cpp-common/pulls{/number}","milestones_url":"https://api.github.com/repos/Metaswitch/cpp-common/milestones{/number}","notifications_url":"https://api.github.com/repos/Metaswitch/cpp-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Metaswitch/cpp-common/labels{/name}","releases_url":"https://api.github.com/repos/Metaswitch/cpp-common/releases{/id}","created_at":"2013-12-18T14:11:57Z","updated_at":"2015-05-07T12:01:06Z","pushed_at":"2015-07-09T13:22:30Z","git_url":"git://github.com/Metaswitch/cpp-common.git","ssh_url":"git@github.com:Metaswitch/cpp-common.git","clone_url":"https://github.com/Metaswitch/cpp-common.git","svn_url":"https://github.com/Metaswitch/cpp-common","homepage":null,"size":3990,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":15,"forks":3,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327"},"html":{"href":"https://github.com/Metaswitch/cpp-common/pull/327"},"issue":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/issues/327"},"comments":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/issues/327/comments"},"review_comments":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327/comments"},"review_comment":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/pulls/327/commits"},"statuses":{"href":"https://api.github.com/repos/Metaswitch/cpp-common/statuses/210178456ad2585e02e3520a407f37f4c9e79d04"}}}}