{"action":"created","comment":{"url":"https://api.github.com/repos/taglib/taglib/pulls/comments/38864292","id":38864292,"diff_hunk":"@@ -0,0 +1,145 @@\n+/***************************************************************************\n+    copyright            : (C) 2002 - 2008 by Scott Wheeler\n+    email                : wheeler@kde.org\n+ ***************************************************************************/\n+\n+/***************************************************************************\n+ *   This library is free software; you can redistribute it and/or modify  *\n+ *   it under the terms of the GNU Lesser General Public License version   *\n+ *   2.1 as published by the Free Software Foundation.                     *\n+ *                                                                         *\n+ *   This library is distributed in the hope that it will be useful, but   *\n+ *   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, write to the Free Software   *\n+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA         *\n+ *   02110-1301  USA                                                       *\n+ *                                                                         *\n+ *   Alternatively, this file is available under the Mozilla Public        *\n+ *   License Version 1.1.  You may obtain a copy of the License at         *\n+ *   http://www.mozilla.org/MPL/                                           *\n+ ***************************************************************************/\n+\n+#ifndef TAGLIB_PICTURE_H\n+#define TAGLIB_PICTURE_H\n+\n+#include \"taglib_export.h\"\n+#include \"tbytevector.h\"\n+#include \"tmap.h\"\n+#include \"tstring.h\"\n+\n+namespace TagLib {\n+\n+class TAGLIB_EXPORT Picture\n+{\n+\n+class PicturePrivate;\n+\n+public:\n+\n+    /**\n+     * @brief The Type enum is based on types in id3v2 tags\n+     */\n+    enum Type {\n+      //! A type not enumerated below\n+      Other              = 0x00,\n+      //! 32x32 PNG image that should be used as the file icon\n+      FileIcon           = 0x01,\n+      //! File icon of a different size or format\n+      OtherFileIcon      = 0x02,\n+      //! Front cover image of the album\n+      FrontCover         = 0x03,\n+      //! Back cover image of the album\n+      BackCover          = 0x04,\n+      //! Inside leaflet page of the album\n+      LeafletPage        = 0x05,\n+      //! Image from the album itself\n+      Media              = 0x06,\n+      //! Picture of the lead artist or soloist\n+      LeadArtist         = 0x07,\n+      //! Picture of the artist or performer\n+      Artist             = 0x08,\n+      //! Picture of the conductor\n+      Conductor          = 0x09,\n+      //! Picture of the band or orchestra\n+      Band               = 0x0A,\n+      //! Picture of the composer\n+      Composer           = 0x0B,\n+      //! Picture of the lyricist or text writer\n+      Lyricist           = 0x0C,\n+      //! Picture of the recording location or studio\n+      RecordingLocation  = 0x0D,\n+      //! Picture of the artists during recording\n+      DuringRecording    = 0x0E,\n+      //! Picture of the artists during performance\n+      DuringPerformance  = 0x0F,\n+      //! Picture from a movie or video related to the track\n+      MovieScreenCapture = 0x10,\n+      //! Picture of a large, coloured fish\n+      ColouredFish       = 0x11,\n+      //! Illustration related to the track\n+      Illustration       = 0x12,\n+      //! Logo of the band or performer\n+      BandLogo           = 0x13,\n+      //! Logo of the publisher (record company)\n+      PublisherLogo      = 0x14\n+    };\n+\n+    /*!\n+     * Constructs an empty Picture.\n+    */\n+    Picture();\n+\n+    /**\n+     * @brief Picture\n+     * @param p\n+     */\n+    Picture(const Picture& p);\n+\n+    /**\n+     * @brief Picture\n+     * @param type\n+     * @param data\n+     * @param mime\n+     * @param description\n+     */\n+    Picture(const ByteVector& data,\n+            Type type = Other,\n+            const String& mime = \"image/\",\n+            const String& description = String());\n+\n+    /*!\n+     * Destroys this Picture instance.\n+     */\n+    virtual ~Picture();\n+\n+    const String& mime() const;\n+    const String& description() const;\n+    Type type() const;\n+    const ByteVector& data() const;\n+\n+    /*!\n+     * Performs a shallow, implicitly shared, copy of \\a p, overwriting the\n+     * Picture's current data.\n+     */\n+    Picture& operator=(const Picture& p);\n+\n+private:\n+    PicturePrivate* p() const{ return _p; }\n+    PicturePrivate* _p;","path":"taglib/toolkit/tpicture.h","position":132,"original_position":132,"commit_id":"71e8915568141dbdbf7d14c507a6e4981c1f97e8","original_commit_id":"71e8915568141dbdbf7d14c507a6e4981c1f97e8","user":{"login":"scotchi","id":170209,"avatar_url":"https://avatars.githubusercontent.com/u/170209?v=3","gravatar_id":"","url":"https://api.github.com/users/scotchi","html_url":"https://github.com/scotchi","followers_url":"https://api.github.com/users/scotchi/followers","following_url":"https://api.github.com/users/scotchi/following{/other_user}","gists_url":"https://api.github.com/users/scotchi/gists{/gist_id}","starred_url":"https://api.github.com/users/scotchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scotchi/subscriptions","organizations_url":"https://api.github.com/users/scotchi/orgs","repos_url":"https://api.github.com/users/scotchi/repos","events_url":"https://api.github.com/users/scotchi/events{/privacy}","received_events_url":"https://api.github.com/users/scotchi/received_events","type":"User","site_admin":false},"body":"Two things:\r\n\r\n* Everywhere else in TagLib's code, it's a `d`-pointer, following the Qt convention.\r\n* There's no reason to have an accessor for this; the only things that can see the private type also have access to the pointer directly.","created_at":"2015-09-07T14:03:49Z","updated_at":"2015-09-07T14:03:49Z","html_url":"https://github.com/taglib/taglib/pull/655#discussion_r38864292","pull_request_url":"https://api.github.com/repos/taglib/taglib/pulls/655","_links":{"self":{"href":"https://api.github.com/repos/taglib/taglib/pulls/comments/38864292"},"html":{"href":"https://github.com/taglib/taglib/pull/655#discussion_r38864292"},"pull_request":{"href":"https://api.github.com/repos/taglib/taglib/pulls/655"}}},"pull_request":{"url":"https://api.github.com/repos/taglib/taglib/pulls/655","id":44352998,"html_url":"https://github.com/taglib/taglib/pull/655","diff_url":"https://github.com/taglib/taglib/pull/655.diff","patch_url":"https://github.com/taglib/taglib/pull/655.patch","issue_url":"https://api.github.com/repos/taglib/taglib/issues/655","number":655,"state":"open","locked":false,"title":"Fix #94: add a unified interface for pictures","user":{"login":"MaxLeb","id":8132834,"avatar_url":"https://avatars.githubusercontent.com/u/8132834?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxLeb","html_url":"https://github.com/MaxLeb","followers_url":"https://api.github.com/users/MaxLeb/followers","following_url":"https://api.github.com/users/MaxLeb/following{/other_user}","gists_url":"https://api.github.com/users/MaxLeb/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxLeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxLeb/subscriptions","organizations_url":"https://api.github.com/users/MaxLeb/orgs","repos_url":"https://api.github.com/users/MaxLeb/repos","events_url":"https://api.github.com/users/MaxLeb/events{/privacy}","received_events_url":"https://api.github.com/users/MaxLeb/received_events","type":"User","site_admin":false},"body":"This is an update for PR: 397( https://github.com/taglib/taglib/pull/397 )\r\n","created_at":"2015-09-07T13:02:14Z","updated_at":"2015-09-07T14:03:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20672c6f5de39117d0cf1efe2b819017dd410acd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/taglib/taglib/pulls/655/commits","review_comments_url":"https://api.github.com/repos/taglib/taglib/pulls/655/comments","review_comment_url":"https://api.github.com/repos/taglib/taglib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/taglib/taglib/issues/655/comments","statuses_url":"https://api.github.com/repos/taglib/taglib/statuses/71e8915568141dbdbf7d14c507a6e4981c1f97e8","head":{"label":"MaxLeb:pictures","ref":"pictures","sha":"71e8915568141dbdbf7d14c507a6e4981c1f97e8","user":{"login":"MaxLeb","id":8132834,"avatar_url":"https://avatars.githubusercontent.com/u/8132834?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxLeb","html_url":"https://github.com/MaxLeb","followers_url":"https://api.github.com/users/MaxLeb/followers","following_url":"https://api.github.com/users/MaxLeb/following{/other_user}","gists_url":"https://api.github.com/users/MaxLeb/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxLeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxLeb/subscriptions","organizations_url":"https://api.github.com/users/MaxLeb/orgs","repos_url":"https://api.github.com/users/MaxLeb/repos","events_url":"https://api.github.com/users/MaxLeb/events{/privacy}","received_events_url":"https://api.github.com/users/MaxLeb/received_events","type":"User","site_admin":false},"repo":{"id":21730604,"name":"taglib","full_name":"MaxLeb/taglib","owner":{"login":"MaxLeb","id":8132834,"avatar_url":"https://avatars.githubusercontent.com/u/8132834?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxLeb","html_url":"https://github.com/MaxLeb","followers_url":"https://api.github.com/users/MaxLeb/followers","following_url":"https://api.github.com/users/MaxLeb/following{/other_user}","gists_url":"https://api.github.com/users/MaxLeb/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxLeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxLeb/subscriptions","organizations_url":"https://api.github.com/users/MaxLeb/orgs","repos_url":"https://api.github.com/users/MaxLeb/repos","events_url":"https://api.github.com/users/MaxLeb/events{/privacy}","received_events_url":"https://api.github.com/users/MaxLeb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaxLeb/taglib","description":"TagLib Audio Meta-Data Library","fork":true,"url":"https://api.github.com/repos/MaxLeb/taglib","forks_url":"https://api.github.com/repos/MaxLeb/taglib/forks","keys_url":"https://api.github.com/repos/MaxLeb/taglib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaxLeb/taglib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaxLeb/taglib/teams","hooks_url":"https://api.github.com/repos/MaxLeb/taglib/hooks","issue_events_url":"https://api.github.com/repos/MaxLeb/taglib/issues/events{/number}","events_url":"https://api.github.com/repos/MaxLeb/taglib/events","assignees_url":"https://api.github.com/repos/MaxLeb/taglib/assignees{/user}","branches_url":"https://api.github.com/repos/MaxLeb/taglib/branches{/branch}","tags_url":"https://api.github.com/repos/MaxLeb/taglib/tags","blobs_url":"https://api.github.com/repos/MaxLeb/taglib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaxLeb/taglib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaxLeb/taglib/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaxLeb/taglib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaxLeb/taglib/statuses/{sha}","languages_url":"https://api.github.com/repos/MaxLeb/taglib/languages","stargazers_url":"https://api.github.com/repos/MaxLeb/taglib/stargazers","contributors_url":"https://api.github.com/repos/MaxLeb/taglib/contributors","subscribers_url":"https://api.github.com/repos/MaxLeb/taglib/subscribers","subscription_url":"https://api.github.com/repos/MaxLeb/taglib/subscription","commits_url":"https://api.github.com/repos/MaxLeb/taglib/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaxLeb/taglib/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaxLeb/taglib/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaxLeb/taglib/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaxLeb/taglib/contents/{+path}","compare_url":"https://api.github.com/repos/MaxLeb/taglib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaxLeb/taglib/merges","archive_url":"https://api.github.com/repos/MaxLeb/taglib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaxLeb/taglib/downloads","issues_url":"https://api.github.com/repos/MaxLeb/taglib/issues{/number}","pulls_url":"https://api.github.com/repos/MaxLeb/taglib/pulls{/number}","milestones_url":"https://api.github.com/repos/MaxLeb/taglib/milestones{/number}","notifications_url":"https://api.github.com/repos/MaxLeb/taglib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaxLeb/taglib/labels{/name}","releases_url":"https://api.github.com/repos/MaxLeb/taglib/releases{/id}","created_at":"2014-07-11T09:34:25Z","updated_at":"2014-08-23T07:34:18Z","pushed_at":"2015-09-07T13:44:22Z","git_url":"git://github.com/MaxLeb/taglib.git","ssh_url":"git@github.com:MaxLeb/taglib.git","clone_url":"https://github.com/MaxLeb/taglib.git","svn_url":"https://github.com/MaxLeb/taglib","homepage":"http://taglib.github.io/","size":6228,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"taglib:taglib2","ref":"taglib2","sha":"9b8f774fb3158490d18b39caec46bfd4d3e2d3dc","user":{"login":"taglib","id":662523,"avatar_url":"https://avatars.githubusercontent.com/u/662523?v=3","gravatar_id":"","url":"https://api.github.com/users/taglib","html_url":"https://github.com/taglib","followers_url":"https://api.github.com/users/taglib/followers","following_url":"https://api.github.com/users/taglib/following{/other_user}","gists_url":"https://api.github.com/users/taglib/gists{/gist_id}","starred_url":"https://api.github.com/users/taglib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taglib/subscriptions","organizations_url":"https://api.github.com/users/taglib/orgs","repos_url":"https://api.github.com/users/taglib/repos","events_url":"https://api.github.com/users/taglib/events{/privacy}","received_events_url":"https://api.github.com/users/taglib/received_events","type":"Organization","site_admin":false},"repo":{"id":1465033,"name":"taglib","full_name":"taglib/taglib","owner":{"login":"taglib","id":662523,"avatar_url":"https://avatars.githubusercontent.com/u/662523?v=3","gravatar_id":"","url":"https://api.github.com/users/taglib","html_url":"https://github.com/taglib","followers_url":"https://api.github.com/users/taglib/followers","following_url":"https://api.github.com/users/taglib/following{/other_user}","gists_url":"https://api.github.com/users/taglib/gists{/gist_id}","starred_url":"https://api.github.com/users/taglib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taglib/subscriptions","organizations_url":"https://api.github.com/users/taglib/orgs","repos_url":"https://api.github.com/users/taglib/repos","events_url":"https://api.github.com/users/taglib/events{/privacy}","received_events_url":"https://api.github.com/users/taglib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/taglib/taglib","description":"TagLib Audio Meta-Data Library","fork":false,"url":"https://api.github.com/repos/taglib/taglib","forks_url":"https://api.github.com/repos/taglib/taglib/forks","keys_url":"https://api.github.com/repos/taglib/taglib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taglib/taglib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taglib/taglib/teams","hooks_url":"https://api.github.com/repos/taglib/taglib/hooks","issue_events_url":"https://api.github.com/repos/taglib/taglib/issues/events{/number}","events_url":"https://api.github.com/repos/taglib/taglib/events","assignees_url":"https://api.github.com/repos/taglib/taglib/assignees{/user}","branches_url":"https://api.github.com/repos/taglib/taglib/branches{/branch}","tags_url":"https://api.github.com/repos/taglib/taglib/tags","blobs_url":"https://api.github.com/repos/taglib/taglib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taglib/taglib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taglib/taglib/git/refs{/sha}","trees_url":"https://api.github.com/repos/taglib/taglib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taglib/taglib/statuses/{sha}","languages_url":"https://api.github.com/repos/taglib/taglib/languages","stargazers_url":"https://api.github.com/repos/taglib/taglib/stargazers","contributors_url":"https://api.github.com/repos/taglib/taglib/contributors","subscribers_url":"https://api.github.com/repos/taglib/taglib/subscribers","subscription_url":"https://api.github.com/repos/taglib/taglib/subscription","commits_url":"https://api.github.com/repos/taglib/taglib/commits{/sha}","git_commits_url":"https://api.github.com/repos/taglib/taglib/git/commits{/sha}","comments_url":"https://api.github.com/repos/taglib/taglib/comments{/number}","issue_comment_url":"https://api.github.com/repos/taglib/taglib/issues/comments{/number}","contents_url":"https://api.github.com/repos/taglib/taglib/contents/{+path}","compare_url":"https://api.github.com/repos/taglib/taglib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taglib/taglib/merges","archive_url":"https://api.github.com/repos/taglib/taglib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taglib/taglib/downloads","issues_url":"https://api.github.com/repos/taglib/taglib/issues{/number}","pulls_url":"https://api.github.com/repos/taglib/taglib/pulls{/number}","milestones_url":"https://api.github.com/repos/taglib/taglib/milestones{/number}","notifications_url":"https://api.github.com/repos/taglib/taglib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taglib/taglib/labels{/name}","releases_url":"https://api.github.com/repos/taglib/taglib/releases{/id}","created_at":"2011-03-10T19:36:24Z","updated_at":"2015-08-31T23:51:22Z","pushed_at":"2015-09-07T13:44:22Z","git_url":"git://github.com/taglib/taglib.git","ssh_url":"git@github.com:taglib/taglib.git","clone_url":"https://github.com/taglib/taglib.git","svn_url":"https://github.com/taglib/taglib","homepage":"http://taglib.github.io/","size":10076,"stargazers_count":339,"watchers_count":339,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":122,"mirror_url":null,"open_issues_count":58,"forks":122,"open_issues":58,"watchers":339,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/taglib/taglib/pulls/655"},"html":{"href":"https://github.com/taglib/taglib/pull/655"},"issue":{"href":"https://api.github.com/repos/taglib/taglib/issues/655"},"comments":{"href":"https://api.github.com/repos/taglib/taglib/issues/655/comments"},"review_comments":{"href":"https://api.github.com/repos/taglib/taglib/pulls/655/comments"},"review_comment":{"href":"https://api.github.com/repos/taglib/taglib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/taglib/taglib/pulls/655/commits"},"statuses":{"href":"https://api.github.com/repos/taglib/taglib/statuses/71e8915568141dbdbf7d14c507a6e4981c1f97e8"}}}}