[my-place] Forgotten data to detected places database add. 06/94406/1
authorMarcin Masternak <m.masternak@samsung.com>
Fri, 28 Oct 2016 15:13:32 +0000 (17:13 +0200)
committerMarcin Masternak <m.masternak@samsung.com>
Fri, 28 Oct 2016 15:13:32 +0000 (17:13 +0200)
Change-Id: I6df5a35b1ea04c4d820bd04460bc0b668749e6ad
Signed-off-by: Marcin Masternak <m.masternak@samsung.com>
src/my-place/facade/UserPlaces.cpp
src/my-place/place/PlacesDetector.cpp

index e989ab7..01b0683 100755 (executable)
@@ -108,6 +108,7 @@ ctx::Json ctx::UserPlaces::__composeJson(std::vector<std::shared_ptr<Place>> pla
                placeJson.set(NULL, PLACE_CREATE_DATE, static_cast<int64_t>(place->createDate));
                data.append(NULL, PLACE_DATA_READ, placeJson);
        }
+       _J("returns ", data);
        return data;
 }
 
index 5ecd6eb..03fd1d5 100644 (file)
@@ -253,9 +253,17 @@ std::shared_ptr<ctx::Place> ctx::PlacesDetector::__placeFromMergedVisits(Visits
        }
        std::shared_ptr<MacSet> allMacs = macSetsUnion(macSets);
        __mergeLocation(mergedVisits, *place);
-
        PlaceCateger::categorize(mergedVisits, *place);
 
+       /*
+        * At this stage getting network names associated with Wifi AP MAC addresses is not needed (by looking
+        * to Wifi APs MAC addresses to network names map in database). This additional information for place
+        * is needed only when place is returned for external clients (getting straight from the database).
+        */
+       for (ctx::Mac mac : *allMacs) {
+               place->wifiAps.insert(std::pair<std::string, std::string>(mac, ""));
+       }
+
        return place;
 }