<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.heremaps-uc" api-version="2.4" version="1.0.0" install-location="internal-only">
<label>HereMaps UC</label>
- <author email="youngae.kang@samsung.com" href="www.samsung.com">Youngae kang</author>
+ <author email="cbible.kim@samsung.com" href="www.samsung.com">Seechan Kim</author>
<author email="jongmun.woo@samsung.com" href="www.samsung.com">JongMun Woo</author>
<description>HereMaps User Consent application</description>
<privileges>
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
- * Contact: Jongmun Woo <jongmun.woo@samsung.com>, Young-Ae Kang <youngae.kang@samsung.com>
+ * Contact: Jongmun Woo <jongmun.woo@samsung.com>, Seechan Kim <cbible.kim@samsung.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* \ingroup finder
*/
-class ExtendedAttribute
+class EXPORT_API ExtendedAttribute
{
public:
/**
static void ParseAddress( JsonObject* json_data, Address& address );
+#ifdef TIZEN_MIGRATION
+ static void ParseContacts( JsonArray* json_data, ContactDetailsList& contacts );
+
static void ParseContacts( JsonArray* json_data, const String& key,
ContactDetailsList& contacts );
-#ifndef TIZEN_MIGRATION
+
+ static void ParseLinkObject( JsonObject* json_data, LinkObject& link_object );
+#else
+ static void ParseContacts( JsonArray* json_data, const String& key,
+ ContactDetailsList& contacts );
+
static void ParseLinkObject( IJsonValue* json_data,
const char* object_name,
LinkObject& link_object );
-#endif
+
static void ParseLinkObject( JsonObject* json_data, LinkObject& link_object );
-#ifndef TIZEN_MIGRATION
+
static void ParseLinkObject( JsonObject* json_data,
const char* object_name,
LinkObject& link_object );
bool CreateDetachedThread(void* (*pFunc)(void*), void *pArgs);
#ifdef TIZEN_SUPPORT_CRYPTO_LOCK
- static void CRYPTO_MutexLock(int mode, int type, char *file, int line);
- static void CRYPTO_InitMutexLocks(void);
- static void CRYPTO_KillMutexLocks(void);
- static unsigned long CRYPTO_ThreadId(void);
+ static void CryptoMutexLock(int mode, int type, char *file, int line);
+ static void CryptoInitMutexLocks(void);
+ static void CryptoKillMutexLocks(void);
+ static unsigned long CryptoThreadId(void);
#endif
class RestCurlImpl;
*
* @return A value indicating z-order to the bitmap.
*/
- int GetZorder() const;
+ int GetZOrder() const;
/**
* This method sets the marker z-order.
*
* @param nZorder A constant value of z-order.
*/
- void SetZorder(int nZorder);
+ void SetZOrder(int nZorder);
#endif
private:
void AbortLoading();
#ifdef TIZEN_SUPPORT_LIMIT_RETRYING_FETCHING_TILES
- int GetTryCount();
+ int GetTryCount() const;
- int SetTryCount(int cnt);
+ int SetTryCount(int count);
#endif
private:
MT_Normal_Day_Custom,
MT_Normal_Night,
MT_Normal_Night_Grey,
- MT_Pedestrian_Day,
- MT_Pedestrian_Day_Mobile,
- MT_Pedestrian_Night,
- MT_Pedestrian_Night_Mobile,
- MT_Carnav_Day_Grey,
MT_Normal_Day_Mobile,
MT_Normal_Day_Grey_Mobile,
MT_Normal_Day_Transit_Mobile,
MT_Normal_Night_Transit_Mobile,
MT_Normal_Night_Mobile,
MT_Normal_Night_Grey_Mobile,
- MT_Reduced_Day,
- MT_Reduced_Night,
MT_Hybrid_Day_Transit,
MT_Hybrid_Grey_Day,
MT_Hybrid_Traffic_Day,
MT_Hybrid_Day_Mobile,
MT_Terrain_Day_Mobile,
+ MT_Pedestrian_Day,
+ MT_Pedestrian_Day_Mobile,
+ MT_Pedestrian_Night,
+ MT_Pedestrian_Night_Mobile,
+ MT_Reduced_Day,
+ MT_Reduced_Night,
+ MT_Carnav_Day_Grey,
#endif
MT_Last_Entry_Undefined ///< Indicates that the map type is not
/// defined.
*
* @return A value indicating the maximum map zoom level.
*/
- void SetMaximumZoomLevel(double zoom);
+ void SetMaximumZoomLevel(double zoomLevel);
#endif
/**
*
* @return An pointer indicating the bitmap of the root tile.
*/
- DrawableBitmapPtr GetRootPixmap();
+ DrawableBitmapPtr GetRootPixmap() const;
/**
* This method sets a pointer of a structure of the Evas GL API object that
*
* @return A value indicating the angle of the map.
*/
- double GetAngle();
+ double GetAngle() const;
/**
* This method sets a Boolean value indicating if the scale bar is enabled or not.
* @return A value indicating the MetricSystem selector for
* the given query.
*/
- GeoRouteQuery::MetricSystem GetMetricSystem(void);
+ GeoRouteQuery::MetricSystem GetMetricSystem(void) const;
/**
* This method sets the bounding area for the given query.
* @return A value indicating the bounding area for
* the given query.
*/
- GeoBoundingBox GetViewBounds(void);
+ GeoBoundingBox GetViewBounds(void) const;
/**
* This method sets a value that indicates the maximum number of alternative routes
typedef std::list<TileCache> TileCacheList;
+/**
+ *
+ * This class encapsulates a caching system for map tiles based on the file system.
+ *
+ */
+
class TileFetcherCache
{
public:
+ /**
+ * This method is the default constructor.
+ */
TileFetcherCache();
+ /**
+ * This method is the (virtual) destructor.
+ */
virtual ~TileFetcherCache();
+ /**
+ * This method is to get the instance of this class.
+ */
static TileFetcherCache& GetInstance();
+ /**
+ * This method is to clear caching system.
+ */
void shutdown();
+ /**
+ * This method is to remove a tile having the hash.
+ */
bool remove(const int hash);
+ /**
+ * This method is to check if there is a tile having the hash.
+ */
bool isFound(const int hash);
+ /**
+ * This method is to get the iterator of a tile having the hash.
+ */
TileCacheList::iterator find(const int hash);
+ /**
+ * This method is to read a tile having the hash from own file system.
+ *
+ * @param hash A value of hash indicating the tile
+ * @param buffer A buffer to store the map tile
+ * @param size A size of map tile (bytes)
+ */
unsigned long read(const int hash, unsigned char *&buffer, unsigned long &size);
+ /**
+ * This method is to write a tile having the hash to own file system.
+ *
+ * @param hash A value of hash indicating the tile
+ * @param buffer A buffer stored the map tile
+ * @param size A size of map tile (bytes)
+ */
unsigned long write(const int hash, const unsigned char *buffer, const unsigned long size);
+ /**
+ * This method is to clear all of cache files.
+ */
void clearCache();
- Here::Maps::RestItemHandle::RequestId load(const Here::Maps::TileKey &rKey, Here::Maps::TileFetcherQueryListener &rListener);
-
+ /**
+ * This method is to abort the request to get a tile from the cache.
+ */
void abort(void *pArg);
+ /**
+ * This method is to request to get a tile from the cache.
+ */
void fire(void *pArg);
private:
HERE_MAPS_NO_COPY_NO_ASSIGN(TileFetcherCache);
+ /**
+ * This method is to initialize the cache by scanning and building the list of already cached tiles.
+ */
void __initCache();
+ /**
+ * This method is to compare hit rates of tiles to decide which one will be removed.
+ */
static bool __compareTileCache(const TileCache& first, const TileCache& second);
+ /**
+ * This method is to check if more tiles can be stored.
+ */
bool __checkCapacity(void);
+ /**
+ * This method is to check if more tiles can be stored with only free space.
+ */
bool __isAvailableSpace(void);
+ /**
+ * This method is to check if more tiles can be stored with only the count of tiles.
+ */
bool __isAvailableCount(void);
+ /**
+ * This method is to get the path where tile files are stored in.
+ */
bool __getCachePath(char *path, int size);
+ /**
+ * This method is to get the path of the tile.
+ */
bool __getFilePath(const int hash, char *path, int size);
+ /**
+ * This method is to get the path of the tile.
+ */
bool __getFilePath(const char *fname, char *path, int size);
+ /**
+ * This method is to get the hash from the file name.
+ */
int __parseHash(const char *fname);
+ /**
+ * This method is a timer callback to delay loading time.
+ */
static gboolean __fireTimer(gpointer data);
+ /**
+ * This method is a timer callback to delay loading time.
+ */
static gboolean __fireIdler(gpointer data);
+ /**
+ * This method is a timer destroyer.
+ */
static void __timerDestroy(gpointer data);
+ /**
+ * This method is a timer destroyer.
+ */
static void __idlerDestroy(gpointer data);
//members
* @return A string containing the base URI.
*/
#ifdef TIZEN_MIGRATION
- String GetBaseUri();
+ String GetBaseUri() const;
#else
static String GetBaseUri();
#endif
#include <maps_place_link_object_plugin.h>
#include <maps_place_editorial_plugin.h>
#include <maps_place_review_plugin.h>
+#include <maps_place_attribute_plugin.h>
#include <maps_place_category.h>
//map engine header
#include <finder/LinkObject.h>
#include <finder/Ratings.h>
#include <finder/RelatedItem.h>
+#include <finder/ExtendedAttribute.h>
#include <common/GeoLocation.h>
#include <common/Address.h>
private:
void ProcessPlaceLocation(PlaceDetails herePlace, maps_place_h mapsPlace);
- void ProcessPlaceContact(PlaceDetails herePlace, maps_place_h mapsPlace);
- void ProcessPlaceCategory(PlaceDetails herePlace, maps_place_h mapsPlace);
- void ProcessPlaceImage(PlaceDetails herePlace, maps_place_h mapsPlace);
+ void ProcessPlaceContacts(PlaceDetails herePlace, maps_place_h mapsPlace);
+ void ProcessPlaceCategories(PlaceDetails herePlace, maps_place_h mapsPlace);
+ void ProcessPlaceImages(PlaceDetails herePlace, maps_place_h mapsPlace);
void ProcessPlaceDetails(PlaceDetails herePlace, maps_place_h mapsPlace);
void ProcessPlaceReviews(PlaceDetails herePlace, maps_place_h mapsPlace);
void ProcessPlaceRatings(PlaceDetails herePlace, maps_place_h mapsPlace);
void ProcessPlaceRated(PlaceDetails herePlace, maps_place_h mapsPlace);
+ void ProcessPlaceAttributes(PlaceDetails herePlace, maps_place_h mapsPlace);
void __sortList(PlaceList &list);
void __flushReplies(int error);
-libheremaps-engine.so.1.0.6_13
\ No newline at end of file
+libheremaps-engine.so.1.0.6_14
\ No newline at end of file
-libheremaps-engine.so.1.0.6_13
\ No newline at end of file
+libheremaps-engine.so.1.0.6_14
\ No newline at end of file
-libheremaps-engine.so.1.0.6_13
\ No newline at end of file
+libheremaps-engine.so.1.0.6_14
\ No newline at end of file
-libheremaps-engine.so.1.0.6_13
\ No newline at end of file
+libheremaps-engine.so.1.0.6_14
\ No newline at end of file
/* location */
ProcessPlaceLocation(herePlace, mapsPlace);
- ProcessPlaceContact(herePlace, mapsPlace);
+ ProcessPlaceContacts(herePlace, mapsPlace);
- ProcessPlaceCategory(herePlace, mapsPlace);
+ ProcessPlaceCategories(herePlace, mapsPlace);
/* tags */
/* maps & here not supported */
- ProcessPlaceImage(herePlace, mapsPlace);
+ ProcessPlaceImages(herePlace, mapsPlace);
ProcessPlaceDetails(herePlace, mapsPlace);
ProcessPlaceRated(herePlace, mapsPlace);
+ ProcessPlaceAttributes(herePlace, mapsPlace);
+
if (!isPending)
m_PlaceList.push_back(mapsPlace);
}
-void HerePlace::ProcessPlaceContact(PlaceDetails herePlace, maps_place_h mapsPlace)
+void HerePlace::ProcessPlaceContacts(PlaceDetails herePlace, maps_place_h mapsPlace)
{
/* contact */
ContactDetailsList hereContList = herePlace.GetContactDetails();
}
if (is_valid)
- maps_item_list_append(mapsContList, mapsCont,
- maps_place_contact_clone);
+ maps_item_list_append(mapsContList, mapsCont, maps_place_contact_clone);
maps_place_contact_destroy(mapsCont);
}
maps_item_list_destroy(mapsContList);
}
-void HerePlace::ProcessPlaceCategory(PlaceDetails herePlace, maps_place_h mapsPlace)
+void HerePlace::ProcessPlaceCategories(PlaceDetails herePlace, maps_place_h mapsPlace)
{
CategoryList hereCateList = herePlace.GetCategories();
CategoryList::iterator hereCate;
if (maps_item_list_create(&mapsCateList) != MAPS_ERROR_NONE) return;
- // maps-service supports only one category
- hereCate = hereCateList.begin();
- if (maps_place_category_create(&mapsCate) == MAPS_ERROR_NONE)
- {
+ for (hereCate = hereCateList.begin(); hereCate != hereCateList.end(); hereCate++) {
+ if (maps_place_category_create(&mapsCate) != MAPS_ERROR_NONE) continue;
+
+ is_valid = false;
+
if (!hereCate->GetCategoryId().ToString().empty()) {
error = maps_place_category_set_id(mapsCate,
hereCate->GetCategoryId().ToString().c_str());
is_valid |= (error == MAPS_ERROR_NONE);
}
- if (is_valid) {
+ if (is_valid)
maps_item_list_append(mapsCateList, mapsCate, maps_place_category_clone);
- }
+
maps_place_category_destroy(mapsCate);
}
maps_item_list_destroy(mapsCateList);
}
-void HerePlace::ProcessPlaceImage(PlaceDetails herePlace, maps_place_h mapsPlace)
+void HerePlace::ProcessPlaceImages(PlaceDetails herePlace, maps_place_h mapsPlace)
{
ImageContentList hereImageList = herePlace.GetImageContent();
ImageContentList::iterator hereImage;
maps_place_link_object_destroy(mapsRelated);
}
+void HerePlace::ProcessPlaceAttributes(PlaceDetails herePlace, maps_place_h mapsPlace)
+{
+ ExtendedAttributeList hereAttributeList = herePlace.GetExtendedAttributes();
+ ExtendedAttributeList::iterator hereAttribute;
+ maps_item_list_h mapsAttributeList;
+ maps_place_attribute_h mapsAttribute;
+ int error;
+ bool is_valid = false;
+
+ if (hereAttributeList.empty()) return;
+
+ if (maps_item_list_create(&mapsAttributeList) != MAPS_ERROR_NONE) return;
+
+ for (hereAttribute = hereAttributeList.begin(); hereAttribute != hereAttributeList.end(); hereAttribute++) {
+ if (maps_place_attribute_create(&mapsAttribute) != MAPS_ERROR_NONE) continue;
+
+ is_valid = false;
+
+ if (!hereAttribute->GetAttributeType().empty()) {
+ error = maps_place_attribute_set_id(mapsAttribute,
+ (char*)hereAttribute->GetAttributeType().c_str());
+ is_valid |= (error == MAPS_ERROR_NONE);
+ }
+
+ if (!hereAttribute->GetLabel().empty()) {
+ error = maps_place_attribute_set_label(mapsAttribute,
+ (char*)hereAttribute->GetLabel().c_str());
+ is_valid |= (error == MAPS_ERROR_NONE);
+ }
+
+ if (!hereAttribute->GetText().empty()) {
+ error = maps_place_attribute_set_text(mapsAttribute,
+ (char*)hereAttribute->GetText().c_str());
+ is_valid |= (error == MAPS_ERROR_NONE);
+ }
+
+ if (is_valid)
+ maps_item_list_append(mapsAttributeList, mapsAttribute, maps_place_attribute_clone);
+
+ maps_place_attribute_destroy(mapsAttribute);
+ }
+
+ if (maps_item_list_items(mapsAttributeList)) {
+ maps_place_set_attributes(mapsPlace, mapsAttributeList);
+ maps_item_list_remove_all(mapsAttributeList, maps_place_attribute_destroy);
+ }
+
+ maps_item_list_destroy(mapsAttributeList);
+}
+
void HerePlace::__flushReplies(int error)
{
maps_place_h mapsPlace;
/* z-order */
int z_order = 0;
maps_view_object_marker_get_z_order(hMarker, &z_order);
- hereMarker->SetZorder(z_order);
+ hereMarker->SetZOrder(z_order);
} while (0);
if (img) evas_object_del(img);