changed how to count length of maps_item_list 48/99848/3
authorchanywa <cbible.kim@samsung.com>
Thu, 24 Nov 2016 08:39:26 +0000 (17:39 +0900)
committerchanywa <cbible.kim@samsung.com>
Thu, 24 Nov 2016 08:52:07 +0000 (17:52 +0900)
Change-Id: I26132462c445da42550e8a353f425fa4f3ab5119

inc/here_utils.h
maps-plugin-here.changes
packaging/maps-plugin-here.spec
src/here_place.cpp
src/here_route.cpp
src/here_utils.cpp

index d016639..f1a5af8 100644 (file)
@@ -31,6 +31,7 @@
 #include <maps_route_maneuver.h>
 #include <maps_service.h>
 #include <maps_view.h>
+#include <maps_extra_types.h>
 
 //plug-in header
 #include "here_types.h"
@@ -84,9 +85,9 @@
        MAPS_CHECK_CONDITION(arg != NULL, MAPS_ERROR_INVALID_PARAMETER, "MAPS_ERROR_INVALID_PARAMETER")
 
 #define MAPS_PRINT_ERROR_CODE_RETURN(code) \
-       do{ \
+       do { \
                MAPS_LOGE("%s(0x%08x)", #code, code); \
-               return code;    \
+               return code; \
        } while (0)
 
 #ifndef TIZEN_MIGRATION
@@ -95,14 +96,13 @@ typedef std::string Uri;
 typedef std::wstring WString;
 #endif
 
-#define maps_item_list_items(item_list) g_list_length((GList*)(*(unsigned long*)item_list)  )
-
 extern "C"
 {
        int ConvertToMapsError(int nRet);
        int ConvertToHereError(int nRet);
        const char* ConverHereErrorToString(int nErr);
        const char* ConvertMapsErrorToChar(int nErr);
+       int GetMapsItemListLength(maps_item_list_h list);
 }
 
 HERE_PLUGIN_BEGIN_NAMESPACE
index e6b233f..1a0b97e 100644 (file)
@@ -1,3 +1,8 @@
+[Version]   maps-plugin-here_0.3.11
+[Date]      24 Nov 2016
+[Title]     fixed some problems to support 64bit OS
+[Developer] Seechan Kim <cbible.kim@samsung.com>
+
 [Version]   maps-plugin-here_0.3.10
 [Date]      14 Nov 2016
 [Title]     changed connection timeout from 20 seconds to 120 seconds
index 45c9a9c..985222d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       maps-plugin-here
 Summary:    Tizen HERE Maps Plug-in Library
-Version:    0.3.10
+Version:    0.3.11
 Release:    1
 Group:      Location/Libraries
 License:    Apache-2.0 and HERE
index d87e806..02c7bda 100644 (file)
@@ -798,7 +798,7 @@ void HerePlace::ProcessPlaceContacts(PlaceDetails herePlace, maps_place_h mapsPl
                maps_place_contact_destroy(mapsCont);
        }
 
-       if (maps_item_list_items(mapsContList)) {
+       if (GetMapsItemListLength(mapsContList)) {
                maps_place_set_contacts(mapsPlace, mapsContList);
                maps_item_list_remove_all(mapsContList, maps_place_contact_destroy);
        }
@@ -847,7 +847,7 @@ void HerePlace::ProcessPlaceCategories(PlaceDetails herePlace, maps_place_h maps
                maps_place_category_destroy(mapsCate);
        }
 
-       if (maps_item_list_items(mapsCateList)) {
+       if (GetMapsItemListLength(mapsCateList)) {
                maps_place_set_categories(mapsPlace, mapsCateList);
                maps_item_list_remove_all(mapsCateList, maps_place_category_destroy);
        }
@@ -911,7 +911,7 @@ void HerePlace::ProcessPlaceImages(PlaceDetails herePlace, maps_place_h mapsPlac
                maps_place_image_destroy(mapsImage);
        }
 
-       if (maps_item_list_items(mapsImageList)) {
+       if (GetMapsItemListLength(mapsImageList)) {
                maps_place_set_images(mapsPlace, mapsImageList);
                maps_item_list_remove_all(mapsImageList, maps_place_image_destroy);
        }
@@ -956,7 +956,7 @@ void HerePlace::ProcessPlaceDetails(PlaceDetails herePlace, maps_place_h mapsPla
                maps_place_editorial_destroy(mapsEdit);
        }
 
-       if (maps_item_list_items(mapsEditList)) {
+       if (GetMapsItemListLength(mapsEditList)) {
                maps_place_set_editorials(mapsPlace, mapsEditList);
                maps_item_list_remove_all(mapsEditList, maps_place_editorial_destroy);
        }
@@ -1032,7 +1032,7 @@ void HerePlace::ProcessPlaceReviews(PlaceDetails herePlace, maps_place_h mapsPla
                maps_place_review_destroy(mapsReview);
        }
 
-       if (maps_item_list_items(mapsReviewList)) {
+       if (GetMapsItemListLength(mapsReviewList)) {
                maps_place_set_reviews(mapsPlace, mapsReviewList);
                maps_item_list_remove_all(mapsReviewList, maps_place_review_destroy);
        }
@@ -1129,7 +1129,7 @@ void HerePlace::ProcessPlaceAttributes(PlaceDetails herePlace, maps_place_h maps
                maps_place_attribute_destroy(mapsAttribute);
        }
 
-       if (maps_item_list_items(mapsAttributeList)) {
+       if (GetMapsItemListLength(mapsAttributeList)) {
                maps_place_set_attributes(mapsPlace, mapsAttributeList);
                maps_item_list_remove_all(mapsAttributeList, maps_place_attribute_destroy);
        }
@@ -1246,7 +1246,7 @@ void HerePlace::__flushReplies(int error)
                }
 
                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);
+                       ((maps_service_search_place_list_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, GetMapsItemListLength(placeList), placeList, m_pUserData);
                else
                        maps_place_list_destroy(placeList);
        } else {
index 7b3e2b5..b547068 100644 (file)
@@ -283,7 +283,7 @@ void HereRoute::OnRouteReply(const GeoRouteReply& Reply)
                                        }
                                }
 
-                               if (maps_item_list_items(mapsPathList)) {
+                               if (GetMapsItemListLength(mapsPathList)) {
                                        maps_route_set_path(mapsRoute, mapsPathList);
                                        maps_item_list_remove_all(mapsPathList, maps_coordinates_destroy);
                                }
@@ -359,7 +359,7 @@ maps_error_e HereRoute::ProcessSegments(maps_route_h mapsRoute, const RouteSegme
                maps_route_segment_destroy(mapsSegm);
        }
 
-       if (maps_item_list_items(mapsSegmList)) {
+       if (GetMapsItemListLength(mapsSegmList)) {
                maps_route_set_segments(mapsRoute, mapsSegmList);
                maps_item_list_remove_all(mapsSegmList, maps_route_segment_destroy);
        }
@@ -393,7 +393,7 @@ maps_error_e HereRoute::ProcessSegmentsPath(maps_route_segment_h mapsSegm, const
                }
        }
 
-       if (maps_item_list_items(mapsPathList)) {
+       if (GetMapsItemListLength(mapsPathList)) {
                maps_route_segment_set_path(mapsSegm, mapsPathList);
                maps_item_list_remove_all(mapsPathList, maps_coordinates_destroy);
        }
@@ -446,7 +446,7 @@ maps_error_e HereRoute::ProcessManeuver(maps_route_segment_h mapsSegm, const Man
                maps_route_maneuver_destroy(mapsManeuver);
        }
 
-       if (maps_item_list_items(mapsManeList)) {
+       if (GetMapsItemListLength(mapsManeList)) {
                maps_route_segment_set_maneuvers(mapsSegm, mapsManeList);
                maps_item_list_remove_all(mapsManeList, maps_route_maneuver_destroy);
        }
index 8e9275e..e209fb8 100644 (file)
@@ -111,6 +111,13 @@ const char* ConvertMapsErrorToChar(int nErr)
        }
        return "MAPS_ERROR_UNKNOWN";
 }
+
+int GetMapsItemListLength(maps_item_list_h list)
+{
+       int length = 0;
+       maps_item_list_get_length(list, &length);
+       return length;
+}
 }