From 06d27523dc116aa65e357f48672b05e436246c58 Mon Sep 17 00:00:00 2001 From: Marcin Masternak Date: Thu, 9 Jun 2016 12:12:17 +0200 Subject: [PATCH] [my-place] Refactoring: Code separation. Change-Id: Ib307b93b832f5011be8f9e88fcf407e55176d831 Signed-off-by: Marcin Masternak --- .../{user_places => facade}/user_places.cpp | 3 +- .../{user_places => facade}/user_places.h | 4 +- .../user_places_params.h | 0 .../user_places_types.cpp | 2 +- .../user_places_types.h | 59 +++++++++++++- src/my-place/{user_places => place}/graph.cpp | 0 src/my-place/{user_places => place}/graph.h | 0 .../{user_places => place}/place_categer.cpp | 7 +- .../{user_places => place}/place_categer.h | 3 +- .../places_detector.cpp | 13 ++- .../{user_places => place}/places_detector.h | 5 +- src/my-place/place_recognition.cpp | 1 - src/my-place/place_recognition.h | 3 +- src/my-place/place_recognition_types.h | 79 ------------------- .../{user_places => utils}/debug_utils.cpp | 0 .../{user_places => utils}/debug_utils.h | 0 src/my-place/{user_places => utils}/gmap.cpp | 0 src/my-place/{user_places => utils}/gmap.h | 3 +- .../{user_places => utils}/median.cpp | 0 src/my-place/{user_places => utils}/median.h | 3 +- .../{user_places => utils}/similarity.h | 2 +- .../{user_places => visit-categer}/mahal.cpp | 0 .../{user_places => visit-categer}/mahal.h | 2 +- .../piecewise_lin.cpp | 0 .../piecewise_lin.h | 2 +- .../prob_features_model.h | 0 .../visit_categer.cpp | 2 +- .../visit_categer.h | 3 +- .../location_listener_iface.h | 2 +- .../location_logger.cpp | 6 +- .../location_logger.h | 0 .../visit_detector.cpp | 15 ++-- .../visit_detector.h | 2 +- .../visit_listener_iface.h | 0 .../wifi_listener_iface.h | 2 +- .../wifi_logger.cpp | 4 +- .../wifi_logger.h | 2 +- 37 files changed, 102 insertions(+), 127 deletions(-) rename src/my-place/{user_places => facade}/user_places.cpp (99%) rename src/my-place/{user_places => facade}/user_places.h (94%) rename src/my-place/{user_places => facade}/user_places_params.h (100%) rename src/my-place/{user_places => facade}/user_places_types.cpp (99%) rename src/my-place/{user_places => facade}/user_places_types.h (63%) rename src/my-place/{user_places => place}/graph.cpp (100%) rename src/my-place/{user_places => place}/graph.h (100%) rename src/my-place/{user_places => place}/place_categer.cpp (96%) rename src/my-place/{user_places => place}/place_categer.h (94%) rename src/my-place/{user_places => place}/places_detector.cpp (98%) rename src/my-place/{user_places => place}/places_detector.h (96%) delete mode 100644 src/my-place/place_recognition_types.h rename src/my-place/{user_places => utils}/debug_utils.cpp (100%) rename src/my-place/{user_places => utils}/debug_utils.h (100%) rename src/my-place/{user_places => utils}/gmap.cpp (100%) rename src/my-place/{user_places => utils}/gmap.h (95%) rename src/my-place/{user_places => utils}/median.cpp (100%) rename src/my-place/{user_places => utils}/median.h (93%) rename src/my-place/{user_places => utils}/similarity.h (97%) rename src/my-place/{user_places => visit-categer}/mahal.cpp (100%) rename src/my-place/{user_places => visit-categer}/mahal.h (96%) rename src/my-place/{user_places => visit-categer}/piecewise_lin.cpp (100%) rename src/my-place/{user_places => visit-categer}/piecewise_lin.h (96%) rename src/my-place/{user_places => visit-categer}/prob_features_model.h (100%) rename src/my-place/{user_places => visit-categer}/visit_categer.cpp (99%) rename src/my-place/{user_places => visit-categer}/visit_categer.h (98%) rename src/my-place/{user_places => visit-detector}/location_listener_iface.h (96%) rename src/my-place/{user_places => visit-detector}/location_logger.cpp (99%) rename src/my-place/{user_places => visit-detector}/location_logger.h (100%) rename src/my-place/{user_places => visit-detector}/visit_detector.cpp (98%) rename src/my-place/{user_places => visit-detector}/visit_detector.h (99%) rename src/my-place/{user_places => visit-detector}/visit_listener_iface.h (100%) rename src/my-place/{user_places => visit-detector}/wifi_listener_iface.h (96%) rename src/my-place/{user_places => visit-detector}/wifi_logger.cpp (99%) rename src/my-place/{user_places => visit-detector}/wifi_logger.h (98%) diff --git a/src/my-place/user_places/user_places.cpp b/src/my-place/facade/user_places.cpp similarity index 99% rename from src/my-place/user_places/user_places.cpp rename to src/my-place/facade/user_places.cpp index 621a40a..830242f 100755 --- a/src/my-place/user_places/user_places.cpp +++ b/src/my-place/facade/user_places.cpp @@ -18,7 +18,7 @@ #include #include #include "user_places.h" -#include "places_detector.h" +#include "../place/places_detector.h" #include ctx::UserPlaces::UserPlaces(PlaceRecogMode energyMode): @@ -58,7 +58,6 @@ ctx::UserPlaces::~UserPlaces() __timerManager.remove(__placesDetectorTimerId); _D("PlacesDetector timer removed"); } - if (__visitDetector) delete __visitDetector; if (__placesDetector) diff --git a/src/my-place/user_places/user_places.h b/src/my-place/facade/user_places.h similarity index 94% rename from src/my-place/user_places/user_places.h rename to src/my-place/facade/user_places.h index 5d9b181..4a4dc25 100644 --- a/src/my-place/user_places/user_places.h +++ b/src/my-place/facade/user_places.h @@ -20,8 +20,8 @@ #include #include #include -#include "visit_detector.h" -#include "places_detector.h" +#include "../visit-detector/visit_detector.h" +#include "../place/places_detector.h" #include "user_places_types.h" namespace ctx { diff --git a/src/my-place/user_places/user_places_params.h b/src/my-place/facade/user_places_params.h similarity index 100% rename from src/my-place/user_places/user_places_params.h rename to src/my-place/facade/user_places_params.h diff --git a/src/my-place/user_places/user_places_types.cpp b/src/my-place/facade/user_places_types.cpp similarity index 99% rename from src/my-place/user_places/user_places_types.cpp rename to src/my-place/facade/user_places_types.cpp index f11a702..c995467 100644 --- a/src/my-place/user_places/user_places_types.cpp +++ b/src/my-place/facade/user_places_types.cpp @@ -22,7 +22,7 @@ #include #include "user_places_types.h" #include "user_places_params.h" -#include "debug_utils.h" +#include "../utils/debug_utils.h" #define __MAC_STRING_COMPONENTS_SEPARATOR ':' #define __MAC_SET_STRING_DELIMITER ',' diff --git a/src/my-place/user_places/user_places_types.h b/src/my-place/facade/user_places_types.h similarity index 63% rename from src/my-place/user_places/user_places_types.h rename to src/my-place/facade/user_places_types.h index db80bf1..43d7597 100644 --- a/src/my-place/user_places/user_places_types.h +++ b/src/my-place/facade/user_places_types.h @@ -22,12 +22,67 @@ #include #include #include -#include "graph.h" -#include "../place_recognition_types.h" #include #include #include +// Context Items +#define PLACE_PRIV_RECOGNITION "location" // TODO: unused? + +// Database +#define VISIT_TABLE "place_status_user_place_visit" +#define VISIT_COLUMN_START_TIME "start_time" +#define VISIT_COLUMN_END_TIME "end_time" +#define VISIT_COLUMN_WIFI_APS "wifi_aps" +#define VISIT_COLUMN_CATEGORY "category" +#ifdef TIZEN_ENGINEER_MODE +#define VISIT_COLUMN_START_TIME_HUMAN "start_time_human" // only for debug: human readable time data: +#define VISIT_COLUMN_END_TIME_HUMAN "end_time_human" // only for debug: human readable time data: +#endif /* TIZEN_ENGINEER_MODE */ +#define VISIT_COLUMN_LOCATION_VALID "location_valid" +#define VISIT_COLUMN_LOCATION_LATITUDE "location_latitude" +#define VISIT_COLUMN_LOCATION_LONGITUDE "location_longitude" +#define VISIT_COLUMN_LOCATION_ACCURACY "location_accuracy" +#define VISIT_COLUMN_CATEG_HOME "categ_home" +#define VISIT_COLUMN_CATEG_WORK "categ_work" +#define VISIT_COLUMN_CATEG_OTHER "categ_other" + +#define WIFI_APS_MAP_TABLE "place_status_user_place_wifi_aps_map" +#define WIFI_APS_MAP_COLUMN_MAC "mac" +#define WIFI_APS_MAP_COLUMN_NETWORK_NAME "network_name" +#define WIFI_APS_MAP_COLUMN_INSERT_TIME "insert_time" + +#define PLACE_TABLE "place_status_user_place" +#define PLACE_COLUMN_CATEG_ID "categ_id" +#define PLACE_COLUMN_CATEG_CONFIDENCE "categ_confidence" +#define PLACE_COLUMN_NAME "name" +#define PLACE_COLUMN_LOCATION_VALID "location_valid" +#define PLACE_COLUMN_LOCATION_LATITUDE "location_latitude" +#define PLACE_COLUMN_LOCATION_LONGITUDE "location_longitude" +#define PLACE_COLUMN_LOCATION_ACCURACY "location_accuracy" +#define PLACE_COLUMN_WIFI_APS "wifi_aps" +#define PLACE_COLUMN_CREATE_DATE "create_date" + +#define WIFI_TABLE_NAME "place_status_user_place_wifi" +#define WIFI_COLUMN_TIMESTAMP "timestamp" +#define WIFI_COLUMN_BSSID "bssid" +#define WIFI_COLUMN_ESSID "essid" + +#define LOCATION_TABLE_NAME "place_status_user_place_location" +#define LOCATION_COLUMN_LATITUDE "geo_latitude" +#define LOCATION_COLUMN_LONGITUDE "geo_longitude" +#define LOCATION_COLUMN_ACCURACY "accuracy" +#define LOCATION_COLUMN_TIMESTAMP "timestamp" +#ifdef TIZEN_ENGINEER_MODE +#define LOCATION_COLUMN_TIMESTAMP_HUMAN "time_human" // only for debug: human readable time data: +#define LOCATION_COLUMN_METHOD "method" +#endif /* TIZEN_ENGINEER_MODE */ + +enum PlaceRecogMode { + PLACE_RECOG_HIGH_ACCURACY_MODE = 0, + PLACE_RECOG_LOW_POWER_MODE = 1 +}; + namespace ctx { /* diff --git a/src/my-place/user_places/graph.cpp b/src/my-place/place/graph.cpp similarity index 100% rename from src/my-place/user_places/graph.cpp rename to src/my-place/place/graph.cpp diff --git a/src/my-place/user_places/graph.h b/src/my-place/place/graph.h similarity index 100% rename from src/my-place/user_places/graph.h rename to src/my-place/place/graph.h diff --git a/src/my-place/user_places/place_categer.cpp b/src/my-place/place/place_categer.cpp similarity index 96% rename from src/my-place/user_places/place_categer.cpp rename to src/my-place/place/place_categer.cpp index 05ebcfc..5c8da42 100644 --- a/src/my-place/user_places/place_categer.cpp +++ b/src/my-place/place/place_categer.cpp @@ -15,10 +15,9 @@ */ #include "place_categer.h" -#include "median.h" -#include "../place_recognition_types.h" -#include "user_places_params.h" -#include "user_places_types.h" +#include "../utils/median.h" +#include "../facade/user_places_params.h" +#include "../facade/user_places_types.h" #include #include diff --git a/src/my-place/user_places/place_categer.h b/src/my-place/place/place_categer.h similarity index 94% rename from src/my-place/user_places/place_categer.h rename to src/my-place/place/place_categer.h index 50df4b1..c5ba1c8 100644 --- a/src/my-place/user_places/place_categer.h +++ b/src/my-place/place/place_categer.h @@ -17,12 +17,11 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_PLACE_CATEGER_ #define _CONTEXT_PLACE_RECOGNITION_PLACE_CATEGER_ -#include "user_places_types.h" +#include "../facade/user_places_types.h" #include #include #include #include -#include "../place_recognition_types.h" namespace ctx { diff --git a/src/my-place/user_places/places_detector.cpp b/src/my-place/place/places_detector.cpp similarity index 98% rename from src/my-place/user_places/places_detector.cpp rename to src/my-place/place/places_detector.cpp index ff2556c..6b1dcbb 100644 --- a/src/my-place/user_places/places_detector.cpp +++ b/src/my-place/place/places_detector.cpp @@ -17,19 +17,18 @@ #include #include #include -#include "similarity.h" +#include "../utils/similarity.h" #include "places_detector.h" #include "place_categer.h" -#include "graph.h" -#include "median.h" +#include "../utils/median.h" #ifdef TIZEN_ENGINEER_MODE -#include "gmap.h" +#include "../utils/gmap.h" #endif /* TIZEN_ENGINEER_MODE */ -#include "../place_recognition_types.h" +#include "../facade/user_places_types.h" #include #include -#include "user_places_params.h" -#include "debug_utils.h" +#include "../facade/user_places_params.h" +#include "../utils/debug_utils.h" #define __DELETE_PLACES_QUERY "DELETE FROM " PLACE_TABLE diff --git a/src/my-place/user_places/places_detector.h b/src/my-place/place/places_detector.h similarity index 96% rename from src/my-place/user_places/places_detector.h rename to src/my-place/place/places_detector.h index bb4dab1..527fa40 100644 --- a/src/my-place/user_places/places_detector.h +++ b/src/my-place/place/places_detector.h @@ -21,9 +21,10 @@ #include #include #include -#include "visit_detector.h" -#include "user_places_types.h" +//#include "visit_detector.h" +#include "../facade/user_places_types.h" #include +#include "graph.h" namespace ctx { diff --git a/src/my-place/place_recognition.cpp b/src/my-place/place_recognition.cpp index ba9e4d1..7143743 100644 --- a/src/my-place/place_recognition.cpp +++ b/src/my-place/place_recognition.cpp @@ -15,7 +15,6 @@ */ #include "place_recognition.h" -#include "user_places/user_places.h" void ctx::PlaceRecognitionProvider::getPrivilege(std::vector &privilege) { diff --git a/src/my-place/place_recognition.h b/src/my-place/place_recognition.h index 729a8bc..d8fc410 100644 --- a/src/my-place/place_recognition.h +++ b/src/my-place/place_recognition.h @@ -19,7 +19,8 @@ #include #include "MyPlaceTypes.h" -#include "user_places/user_places.h" +#include "facade/user_places.h" +#include "ProviderTypes.h" namespace ctx { diff --git a/src/my-place/place_recognition_types.h b/src/my-place/place_recognition_types.h deleted file mode 100644 index b19777a..0000000 --- a/src/my-place/place_recognition_types.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef _CONTEXT_PLACE_RECOGNITION_TYPES_ -#define _CONTEXT_PLACE_RECOGNITION_TYPES_ - -#include - -// Context Items -#define PLACE_PRIV_RECOGNITION "location" - -// Database -#define VISIT_TABLE "place_status_user_place_visit" -#define VISIT_COLUMN_START_TIME "start_time" -#define VISIT_COLUMN_END_TIME "end_time" -#define VISIT_COLUMN_WIFI_APS "wifi_aps" -#define VISIT_COLUMN_CATEGORY "category" -#ifdef TIZEN_ENGINEER_MODE -#define VISIT_COLUMN_START_TIME_HUMAN "start_time_human" // only for debug: human readable time data: -#define VISIT_COLUMN_END_TIME_HUMAN "end_time_human" // only for debug: human readable time data: -#endif /* TIZEN_ENGINEER_MODE */ -#define VISIT_COLUMN_LOCATION_VALID "location_valid" -#define VISIT_COLUMN_LOCATION_LATITUDE "location_latitude" -#define VISIT_COLUMN_LOCATION_LONGITUDE "location_longitude" -#define VISIT_COLUMN_LOCATION_ACCURACY "location_accuracy" -#define VISIT_COLUMN_CATEG_HOME "categ_home" -#define VISIT_COLUMN_CATEG_WORK "categ_work" -#define VISIT_COLUMN_CATEG_OTHER "categ_other" - -#define WIFI_APS_MAP_TABLE "place_status_user_place_wifi_aps_map" -#define WIFI_APS_MAP_COLUMN_MAC "mac" -#define WIFI_APS_MAP_COLUMN_NETWORK_NAME "network_name" -#define WIFI_APS_MAP_COLUMN_INSERT_TIME "insert_time" - -#define PLACE_TABLE "place_status_user_place" -#define PLACE_COLUMN_CATEG_ID "categ_id" -#define PLACE_COLUMN_CATEG_CONFIDENCE "categ_confidence" -#define PLACE_COLUMN_NAME "name" -#define PLACE_COLUMN_LOCATION_VALID "location_valid" -#define PLACE_COLUMN_LOCATION_LATITUDE "location_latitude" -#define PLACE_COLUMN_LOCATION_LONGITUDE "location_longitude" -#define PLACE_COLUMN_LOCATION_ACCURACY "location_accuracy" -#define PLACE_COLUMN_WIFI_APS "wifi_aps" -#define PLACE_COLUMN_CREATE_DATE "create_date" - -#define WIFI_TABLE_NAME "place_status_user_place_wifi" -#define WIFI_COLUMN_TIMESTAMP "timestamp" -#define WIFI_COLUMN_BSSID "bssid" -#define WIFI_COLUMN_ESSID "essid" - -#define LOCATION_TABLE_NAME "place_status_user_place_location" -#define LOCATION_COLUMN_LATITUDE "geo_latitude" -#define LOCATION_COLUMN_LONGITUDE "geo_longitude" -#define LOCATION_COLUMN_ACCURACY "accuracy" -#define LOCATION_COLUMN_TIMESTAMP "timestamp" -#ifdef TIZEN_ENGINEER_MODE -#define LOCATION_COLUMN_TIMESTAMP_HUMAN "time_human" // only for debug: human readable time data: -#define LOCATION_COLUMN_METHOD "method" -#endif /* TIZEN_ENGINEER_MODE */ - -enum PlaceRecogMode { - PLACE_RECOG_HIGH_ACCURACY_MODE = 0, - PLACE_RECOG_LOW_POWER_MODE = 1 -}; - -#endif /* End of _CONTEXT_PLACE_RECOGNITION_TYPES_ */ diff --git a/src/my-place/user_places/debug_utils.cpp b/src/my-place/utils/debug_utils.cpp similarity index 100% rename from src/my-place/user_places/debug_utils.cpp rename to src/my-place/utils/debug_utils.cpp diff --git a/src/my-place/user_places/debug_utils.h b/src/my-place/utils/debug_utils.h similarity index 100% rename from src/my-place/user_places/debug_utils.h rename to src/my-place/utils/debug_utils.h diff --git a/src/my-place/user_places/gmap.cpp b/src/my-place/utils/gmap.cpp similarity index 100% rename from src/my-place/user_places/gmap.cpp rename to src/my-place/utils/gmap.cpp diff --git a/src/my-place/user_places/gmap.h b/src/my-place/utils/gmap.h similarity index 95% rename from src/my-place/user_places/gmap.h rename to src/my-place/utils/gmap.h index 7c758d6..e0e772b 100644 --- a/src/my-place/user_places/gmap.h +++ b/src/my-place/utils/gmap.h @@ -17,8 +17,7 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_GMAP_H_ #define _CONTEXT_PLACE_RECOGNITION_GMAP_H_ -#include "user_places_types.h" -#include "../place_recognition_types.h" +#include "../facade/user_places_types.h" #define GMAP_FILE "/tmp/user_places_map.html" diff --git a/src/my-place/user_places/median.cpp b/src/my-place/utils/median.cpp similarity index 100% rename from src/my-place/user_places/median.cpp rename to src/my-place/utils/median.cpp diff --git a/src/my-place/user_places/median.h b/src/my-place/utils/median.h similarity index 93% rename from src/my-place/user_places/median.h rename to src/my-place/utils/median.h index 90b6bdf..66c29e8 100644 --- a/src/my-place/user_places/median.h +++ b/src/my-place/utils/median.h @@ -17,9 +17,8 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_MEDIAN_ #define _CONTEXT_PLACE_RECOGNITION_MEDIAN_ -#include "user_places_types.h" +#include "../facade/user_places_types.h" #include -#include "../place_recognition_types.h" namespace ctx { diff --git a/src/my-place/user_places/similarity.h b/src/my-place/utils/similarity.h similarity index 97% rename from src/my-place/user_places/similarity.h rename to src/my-place/utils/similarity.h index 93054a8..a55924e 100644 --- a/src/my-place/user_places/similarity.h +++ b/src/my-place/utils/similarity.h @@ -17,7 +17,7 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_SIMILAR_H_ #define _CONTEXT_PLACE_RECOGNITION_SIMILAR_H_ -#include "user_places_types.h" +#include "../facade/user_places_types.h" namespace ctx { diff --git a/src/my-place/user_places/mahal.cpp b/src/my-place/visit-categer/mahal.cpp similarity index 100% rename from src/my-place/user_places/mahal.cpp rename to src/my-place/visit-categer/mahal.cpp diff --git a/src/my-place/user_places/mahal.h b/src/my-place/visit-categer/mahal.h similarity index 96% rename from src/my-place/user_places/mahal.h rename to src/my-place/visit-categer/mahal.h index dadf859..e254b12 100644 --- a/src/my-place/user_places/mahal.h +++ b/src/my-place/visit-categer/mahal.h @@ -18,7 +18,7 @@ #define _CONTEXT_PLACE_RECOGNITION_MAHAL_H_ #include -#include "user_places_types.h" +#include "../facade/user_places_types.h" namespace ctx { diff --git a/src/my-place/user_places/piecewise_lin.cpp b/src/my-place/visit-categer/piecewise_lin.cpp similarity index 100% rename from src/my-place/user_places/piecewise_lin.cpp rename to src/my-place/visit-categer/piecewise_lin.cpp diff --git a/src/my-place/user_places/piecewise_lin.h b/src/my-place/visit-categer/piecewise_lin.h similarity index 96% rename from src/my-place/user_places/piecewise_lin.h rename to src/my-place/visit-categer/piecewise_lin.h index 6195da6..f3e8a8e 100644 --- a/src/my-place/user_places/piecewise_lin.h +++ b/src/my-place/visit-categer/piecewise_lin.h @@ -17,7 +17,7 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_PIECEWISE_LIN_ #define _CONTEXT_PLACE_RECOGNITION_PIECEWISE_LIN_ -#include "user_places_types.h" +#include "../facade/user_places_types.h" namespace ctx { diff --git a/src/my-place/user_places/prob_features_model.h b/src/my-place/visit-categer/prob_features_model.h similarity index 100% rename from src/my-place/user_places/prob_features_model.h rename to src/my-place/visit-categer/prob_features_model.h diff --git a/src/my-place/user_places/visit_categer.cpp b/src/my-place/visit-categer/visit_categer.cpp similarity index 99% rename from src/my-place/user_places/visit_categer.cpp rename to src/my-place/visit-categer/visit_categer.cpp index 3b0805f..f73b0ef 100644 --- a/src/my-place/user_places/visit_categer.cpp +++ b/src/my-place/visit-categer/visit_categer.cpp @@ -17,7 +17,6 @@ #include "visit_categer.h" #include "mahal.h" #include -#include "../place_recognition_types.h" #include "prob_features_model.h" #include @@ -404,6 +403,7 @@ void ctx::VisitCateger::__normalize(std::vector &features) void ctx::VisitCateger::categorize(ctx::Visit &visit) { + _D(""); IntervalFeatures features = __intervalFeatures(visit.interval); __normalize(features); diff --git a/src/my-place/user_places/visit_categer.h b/src/my-place/visit-categer/visit_categer.h similarity index 98% rename from src/my-place/user_places/visit_categer.h rename to src/my-place/visit-categer/visit_categer.h index a457ca8..ac657ec 100644 --- a/src/my-place/user_places/visit_categer.h +++ b/src/my-place/visit-categer/visit_categer.h @@ -17,10 +17,11 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_VISIT_CATEGER_H_ #define _CONTEXT_PLACE_RECOGNITION_VISIT_CATEGER_H_ -#include "user_places_types.h" +#include "../facade/user_places_types.h" #include "mahal.h" #include "piecewise_lin.h" #include +#include namespace ctx { diff --git a/src/my-place/user_places/location_listener_iface.h b/src/my-place/visit-detector/location_listener_iface.h similarity index 96% rename from src/my-place/user_places/location_listener_iface.h rename to src/my-place/visit-detector/location_listener_iface.h index 4c3aca3..29a598a 100644 --- a/src/my-place/user_places/location_listener_iface.h +++ b/src/my-place/visit-detector/location_listener_iface.h @@ -17,7 +17,7 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_LOCATION_LISTENER_IFACE_H_ #define _CONTEXT_PLACE_RECOGNITION_LOCATION_LISTENER_IFACE_H_ -#include "user_places_types.h" +#include "../facade/user_places_types.h" namespace ctx { diff --git a/src/my-place/user_places/location_logger.cpp b/src/my-place/visit-detector/location_logger.cpp similarity index 99% rename from src/my-place/user_places/location_logger.cpp rename to src/my-place/visit-detector/location_logger.cpp index cdb7fb1..afdaafe 100644 --- a/src/my-place/user_places/location_logger.cpp +++ b/src/my-place/visit-detector/location_logger.cpp @@ -18,9 +18,9 @@ #include #include #include -#include "../place_recognition_types.h" -#include "user_places_params.h" -#include "debug_utils.h" +#include "../facade/user_places_types.h" +#include "../facade/user_places_params.h" +#include "../utils/debug_utils.h" #include "location_logger.h" #ifdef TIZEN_ENGINEER_MODE diff --git a/src/my-place/user_places/location_logger.h b/src/my-place/visit-detector/location_logger.h similarity index 100% rename from src/my-place/user_places/location_logger.h rename to src/my-place/visit-detector/location_logger.h diff --git a/src/my-place/user_places/visit_detector.cpp b/src/my-place/visit-detector/visit_detector.cpp similarity index 98% rename from src/my-place/user_places/visit_detector.cpp rename to src/my-place/visit-detector/visit_detector.cpp index 662c700..038d1b6 100644 --- a/src/my-place/user_places/visit_detector.cpp +++ b/src/my-place/visit-detector/visit_detector.cpp @@ -20,13 +20,13 @@ #include #include #include -#include "../place_recognition_types.h" +#include "../facade/user_places_types.h" #include "visit_detector.h" -#include "user_places_params.h" -#include "visit_categer.h" -#include "similarity.h" -#include "median.h" -#include "debug_utils.h" +#include "../facade/user_places_params.h" +#include "../visit-categer/visit_categer.h" +#include "../utils/similarity.h" +#include "../utils/median.h" +#include "../utils/debug_utils.h" #ifdef TIZEN_ENGINEER_MODE #define __VISIT_TABLE_COLUMNS \ @@ -485,3 +485,6 @@ void ctx::VisitDetector::setMode(PlaceRecogMode energyMode) if (__wifiLogger) __wifiLogger->setMode(energyMode); } + + + diff --git a/src/my-place/user_places/visit_detector.h b/src/my-place/visit-detector/visit_detector.h similarity index 99% rename from src/my-place/user_places/visit_detector.h rename to src/my-place/visit-detector/visit_detector.h index 613c554..92c68ec 100644 --- a/src/my-place/user_places/visit_detector.h +++ b/src/my-place/visit-detector/visit_detector.h @@ -22,7 +22,7 @@ #include #include #include -#include "user_places_types.h" +#include "../facade/user_places_types.h" #include #include #include "visit_listener_iface.h" diff --git a/src/my-place/user_places/visit_listener_iface.h b/src/my-place/visit-detector/visit_listener_iface.h similarity index 100% rename from src/my-place/user_places/visit_listener_iface.h rename to src/my-place/visit-detector/visit_listener_iface.h diff --git a/src/my-place/user_places/wifi_listener_iface.h b/src/my-place/visit-detector/wifi_listener_iface.h similarity index 96% rename from src/my-place/user_places/wifi_listener_iface.h rename to src/my-place/visit-detector/wifi_listener_iface.h index 281575f..98cff1e 100644 --- a/src/my-place/user_places/wifi_listener_iface.h +++ b/src/my-place/visit-detector/wifi_listener_iface.h @@ -17,7 +17,7 @@ #ifndef _CONTEXT_PLACE_RECOGNITION_WIFI_LISTENER_IFACE_H_ #define _CONTEXT_PLACE_RECOGNITION_WIFI_LISTENER_IFACE_H_ -#include "user_places_types.h" +#include "../facade/user_places_types.h" namespace ctx { diff --git a/src/my-place/user_places/wifi_logger.cpp b/src/my-place/visit-detector/wifi_logger.cpp similarity index 99% rename from src/my-place/user_places/wifi_logger.cpp rename to src/my-place/visit-detector/wifi_logger.cpp index e304a49..9872d86 100644 --- a/src/my-place/user_places/wifi_logger.cpp +++ b/src/my-place/visit-detector/wifi_logger.cpp @@ -17,8 +17,8 @@ #include #include #include -#include "../place_recognition_types.h" -#include "debug_utils.h" +#include "../facade/user_places_types.h" +#include "../utils/debug_utils.h" #include "wifi_logger.h" #define __WIFI_CREATE_TABLE_COLUMNS \ diff --git a/src/my-place/user_places/wifi_logger.h b/src/my-place/visit-detector/wifi_logger.h similarity index 98% rename from src/my-place/user_places/wifi_logger.h rename to src/my-place/visit-detector/wifi_logger.h index f167a4a..e3d03c3 100644 --- a/src/my-place/user_places/wifi_logger.h +++ b/src/my-place/visit-detector/wifi_logger.h @@ -24,7 +24,7 @@ #include #include "wifi_listener_iface.h" #include "visit_listener_iface.h" -#include "user_places_params.h" +#include "../facade/user_places_params.h" /* Database usage flag */ #define WIFI_LOGGER_DATABASE false -- 2.34.1