Fixed that failed commands may not reply 01/64401/1
authorchanywa <cbible.kim@samsung.com>
Fri, 1 Apr 2016 03:21:01 +0000 (12:21 +0900)
committerchanywa <cbible.kim@samsung.com>
Fri, 1 Apr 2016 03:21:01 +0000 (12:21 +0900)
Change-Id: Ife8f58cd0fc134035e09a666a4aeec332c1aa2b8

CMakeLists.txt
inc/engine/common/HereMaps_global.h
inc/engine/graphic/Canvas.h
inc/engine/internal/GeoOpenGlRenderer.h
inc/here_place.h
src/here_multirevgeocode.cpp
src/here_place.cpp
src/here_plugin.cpp

index d037aad..df75516 100644 (file)
@@ -7,7 +7,20 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 SET(LIBDIR ${LIBDIR})
 
 # Dependencies
-SET(dependents "glib-2.0 gmodule-2.0 libxml-2.0 dlog capi-network-connection capi-appfw-app-manager capi-maps-service capi-appfw-application vconf")
+SET(dependents 
+       glib-2.0
+       gmodule-2.0
+       libxml-2.0
+       dlog
+       capi-maps-service
+       capi-network-connection
+       capi-appfw-app-manager
+       capi-appfw-application
+       evas
+       ecore-evas
+       elementary
+       vconf
+       )
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pkgs REQUIRED ${dependents})
index a13ea2f..3dd75c8 100755 (executable)
@@ -80,7 +80,6 @@ typedef unsigned char byte;
 #define HERE_MAPS_LOG_DBG_INFO(fmt,args...)  LOGD(fmt, ##args);
 #define HERE_MAPS_LOG_ERROR(fmt,args...)     LOGE(fmt, ##args);
 #define HERE_MAPS_LOG_WARNING(fmt,args...)   LOGW(fmt, ##args);
-#define HERE_MAPS_SECLOG(fmt,args...)  SECURE_LOGD(fmt, ##args)
 
 #define HERE_MAPS_RETURN_RESULT(cond,ret,fmt,args...)\
         if (!cond) {\
index 7c14229..175b243 100755 (executable)
@@ -30,26 +30,27 @@ TIZEN_MAPS_BEGIN_NAMESPACE
 class Canvas : public Object
 {
 public:
-    typedef std::vector<FloatPoint*> tPoint;
-    Canvas(void);
-    virtual ~Canvas(void);
-    result Construct(const BufferInfo& bufferInfo);
-    result FillPolygon(const Color& color, const tPoint& points);
-    result DrawPolyline(const tPoint& points);
-    result SetLineWidth(int width);
-    void SetForegroundColor(const Color& fgColor);
+
+       typedef std::vector<FloatPoint*> tPoint;
+       Canvas(void);
+       virtual ~Canvas(void);
+       result Construct(const BufferInfo& bufferInfo);
+       result FillPolygon(const Color& color, const tPoint& points);
+       result DrawPolyline(const tPoint& points);
+       result SetLineWidth(int width);
+       void SetForegroundColor(const Color& fgColor);
 protected:
-    void* _pNativeGfxEngine;
+       void* _pNativeGfxEngine;
 private:
-    unsigned long __ComposeColor(unsigned long color32, int opacity);
-    void __SetColor(cairo_t* pCairo, unsigned long composedColor);
-
-    unsigned long* __pBuffer;
-    unsigned long __fgColor;
-    int __lineWidth;
-    cairo_operator_t __cairo_operator;
-    Color __fgColorNative;
-    int __fgOpacity;
+       unsigned long __ComposeColor(unsigned long color32, int opacity);
+       void __SetColor(cairo_t* pCairo, unsigned long composedColor);
+
+       unsigned long* __pBuffer;
+       unsigned long __fgColor;
+       int __lineWidth;
+       cairo_operator_t __cairo_operator;
+       Color __fgColorNative;
+       int __fgOpacity;
 };
 
 TIZEN_MAPS_END_NAMESPACE
index 1686353..638443b 100755 (executable)
@@ -82,45 +82,45 @@ public:
                 unsigned int width,
                 unsigned int height);
 
-    /** 
+    /**
      * This method renders a square, using the rectangle and texture specified
-     * by the caller. 
-     * 
+     * by the caller.
+     *
      * @param aRect A constant reference to the rectangle to render.
-     * 
+     *
      * @param rTexture A constant reference to the texture object to apply.
-     * 
+     *
      * @param sx0 A value providing the x coordinate of the top left corner of
-     *        the rectangle in the tile grid. 
-     * 
+     *        the rectangle in the tile grid.
+     *
      * @param sy0 A value providing the y coordinate of the top left corner of
      *        the rectangle in the tile grid.
-     * 
+     *
      * @param sx1 A value providing the x coordinate of the bottom right corner of
      *        the rectangle in the tile grid.
-     * 
+     *
      * @param sy1 A value providing the y coordinate of the bottom right corner of
      *        the rectangle in the tile grid.
      */
     bool RenderQuad(const Tizen::Maps::FloatRectangle& aRect, const GlTexture& rTexture, float sx0=0.f, float sy0=1.f, float sx1=1.f, float sy1=0.f);
 
