From a0809aff66b376e62fa85c5e302279117f0b5a58 Mon Sep 17 00:00:00 2001 From: Marcin Masternak Date: Fri, 27 May 2016 19:39:35 +0200 Subject: [PATCH] [my-place] Move shared types to context-common. Change-Id: I3fbed99328a88246ce14922cdf2038f3ec4d04e8 Signed-off-by: Marcin Masternak --- src/my-place/place_recognition_types.h | 8 ------ src/my-place/user_places/debug_utils.h | 2 +- src/my-place/user_places/place_categer.h | 1 + src/my-place/user_places/places_detector.h | 1 + src/my-place/user_places/user_places_types.h | 26 +------------------- 5 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/my-place/place_recognition_types.h b/src/my-place/place_recognition_types.h index 9b211a8..4036693 100644 --- a/src/my-place/place_recognition_types.h +++ b/src/my-place/place_recognition_types.h @@ -76,14 +76,6 @@ #define PLACE_WIFI_APS "WifiAPs" #define PLACE_CREATE_DATE "CreateDate" -// Data values -enum PlaceCategId { - PLACE_CATEG_ID_NONE = 0, - PLACE_CATEG_ID_HOME = 1, - PLACE_CATEG_ID_WORK = 2, - PLACE_CATEG_ID_OTHER = 3 -}; - enum PlaceRecogMode { PLACE_RECOG_HIGH_ACCURACY_MODE = 0, PLACE_RECOG_LOW_POWER_MODE = 1 diff --git a/src/my-place/user_places/debug_utils.h b/src/my-place/user_places/debug_utils.h index 1e0965d..5505e82 100644 --- a/src/my-place/user_places/debug_utils.h +++ b/src/my-place/user_places/debug_utils.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include namespace ctx { diff --git a/src/my-place/user_places/place_categer.h b/src/my-place/user_places/place_categer.h index de2c657..9632f6f 100644 --- a/src/my-place/user_places/place_categer.h +++ b/src/my-place/user_places/place_categer.h @@ -21,6 +21,7 @@ #include #include #include +#include #include "../place_recognition_types.h" namespace ctx { diff --git a/src/my-place/user_places/places_detector.h b/src/my-place/user_places/places_detector.h index 2cb0e41..0cf6885 100644 --- a/src/my-place/user_places/places_detector.h +++ b/src/my-place/user_places/places_detector.h @@ -23,6 +23,7 @@ #include #include "visit_detector.h" #include "user_places_types.h" +#include namespace ctx { diff --git a/src/my-place/user_places/user_places_types.h b/src/my-place/user_places/user_places_types.h index 7c20d97..e2cc437 100644 --- a/src/my-place/user_places/user_places_types.h +++ b/src/my-place/user_places/user_places_types.h @@ -26,6 +26,7 @@ #include "../place_recognition_types.h" #include #include +#include namespace ctx { @@ -138,16 +139,6 @@ namespace ctx { typedef std::map Categs; // scores of categories - struct Location { - double latitude; - double longitude; - double accuracy; // [m] - - Location(double latitude_ = 0.0, double longitude_ = 0.0, double accuracy_ = -1.0) - : latitude(latitude_), longitude(longitude_), accuracy(accuracy_) {} - - }; /* struct Location */ - #ifdef TIZEN_ENGINEER_MODE enum LocationSource { LOCATION_METHOD_REQUEST = 0, @@ -202,21 +193,6 @@ namespace ctx { std::shared_ptr macSetFromMacs2Counts(const Macs2Counts &macs2Counts); - typedef float confidence_t; - - class Place { - - public: - PlaceCategId categId; // category of a place (work/home/other) - confidence_t categConfidence; // confidence of the above category - between [0,1] - std::string name; // for now: "work"/"home"/"other" - bool locationValid; - Location location; // makes sense if locationValid == true; - std::string wifiAps; // WiFi APs MAC addresses separated by "," - time_t createDate; // The last update time of this place - - }; /* class Place */ - } /* namespace ctx */ #endif /* End of _CONTEXT_PLACE_RECOGNITION_USER_PLACES_TYPES_H_ */ -- 2.34.1