From 7e5c677c0b5f13f09fdc7cba00cb983ed6a0b7cf Mon Sep 17 00:00:00 2001 From: Marcin Masternak Date: Wed, 2 Nov 2016 18:26:00 +0100 Subject: [PATCH] [my-place] Table creations change to synchronous. Change-Id: I672539d4e1c2eb5c936552c6842cdbdde148ca07 Signed-off-by: Marcin Masternak --- src/my-place/facade/UserPlaces.cpp | 2 +- src/my-place/place/PlacesDetector.cpp | 2 +- src/my-place/visit-detector/LocationLogger.cpp | 2 +- src/my-place/visit-detector/VisitDetector.cpp | 4 ++-- src/my-place/visit-detector/WifiLogger.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/my-place/facade/UserPlaces.cpp b/src/my-place/facade/UserPlaces.cpp index 01b0683..4fc6024 100755 --- a/src/my-place/facade/UserPlaces.cpp +++ b/src/my-place/facade/UserPlaces.cpp @@ -233,7 +233,7 @@ std::vector> ctx::UserPlaces::__placesFromJsons(std: void ctx::UserPlaces::__dbCreateMyPlaceSettingsTable() { DatabaseManager dbManager; - bool ret = dbManager.createTable(0, MYPLACE_SETTINGS_TABLE, __MYPLACE_SETTINGS_TABLE_COLUMNS); + bool ret = dbManager.createTableSync(MYPLACE_SETTINGS_TABLE, __MYPLACE_SETTINGS_TABLE_COLUMNS); _D("db: Myplace setting Table Creation Result: %s", ret ? "SUCCESS" : "FAIL"); } diff --git a/src/my-place/place/PlacesDetector.cpp b/src/my-place/place/PlacesDetector.cpp index 03fd1d5..31d0a3f 100644 --- a/src/my-place/place/PlacesDetector.cpp +++ b/src/my-place/place/PlacesDetector.cpp @@ -348,7 +348,7 @@ void ctx::PlacesDetector::__dbDeleteOlderWifiAPsThan(time_t threshold) void ctx::PlacesDetector::__dbCreateTable() { DatabaseManager dbManager; - bool ret = dbManager.createTable(0, PLACE_TABLE, __PLACE_TABLE_COLUMNS); + bool ret = dbManager.createTableSync(PLACE_TABLE, __PLACE_TABLE_COLUMNS); _D("db: place Table Creation Result: %s", ret ? "SUCCESS" : "FAIL"); } diff --git a/src/my-place/visit-detector/LocationLogger.cpp b/src/my-place/visit-detector/LocationLogger.cpp index 372ee74..6369694 100644 --- a/src/my-place/visit-detector/LocationLogger.cpp +++ b/src/my-place/visit-detector/LocationLogger.cpp @@ -176,7 +176,7 @@ void ctx::LocationLogger::__log(location_accessibility_state_e state) int ctx::LocationLogger::__dbCreateTable() { DatabaseManager dbManager; - bool ret = dbManager.createTable(0, LOCATION_TABLE, __LOCATION_CREATE_TABLE_COLUMNS, NULL, NULL); + bool ret = dbManager.createTableSync(LOCATION_TABLE, __LOCATION_CREATE_TABLE_COLUMNS); _D("%s -> Table Creation Request", ret ? "SUCCESS" : "FAIL"); return 0; } diff --git a/src/my-place/visit-detector/VisitDetector.cpp b/src/my-place/visit-detector/VisitDetector.cpp index 98460c2..ba431f6 100644 --- a/src/my-place/visit-detector/VisitDetector.cpp +++ b/src/my-place/visit-detector/VisitDetector.cpp @@ -387,10 +387,10 @@ std::shared_ptr ctx::VisitDetector::__getVisits() void ctx::VisitDetector::__dbCreateTables() { DatabaseManager dbManager; - bool ret = dbManager.createTable(0, VISIT_TABLE, __VISIT_TABLE_COLUMNS); + bool ret = dbManager.createTableSync(VISIT_TABLE, __VISIT_TABLE_COLUMNS); _D("db: Visit Table Creation Result: %s", ret ? "SUCCESS" : "FAIL"); - ret = dbManager.createTable(0, WIFI_APS_MAP_TABLE, __WIFI_APS_MAP_TABLE_COLUMNS); + ret = dbManager.createTableSync(WIFI_APS_MAP_TABLE, __WIFI_APS_MAP_TABLE_COLUMNS); _D("db: Wifi AP Map Table Creation Result: %s", ret ? "SUCCESS" : "FAIL"); } diff --git a/src/my-place/visit-detector/WifiLogger.cpp b/src/my-place/visit-detector/WifiLogger.cpp index 874f494..b46ecd9 100644 --- a/src/my-place/visit-detector/WifiLogger.cpp +++ b/src/my-place/visit-detector/WifiLogger.cpp @@ -37,7 +37,7 @@ int ctx::WifiLogger::__dbCreateTable() { DatabaseManager dbManager; - bool ret = dbManager.createTable(0, WIFI_TABLE, __WIFI_CREATE_TABLE_COLUMNS, NULL, NULL); + bool ret = dbManager.createTableSync(WIFI_TABLE, __WIFI_CREATE_TABLE_COLUMNS); _D("Table Creation Request: %s", ret ? "SUCCESS" : "FAIL"); return ret; } -- 2.7.4