[my-place] Move shared types to context-common. 37/71937/1
authorMarcin Masternak <m.masternak@samsung.com>
Fri, 27 May 2016 17:39:35 +0000 (19:39 +0200)
committerMarcin Masternak <m.masternak@samsung.com>
Fri, 27 May 2016 17:40:51 +0000 (19:40 +0200)
Change-Id: I3fbed99328a88246ce14922cdf2038f3ec4d04e8
Signed-off-by: Marcin Masternak <m.masternak@samsung.com>
src/my-place/place_recognition_types.h
src/my-place/user_places/debug_utils.h
src/my-place/user_places/place_categer.h
src/my-place/user_places/places_detector.h
src/my-place/user_places/user_places_types.h

index 9b211a80b52278100750861763acd38126331dd5..4036693e0588aad443087895cc9a6676ed58c714 100644 (file)
 #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
index 1e0965d6359b69b28ebefeb3b1dc02d7e2a4538d..5505e829cca953de03a61c8585e8f9b524e9f66f 100644 (file)
@@ -20,7 +20,7 @@
 #include <string>
 #include <ctime>
 #include <iostream>
-#include <user_places_types.h>
+#include <MyPlaceTypes.h>
 
 namespace ctx {
 
index de2c657f07b79680f80466fa8f99b01f56e646d4..9632f6f48d225bc42a5ee771e32baa7d8fb2e7fd 100644 (file)
@@ -21,6 +21,7 @@
 #include <utility>
 #include <vector>
 #include <string>
+#include <MyPlaceTypes.h>
 #include "../place_recognition_types.h"
 
 namespace ctx {
index 2cb0e41fbb20d586c665ffb629f9dc8de9e1ef20..0cf6885d0197299e3a8f68e027e960df74c0b50d 100644 (file)
@@ -23,6 +23,7 @@
 #include <DatabaseManager.h>
 #include "visit_detector.h"
 #include "user_places_types.h"
+#include <MyPlaceTypes.h>
 
 namespace ctx {
 
index 7c20d9791d25c1db2bc9bc55625635aea2435abd..e2cc43771573c1d2183fb85aba6a092ddf48260a 100644 (file)
@@ -26,6 +26,7 @@
 #include "../place_recognition_types.h"
 #include <string>
 #include <ctime>
+#include <MyPlaceTypes.h>
 
 namespace ctx {
 
@@ -138,16 +139,6 @@ namespace ctx {
 
        typedef std::map<int, num_t> 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<MacSet> 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_ */