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.
--- /dev/null
+/*
+ * 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 <code>CategoriesQuery</code> 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_
--- /dev/null
+/*
+ * 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 <code>SearchItem</code> 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_
class DiscoveryReply;
class PlaceDetailsReply;
+#ifdef TIZEN_CUSTOMIZATION
+class CategoriesReply;
+#endif
/**
* This class encapsulates an object that is notified when a response to a query
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);
class GeoBoundingBox;
class SearchContext;
class FinderError;
+#ifdef TIZEN_CUSTOMIZATION
+class CategoriesReply;
+#endif
/**
* Parses Places API Json data.
*/
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,
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 );
* @return <code>true</code> if the scale bar is enabled, otherwise <code>false</code>.
*/
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
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);
-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
-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
-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
-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
}
}
+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();