From: chanywa Date: Thu, 24 Nov 2016 06:11:51 +0000 (+0900) Subject: patch to support 64 bit OS X-Git-Tag: submit/tizen_3.0/20161124.113335^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F99782%2F1;p=platform%2Fcore%2Flocation%2Fmaps-plugin-here.git patch to support 64 bit OS Change-Id: Ie516d944dc4e4940db066c34a65d823db6174f27 --- diff --git a/inc/engine/finder/BaseFinderReply.h b/inc/engine/finder/BaseFinderReply.h index c9f7568..a483cc4 100644 --- a/inc/engine/finder/BaseFinderReply.h +++ b/inc/engine/finder/BaseFinderReply.h @@ -34,7 +34,10 @@ public: enum ReplyType { RT_Discovery = 0, // Indicates a reply to a discovery query. - RT_PlaceDetails // Indicates a reply to a request for place details. + RT_PlaceDetails, // Indicates a reply to a request for place details. +#ifdef TIZEN_CUSTOMIZATION + RT_Categories // Indicates a reply to a request for categories. +#endif }; /** * This method is the constructor. diff --git a/inc/engine/finder/CategoriesQuery.h b/inc/engine/finder/CategoriesQuery.h new file mode 100755 index 0000000..bcd2351 --- /dev/null +++ b/inc/engine/finder/CategoriesQuery.h @@ -0,0 +1,197 @@ +/* + * Copyright (C) 2013 HERE Global B.V. All rights reserved. + * This software, including documentation, is protected by copyright controlled by + * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing, + * storing, adapting or translating, any or all of this material requires the prior + * written consent of HERE Global B.V. You may use this + * Software in accordance with the terms and conditions defined in the + * HERE Location Platform Services Terms and Conditions, available at + * http://developer.here.com/terms-conditions-base + * + * As an additional permission to the above, you may distribute Software, + * in object code format as part of an Application, according to, and subject to, terms and + * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement. + * You may distribute such object code format Application under terms of your choice, + * provided that the header and source files of the Software have not been modified. + */ + +#ifndef CATEGORIES_QUERY_H_ +#define CATEGORIES_QUERY_H_ + +#include "common/HereMaps_global.h" +#include "common/BaseQuery.h" +#include "finder/Category.h" +#include "common/GeoBoundingArea.h" + +#ifdef TIZEN_CUSTOMIZATION +HERE_MAPS_BEGIN_NAMESPACE + +class QueryListener; +class GeoCoordinates; +class FinderQueryListener; +class FinderError; + +/** + * This class encapsulates a places discovery query. + * + * \ingroup finder + */ +class EXPORT_API CategoriesQuery : public BaseQuery +{ +public: + /** + * This enumeration defines identifiers for the supported discovery query + * types. + */ + enum QueryType + { + QT_PLACES = 0, ///< Indicates a query that searches for places. + QT_CUISINES, ///< Indicates a query that searches for cuisines. + }; + + /** + * This enumeration defines identifiers for the supported discovery query + * result types. + */ + /* + * The identifiers are not valid for search QueryTypes. + */ + enum ResultTypes + { + SIT_CATEGORY = 0, ///< Indicates that the result contains only category items + }; + +public: + + /** + * This method is the default constructor. + */ + CategoriesQuery(); + + /** + * This method is a constructor. It constructs a valid CategoriesQuery from + * a URL provided by the caller. + * + * @param sUrl A constant reference to the URL of the location whose details + * are to be retrieved from the server + */ + CategoriesQuery(const String& sUrl); + + /** + * This method is the (virtual) destructor. + */ + virtual ~CategoriesQuery(); + + /** + * This method retrieves a value indicating the query type. + * + * @return A value indicating the query type. + */ + QueryType GetType() const; + + /** + * This method sets the query type. + * + * @param eType A value indicating the query type. + */ + void SetType(QueryType eType); + + /** + * This method retrieves the search proximity. + * + * @return An object containing the geographic coordinates of the location + * around which the search is/was to be conducted and within whose + * proximity the results must lie. + */ + GeoCoordinates GetProximity() const; + + /** + * This method sets search proximity. + * + * @param rCoord An object containing the geographic coordinates of the + * location around which the search is/was to be conducted and within + * whose proximity the results must lie. + */ + void SetProximity(const GeoCoordinates& rCoord); + + /** + * This method retrieves a BCP 47 identifier of the search language. + * + * @return A string containing a BCP 47 identifier of the language. + */ + String GetLanguage() const; + + /** + * This method sets the langauge, using a BCP 47 langauge code. + * + * @param sSearch A constant reference to a string containing a BCP 47 + * identifier of the language. + */ + void SetLanguage(const String& sLang); + + + /** + * This method attempts to establish a connection + * with the server and then, if the connection has been established, it + * builds and submits a query. + * + * @param rDst A reference to an object that is to be notified when the + * reply to the query has arrived from the server. + * + * @param pUserData A pointer to user data to be passed back within the + * corresponding reply object. + * + * @return Identifier of issued request. + */ + RestItemHandle::RequestId Execute(FinderQueryListener& rListener, Tizen::Maps::HereObject* pUserData = NULL) const; + + /** + * This method retrieves error information associated with the query. + * + * @return A constant pointer to an object containing the error details. + */ + const FinderError* GetError() const; + + /** + * This static method returns the base URI to be used for all subsequent + * discovery queries. + * + * @return A string containing the base URI. + */ + static String GetBaseUri(); + + /** + * This static method returns the base URI to be used for all subsequent + * discovery queries. + * + * @param sUri A constant reference to a string containing the base URI. + */ + static void SetBaseUri(const String& sUri); + +private: + + /** + * This method creates the URI for the request. + * + * @return URI request string. + */ + String CreateUri() const; + + bool AppendService(CategoriesQuery::QueryType eType, String& sDst) const; + +private: + HERE_MAPS_NO_COPY_NO_ASSIGN(CategoriesQuery); + + class CategoriesQueryImpl; + CategoriesQueryImpl* m_pImpl; + + friend class CategoriesReply; + + static String s_sBaseUri; + +}; + +HERE_MAPS_END_NAMESPACE +#endif + +#endif // CATEGORIES_QUERY_H_ diff --git a/inc/engine/finder/CategoriesReply.h b/inc/engine/finder/CategoriesReply.h new file mode 100755 index 0000000..0a9dd16 --- /dev/null +++ b/inc/engine/finder/CategoriesReply.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2013 HERE Global B.V. All rights reserved. + * This software, including documentation, is protected by copyright controlled by + * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing, + * storing, adapting or translating, any or all of this material requires the prior + * written consent of HERE Global B.V. You may use this + * Software in accordance with the terms and conditions defined in the + * HERE Location Platform Services Terms and Conditions, available at + * http://developer.here.com/terms-conditions-base + * + * As an additional permission to the above, you may distribute Software, + * in object code format as part of an Application, according to, and subject to, terms and + * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement. + * You may distribute such object code format Application under terms of your choice, + * provided that the header and source files of the Software have not been modified. + */ + +#ifndef CATEGORIES_REPLY_H_ +#define CATEGORIES_REPLY_H_ + +#include "finder/BaseFinderReply.h" +#include "finder/CategoriesQuery.h" + +HERE_MAPS_BEGIN_NAMESPACE + +/** + * This class encapsulates a response to a discovery query. The response is a + * page of link objects, each containing information about one place. It also + * includes a link to the next page of results, if available. + * + * \ingroup finder + */ +class EXPORT_API CategoriesReply : public BaseFinderReply +{ +public: + + /** + * This is the default constructor. + */ + CategoriesReply(); + + /** + * This is the (virtual) destructor. + */ + virtual ~CategoriesReply(); + + /** + * This method retrieves a list of search result items that can lead an + * application user to detailed information about specific places. + * + * @return A vector of instances of SearchItem which represent + * individual search results. + */ + CategoryList GetCategoryList() const; + +private: + void SetCategoryList(const CategoryList&); + +private: + HERE_MAPS_NO_COPY_NO_ASSIGN(CategoriesReply); + + virtual bool OnDataReceived(const unsigned char* pBuffer, size_t uSize); + + class CategoriesReplyImpl; + CategoriesReplyImpl* m_pImpl; + + friend class JsonParser; +}; + +HERE_MAPS_END_NAMESPACE + +#endif // CATEGORIES_REPLY_H_ diff --git a/inc/engine/finder/FinderQueryListener.h b/inc/engine/finder/FinderQueryListener.h old mode 100644 new mode 100755 index 9a84d48..e5f8fcb --- a/inc/engine/finder/FinderQueryListener.h +++ b/inc/engine/finder/FinderQueryListener.h @@ -26,6 +26,9 @@ HERE_MAPS_BEGIN_NAMESPACE class DiscoveryReply; class PlaceDetailsReply; +#ifdef TIZEN_CUSTOMIZATION +class CategoriesReply; +#endif /** * This class encapsulates an object that is notified when a response to a query @@ -80,6 +83,23 @@ public: virtual void OnPlaceDetailsFailure(const PlaceDetailsReply& rReply) = 0; #endif + #ifdef TIZEN_CUSTOMIZATION + /** + * This method is a callback invoked when data have arrived in response to a + * categories request. + * + * @param rReply A constant reference to an object containing the response data. + */ + virtual void OnCategoriesReply(const CategoriesReply& rReply) = 0; + + /** + * This method is a callback invoked when categories request is failed. + * + * @param rReply A Constant reference to an object containing the response data. + */ + virtual void OnCategoriesFailure(const CategoriesReply& rReply) = 0; + #endif + private: HERE_MAPS_NO_COPY_NO_ASSIGN(FinderQueryListener); diff --git a/inc/engine/internal/JsonParser.h b/inc/engine/internal/JsonParser.h old mode 100644 new mode 100755 index 0ca02e2..1b9fcd6 --- a/inc/engine/internal/JsonParser.h +++ b/inc/engine/internal/JsonParser.h @@ -66,6 +66,9 @@ class Ratings; class GeoBoundingBox; class SearchContext; class FinderError; +#ifdef TIZEN_CUSTOMIZATION +class CategoriesReply; +#endif /** * Parses Places API Json data. @@ -94,6 +97,17 @@ public: */ static bool ParsePlaceResult( ByteBuffer& buf, PlaceDetails& place_data, FinderError*& error); +#ifdef TIZEN_CUSTOMIZATION + /** + * Parse categories result. + * @param json_stream ByteBuffer. + * @param place_data Parsed categories data. + * @param error A pointer to an object that is populated + * with error information should parsing fail. + */ + static bool ParseCategoriesSearch( ByteBuffer& buf, CategoriesReply& results_page, FinderError*& pError ); +#endif + private: static void ParseGeocodeSearch( ByteBuffer& json_stream, @@ -179,6 +193,9 @@ private: static void ParseAddress( IJsonValue* json_location, GeoLocation& loc ); static void ParsePlaceResults(JsonArray* pObject, PlaceItemList&, SearchItemList& ); +#ifdef TIZEN_CUSTOMIZATION + static void ParseCategoriesSearch( IJsonValue* pJsonValue, CategoriesReply& result ); +#endif private: static void GetStringValue(JsonObject* pObject, const String& sKey, String& value ); diff --git a/inc/engine/maps/GeoTiledMap.h b/inc/engine/maps/GeoTiledMap.h old mode 100644 new mode 100755 index de73f2d..ed8af45 --- a/inc/engine/maps/GeoTiledMap.h +++ b/inc/engine/maps/GeoTiledMap.h @@ -498,6 +498,14 @@ public: * @return true if the scale bar is enabled, otherwise false. */ bool GetScalebar() const; + + /** + * This method sets position of logo of the map. + * + * @param xFactor The propotional x-position of the logo [0.0~1.0]. + * @param yFactor The propotional y-position of the logo [0.0~1.0]. + */ + void SetLogoPosition(double xFactor, double yFactor); #endif #ifdef TIZEN_SUPPORT_TILE_FILE_CACHE diff --git a/inc/here_place.h b/inc/here_place.h index 419e5a7..3f1430c 100644 --- a/inc/here_place.h +++ b/inc/here_place.h @@ -93,6 +93,9 @@ public: virtual void OnPlaceDetailsReply(const PlaceDetailsReply &Reply); virtual void OnPlaceDetailsFailure(const PlaceDetailsReply& Reply); + virtual void OnCategoriesReply(const CategoriesReply &Reply); + virtual void OnCategoriesFailure(const CategoriesReply& Reply); + private: void ProcessPlaceLocation(PlaceDetails herePlace, maps_place_h mapsPlace); void ProcessPlaceContacts(PlaceDetails herePlace, maps_place_h mapsPlace); diff --git a/lib/aarch64/libheremaps-engine.so.1 b/lib/aarch64/libheremaps-engine.so.1 index 98450dc..1146358 120000 --- a/lib/aarch64/libheremaps-engine.so.1 +++ b/lib/aarch64/libheremaps-engine.so.1 @@ -1 +1 @@ -libheremaps-engine.so.1.0.6_22 \ No newline at end of file +libheremaps-engine.so.1.0.6_23 \ No newline at end of file diff --git a/lib/aarch64/libheremaps-engine.so.1.0.6_22 b/lib/aarch64/libheremaps-engine.so.1.0.6_22 deleted file mode 100755 index ab532e9..0000000 Binary files a/lib/aarch64/libheremaps-engine.so.1.0.6_22 and /dev/null differ diff --git a/lib/aarch64/libheremaps-engine.so.1.0.6_23 b/lib/aarch64/libheremaps-engine.so.1.0.6_23 new file mode 100755 index 0000000..a098503 Binary files /dev/null and b/lib/aarch64/libheremaps-engine.so.1.0.6_23 differ diff --git a/lib/arm/libheremaps-engine.so.1 b/lib/arm/libheremaps-engine.so.1 index 98450dc..1146358 120000 --- a/lib/arm/libheremaps-engine.so.1 +++ b/lib/arm/libheremaps-engine.so.1 @@ -1 +1 @@ -libheremaps-engine.so.1.0.6_22 \ No newline at end of file +libheremaps-engine.so.1.0.6_23 \ No newline at end of file diff --git a/lib/arm/libheremaps-engine.so.1.0.6_22 b/lib/arm/libheremaps-engine.so.1.0.6_22 deleted file mode 100755 index 896b7e9..0000000 Binary files a/lib/arm/libheremaps-engine.so.1.0.6_22 and /dev/null differ diff --git a/lib/arm/libheremaps-engine.so.1.0.6_23 b/lib/arm/libheremaps-engine.so.1.0.6_23 new file mode 100755 index 0000000..cb0e933 Binary files /dev/null and b/lib/arm/libheremaps-engine.so.1.0.6_23 differ diff --git a/lib/i586/libheremaps-engine.so.1 b/lib/i586/libheremaps-engine.so.1 index 98450dc..1146358 120000 --- a/lib/i586/libheremaps-engine.so.1 +++ b/lib/i586/libheremaps-engine.so.1 @@ -1 +1 @@ -libheremaps-engine.so.1.0.6_22 \ No newline at end of file +libheremaps-engine.so.1.0.6_23 \ No newline at end of file diff --git a/lib/i586/libheremaps-engine.so.1.0.6_22 b/lib/i586/libheremaps-engine.so.1.0.6_22 deleted file mode 100755 index d21fded..0000000 Binary files a/lib/i586/libheremaps-engine.so.1.0.6_22 and /dev/null differ diff --git a/lib/i586/libheremaps-engine.so.1.0.6_23 b/lib/i586/libheremaps-engine.so.1.0.6_23 new file mode 100755 index 0000000..2abbd14 Binary files /dev/null and b/lib/i586/libheremaps-engine.so.1.0.6_23 differ diff --git a/lib/x86_64/libheremaps-engine.so.1 b/lib/x86_64/libheremaps-engine.so.1 index 98450dc..1146358 120000 --- a/lib/x86_64/libheremaps-engine.so.1 +++ b/lib/x86_64/libheremaps-engine.so.1 @@ -1 +1 @@ -libheremaps-engine.so.1.0.6_22 \ No newline at end of file +libheremaps-engine.so.1.0.6_23 \ No newline at end of file diff --git a/lib/x86_64/libheremaps-engine.so.1.0.6_22 b/lib/x86_64/libheremaps-engine.so.1.0.6_22 deleted file mode 100755 index 865d5bb..0000000 Binary files a/lib/x86_64/libheremaps-engine.so.1.0.6_22 and /dev/null differ diff --git a/lib/x86_64/libheremaps-engine.so.1.0.6_23 b/lib/x86_64/libheremaps-engine.so.1.0.6_23 new file mode 100755 index 0000000..16b9a70 Binary files /dev/null and b/lib/x86_64/libheremaps-engine.so.1.0.6_23 differ diff --git a/src/here_place.cpp b/src/here_place.cpp index f9ef2b4..d87e806 100644 --- a/src/here_place.cpp +++ b/src/here_place.cpp @@ -665,6 +665,14 @@ void HerePlace::OnPlaceDetailsFailure(const PlaceDetailsReply& Reply) } } +void HerePlace::OnCategoriesReply(const CategoriesReply &Reply) +{ +} + +void HerePlace::OnCategoriesFailure(const CategoriesReply& Reply) +{ +} + void HerePlace::ProcessPlaceLocation(PlaceDetails herePlace, maps_place_h mapsPlace) { GeoLocation hereLocation = herePlace.GetLocation();