2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_get_date")]
23 internal static extern ErrorCode GetDate(this PlaceReviewHandle /* maps_place_review_h */ review, out string date);
25 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_get_title")]
26 internal static extern ErrorCode GetTitle(this PlaceReviewHandle /* maps_place_review_h */ review, out string title);
28 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_get_rating")]
29 internal static extern ErrorCode GetRating(this PlaceReviewHandle /* maps_place_review_h */ review, out double rating);
31 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_get_description")]
32 internal static extern ErrorCode GetDescription(this PlaceReviewHandle /* maps_place_review_h */ review, out string description);
34 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_get_language")]
35 internal static extern ErrorCode GetLanguage(this PlaceReviewHandle /* maps_place_review_h */ review, out string language);
37 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_get_media")]
38 internal static extern ErrorCode GetMedia(this PlaceReviewHandle /* maps_place_review_h */ review, out IntPtr /* maps_place_media_h */ media);
40 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_get_user_link")]
41 internal static extern ErrorCode GetUserLink(this PlaceReviewHandle /* maps_place_review_h */ review, out IntPtr /* maps_place_link_object_h */ user);
43 internal class PlaceReviewHandle : SafeMapsHandle
45 [DllImport(Libraries.MapService, EntryPoint = "maps_place_review_destroy")]
46 internal static extern ErrorCode Destroy(IntPtr /* maps_place_review_h */ review);
50 get { return NativeGet(this.GetDate); }
55 get { return NativeGet(this.GetTitle); }
57 internal string Language
59 get { return NativeGet(this.GetLanguage); }
61 internal string Description
63 get { return NativeGet(this.GetDescription); }
65 internal double Rating
67 get { return NativeGet<double>(this.GetRating); }
70 internal PlaceLinkObjectHandle User
72 get { return NativeGet(this.GetUserLink, PlaceLinkObjectHandle.Create); }
75 internal PlaceMediaHandle Media
77 get { return NativeGet(this.GetMedia, PlaceMediaHandle.Create); }
80 public PlaceReviewHandle(IntPtr handle, bool needToRelease) : base(handle, needToRelease, Destroy)