GitHub PullRequestReviewCommentEvent at 2014-01-27 15:32:53
Repository: sprout
Actor: AlexHockey
Payload: {"comment":{"url":"https://api.github.com/repos/Metaswitch/sprout/pulls/comments/9192083","id":9192083,"diff_hunk":"@@ -0,0 +1,371 @@\n+/**\n+ * @file notify_utils.cpp \n+ *\n+ * Project Clearwater - IMS in the Cloud\n+ * Copyright (C) 2013  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 under 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+extern \"C\" {\n+#include <pjsip.h>\n+#include <pjlib-util.h>\n+#include <pjlib.h>\n+}\n+\n+#include <string>\n+#include \"pjutils.h\"\n+#include \"stack.h\"\n+#include \"notify_utils.h\"\n+#include \"log.h\"\n+\n+/* MIME */","path":"sprout/notify_utils.cpp","position":49,"original_position":49,"commit_id":"eab92796ecc8d11486ee5a2c26fbfbcf5dbd7ecf","original_commit_id":"eab92796ecc8d11486ee5a2c26fbfbcf5dbd7ecf","user":{"login":"AlexHockey","id":4903205,"avatar_url":"https://gravatar.com/avatar/857ec04245d2782554203eb702951b27?d=https%3A%2F%2Fidenticons.github.com%2F8b0dd82a740714d991dc1f25f90a9c9f.png&r=x","gravatar_id":"857ec04245d2782554203eb702951b27","url":"https://api.github.com/users/AlexHockey","html_url":"https://github.com/AlexHockey","followers_url":"https://api.github.com/users/AlexHockey/followers","following_url":"https://api.github.com/users/AlexHockey/following{/other_user}","gists_url":"https://api.github.com/users/AlexHockey/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexHockey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexHockey/subscriptions","organizations_url":"https://api.github.com/users/AlexHockey/orgs","repos_url":"https://api.github.com/users/AlexHockey/repos","events_url":"https://api.github.com/users/AlexHockey/events{/privacy}","received_events_url":"https://api.github.com/users/AlexHockey/received_events","type":"User","site_admin":false},"body":"I haven't checked that all these lengths match up. I wonder whether it would be better to define these with a macro. Something like:\r\n\r\n`#define CONST_PJSTR(NAME, VALUE) static const pj_str_t NAME = {VALUE, sizeof(VALUE) - 1}`\r\n\r\nThe just write:\r\n`CONST_PJSTR(STR_MIME_TYPE, \"application\");`\r\n`CONST_PJSTR(STR_MIME_SUBTYPE, \"reginfo+xml\");`\r\n\r\nThoughts?","created_at":"2014-01-27T15:32:53Z","updated_at":"2014-01-27T15:32:53Z","html_url":"https://github.com/Metaswitch/sprout/pull/365#discussion_r9192083","pull_request_url":"https://api.github.com/repos/Metaswitch/sprout/pulls/365","_links":{"self":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/comments/9192083"},"html":{"href":"https://github.com/Metaswitch/sprout/pull/365#discussion_r9192083"},"pull_request":{"href":"https://api.github.com/repos/Metaswitch/sprout/pulls/365"}}}}