{"action":"created","comment":{"url":"https://api.github.com/repos/mapsme/omim/pulls/comments/54392426","id":54392426,"diff_hunk":"@@ -0,0 +1,87 @@\n+#pragma once\n+\n+#include \"map/bookmark.hpp\"\n+\n+#include \"indexer/feature_data.hpp\"\n+#include \"indexer/feature_meta.hpp\"\n+#include \"indexer/map_object.hpp\"\n+\n+#include \"geometry/latlon.hpp\"\n+#include \"geometry/mercator.hpp\"\n+#include \"geometry/point2d.hpp\"\n+\n+#include \"std/string.hpp\"\n+\n+// TODO(AlexZ): There should be a better way.\n+class Framework;\n+\n+namespace place_page\n+{\n+\n+enum Fields\n+{\n+  // Non-Feature fields.\n+  Bookmark,\n+  CustomName,   //!< Name from API, shared link, Dropped Pin etc.\n+//  EditButton,\n+  //ApiBackUrl,\n+  // Feature fields.\n+  ObjectName,\n+  Type,\n+  Phone,\n+  Fax,\n+  Email,\n+  Website,\n+  Internet,\n+  Cuisine,\n+  OpeningHours,\n+  Stars,\n+  Operator,\n+  Elevation,\n+  Wikipedia,\n+  Flats,\n+  BuildingLevels,\n+};\n+\n+class Info : public osm::MapObject\n+{\n+  friend class ::Framework;\n+public:\n+  vector<Fields> GetAvailableFields() const;\n+\n+  bool IsFeature() const { return m_featureID.IsValid(); }\n+  bool IsBookmark() const { return m_bac != MakeEmptyBookmarkAndCategory(); }\n+  bool IsMyPosition() const { return m_isMyPosition; }\n+  /// @returns true if Back API button should be displayed.\n+  bool HasApiUrl() const { return !m_apiUrl.empty(); }\n+  /// @returns true if Edit Place button should be displayed.\n+  bool IsEditable() const { return m_isEditable; }\n+\n+  // TODO(AlexZ): Finish address refactoring.\n+//  AddressInfo GetAddress() const;\n+\n+  /// Should be used by UI code to generate cool name for new bookmarks.\n+  // TODO: Tune new bookmark name. May be add address or some other data.\n+  string FormatNewBookmarkName() const;\n+\n+  /// Convenient wrapper for feature's name and custom name.\n+  string GetTitle() const;\n+\n+  string GetCustomName() const { return m_customName; }\n+  BookmarkAndCategory GetBookmark() const { return m_bac; }\n+  // TODO: Can we avoid using this setter in UI?\n+  void SetBookmark(BookmarkAndCategory bac) { m_bac = bac; }\n+  string const & GetApiUrl() const { return m_apiUrl; }\n+\n+  // TODO(Vlad, yunikkk): Use Fields enum + getters instead of direct metadata access.\n+  feature::Metadata const & GetMetadata() const { return m_metadata; }","path":"map/place_page_info.hpp","position":77,"original_position":77,"commit_id":"105d9651ee4c5066a7cff30444c818867788386f","original_commit_id":"105d9651ee4c5066a7cff30444c818867788386f","user":{"login":"VladiMihaylenko","id":6297856,"avatar_url":"https://avatars.githubusercontent.com/u/6297856?v=3","gravatar_id":"","url":"https://api.github.com/users/VladiMihaylenko","html_url":"https://github.com/VladiMihaylenko","followers_url":"https://api.github.com/users/VladiMihaylenko/followers","following_url":"https://api.github.com/users/VladiMihaylenko/following{/other_user}","gists_url":"https://api.github.com/users/VladiMihaylenko/gists{/gist_id}","starred_url":"https://api.github.com/users/VladiMihaylenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladiMihaylenko/subscriptions","organizations_url":"https://api.github.com/users/VladiMihaylenko/orgs","repos_url":"https://api.github.com/users/VladiMihaylenko/repos","events_url":"https://api.github.com/users/VladiMihaylenko/events{/privacy}","received_events_url":"https://api.github.com/users/VladiMihaylenko/received_events","type":"User","site_admin":false},"body":"если ты хочешь скрыть метадату, почему она до сих пор private? ","created_at":"2016-02-29T10:30:15Z","updated_at":"2016-02-29T10:30:15Z","html_url":"https://github.com/mapsme/omim/pull/1957#discussion_r54392426","pull_request_url":"https://api.github.com/repos/mapsme/omim/pulls/1957","_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments/54392426"},"html":{"href":"https://github.com/mapsme/omim/pull/1957#discussion_r54392426"},"pull_request":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1957"}}},"pull_request":{"url":"https://api.github.com/repos/mapsme/omim/pulls/1957","id":59814962,"html_url":"https://github.com/mapsme/omim/pull/1957","diff_url":"https://github.com/mapsme/omim/pull/1957.diff","patch_url":"https://github.com/mapsme/omim/pull/1957.patch","issue_url":"https://api.github.com/repos/mapsme/omim/issues/1957","number":1957,"state":"open","locked":false,"title":"[DO NOT MERGE] UserMarks, Editor and Place Page refactoring.","user":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"body":"- QT version now has fully featured and editable Place Page on a left mouse tap.\r\n- Removed usermarks from iOS and Android code.\r\n- Separate structures to pass data for Place Page and for Editor UI.\r\n- Moved some duplicate code to the C++ core (place page subtitle formatting).\r\n\r\nTODO's:\r\n- Correctly pass AddressInfo to Place Page.\r\n- Finish iOS and Android code parts.\r\n- Move cuisines translations to the core.\r\n\r\n@vng @mgsergio @yunikkk @VladiMihaylenko @trashkalmar @igrechuhin Please check it out.","created_at":"2016-02-18T15:29:34Z","updated_at":"2016-02-29T10:30:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ca860e403ea124a166f01daf323aa329db06470","assignee":{"login":"vng","id":175612,"avatar_url":"https://avatars.githubusercontent.com/u/175612?v=3","gravatar_id":"","url":"https://api.github.com/users/vng","html_url":"https://github.com/vng","followers_url":"https://api.github.com/users/vng/followers","following_url":"https://api.github.com/users/vng/following{/other_user}","gists_url":"https://api.github.com/users/vng/gists{/gist_id}","starred_url":"https://api.github.com/users/vng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vng/subscriptions","organizations_url":"https://api.github.com/users/vng/orgs","repos_url":"https://api.github.com/users/vng/repos","events_url":"https://api.github.com/users/vng/events{/privacy}","received_events_url":"https://api.github.com/users/vng/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mapsme/omim/pulls/1957/commits","review_comments_url":"https://api.github.com/repos/mapsme/omim/pulls/1957/comments","review_comment_url":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapsme/omim/issues/1957/comments","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/105d9651ee4c5066a7cff30444c818867788386f","head":{"label":"deathbaba:usermark-change","ref":"usermark-change","sha":"105d9651ee4c5066a7cff30444c818867788386f","user":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"repo":{"id":43427531,"name":"omim","full_name":"deathbaba/omim","owner":{"login":"deathbaba","id":170263,"avatar_url":"https://avatars.githubusercontent.com/u/170263?v=3","gravatar_id":"","url":"https://api.github.com/users/deathbaba","html_url":"https://github.com/deathbaba","followers_url":"https://api.github.com/users/deathbaba/followers","following_url":"https://api.github.com/users/deathbaba/following{/other_user}","gists_url":"https://api.github.com/users/deathbaba/gists{/gist_id}","starred_url":"https://api.github.com/users/deathbaba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deathbaba/subscriptions","organizations_url":"https://api.github.com/users/deathbaba/orgs","repos_url":"https://api.github.com/users/deathbaba/repos","events_url":"https://api.github.com/users/deathbaba/events{/privacy}","received_events_url":"https://api.github.com/users/deathbaba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deathbaba/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":true,"url":"https://api.github.com/repos/deathbaba/omim","forks_url":"https://api.github.com/repos/deathbaba/omim/forks","keys_url":"https://api.github.com/repos/deathbaba/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deathbaba/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deathbaba/omim/teams","hooks_url":"https://api.github.com/repos/deathbaba/omim/hooks","issue_events_url":"https://api.github.com/repos/deathbaba/omim/issues/events{/number}","events_url":"https://api.github.com/repos/deathbaba/omim/events","assignees_url":"https://api.github.com/repos/deathbaba/omim/assignees{/user}","branches_url":"https://api.github.com/repos/deathbaba/omim/branches{/branch}","tags_url":"https://api.github.com/repos/deathbaba/omim/tags","blobs_url":"https://api.github.com/repos/deathbaba/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deathbaba/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deathbaba/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/deathbaba/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deathbaba/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/deathbaba/omim/languages","stargazers_url":"https://api.github.com/repos/deathbaba/omim/stargazers","contributors_url":"https://api.github.com/repos/deathbaba/omim/contributors","subscribers_url":"https://api.github.com/repos/deathbaba/omim/subscribers","subscription_url":"https://api.github.com/repos/deathbaba/omim/subscription","commits_url":"https://api.github.com/repos/deathbaba/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/deathbaba/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/deathbaba/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/deathbaba/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/deathbaba/omim/contents/{+path}","compare_url":"https://api.github.com/repos/deathbaba/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deathbaba/omim/merges","archive_url":"https://api.github.com/repos/deathbaba/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deathbaba/omim/downloads","issues_url":"https://api.github.com/repos/deathbaba/omim/issues{/number}","pulls_url":"https://api.github.com/repos/deathbaba/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/deathbaba/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/deathbaba/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deathbaba/omim/labels{/name}","releases_url":"https://api.github.com/repos/deathbaba/omim/releases{/id}","deployments_url":"https://api.github.com/repos/deathbaba/omim/deployments","created_at":"2015-09-30T10:45:37Z","updated_at":"2015-09-30T10:48:10Z","pushed_at":"2016-02-29T09:43:48Z","git_url":"git://github.com/deathbaba/omim.git","ssh_url":"git@github.com:deathbaba/omim.git","clone_url":"https://github.com/deathbaba/omim.git","svn_url":"https://github.com/deathbaba/omim","homepage":null,"size":2186444,"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":"mapsme:new-search","ref":"new-search","sha":"4ddd6504626254906fed51449fd7425912965352","user":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"repo":{"id":42798033,"name":"omim","full_name":"mapsme/omim","owner":{"login":"mapsme","id":14185141,"avatar_url":"https://avatars.githubusercontent.com/u/14185141?v=3","gravatar_id":"","url":"https://api.github.com/users/mapsme","html_url":"https://github.com/mapsme","followers_url":"https://api.github.com/users/mapsme/followers","following_url":"https://api.github.com/users/mapsme/following{/other_user}","gists_url":"https://api.github.com/users/mapsme/gists{/gist_id}","starred_url":"https://api.github.com/users/mapsme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapsme/subscriptions","organizations_url":"https://api.github.com/users/mapsme/orgs","repos_url":"https://api.github.com/users/mapsme/repos","events_url":"https://api.github.com/users/mapsme/events{/privacy}","received_events_url":"https://api.github.com/users/mapsme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapsme/omim","description":"MAPS.ME - Offline OpenStreetMap maps for iOS/Android/Mac/Linux/Windows","fork":false,"url":"https://api.github.com/repos/mapsme/omim","forks_url":"https://api.github.com/repos/mapsme/omim/forks","keys_url":"https://api.github.com/repos/mapsme/omim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapsme/omim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapsme/omim/teams","hooks_url":"https://api.github.com/repos/mapsme/omim/hooks","issue_events_url":"https://api.github.com/repos/mapsme/omim/issues/events{/number}","events_url":"https://api.github.com/repos/mapsme/omim/events","assignees_url":"https://api.github.com/repos/mapsme/omim/assignees{/user}","branches_url":"https://api.github.com/repos/mapsme/omim/branches{/branch}","tags_url":"https://api.github.com/repos/mapsme/omim/tags","blobs_url":"https://api.github.com/repos/mapsme/omim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapsme/omim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapsme/omim/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapsme/omim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapsme/omim/statuses/{sha}","languages_url":"https://api.github.com/repos/mapsme/omim/languages","stargazers_url":"https://api.github.com/repos/mapsme/omim/stargazers","contributors_url":"https://api.github.com/repos/mapsme/omim/contributors","subscribers_url":"https://api.github.com/repos/mapsme/omim/subscribers","subscription_url":"https://api.github.com/repos/mapsme/omim/subscription","commits_url":"https://api.github.com/repos/mapsme/omim/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapsme/omim/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapsme/omim/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapsme/omim/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapsme/omim/contents/{+path}","compare_url":"https://api.github.com/repos/mapsme/omim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapsme/omim/merges","archive_url":"https://api.github.com/repos/mapsme/omim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapsme/omim/downloads","issues_url":"https://api.github.com/repos/mapsme/omim/issues{/number}","pulls_url":"https://api.github.com/repos/mapsme/omim/pulls{/number}","milestones_url":"https://api.github.com/repos/mapsme/omim/milestones{/number}","notifications_url":"https://api.github.com/repos/mapsme/omim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapsme/omim/labels{/name}","releases_url":"https://api.github.com/repos/mapsme/omim/releases{/id}","deployments_url":"https://api.github.com/repos/mapsme/omim/deployments","created_at":"2015-09-20T02:57:13Z","updated_at":"2016-02-28T13:54:59Z","pushed_at":"2016-02-29T10:29:09Z","git_url":"git://github.com/mapsme/omim.git","ssh_url":"git@github.com:mapsme/omim.git","clone_url":"https://github.com/mapsme/omim.git","svn_url":"https://github.com/mapsme/omim","homepage":null,"size":2232681,"stargazers_count":1635,"watchers_count":1635,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":225,"mirror_url":null,"open_issues_count":121,"forks":225,"open_issues":121,"watchers":1635,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1957"},"html":{"href":"https://github.com/mapsme/omim/pull/1957"},"issue":{"href":"https://api.github.com/repos/mapsme/omim/issues/1957"},"comments":{"href":"https://api.github.com/repos/mapsme/omim/issues/1957/comments"},"review_comments":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1957/comments"},"review_comment":{"href":"https://api.github.com/repos/mapsme/omim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapsme/omim/pulls/1957/commits"},"statuses":{"href":"https://api.github.com/repos/mapsme/omim/statuses/105d9651ee4c5066a7cff30444c818867788386f"}}}}