-    /** 
+    /**
      * This method renders a square, using the rectangle and texture specified
-     * by the caller. 
-     * 
+     * by the caller.
+     *
      * @param aRect A constant reference to the rectangle to render.
-     * 
+     *
      * @param uTexture A value of the id of the texture object to apply.
-     * 
+     *
      * @param sx0 A value providing the x coordinate of the top left corner of
-     *        the rectangle in the tile grid. 
-     * 
+     *        the rectangle in the tile grid.
+     *
      * @param sy0 A value providing the y coordinate of the top left corner of
      *        the rectangle in the tile grid.
-     * 
+     *
      * @param sx1 A value providing the x coordinate of the bottom right corner of
      *        the rectangle in the tile grid.
-     * 
+     *
      * @param sy1 A value providing the y coordinate of the bottom right corner of
      *        the rectangle in the tile grid.
      */
index 229c969..2a94c4b 100644 (file)
@@ -73,7 +73,7 @@ public:
        here_error_e PrepareDiscoveryPreference(maps_preference_h hPref);
        here_error_e PrepareDiscoveryFilter(maps_place_filter_h hFilter);
 
-       here_error_e StartDiscoveryPlace(maps_coordinates_h hCoord, int nDistance);
+       here_error_e StartDiscoveryPlace(maps_coordinates_h hCoord, const int nDistance);
        here_error_e StartDiscoveryPlace(maps_area_h hArea, const char *szAddr = "");
        here_error_e StartDiscoveryPlaceList(maps_area_h hArea);
 
index 0159b88..fb73077 100755 (executable)
@@ -41,7 +41,7 @@ here_error_e HereMultiRevGeocode::PrepareQuery()
        if (m_pQuery)
                return HERE_ERROR_PERMISSION_DENIED;
 
-       m_pQuery = new MultiReverseQuery();
+       m_pQuery = new (std::nothrow) MultiReverseQuery();
 
        if (!m_pQuery)
                return HERE_ERROR_OUT_OF_MEMORY;
index be5abd3..b3fd949 100644 (file)
@@ -184,8 +184,9 @@ here_error_e HerePlace::StartDiscoveryPlace(maps_coordinates_h hCoord, int nDist
        if (!hCoord || nDistance < 0)
                return HERE_ERROR_INVALID_PARAMETER;
 
+       int meters = (int)(HereUtils::ConvertDistance(nDistance, m_eDistanceUnit, MAPS_DISTANCE_UNIT_M) + 0.5);
        maps_area_h area = NULL;
-       maps_area_create_circle(hCoord, nDistance, &area);
+       maps_area_create_circle(hCoord, meters, &area);
        here_error_e error = StartDiscoveryPlace(area);
        maps_area_destroy(area);
        return error;
@@ -480,7 +481,8 @@ void HerePlace::OnDiscoverReply (const DiscoveryReply &Reply)
                        }
 
                        /* distance */
-                       maps_place_set_distance(mapsPlace, HereUtils::ConvertDistance((int)herePlaceIt->GetDistance(), m_eDistanceUnit));
+                       maps_place_set_distance(mapsPlace,
+                               HereUtils::ConvertDistance((int)herePlaceIt->GetDistance(), m_eDistanceUnit) + 0.5);
 
                        /* sponser */
                        /* herePlaceList.GetIsSponsored() */
@@ -1249,7 +1251,7 @@ void HerePlace::ProcessPlaceRated(PlaceDetails herePlace, maps_place_h mapsPlace
 void HerePlace::__flushReplies(int error)
 {
        maps_place_h mapsPlace;
-       maps_item_list_h place_list;
+       maps_item_list_h placeList = NULL;
 
        m_nReplyIdx = 0;
        __sortList(m_PlaceList);
@@ -1269,9 +1271,13 @@ void HerePlace::__flushReplies(int error)
        }
        else if (m_bReplyWithList)
        {
-               int error = maps_place_list_create(&place_list);
+               if (error == MAPS_ERROR_NONE)
+                       error = maps_place_list_create(&placeList);
+
                if (error != MAPS_ERROR_NONE)
                {
+                       if (placeList)
+                               maps_place_list_destroy(placeList);
                        ((maps_service_search_place_list_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, 0, NULL, m_pUserData);
                        return;
                }
@@ -1281,13 +1287,22 @@ void HerePlace::__flushReplies(int error)
                        mapsPlace = m_PlaceList.front();
                        m_PlaceList.pop_front();
 
-                       maps_item_list_append(place_list, mapsPlace, maps_place_clone);
+                       maps_item_list_append(placeList, mapsPlace, maps_place_clone);
                }
 
-               ((maps_service_search_place_list_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, maps_item_list_items(place_list), place_list, m_pUserData);
+               if (!m_bCanceled)
+                       ((maps_service_search_place_list_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, maps_item_list_items(placeList), placeList, m_pUserData);
+               else
+                       maps_place_list_destroy(placeList);
        }
        else
        {
+               if (error != MAPS_ERROR_NONE)
+               {
+                       ((maps_service_search_place_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, 0, 0, NULL, m_pUserData);
+                       return;
+               }
+
                while (m_nReplyIdx < m_nReplyCnt && !m_bCanceled && !m_PlaceList.empty())
                {
                        mapsPlace = m_PlaceList.front();
index 8bd60e4..b87d434 100644 (file)
@@ -108,6 +108,7 @@ EXPORT_API int maps_plugin_is_service_supported(maps_service_e service, bool *su
                case MAPS_SERVICE_CANCEL_REQUEST:
                case MAPS_SERVICE_MULTI_REVERSE_GEOCODE:
                case MAPS_SERVICE_SEARCH_PLACE_LIST:
+               case MAPS_SERVICE_SEARCH_GET_PLACE_DETAILS:
                        *supported = TRUE;
                        return MAPS_ERROR_NONE;
                default: