{"action":"created","comment":{"url":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/comments/61278022","id":61278022,"diff_hunk":"@@ -0,0 +1,108 @@\n+/*\n+ * Copyright (C) 2016 Red Hat, Inc.\n+ * This library is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU Lesser General Public\n+ * License as published by the Free Software Foundation; either\n+ * version 2.1 of the License, or (at your option) any later version.\n+ *\n+ * This library is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this library; If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ * Author: Gris Ge <fge@redhat.com>\n+ *\n+ */\n+\n+#ifndef LIBSTORAGEMGMT_BATTERY_H\n+#define LIBSTORAGEMGMT_BATTERY_H\n+\n+#include \"libstoragemgmt_common.h\"\n+\n+#ifdef __cplusplus\n+extern \"C\" {\n+#endif\n+\n+/**\n+ * New in version 1.3.\n+ * Free the memory for a battery record\n+ * @param b     Battery memory to free\n+ * @return LSM_ERR_OK on success, else error reason.\n+ */\n+int LSM_DLL_EXPORT lsm_battery_record_free(lsm_battery *b);\n+\n+/**\n+ * New in version 1.3.\n+ * Copy a battery record\n+ * @param b     Battery record to copy\n+ * @return Copy of battery record\n+ */\n+lsm_battery LSM_DLL_EXPORT *lsm_battery_record_copy(lsm_battery *b);\n+\n+/**\n+ * New in version 1.3.\n+ * Free an array of battery records\n+ * @param battery       Array of battery records\n+ * @param count         Count of battery array.\n+ * @return LSM_ERR_OK on success, else error reason.\n+ */\n+int LSM_DLL_EXPORT lsm_battery_record_array_free(lsm_battery **bs,","path":"c_binding/include/libstoragemgmt/libstoragemgmt_battery.h","position":52,"original_position":52,"commit_id":"9de99d0a0cbf53c77003da1f0c88ff1247d322ab","original_commit_id":"4de1a915fdda3c89bf07968084e8d7fe7fdf89a3","user":{"login":"tasleson","id":2520480,"avatar_url":"https://avatars.githubusercontent.com/u/2520480?v=3","gravatar_id":"","url":"https://api.github.com/users/tasleson","html_url":"https://github.com/tasleson","followers_url":"https://api.github.com/users/tasleson/followers","following_url":"https://api.github.com/users/tasleson/following{/other_user}","gists_url":"https://api.github.com/users/tasleson/gists{/gist_id}","starred_url":"https://api.github.com/users/tasleson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasleson/subscriptions","organizations_url":"https://api.github.com/users/tasleson/orgs","repos_url":"https://api.github.com/users/tasleson/repos","events_url":"https://api.github.com/users/tasleson/events{/privacy}","received_events_url":"https://api.github.com/users/tasleson/received_events","type":"User","site_admin":false},"body":"`lsm_battery *bs[]`","created_at":"2016-04-27T15:19:56Z","updated_at":"2016-04-27T15:19:56Z","html_url":"https://github.com/libstorage/libstoragemgmt/pull/16#discussion_r61278022","pull_request_url":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/comments/61278022"},"html":{"href":"https://github.com/libstorage/libstoragemgmt/pull/16#discussion_r61278022"},"pull_request":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16","id":36407166,"html_url":"https://github.com/libstorage/libstoragemgmt/pull/16","diff_url":"https://github.com/libstorage/libstoragemgmt/pull/16.diff","patch_url":"https://github.com/libstorage/libstoragemgmt/pull/16.patch","issue_url":"https://api.github.com/repos/libstorage/libstoragemgmt/issues/16","number":16,"state":"open","locked":false,"title":"[PATCH 00/23] Battery and volume RAM cache","user":{"login":"cathay4t","id":934948,"avatar_url":"https://avatars.githubusercontent.com/u/934948?v=3","gravatar_id":"","url":"https://api.github.com/users/cathay4t","html_url":"https://github.com/cathay4t","followers_url":"https://api.github.com/users/cathay4t/followers","following_url":"https://api.github.com/users/cathay4t/following{/other_user}","gists_url":"https://api.github.com/users/cathay4t/gists{/gist_id}","starred_url":"https://api.github.com/users/cathay4t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathay4t/subscriptions","organizations_url":"https://api.github.com/users/cathay4t/orgs","repos_url":"https://api.github.com/users/cathay4t/repos","events_url":"https://api.github.com/users/cathay4t/events{/privacy}","received_events_url":"https://api.github.com/users/cathay4t/received_events","type":"User","site_admin":false},"body":" * New features:\r\n    * Query battery(including super capacitor)\r\n    * Query volume RAM cache settings:\r\n        * Physical disk cache policy.\r\n        * Write cache policy and status.\r\n        * Read cache policy and status.\r\n    * Change volume RAM cache policy.\r\n\r\n * Supported plugins:\r\n    * MegaRAID\r\n    * HPSA\r\n    * Sim and Simc\r\n\r\nPlease be advised SSD cache will be another PR in version 1.4.","created_at":"2015-05-28T13:39:25Z","updated_at":"2016-04-27T15:19:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"323524b04ece8b3ad6c5a99926969900ee55484b","assignee":null,"milestone":{"url":"https://api.github.com/repos/libstorage/libstoragemgmt/milestones/1","html_url":"https://github.com/libstorage/libstoragemgmt/milestones/1.3","labels_url":"https://api.github.com/repos/libstorage/libstoragemgmt/milestones/1/labels","id":1137995,"number":1,"title":"1.3","description":"Planed new features:\r\n * blink LED(ident and fault) of local disk via SES.\r\n * Cache setting query(including battery status).\r\n * Local disk link type, RPM query.","creator":{"login":"cathay4t","id":934948,"avatar_url":"https://avatars.githubusercontent.com/u/934948?v=3","gravatar_id":"","url":"https://api.github.com/users/cathay4t","html_url":"https://github.com/cathay4t","followers_url":"https://api.github.com/users/cathay4t/followers","following_url":"https://api.github.com/users/cathay4t/following{/other_user}","gists_url":"https://api.github.com/users/cathay4t/gists{/gist_id}","starred_url":"https://api.github.com/users/cathay4t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathay4t/subscriptions","organizations_url":"https://api.github.com/users/cathay4t/orgs","repos_url":"https://api.github.com/users/cathay4t/repos","events_url":"https://api.github.com/users/cathay4t/events{/privacy}","received_events_url":"https://api.github.com/users/cathay4t/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":8,"state":"open","created_at":"2015-05-28T13:45:18Z","updated_at":"2016-04-27T14:49:02Z","due_on":"2016-04-30T16:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16/commits","review_comments_url":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16/comments","review_comment_url":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libstorage/libstoragemgmt/issues/16/comments","statuses_url":"https://api.github.com/repos/libstorage/libstoragemgmt/statuses/9de99d0a0cbf53c77003da1f0c88ff1247d322ab","head":{"label":"cathay4t:cache_info","ref":"cache_info","sha":"9de99d0a0cbf53c77003da1f0c88ff1247d322ab","user":{"login":"cathay4t","id":934948,"avatar_url":"https://avatars.githubusercontent.com/u/934948?v=3","gravatar_id":"","url":"https://api.github.com/users/cathay4t","html_url":"https://github.com/cathay4t","followers_url":"https://api.github.com/users/cathay4t/followers","following_url":"https://api.github.com/users/cathay4t/following{/other_user}","gists_url":"https://api.github.com/users/cathay4t/gists{/gist_id}","starred_url":"https://api.github.com/users/cathay4t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathay4t/subscriptions","organizations_url":"https://api.github.com/users/cathay4t/orgs","repos_url":"https://api.github.com/users/cathay4t/repos","events_url":"https://api.github.com/users/cathay4t/events{/privacy}","received_events_url":"https://api.github.com/users/cathay4t/received_events","type":"User","site_admin":false},"repo":{"id":32376788,"name":"libstoragemgmt","full_name":"cathay4t/libstoragemgmt","owner":{"login":"cathay4t","id":934948,"avatar_url":"https://avatars.githubusercontent.com/u/934948?v=3","gravatar_id":"","url":"https://api.github.com/users/cathay4t","html_url":"https://github.com/cathay4t","followers_url":"https://api.github.com/users/cathay4t/followers","following_url":"https://api.github.com/users/cathay4t/following{/other_user}","gists_url":"https://api.github.com/users/cathay4t/gists{/gist_id}","starred_url":"https://api.github.com/users/cathay4t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cathay4t/subscriptions","organizations_url":"https://api.github.com/users/cathay4t/orgs","repos_url":"https://api.github.com/users/cathay4t/repos","events_url":"https://api.github.com/users/cathay4t/events{/privacy}","received_events_url":"https://api.github.com/users/cathay4t/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cathay4t/libstoragemgmt","description":"A library for storage management","fork":true,"url":"https://api.github.com/repos/cathay4t/libstoragemgmt","forks_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/forks","keys_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/teams","hooks_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/hooks","issue_events_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/issues/events{/number}","events_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/events","assignees_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/assignees{/user}","branches_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/branches{/branch}","tags_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/tags","blobs_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/statuses/{sha}","languages_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/languages","stargazers_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/stargazers","contributors_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/contributors","subscribers_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/subscribers","subscription_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/subscription","commits_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/issues/comments{/number}","contents_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/contents/{+path}","compare_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/merges","archive_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/downloads","issues_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/issues{/number}","pulls_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/pulls{/number}","milestones_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/milestones{/number}","notifications_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/labels{/name}","releases_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/releases{/id}","deployments_url":"https://api.github.com/repos/cathay4t/libstoragemgmt/deployments","created_at":"2015-03-17T06:57:15Z","updated_at":"2016-01-13T05:41:50Z","pushed_at":"2016-04-27T12:47:11Z","git_url":"git://github.com/cathay4t/libstoragemgmt.git","ssh_url":"git@github.com:cathay4t/libstoragemgmt.git","clone_url":"https://github.com/cathay4t/libstoragemgmt.git","svn_url":"https://github.com/cathay4t/libstoragemgmt","homepage":"","size":3533,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"libstorage:master","ref":"master","sha":"342b99273c430f8970a135fcdae3fa0231ece44b","user":{"login":"libstorage","id":11510731,"avatar_url":"https://avatars.githubusercontent.com/u/11510731?v=3","gravatar_id":"","url":"https://api.github.com/users/libstorage","html_url":"https://github.com/libstorage","followers_url":"https://api.github.com/users/libstorage/followers","following_url":"https://api.github.com/users/libstorage/following{/other_user}","gists_url":"https://api.github.com/users/libstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/libstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libstorage/subscriptions","organizations_url":"https://api.github.com/users/libstorage/orgs","repos_url":"https://api.github.com/users/libstorage/repos","events_url":"https://api.github.com/users/libstorage/events{/privacy}","received_events_url":"https://api.github.com/users/libstorage/received_events","type":"Organization","site_admin":false},"repo":{"id":32356658,"name":"libstoragemgmt","full_name":"libstorage/libstoragemgmt","owner":{"login":"libstorage","id":11510731,"avatar_url":"https://avatars.githubusercontent.com/u/11510731?v=3","gravatar_id":"","url":"https://api.github.com/users/libstorage","html_url":"https://github.com/libstorage","followers_url":"https://api.github.com/users/libstorage/followers","following_url":"https://api.github.com/users/libstorage/following{/other_user}","gists_url":"https://api.github.com/users/libstorage/gists{/gist_id}","starred_url":"https://api.github.com/users/libstorage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libstorage/subscriptions","organizations_url":"https://api.github.com/users/libstorage/orgs","repos_url":"https://api.github.com/users/libstorage/repos","events_url":"https://api.github.com/users/libstorage/events{/privacy}","received_events_url":"https://api.github.com/users/libstorage/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libstorage/libstoragemgmt","description":"A library for storage management","fork":false,"url":"https://api.github.com/repos/libstorage/libstoragemgmt","forks_url":"https://api.github.com/repos/libstorage/libstoragemgmt/forks","keys_url":"https://api.github.com/repos/libstorage/libstoragemgmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libstorage/libstoragemgmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libstorage/libstoragemgmt/teams","hooks_url":"https://api.github.com/repos/libstorage/libstoragemgmt/hooks","issue_events_url":"https://api.github.com/repos/libstorage/libstoragemgmt/issues/events{/number}","events_url":"https://api.github.com/repos/libstorage/libstoragemgmt/events","assignees_url":"https://api.github.com/repos/libstorage/libstoragemgmt/assignees{/user}","branches_url":"https://api.github.com/repos/libstorage/libstoragemgmt/branches{/branch}","tags_url":"https://api.github.com/repos/libstorage/libstoragemgmt/tags","blobs_url":"https://api.github.com/repos/libstorage/libstoragemgmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libstorage/libstoragemgmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libstorage/libstoragemgmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/libstorage/libstoragemgmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libstorage/libstoragemgmt/statuses/{sha}","languages_url":"https://api.github.com/repos/libstorage/libstoragemgmt/languages","stargazers_url":"https://api.github.com/repos/libstorage/libstoragemgmt/stargazers","contributors_url":"https://api.github.com/repos/libstorage/libstoragemgmt/contributors","subscribers_url":"https://api.github.com/repos/libstorage/libstoragemgmt/subscribers","subscription_url":"https://api.github.com/repos/libstorage/libstoragemgmt/subscription","commits_url":"https://api.github.com/repos/libstorage/libstoragemgmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/libstorage/libstoragemgmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/libstorage/libstoragemgmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/libstorage/libstoragemgmt/issues/comments{/number}","contents_url":"https://api.github.com/repos/libstorage/libstoragemgmt/contents/{+path}","compare_url":"https://api.github.com/repos/libstorage/libstoragemgmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libstorage/libstoragemgmt/merges","archive_url":"https://api.github.com/repos/libstorage/libstoragemgmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libstorage/libstoragemgmt/downloads","issues_url":"https://api.github.com/repos/libstorage/libstoragemgmt/issues{/number}","pulls_url":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls{/number}","milestones_url":"https://api.github.com/repos/libstorage/libstoragemgmt/milestones{/number}","notifications_url":"https://api.github.com/repos/libstorage/libstoragemgmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libstorage/libstoragemgmt/labels{/name}","releases_url":"https://api.github.com/repos/libstorage/libstoragemgmt/releases{/id}","deployments_url":"https://api.github.com/repos/libstorage/libstoragemgmt/deployments","created_at":"2015-03-16T22:25:25Z","updated_at":"2016-04-25T11:40:26Z","pushed_at":"2016-04-27T14:49:02Z","git_url":"git://github.com/libstorage/libstoragemgmt.git","ssh_url":"git@github.com:libstorage/libstoragemgmt.git","clone_url":"https://github.com/libstorage/libstoragemgmt.git","svn_url":"https://github.com/libstorage/libstoragemgmt","homepage":"","size":3819,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":18,"forks":10,"open_issues":18,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16"},"html":{"href":"https://github.com/libstorage/libstoragemgmt/pull/16"},"issue":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/issues/16"},"comments":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/libstorage/libstoragemgmt/statuses/9de99d0a0cbf53c77003da1f0c88ff1247d322ab"}}}}