From 7e509e3b40cd5176a7979d8311a650d99084834c Mon Sep 17 00:00:00 2001 From: Mu-Woong Lee Date: Tue, 19 Apr 2016 20:02:53 +0900 Subject: [PATCH] Reorganize the directory structure of source files Source directories are roughly separated by their dependencies. Later, the build script will be updated to produce one shared object per one directory, and a dynamic loading routine will be applied. Change-Id: Iceaae6740cebc15a89ce0631f13b1254640b12c4 Signed-off-by: Mu-Woong Lee --- CMakeLists.txt | 70 +++++++++++++--- packaging/context-provider.spec | 31 +++----- src/CMakeLists.txt | 24 ------ src/{device => }/activity/Activity.h | 1 + src/{device => }/activity/ActivityBase.cpp | 0 src/{device => }/activity/ActivityBase.h | 2 +- src/{device => }/activity/ActivityTypes.h | 0 .../app => app-stats}/ActiveWindowMonitor.cpp | 0 .../app => app-stats}/ActiveWindowMonitor.h | 0 .../app => app-stats}/AppStatisticsTypes.h | 0 .../app => app-stats}/AppStatsLogger.cpp | 0 .../app => app-stats}/AppStatsLogger.h | 0 .../app => app-stats}/AppStatsProvider.cpp | 0 .../app => app-stats}/AppStatsProvider.h | 0 .../app => app-stats}/DbHandle.cpp | 0 src/{statistics/app => app-stats}/DbHandle.h | 0 src/{statistics/app => app-stats}/DbInit.cpp | 0 src/{statistics/app => app-stats}/DbInit.h | 0 .../app => app-stats}/InstallMonitor.cpp | 0 .../app => app-stats}/InstallMonitor.h | 0 .../AppInactiveDetector.cpp | 0 .../AppInactiveDetector.h | 0 .../AppInactiveDetectorTypes.h | 0 .../InactiveDetector.cpp | 0 .../app_inactive_detector/InactiveDetector.h | 0 .../InactiveDetectorClassificator.cpp | 0 .../InactiveDetectorClassificator.h | 0 .../InactiveDetectorClassificatorKmeans.cpp | 0 .../InactiveDetectorClassificatorKmeans.h | 0 ...InactiveDetectorClassificatorKmeansTypes.h | 0 .../InactiveDetectorStorage.cpp | 0 .../InactiveDetectorStorage.h | 0 .../InactiveDetectorStorageQueries.h | 0 .../InactiveDetectorWeight.cpp | 0 .../InactiveDetectorWeight.h | 0 src/{device/social => call}/Call.cpp | 1 - src/{device/social => call}/Call.h | 3 +- src/{device/social => contacts}/Contacts.cpp | 1 - src/{device/social => contacts}/Contacts.h | 3 +- src/device/CMakeLists.txt | 30 ------- src/{device/social => email}/Email.cpp | 1 - src/{device/social => email}/Email.h | 3 +- .../geofence/GeofenceMonitorHandle.cpp | 0 .../geofence/GeofenceMonitorHandle.h | 0 .../geofence/PlaceGeofenceProvider.cpp | 0 .../geofence/PlaceGeofenceProvider.h | 0 src/{place => }/geofence/PlaceGeofenceTypes.h | 0 .../system => headphone}/Headphone.cpp | 1 - src/{device/system => headphone}/Headphone.h | 9 ++- .../media => media-stats}/DbHandle.cpp | 0 .../media => media-stats}/DbHandle.h | 0 .../MediaContentMonitor.cpp | 0 .../MediaContentMonitor.h | 0 .../MediaStatisticsTypes.h | 0 .../MediaStatsLogger.cpp | 0 .../media => media-stats}/MediaStatsLogger.h | 0 .../MediaStatsProvider.cpp | 0 .../MediaStatsProvider.h | 0 src/{device/social => message}/Message.cpp | 1 - src/{device/social => message}/Message.h | 3 +- .../place_recognition.cpp | 0 .../place_recognition.h | 0 .../place_recognition_types.h | 0 .../user_places/debug_utils.cpp | 0 .../user_places/debug_utils.h | 0 .../user_places/gmap.cpp | 0 .../user_places/gmap.h | 0 .../user_places/graph.cpp | 0 .../user_places/graph.h | 0 .../user_places/location_listener_iface.h | 0 .../user_places/location_logger.cpp | 0 .../user_places/location_logger.h | 0 .../user_places/mahal.cpp | 0 .../user_places/mahal.h | 0 .../user_places/median.cpp | 0 .../user_places/median.h | 0 .../user_places/piecewise_lin.cpp | 0 .../user_places/piecewise_lin.h | 0 .../user_places/place_categer.cpp | 0 .../user_places/place_categer.h | 0 .../user_places/places_detector.cpp | 0 .../user_places/places_detector.h | 0 .../user_places/prob_features_model.h | 0 .../user_places/similarity.h | 0 .../user_places/user_places.cpp | 0 .../user_places/user_places.h | 0 .../user_places/user_places_params.h | 0 .../user_places/user_places_types.cpp | 0 .../user_places/user_places_types.h | 0 .../user_places/visit_categer.cpp | 0 .../user_places/visit_categer.h | 0 .../user_places/visit_detector.cpp | 0 .../user_places/visit_detector.h | 0 .../user_places/visit_listener_iface.h | 0 .../user_places/wifi_listener_iface.h | 0 .../user_places/wifi_logger.cpp | 0 .../user_places/wifi_logger.h | 0 src/place/CMakeLists.txt | 22 ------ .../prediction/assoc_rule.cpp | 0 src/{statistics => }/prediction/assoc_rule.h | 0 .../prediction/assoc_rule_miner.cpp | 0 .../prediction/assoc_rule_miner.h | 0 .../prediction/assoc_rule_of_ids.h | 0 .../prediction/assoc_rule_producer.cpp | 0 .../prediction/assoc_rule_producer.h | 0 src/{statistics => }/prediction/basket.cpp | 0 src/{statistics => }/prediction/basket.h | 0 .../prediction/basket_compressor.cpp | 0 .../prediction/basket_compressor.h | 0 .../prediction/basket_filter.cpp | 0 .../prediction/basket_filter.h | 0 .../prediction/basket_producer.cpp | 0 .../prediction/basket_producer.h | 0 .../prediction/baskets_agregator.cpp | 0 .../prediction/baskets_agregator.h | 0 src/{statistics => }/prediction/event.cpp | 0 src/{statistics => }/prediction/event.h | 0 src/{statistics => }/prediction/event_set.h | 0 .../prediction/i_item_id_filter.h | 0 src/{statistics => }/prediction/interval.cpp | 0 src/{statistics => }/prediction/interval.h | 0 src/{statistics => }/prediction/item.cpp | 0 src/{statistics => }/prediction/item.h | 0 .../prediction/item_catalogue.cpp | 0 .../prediction/item_catalogue.h | 0 src/{statistics => }/prediction/item_id_set.h | 0 src/{statistics => }/prediction/item_set.cpp | 0 src/{statistics => }/prediction/item_set.h | 0 .../prediction/item_string_converter.cpp | 0 .../prediction/item_string_converter.h | 0 .../single_category_item_id_filter.cpp | 0 .../single_category_item_id_filter.h | 0 .../prediction/weight_apriori.cpp | 0 .../prediction/weight_apriori.h | 0 src/{statistics => }/shared/CommonTypes.h | 0 src/{statistics => }/shared/DbHandleBase.cpp | 0 src/{statistics => }/shared/DbHandleBase.h | 0 .../DeviceContextProvider.cpp | 79 +++++-------------- src/{device => shared}/DeviceProviderBase.cpp | 0 src/{device => shared}/DeviceProviderBase.h | 0 .../PlaceContextProvider.cpp | 11 ++- src/{device/social => shared}/SocialTypes.h | 0 .../StatisticsContextProvider.cpp | 23 ++---- src/{statistics => }/shared/SystemInfo.cpp | 0 src/{statistics => }/shared/SystemInfo.h | 0 src/{device/system => shared}/SystemTypes.h | 0 .../social => social-stats}/DbHandle.cpp | 0 .../social => social-stats}/DbHandle.h | 0 .../social => social-stats}/LogAggregator.cpp | 0 .../social => social-stats}/LogAggregator.h | 0 .../SocialStatisticsTypes.h | 0 .../SocialStatsLogger.cpp | 0 .../SocialStatsLogger.h | 0 .../SocialStatsProvider.cpp | 0 .../SocialStatsProvider.h | 0 src/statistics/CMakeLists.txt | 31 -------- src/{device => }/system/Battery.cpp | 1 - src/{device => }/system/Battery.h | 3 +- .../runtime_info => system}/Charger.cpp | 1 - .../system/runtime_info => system}/Charger.h | 0 .../system/runtime_info => system}/Gps.cpp | 1 - .../system/runtime_info => system}/Gps.h | 0 src/{device => }/system/Psmode.cpp | 1 - src/{device => }/system/Psmode.h | 3 +- .../RuntimeInfoBase.cpp | 0 .../runtime_info => system}/RuntimeInfoBase.h | 3 +- .../system/runtime_info => system}/Usb.cpp | 1 - .../system/runtime_info => system}/Usb.h | 0 src/{device/system => time}/Alarm.cpp | 1 - src/{device/system => time}/Alarm.h | 1 + src/{device/system => time}/Time.cpp | 1 - src/{device/system => time}/Time.h | 3 +- src/{device/system => wifi}/Wifi.cpp | 1 - src/{device/system => wifi}/Wifi.h | 3 +- 174 files changed, 126 insertions(+), 248 deletions(-) delete mode 100644 src/CMakeLists.txt rename src/{device => }/activity/Activity.h (98%) rename src/{device => }/activity/ActivityBase.cpp (100%) rename src/{device => }/activity/ActivityBase.h (97%) rename src/{device => }/activity/ActivityTypes.h (100%) rename src/{statistics/app => app-stats}/ActiveWindowMonitor.cpp (100%) rename src/{statistics/app => app-stats}/ActiveWindowMonitor.h (100%) rename src/{statistics/app => app-stats}/AppStatisticsTypes.h (100%) rename src/{statistics/app => app-stats}/AppStatsLogger.cpp (100%) rename src/{statistics/app => app-stats}/AppStatsLogger.h (100%) rename src/{statistics/app => app-stats}/AppStatsProvider.cpp (100%) rename src/{statistics/app => app-stats}/AppStatsProvider.h (100%) rename src/{statistics/app => app-stats}/DbHandle.cpp (100%) rename src/{statistics/app => app-stats}/DbHandle.h (100%) rename src/{statistics/app => app-stats}/DbInit.cpp (100%) rename src/{statistics/app => app-stats}/DbInit.h (100%) rename src/{statistics/app => app-stats}/InstallMonitor.cpp (100%) rename src/{statistics/app => app-stats}/InstallMonitor.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/AppInactiveDetector.cpp (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/AppInactiveDetector.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/AppInactiveDetectorTypes.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetector.cpp (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetector.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorClassificator.cpp (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorClassificator.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorClassificatorKmeans.cpp (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorClassificatorKmeans.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorClassificatorKmeansTypes.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorStorage.cpp (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorStorage.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorStorageQueries.h (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorWeight.cpp (100%) rename src/{statistics/app => app-stats}/app_inactive_detector/InactiveDetectorWeight.h (100%) rename src/{device/social => call}/Call.cpp (99%) rename src/{device/social => call}/Call.h (95%) rename src/{device/social => contacts}/Contacts.cpp (99%) rename src/{device/social => contacts}/Contacts.h (94%) delete mode 100644 src/device/CMakeLists.txt rename src/{device/social => email}/Email.cpp (98%) rename src/{device/social => email}/Email.h (93%) rename src/{place => }/geofence/GeofenceMonitorHandle.cpp (100%) rename src/{place => }/geofence/GeofenceMonitorHandle.h (100%) rename src/{place => }/geofence/PlaceGeofenceProvider.cpp (100%) rename src/{place => }/geofence/PlaceGeofenceProvider.h (100%) rename src/{place => }/geofence/PlaceGeofenceTypes.h (100%) rename src/{device/system => headphone}/Headphone.cpp (99%) rename src/{device/system => headphone}/Headphone.h (90%) rename src/{statistics/media => media-stats}/DbHandle.cpp (100%) rename src/{statistics/media => media-stats}/DbHandle.h (100%) rename src/{statistics/media => media-stats}/MediaContentMonitor.cpp (100%) rename src/{statistics/media => media-stats}/MediaContentMonitor.h (100%) rename src/{statistics/media => media-stats}/MediaStatisticsTypes.h (100%) rename src/{statistics/media => media-stats}/MediaStatsLogger.cpp (100%) rename src/{statistics/media => media-stats}/MediaStatsLogger.h (100%) rename src/{statistics/media => media-stats}/MediaStatsProvider.cpp (100%) rename src/{statistics/media => media-stats}/MediaStatsProvider.h (100%) rename src/{device/social => message}/Message.cpp (99%) rename src/{device/social => message}/Message.h (94%) rename src/{place/recognition => my-place}/place_recognition.cpp (100%) rename src/{place/recognition => my-place}/place_recognition.h (100%) rename src/{place/recognition => my-place}/place_recognition_types.h (100%) rename src/{place/recognition => my-place}/user_places/debug_utils.cpp (100%) rename src/{place/recognition => my-place}/user_places/debug_utils.h (100%) rename src/{place/recognition => my-place}/user_places/gmap.cpp (100%) rename src/{place/recognition => my-place}/user_places/gmap.h (100%) rename src/{place/recognition => my-place}/user_places/graph.cpp (100%) rename src/{place/recognition => my-place}/user_places/graph.h (100%) rename src/{place/recognition => my-place}/user_places/location_listener_iface.h (100%) rename src/{place/recognition => my-place}/user_places/location_logger.cpp (100%) rename src/{place/recognition => my-place}/user_places/location_logger.h (100%) rename src/{place/recognition => my-place}/user_places/mahal.cpp (100%) rename src/{place/recognition => my-place}/user_places/mahal.h (100%) rename src/{place/recognition => my-place}/user_places/median.cpp (100%) rename src/{place/recognition => my-place}/user_places/median.h (100%) rename src/{place/recognition => my-place}/user_places/piecewise_lin.cpp (100%) rename src/{place/recognition => my-place}/user_places/piecewise_lin.h (100%) rename src/{place/recognition => my-place}/user_places/place_categer.cpp (100%) rename src/{place/recognition => my-place}/user_places/place_categer.h (100%) rename src/{place/recognition => my-place}/user_places/places_detector.cpp (100%) rename src/{place/recognition => my-place}/user_places/places_detector.h (100%) rename src/{place/recognition => my-place}/user_places/prob_features_model.h (100%) rename src/{place/recognition => my-place}/user_places/similarity.h (100%) rename src/{place/recognition => my-place}/user_places/user_places.cpp (100%) rename src/{place/recognition => my-place}/user_places/user_places.h (100%) rename src/{place/recognition => my-place}/user_places/user_places_params.h (100%) rename src/{place/recognition => my-place}/user_places/user_places_types.cpp (100%) rename src/{place/recognition => my-place}/user_places/user_places_types.h (100%) rename src/{place/recognition => my-place}/user_places/visit_categer.cpp (100%) rename src/{place/recognition => my-place}/user_places/visit_categer.h (100%) rename src/{place/recognition => my-place}/user_places/visit_detector.cpp (100%) rename src/{place/recognition => my-place}/user_places/visit_detector.h (100%) rename src/{place/recognition => my-place}/user_places/visit_listener_iface.h (100%) rename src/{place/recognition => my-place}/user_places/wifi_listener_iface.h (100%) rename src/{place/recognition => my-place}/user_places/wifi_logger.cpp (100%) rename src/{place/recognition => my-place}/user_places/wifi_logger.h (100%) delete mode 100644 src/place/CMakeLists.txt rename src/{statistics => }/prediction/assoc_rule.cpp (100%) rename src/{statistics => }/prediction/assoc_rule.h (100%) rename src/{statistics => }/prediction/assoc_rule_miner.cpp (100%) rename src/{statistics => }/prediction/assoc_rule_miner.h (100%) rename src/{statistics => }/prediction/assoc_rule_of_ids.h (100%) rename src/{statistics => }/prediction/assoc_rule_producer.cpp (100%) rename src/{statistics => }/prediction/assoc_rule_producer.h (100%) rename src/{statistics => }/prediction/basket.cpp (100%) rename src/{statistics => }/prediction/basket.h (100%) rename src/{statistics => }/prediction/basket_compressor.cpp (100%) rename src/{statistics => }/prediction/basket_compressor.h (100%) rename src/{statistics => }/prediction/basket_filter.cpp (100%) rename src/{statistics => }/prediction/basket_filter.h (100%) rename src/{statistics => }/prediction/basket_producer.cpp (100%) rename src/{statistics => }/prediction/basket_producer.h (100%) rename src/{statistics => }/prediction/baskets_agregator.cpp (100%) rename src/{statistics => }/prediction/baskets_agregator.h (100%) rename src/{statistics => }/prediction/event.cpp (100%) rename src/{statistics => }/prediction/event.h (100%) rename src/{statistics => }/prediction/event_set.h (100%) rename src/{statistics => }/prediction/i_item_id_filter.h (100%) rename src/{statistics => }/prediction/interval.cpp (100%) rename src/{statistics => }/prediction/interval.h (100%) rename src/{statistics => }/prediction/item.cpp (100%) rename src/{statistics => }/prediction/item.h (100%) rename src/{statistics => }/prediction/item_catalogue.cpp (100%) rename src/{statistics => }/prediction/item_catalogue.h (100%) rename src/{statistics => }/prediction/item_id_set.h (100%) rename src/{statistics => }/prediction/item_set.cpp (100%) rename src/{statistics => }/prediction/item_set.h (100%) rename src/{statistics => }/prediction/item_string_converter.cpp (100%) rename src/{statistics => }/prediction/item_string_converter.h (100%) rename src/{statistics => }/prediction/single_category_item_id_filter.cpp (100%) rename src/{statistics => }/prediction/single_category_item_id_filter.h (100%) rename src/{statistics => }/prediction/weight_apriori.cpp (100%) rename src/{statistics => }/prediction/weight_apriori.h (100%) rename src/{statistics => }/shared/CommonTypes.h (100%) rename src/{statistics => }/shared/DbHandleBase.cpp (100%) rename src/{statistics => }/shared/DbHandleBase.h (100%) rename src/{device => shared}/DeviceContextProvider.cpp (58%) rename src/{device => shared}/DeviceProviderBase.cpp (100%) rename src/{device => shared}/DeviceProviderBase.h (100%) rename src/{place => shared}/PlaceContextProvider.cpp (85%) rename src/{device/social => shared}/SocialTypes.h (100%) rename src/{statistics => shared}/StatisticsContextProvider.cpp (85%) rename src/{statistics => }/shared/SystemInfo.cpp (100%) rename src/{statistics => }/shared/SystemInfo.h (100%) rename src/{device/system => shared}/SystemTypes.h (100%) rename src/{statistics/social => social-stats}/DbHandle.cpp (100%) rename src/{statistics/social => social-stats}/DbHandle.h (100%) rename src/{statistics/social => social-stats}/LogAggregator.cpp (100%) rename src/{statistics/social => social-stats}/LogAggregator.h (100%) rename src/{statistics/social => social-stats}/SocialStatisticsTypes.h (100%) rename src/{statistics/social => social-stats}/SocialStatsLogger.cpp (100%) rename src/{statistics/social => social-stats}/SocialStatsLogger.h (100%) rename src/{statistics/social => social-stats}/SocialStatsProvider.cpp (100%) rename src/{statistics/social => social-stats}/SocialStatsProvider.h (100%) delete mode 100644 src/statistics/CMakeLists.txt rename src/{device => }/system/Battery.cpp (99%) rename src/{device => }/system/Battery.h (94%) rename src/{device/system/runtime_info => system}/Charger.cpp (98%) rename src/{device/system/runtime_info => system}/Charger.h (100%) rename src/{device/system/runtime_info => system}/Gps.cpp (98%) rename src/{device/system/runtime_info => system}/Gps.h (100%) rename src/{device => }/system/Psmode.cpp (98%) rename src/{device => }/system/Psmode.h (93%) rename src/{device/system/runtime_info => system}/RuntimeInfoBase.cpp (100%) rename src/{device/system/runtime_info => system}/RuntimeInfoBase.h (94%) rename src/{device/system/runtime_info => system}/Usb.cpp (98%) rename src/{device/system/runtime_info => system}/Usb.h (100%) rename src/{device/system => time}/Alarm.cpp (99%) rename src/{device/system => time}/Alarm.h (98%) rename src/{device/system => time}/Time.cpp (98%) rename src/{device/system => time}/Time.h (92%) rename src/{device/system => wifi}/Wifi.cpp (99%) rename src/{device/system => wifi}/Wifi.h (95%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 913174a..2865cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,9 +11,6 @@ INCLUDE_DIRECTORIES( ADD_DEFINITIONS(-O2 -Wall -fPIC -fdata-sections -ffunction-sections -fvisibility=hidden) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,--as-needed -Wl,--gc-section -Wl,--print-gc-section") -# Base Dependency -SET(dependencies libcontext-server) - # Profiles IF("${PROFILE}" STREQUAL "mobile") ADD_DEFINITIONS("-D_MOBILE_") @@ -23,23 +20,70 @@ IF("${PROFILE}" STREQUAL "wearable") ADD_DEFINITIONS("-D_WEARABLE_") ENDIF("${PROFILE}" STREQUAL "wearable") -IF("${PROFILE}" STREQUAL "tv") - ADD_DEFINITIONS("-D_TV_") -ENDIF("${PROFILE}" STREQUAL "tv") -# Include Sub-modules -ADD_SUBDIRECTORY(src) -MESSAGE("Compile definitions: ${compile_defs}") +# Dependency & Source +SET(DEPS + libcontext-server + vconf + capi-system-info + capi-system-device + capi-system-runtime-info + capi-appfw-package-manager + capi-appfw-application + capi-appfw-app-manager + pkgmgr + pkgmgr-info + capi-media-sound-manager + capi-network-bluetooth + capi-network-wifi + motion +) + +FILE(GLOB SRCS + src/shared/*.cpp + src/time/*.cpp + src/activity/*.cpp + src/app-stats/*.cpp + src/headphone/*.cpp + src/system/*.cpp + src/wifi/*.cpp +) + +IF("${PROFILE}" STREQUAL "mobile") +SET(DEPS ${DEPS} + msg-service + contacts-service2 + tapi + capi-telephony + capi-messaging-email + capi-content-media-content + capi-location-manager + capi-geofence-manager +) + +FILE(GLOB SRCS ${SRCS} + src/call/*.cpp + src/contacts/*.cpp + src/email/*.cpp + src/geofence/*.cpp + src/media-stats/*.cpp + src/message/*.cpp + src/my-place/*.cpp + src/my-place/user_places/*.cpp + src/social-stats/*.cpp +) +ENDIF("${PROFILE}" STREQUAL "mobile") + # Build INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(DEPS REQUIRED ${dependencies}) +PKG_CHECK_MODULES(DEPS REQUIRED ${DEPS}) FOREACH(flag ${DEPS_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -ADD_LIBRARY(${target} STATIC ${sources}) +ADD_LIBRARY(${target} STATIC ${SRCS}) TARGET_LINK_LIBRARIES(${target} ${DEPS_LDFLAGS}) SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS}) SET_TARGET_PROPERTIES(${target} PROPERTIES COMPILE_DEFINITIONS "${compile_defs}") @@ -47,7 +91,7 @@ SET_TARGET_PROPERTIES(${target} PROPERTIES SOVERSION ${MAJORVER}) SET_TARGET_PROPERTIES(${target} PROPERTIES VERSION ${FULLVER}) # Package Config -FOREACH(item IN LISTS dependencies) +FOREACH(item IN LISTS DEPS) SET(deps_str "${deps_str} ${item}") ENDFOREACH(item) @@ -74,4 +118,4 @@ INSTALL( FILES_MATCHING PATTERN "*.h" ) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) -INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries) +INSTALL(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/packaging/context-provider.spec b/packaging/context-provider.spec index 7068f1e..598eb65 100644 --- a/packaging/context-provider.spec +++ b/packaging/context-provider.spec @@ -9,6 +9,10 @@ Source0: %{name}-%{version}.tar.gz %define BUILD_PROFILE %{?profile}%{!?profile:%{?tizen_profile_name}} %define keepstatic 1 +%if "%{?BUILD_PROFILE}" == "tv" +ExcludeArch: %{arm} aarch64 %ix86 x86_64 +%endif + BuildRequires: cmake BuildRequires: pkgconfig(libcontext-server) @@ -22,36 +26,21 @@ BuildRequires: pkgconfig(capi-appfw-app-manager) BuildRequires: pkgconfig(pkgmgr) BuildRequires: pkgconfig(pkgmgr-info) BuildRequires: pkgconfig(capi-media-sound-manager) - -%if "%{?BUILD_PROFILE}" == "mobile" BuildRequires: pkgconfig(capi-network-bluetooth) BuildRequires: pkgconfig(capi-network-wifi) -BuildRequires: pkgconfig(capi-telephony) -BuildRequires: pkgconfig(tapi) -BuildRequires: pkgconfig(msg-service) -BuildRequires: pkgconfig(capi-messaging-email) BuildRequires: pkgconfig(motion) + +%if "%{?BUILD_PROFILE}" == "mobile" +BuildRequires: pkgconfig(msg-service) BuildRequires: pkgconfig(contacts-service2) +BuildRequires: pkgconfig(tapi) +BuildRequires: pkgconfig(capi-telephony) +BuildRequires: pkgconfig(capi-messaging-email) BuildRequires: pkgconfig(capi-content-media-content) BuildRequires: pkgconfig(capi-location-manager) BuildRequires: pkgconfig(capi-geofence-manager) %endif -%if "%{?BUILD_PROFILE}" == "wearable" -BuildRequires: pkgconfig(capi-network-bluetooth) -BuildRequires: pkgconfig(capi-network-wifi) -BuildRequires: pkgconfig(capi-telephony) -BuildRequires: pkgconfig(tapi) -BuildRequires: pkgconfig(msg-service) -BuildRequires: pkgconfig(motion) -%endif - -%if "%{?BUILD_PROFILE}" == "tv" -BuildRequires: pkgconfig(capi-network-bluetooth) -BuildRequires: pkgconfig(capi-network-wifi) -BuildRequires: pkgconfig(capi-content-media-content) -%endif - %description Context Provider diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 5926ed8..0000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,24 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) - -FUNCTION(add_provider prvd_name) - ADD_SUBDIRECTORY(${prvd_name}) - GET_DIRECTORY_PROPERTY(srcs_subdir DIRECTORY ${prvd_name} DEFINITION prvd_srcs) - GET_DIRECTORY_PROPERTY(deps_subdir DIRECTORY ${prvd_name} DEFINITION prvd_deps) - GET_DIRECTORY_PROPERTY(cdef_subdir DIRECTORY ${prvd_name} DEFINITION prvd_cdef) - SET(srcs_collected ${srcs_collected} ${srcs_subdir} PARENT_SCOPE) - SET(deps_collected ${deps_collected} ${deps_subdir} PARENT_SCOPE) - SET(cdef_collected ${cdef_collected} ${cdef_subdir} PARENT_SCOPE) -ENDFUNCTION(add_provider) - - -add_provider(device) -add_provider(statistics) -add_provider(place) -#add_provider(custom) - - -LIST(REMOVE_DUPLICATES deps_collected) - -SET(sources ${sources} ${srcs_collected} PARENT_SCOPE) -SET(dependencies ${dependencies} ${deps_collected} PARENT_SCOPE) -SET(compile_defs ${compile_defs} ${cdef_collected} PARENT_SCOPE) diff --git a/src/device/activity/Activity.h b/src/activity/Activity.h similarity index 98% rename from src/device/activity/Activity.h rename to src/activity/Activity.h index f50b283..ab5be2e 100644 --- a/src/device/activity/Activity.h +++ b/src/activity/Activity.h @@ -18,6 +18,7 @@ #define _DEVICE_ACTIVITY_STATUS_H_ #include "ActivityBase.h" +#include "ActivityTypes.h" #define GENERATE_ACTIVITY_PROVIDER(actPrvd, actSubj, actType) \ class actPrvd : public UserActivityBase { \ diff --git a/src/device/activity/ActivityBase.cpp b/src/activity/ActivityBase.cpp similarity index 100% rename from src/device/activity/ActivityBase.cpp rename to src/activity/ActivityBase.cpp diff --git a/src/device/activity/ActivityBase.h b/src/activity/ActivityBase.h similarity index 97% rename from src/device/activity/ActivityBase.h rename to src/activity/ActivityBase.h index ef68d58..56b709f 100644 --- a/src/device/activity/ActivityBase.h +++ b/src/activity/ActivityBase.h @@ -19,7 +19,7 @@ #include #include -#include "../DeviceProviderBase.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/device/activity/ActivityTypes.h b/src/activity/ActivityTypes.h similarity index 100% rename from src/device/activity/ActivityTypes.h rename to src/activity/ActivityTypes.h diff --git a/src/statistics/app/ActiveWindowMonitor.cpp b/src/app-stats/ActiveWindowMonitor.cpp similarity index 100% rename from src/statistics/app/ActiveWindowMonitor.cpp rename to src/app-stats/ActiveWindowMonitor.cpp diff --git a/src/statistics/app/ActiveWindowMonitor.h b/src/app-stats/ActiveWindowMonitor.h similarity index 100% rename from src/statistics/app/ActiveWindowMonitor.h rename to src/app-stats/ActiveWindowMonitor.h diff --git a/src/statistics/app/AppStatisticsTypes.h b/src/app-stats/AppStatisticsTypes.h similarity index 100% rename from src/statistics/app/AppStatisticsTypes.h rename to src/app-stats/AppStatisticsTypes.h diff --git a/src/statistics/app/AppStatsLogger.cpp b/src/app-stats/AppStatsLogger.cpp similarity index 100% rename from src/statistics/app/AppStatsLogger.cpp rename to src/app-stats/AppStatsLogger.cpp diff --git a/src/statistics/app/AppStatsLogger.h b/src/app-stats/AppStatsLogger.h similarity index 100% rename from src/statistics/app/AppStatsLogger.h rename to src/app-stats/AppStatsLogger.h diff --git a/src/statistics/app/AppStatsProvider.cpp b/src/app-stats/AppStatsProvider.cpp similarity index 100% rename from src/statistics/app/AppStatsProvider.cpp rename to src/app-stats/AppStatsProvider.cpp diff --git a/src/statistics/app/AppStatsProvider.h b/src/app-stats/AppStatsProvider.h similarity index 100% rename from src/statistics/app/AppStatsProvider.h rename to src/app-stats/AppStatsProvider.h diff --git a/src/statistics/app/DbHandle.cpp b/src/app-stats/DbHandle.cpp similarity index 100% rename from src/statistics/app/DbHandle.cpp rename to src/app-stats/DbHandle.cpp diff --git a/src/statistics/app/DbHandle.h b/src/app-stats/DbHandle.h similarity index 100% rename from src/statistics/app/DbHandle.h rename to src/app-stats/DbHandle.h diff --git a/src/statistics/app/DbInit.cpp b/src/app-stats/DbInit.cpp similarity index 100% rename from src/statistics/app/DbInit.cpp rename to src/app-stats/DbInit.cpp diff --git a/src/statistics/app/DbInit.h b/src/app-stats/DbInit.h similarity index 100% rename from src/statistics/app/DbInit.h rename to src/app-stats/DbInit.h diff --git a/src/statistics/app/InstallMonitor.cpp b/src/app-stats/InstallMonitor.cpp similarity index 100% rename from src/statistics/app/InstallMonitor.cpp rename to src/app-stats/InstallMonitor.cpp diff --git a/src/statistics/app/InstallMonitor.h b/src/app-stats/InstallMonitor.h similarity index 100% rename from src/statistics/app/InstallMonitor.h rename to src/app-stats/InstallMonitor.h diff --git a/src/statistics/app/app_inactive_detector/AppInactiveDetector.cpp b/src/app-stats/app_inactive_detector/AppInactiveDetector.cpp similarity index 100% rename from src/statistics/app/app_inactive_detector/AppInactiveDetector.cpp rename to src/app-stats/app_inactive_detector/AppInactiveDetector.cpp diff --git a/src/statistics/app/app_inactive_detector/AppInactiveDetector.h b/src/app-stats/app_inactive_detector/AppInactiveDetector.h similarity index 100% rename from src/statistics/app/app_inactive_detector/AppInactiveDetector.h rename to src/app-stats/app_inactive_detector/AppInactiveDetector.h diff --git a/src/statistics/app/app_inactive_detector/AppInactiveDetectorTypes.h b/src/app-stats/app_inactive_detector/AppInactiveDetectorTypes.h similarity index 100% rename from src/statistics/app/app_inactive_detector/AppInactiveDetectorTypes.h rename to src/app-stats/app_inactive_detector/AppInactiveDetectorTypes.h diff --git a/src/statistics/app/app_inactive_detector/InactiveDetector.cpp b/src/app-stats/app_inactive_detector/InactiveDetector.cpp similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetector.cpp rename to src/app-stats/app_inactive_detector/InactiveDetector.cpp diff --git a/src/statistics/app/app_inactive_detector/InactiveDetector.h b/src/app-stats/app_inactive_detector/InactiveDetector.h similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetector.h rename to src/app-stats/app_inactive_detector/InactiveDetector.h diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorClassificator.cpp b/src/app-stats/app_inactive_detector/InactiveDetectorClassificator.cpp similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorClassificator.cpp rename to src/app-stats/app_inactive_detector/InactiveDetectorClassificator.cpp diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorClassificator.h b/src/app-stats/app_inactive_detector/InactiveDetectorClassificator.h similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorClassificator.h rename to src/app-stats/app_inactive_detector/InactiveDetectorClassificator.h diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorClassificatorKmeans.cpp b/src/app-stats/app_inactive_detector/InactiveDetectorClassificatorKmeans.cpp similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorClassificatorKmeans.cpp rename to src/app-stats/app_inactive_detector/InactiveDetectorClassificatorKmeans.cpp diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorClassificatorKmeans.h b/src/app-stats/app_inactive_detector/InactiveDetectorClassificatorKmeans.h similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorClassificatorKmeans.h rename to src/app-stats/app_inactive_detector/InactiveDetectorClassificatorKmeans.h diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorClassificatorKmeansTypes.h b/src/app-stats/app_inactive_detector/InactiveDetectorClassificatorKmeansTypes.h similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorClassificatorKmeansTypes.h rename to src/app-stats/app_inactive_detector/InactiveDetectorClassificatorKmeansTypes.h diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorStorage.cpp b/src/app-stats/app_inactive_detector/InactiveDetectorStorage.cpp similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorStorage.cpp rename to src/app-stats/app_inactive_detector/InactiveDetectorStorage.cpp diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorStorage.h b/src/app-stats/app_inactive_detector/InactiveDetectorStorage.h similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorStorage.h rename to src/app-stats/app_inactive_detector/InactiveDetectorStorage.h diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorStorageQueries.h b/src/app-stats/app_inactive_detector/InactiveDetectorStorageQueries.h similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorStorageQueries.h rename to src/app-stats/app_inactive_detector/InactiveDetectorStorageQueries.h diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorWeight.cpp b/src/app-stats/app_inactive_detector/InactiveDetectorWeight.cpp similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorWeight.cpp rename to src/app-stats/app_inactive_detector/InactiveDetectorWeight.cpp diff --git a/src/statistics/app/app_inactive_detector/InactiveDetectorWeight.h b/src/app-stats/app_inactive_detector/InactiveDetectorWeight.h similarity index 100% rename from src/statistics/app/app_inactive_detector/InactiveDetectorWeight.h rename to src/app-stats/app_inactive_detector/InactiveDetectorWeight.h diff --git a/src/device/social/Call.cpp b/src/call/Call.cpp similarity index 99% rename from src/device/social/Call.cpp rename to src/call/Call.cpp index 460c281..a19a2b9 100644 --- a/src/device/social/Call.cpp +++ b/src/call/Call.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "SocialTypes.h" #include "Call.h" #define TELEPHONY_NOTI_ID_CNT 8 diff --git a/src/device/social/Call.h b/src/call/Call.h similarity index 95% rename from src/device/social/Call.h rename to src/call/Call.h index 02a4eaa..a53276f 100644 --- a/src/device/social/Call.h +++ b/src/call/Call.h @@ -18,7 +18,8 @@ #define _CONTEXT_SOCIAL_STATUS_CALL_H_ #include -#include "../DeviceProviderBase.h" +#include "../shared/SocialTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/device/social/Contacts.cpp b/src/contacts/Contacts.cpp similarity index 99% rename from src/device/social/Contacts.cpp rename to src/contacts/Contacts.cpp index 55ff19a..42789a3 100644 --- a/src/device/social/Contacts.cpp +++ b/src/contacts/Contacts.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "SocialTypes.h" #include "Contacts.h" #define MY_PROFILE_VIEW _contacts_my_profile._uri diff --git a/src/device/social/Contacts.h b/src/contacts/Contacts.h similarity index 94% rename from src/device/social/Contacts.h rename to src/contacts/Contacts.h index c5ced5a..28b68ce 100644 --- a/src/device/social/Contacts.h +++ b/src/contacts/Contacts.h @@ -18,7 +18,8 @@ #define _CONTEXT_SOCIAL_STATUS_CONTACTS_H_ #include -#include "../DeviceProviderBase.h" +#include "../shared/SocialTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/device/CMakeLists.txt b/src/device/CMakeLists.txt deleted file mode 100644 index 16f436f..0000000 --- a/src/device/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -# prvd_cdef, prvd_deps, and prvd_srcs need to be set properly - -# Common Profile -FILE(GLOB prvd_srcs ./*.cpp system/Alarm.cpp system/Time.cpp) -SET(prvd_deps vconf capi-system-info capi-system-device capi-system-runtime-info) - -# Mobile Profile -IF("${PROFILE}" STREQUAL "mobile") - SET(prvd_deps ${prvd_deps} capi-network-bluetooth capi-network-wifi contacts-service2) - SET(prvd_deps ${prvd_deps} capi-telephony tapi msg-service capi-messaging-email motion) - FILE(GLOB_RECURSE prvd_srcs ${prvd_srcs} activity/*.cpp) - FILE(GLOB_RECURSE prvd_srcs ${prvd_srcs} system/*.cpp) - FILE(GLOB_RECURSE prvd_srcs ${prvd_srcs} social/*.cpp) -ENDIF("${PROFILE}" STREQUAL "mobile") - -# Wearable Profile -IF("${PROFILE}" STREQUAL "wearable") - SET(prvd_deps ${prvd_deps} capi-network-bluetooth capi-network-wifi) - SET(prvd_deps ${prvd_deps} capi-telephony tapi msg-service motion) - FILE(GLOB_RECURSE prvd_srcs ${prvd_srcs} activity/*.cpp) - FILE(GLOB_RECURSE prvd_srcs ${prvd_srcs} system/*.cpp) - FILE(GLOB prvd_srcs ${prvd_srcs} social/Call.cpp social/Message.cpp) -ENDIF("${PROFILE}" STREQUAL "wearable") - -# TV Profile -IF("${PROFILE}" STREQUAL "tv") - SET(prvd_deps ${prvd_deps} capi-network-bluetooth capi-network-wifi) - FILE(GLOB prvd_srcs ${prvd_srcs} system/Headphone.cpp system/Wifi.cpp) -ENDIF("${PROFILE}" STREQUAL "tv") diff --git a/src/device/social/Email.cpp b/src/email/Email.cpp similarity index 98% rename from src/device/social/Email.cpp rename to src/email/Email.cpp index e67729e..fbf5c8d 100644 --- a/src/device/social/Email.cpp +++ b/src/email/Email.cpp @@ -15,7 +15,6 @@ */ #include -#include "SocialTypes.h" #include "Email.h" using namespace ctx; diff --git a/src/device/social/Email.h b/src/email/Email.h similarity index 93% rename from src/device/social/Email.h rename to src/email/Email.h index cf44ae7..b78eb33 100644 --- a/src/device/social/Email.h +++ b/src/email/Email.h @@ -18,7 +18,8 @@ #define _CONTEXT_SOCIAL_STATUS_EMAIL_H_ #include -#include "../DeviceProviderBase.h" +#include "../shared/SocialTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/place/geofence/GeofenceMonitorHandle.cpp b/src/geofence/GeofenceMonitorHandle.cpp similarity index 100% rename from src/place/geofence/GeofenceMonitorHandle.cpp rename to src/geofence/GeofenceMonitorHandle.cpp diff --git a/src/place/geofence/GeofenceMonitorHandle.h b/src/geofence/GeofenceMonitorHandle.h similarity index 100% rename from src/place/geofence/GeofenceMonitorHandle.h rename to src/geofence/GeofenceMonitorHandle.h diff --git a/src/place/geofence/PlaceGeofenceProvider.cpp b/src/geofence/PlaceGeofenceProvider.cpp similarity index 100% rename from src/place/geofence/PlaceGeofenceProvider.cpp rename to src/geofence/PlaceGeofenceProvider.cpp diff --git a/src/place/geofence/PlaceGeofenceProvider.h b/src/geofence/PlaceGeofenceProvider.h similarity index 100% rename from src/place/geofence/PlaceGeofenceProvider.h rename to src/geofence/PlaceGeofenceProvider.h diff --git a/src/place/geofence/PlaceGeofenceTypes.h b/src/geofence/PlaceGeofenceTypes.h similarity index 100% rename from src/place/geofence/PlaceGeofenceTypes.h rename to src/geofence/PlaceGeofenceTypes.h diff --git a/src/device/system/Headphone.cpp b/src/headphone/Headphone.cpp similarity index 99% rename from src/device/system/Headphone.cpp rename to src/headphone/Headphone.cpp index 0093af9..3ee6dfa 100644 --- a/src/device/system/Headphone.cpp +++ b/src/headphone/Headphone.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "SystemTypes.h" #include "Headphone.h" #define HANDLING_DELAY 2000 diff --git a/src/device/system/Headphone.h b/src/headphone/Headphone.h similarity index 90% rename from src/device/system/Headphone.h rename to src/headphone/Headphone.h index 00edcfd..2fdd780 100644 --- a/src/device/system/Headphone.h +++ b/src/headphone/Headphone.h @@ -14,13 +14,14 @@ * limitations under the License. */ -#ifndef _DEVICE_SYSTEM_STATUS_HEADPHONE_H_ -#define _DEVICE_STATUS_HEADPNOHE_H_ +#ifndef _CONTEXT_HEADPHONE_H_ +#define _CONTEXT_HEADPNOHE_H_ #include #include #include -#include "../DeviceProviderBase.h" +#include "../shared/SystemTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { @@ -60,4 +61,4 @@ namespace ctx { }; } -#endif // _DEVICE_SYSTEM_STATUS_HEADPHONE_H_ +#endif // _CONTEXT_HEADPHONE_H_ diff --git a/src/statistics/media/DbHandle.cpp b/src/media-stats/DbHandle.cpp similarity index 100% rename from src/statistics/media/DbHandle.cpp rename to src/media-stats/DbHandle.cpp diff --git a/src/statistics/media/DbHandle.h b/src/media-stats/DbHandle.h similarity index 100% rename from src/statistics/media/DbHandle.h rename to src/media-stats/DbHandle.h diff --git a/src/statistics/media/MediaContentMonitor.cpp b/src/media-stats/MediaContentMonitor.cpp similarity index 100% rename from src/statistics/media/MediaContentMonitor.cpp rename to src/media-stats/MediaContentMonitor.cpp diff --git a/src/statistics/media/MediaContentMonitor.h b/src/media-stats/MediaContentMonitor.h similarity index 100% rename from src/statistics/media/MediaContentMonitor.h rename to src/media-stats/MediaContentMonitor.h diff --git a/src/statistics/media/MediaStatisticsTypes.h b/src/media-stats/MediaStatisticsTypes.h similarity index 100% rename from src/statistics/media/MediaStatisticsTypes.h rename to src/media-stats/MediaStatisticsTypes.h diff --git a/src/statistics/media/MediaStatsLogger.cpp b/src/media-stats/MediaStatsLogger.cpp similarity index 100% rename from src/statistics/media/MediaStatsLogger.cpp rename to src/media-stats/MediaStatsLogger.cpp diff --git a/src/statistics/media/MediaStatsLogger.h b/src/media-stats/MediaStatsLogger.h similarity index 100% rename from src/statistics/media/MediaStatsLogger.h rename to src/media-stats/MediaStatsLogger.h diff --git a/src/statistics/media/MediaStatsProvider.cpp b/src/media-stats/MediaStatsProvider.cpp similarity index 100% rename from src/statistics/media/MediaStatsProvider.cpp rename to src/media-stats/MediaStatsProvider.cpp diff --git a/src/statistics/media/MediaStatsProvider.h b/src/media-stats/MediaStatsProvider.h similarity index 100% rename from src/statistics/media/MediaStatsProvider.h rename to src/media-stats/MediaStatsProvider.h diff --git a/src/device/social/Message.cpp b/src/message/Message.cpp similarity index 99% rename from src/device/social/Message.cpp rename to src/message/Message.cpp index f55b3e6..9316806 100644 --- a/src/device/social/Message.cpp +++ b/src/message/Message.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "SocialTypes.h" #include "Message.h" #define MAX_ADDR_SIZE 20 diff --git a/src/device/social/Message.h b/src/message/Message.h similarity index 94% rename from src/device/social/Message.h rename to src/message/Message.h index 78d006b..79e489a 100644 --- a/src/device/social/Message.h +++ b/src/message/Message.h @@ -19,7 +19,8 @@ #include #include -#include "../DeviceProviderBase.h" +#include "../shared/SocialTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/place/recognition/place_recognition.cpp b/src/my-place/place_recognition.cpp similarity index 100% rename from src/place/recognition/place_recognition.cpp rename to src/my-place/place_recognition.cpp diff --git a/src/place/recognition/place_recognition.h b/src/my-place/place_recognition.h similarity index 100% rename from src/place/recognition/place_recognition.h rename to src/my-place/place_recognition.h diff --git a/src/place/recognition/place_recognition_types.h b/src/my-place/place_recognition_types.h similarity index 100% rename from src/place/recognition/place_recognition_types.h rename to src/my-place/place_recognition_types.h diff --git a/src/place/recognition/user_places/debug_utils.cpp b/src/my-place/user_places/debug_utils.cpp similarity index 100% rename from src/place/recognition/user_places/debug_utils.cpp rename to src/my-place/user_places/debug_utils.cpp diff --git a/src/place/recognition/user_places/debug_utils.h b/src/my-place/user_places/debug_utils.h similarity index 100% rename from src/place/recognition/user_places/debug_utils.h rename to src/my-place/user_places/debug_utils.h diff --git a/src/place/recognition/user_places/gmap.cpp b/src/my-place/user_places/gmap.cpp similarity index 100% rename from src/place/recognition/user_places/gmap.cpp rename to src/my-place/user_places/gmap.cpp diff --git a/src/place/recognition/user_places/gmap.h b/src/my-place/user_places/gmap.h similarity index 100% rename from src/place/recognition/user_places/gmap.h rename to src/my-place/user_places/gmap.h diff --git a/src/place/recognition/user_places/graph.cpp b/src/my-place/user_places/graph.cpp similarity index 100% rename from src/place/recognition/user_places/graph.cpp rename to src/my-place/user_places/graph.cpp diff --git a/src/place/recognition/user_places/graph.h b/src/my-place/user_places/graph.h similarity index 100% rename from src/place/recognition/user_places/graph.h rename to src/my-place/user_places/graph.h diff --git a/src/place/recognition/user_places/location_listener_iface.h b/src/my-place/user_places/location_listener_iface.h similarity index 100% rename from src/place/recognition/user_places/location_listener_iface.h rename to src/my-place/user_places/location_listener_iface.h diff --git a/src/place/recognition/user_places/location_logger.cpp b/src/my-place/user_places/location_logger.cpp similarity index 100% rename from src/place/recognition/user_places/location_logger.cpp rename to src/my-place/user_places/location_logger.cpp diff --git a/src/place/recognition/user_places/location_logger.h b/src/my-place/user_places/location_logger.h similarity index 100% rename from src/place/recognition/user_places/location_logger.h rename to src/my-place/user_places/location_logger.h diff --git a/src/place/recognition/user_places/mahal.cpp b/src/my-place/user_places/mahal.cpp similarity index 100% rename from src/place/recognition/user_places/mahal.cpp rename to src/my-place/user_places/mahal.cpp diff --git a/src/place/recognition/user_places/mahal.h b/src/my-place/user_places/mahal.h similarity index 100% rename from src/place/recognition/user_places/mahal.h rename to src/my-place/user_places/mahal.h diff --git a/src/place/recognition/user_places/median.cpp b/src/my-place/user_places/median.cpp similarity index 100% rename from src/place/recognition/user_places/median.cpp rename to src/my-place/user_places/median.cpp diff --git a/src/place/recognition/user_places/median.h b/src/my-place/user_places/median.h similarity index 100% rename from src/place/recognition/user_places/median.h rename to src/my-place/user_places/median.h diff --git a/src/place/recognition/user_places/piecewise_lin.cpp b/src/my-place/user_places/piecewise_lin.cpp similarity index 100% rename from src/place/recognition/user_places/piecewise_lin.cpp rename to src/my-place/user_places/piecewise_lin.cpp diff --git a/src/place/recognition/user_places/piecewise_lin.h b/src/my-place/user_places/piecewise_lin.h similarity index 100% rename from src/place/recognition/user_places/piecewise_lin.h rename to src/my-place/user_places/piecewise_lin.h diff --git a/src/place/recognition/user_places/place_categer.cpp b/src/my-place/user_places/place_categer.cpp similarity index 100% rename from src/place/recognition/user_places/place_categer.cpp rename to src/my-place/user_places/place_categer.cpp diff --git a/src/place/recognition/user_places/place_categer.h b/src/my-place/user_places/place_categer.h similarity index 100% rename from src/place/recognition/user_places/place_categer.h rename to src/my-place/user_places/place_categer.h diff --git a/src/place/recognition/user_places/places_detector.cpp b/src/my-place/user_places/places_detector.cpp similarity index 100% rename from src/place/recognition/user_places/places_detector.cpp rename to src/my-place/user_places/places_detector.cpp diff --git a/src/place/recognition/user_places/places_detector.h b/src/my-place/user_places/places_detector.h similarity index 100% rename from src/place/recognition/user_places/places_detector.h rename to src/my-place/user_places/places_detector.h diff --git a/src/place/recognition/user_places/prob_features_model.h b/src/my-place/user_places/prob_features_model.h similarity index 100% rename from src/place/recognition/user_places/prob_features_model.h rename to src/my-place/user_places/prob_features_model.h diff --git a/src/place/recognition/user_places/similarity.h b/src/my-place/user_places/similarity.h similarity index 100% rename from src/place/recognition/user_places/similarity.h rename to src/my-place/user_places/similarity.h diff --git a/src/place/recognition/user_places/user_places.cpp b/src/my-place/user_places/user_places.cpp similarity index 100% rename from src/place/recognition/user_places/user_places.cpp rename to src/my-place/user_places/user_places.cpp diff --git a/src/place/recognition/user_places/user_places.h b/src/my-place/user_places/user_places.h similarity index 100% rename from src/place/recognition/user_places/user_places.h rename to src/my-place/user_places/user_places.h diff --git a/src/place/recognition/user_places/user_places_params.h b/src/my-place/user_places/user_places_params.h similarity index 100% rename from src/place/recognition/user_places/user_places_params.h rename to src/my-place/user_places/user_places_params.h diff --git a/src/place/recognition/user_places/user_places_types.cpp b/src/my-place/user_places/user_places_types.cpp similarity index 100% rename from src/place/recognition/user_places/user_places_types.cpp rename to src/my-place/user_places/user_places_types.cpp diff --git a/src/place/recognition/user_places/user_places_types.h b/src/my-place/user_places/user_places_types.h similarity index 100% rename from src/place/recognition/user_places/user_places_types.h rename to src/my-place/user_places/user_places_types.h diff --git a/src/place/recognition/user_places/visit_categer.cpp b/src/my-place/user_places/visit_categer.cpp similarity index 100% rename from src/place/recognition/user_places/visit_categer.cpp rename to src/my-place/user_places/visit_categer.cpp diff --git a/src/place/recognition/user_places/visit_categer.h b/src/my-place/user_places/visit_categer.h similarity index 100% rename from src/place/recognition/user_places/visit_categer.h rename to src/my-place/user_places/visit_categer.h diff --git a/src/place/recognition/user_places/visit_detector.cpp b/src/my-place/user_places/visit_detector.cpp similarity index 100% rename from src/place/recognition/user_places/visit_detector.cpp rename to src/my-place/user_places/visit_detector.cpp diff --git a/src/place/recognition/user_places/visit_detector.h b/src/my-place/user_places/visit_detector.h similarity index 100% rename from src/place/recognition/user_places/visit_detector.h rename to src/my-place/user_places/visit_detector.h diff --git a/src/place/recognition/user_places/visit_listener_iface.h b/src/my-place/user_places/visit_listener_iface.h similarity index 100% rename from src/place/recognition/user_places/visit_listener_iface.h rename to src/my-place/user_places/visit_listener_iface.h diff --git a/src/place/recognition/user_places/wifi_listener_iface.h b/src/my-place/user_places/wifi_listener_iface.h similarity index 100% rename from src/place/recognition/user_places/wifi_listener_iface.h rename to src/my-place/user_places/wifi_listener_iface.h diff --git a/src/place/recognition/user_places/wifi_logger.cpp b/src/my-place/user_places/wifi_logger.cpp similarity index 100% rename from src/place/recognition/user_places/wifi_logger.cpp rename to src/my-place/user_places/wifi_logger.cpp diff --git a/src/place/recognition/user_places/wifi_logger.h b/src/my-place/user_places/wifi_logger.h similarity index 100% rename from src/place/recognition/user_places/wifi_logger.h rename to src/my-place/user_places/wifi_logger.h diff --git a/src/place/CMakeLists.txt b/src/place/CMakeLists.txt deleted file mode 100644 index 1db79f7..0000000 --- a/src/place/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -# prvd_cdef, prvd_deps, and prvd_srcs need to be set properly - -# Build flag for the place auto detection engine. -# Set this to "yes" to enable the engine. -SET(enable_recog_engine "no") - -# Common Profile -FILE(GLOB prvd_srcs *.cpp) - -# Mobile Profile -IF("${PROFILE}" STREQUAL "mobile") - FILE(GLOB_RECURSE prvd_srcs ${prvd_srcs} geofence/*.cpp) - SET(prvd_deps ${prvd_deps} capi-geofence-manager) - IF("${enable_recog_engine}" STREQUAL "yes") - FILE(GLOB_RECURSE prvd_srcs ${prvd_srcs} recognition/*.cpp) - SET(prvd_deps ${prvd_deps} capi-location-manager) - SET(prvd_deps ${prvd_deps} capi-network-wifi) - ELSE("${enable_recog_engine}" STREQUAL "yes") - SET(prvd_cdef ${prvd_cdef} _DISABLE_RECOG_ENGINE_) - ENDIF("${enable_recog_engine}" STREQUAL "yes") -ENDIF("${PROFILE}" STREQUAL "mobile") diff --git a/src/statistics/prediction/assoc_rule.cpp b/src/prediction/assoc_rule.cpp similarity index 100% rename from src/statistics/prediction/assoc_rule.cpp rename to src/prediction/assoc_rule.cpp diff --git a/src/statistics/prediction/assoc_rule.h b/src/prediction/assoc_rule.h similarity index 100% rename from src/statistics/prediction/assoc_rule.h rename to src/prediction/assoc_rule.h diff --git a/src/statistics/prediction/assoc_rule_miner.cpp b/src/prediction/assoc_rule_miner.cpp similarity index 100% rename from src/statistics/prediction/assoc_rule_miner.cpp rename to src/prediction/assoc_rule_miner.cpp diff --git a/src/statistics/prediction/assoc_rule_miner.h b/src/prediction/assoc_rule_miner.h similarity index 100% rename from src/statistics/prediction/assoc_rule_miner.h rename to src/prediction/assoc_rule_miner.h diff --git a/src/statistics/prediction/assoc_rule_of_ids.h b/src/prediction/assoc_rule_of_ids.h similarity index 100% rename from src/statistics/prediction/assoc_rule_of_ids.h rename to src/prediction/assoc_rule_of_ids.h diff --git a/src/statistics/prediction/assoc_rule_producer.cpp b/src/prediction/assoc_rule_producer.cpp similarity index 100% rename from src/statistics/prediction/assoc_rule_producer.cpp rename to src/prediction/assoc_rule_producer.cpp diff --git a/src/statistics/prediction/assoc_rule_producer.h b/src/prediction/assoc_rule_producer.h similarity index 100% rename from src/statistics/prediction/assoc_rule_producer.h rename to src/prediction/assoc_rule_producer.h diff --git a/src/statistics/prediction/basket.cpp b/src/prediction/basket.cpp similarity index 100% rename from src/statistics/prediction/basket.cpp rename to src/prediction/basket.cpp diff --git a/src/statistics/prediction/basket.h b/src/prediction/basket.h similarity index 100% rename from src/statistics/prediction/basket.h rename to src/prediction/basket.h diff --git a/src/statistics/prediction/basket_compressor.cpp b/src/prediction/basket_compressor.cpp similarity index 100% rename from src/statistics/prediction/basket_compressor.cpp rename to src/prediction/basket_compressor.cpp diff --git a/src/statistics/prediction/basket_compressor.h b/src/prediction/basket_compressor.h similarity index 100% rename from src/statistics/prediction/basket_compressor.h rename to src/prediction/basket_compressor.h diff --git a/src/statistics/prediction/basket_filter.cpp b/src/prediction/basket_filter.cpp similarity index 100% rename from src/statistics/prediction/basket_filter.cpp rename to src/prediction/basket_filter.cpp diff --git a/src/statistics/prediction/basket_filter.h b/src/prediction/basket_filter.h similarity index 100% rename from src/statistics/prediction/basket_filter.h rename to src/prediction/basket_filter.h diff --git a/src/statistics/prediction/basket_producer.cpp b/src/prediction/basket_producer.cpp similarity index 100% rename from src/statistics/prediction/basket_producer.cpp rename to src/prediction/basket_producer.cpp diff --git a/src/statistics/prediction/basket_producer.h b/src/prediction/basket_producer.h similarity index 100% rename from src/statistics/prediction/basket_producer.h rename to src/prediction/basket_producer.h diff --git a/src/statistics/prediction/baskets_agregator.cpp b/src/prediction/baskets_agregator.cpp similarity index 100% rename from src/statistics/prediction/baskets_agregator.cpp rename to src/prediction/baskets_agregator.cpp diff --git a/src/statistics/prediction/baskets_agregator.h b/src/prediction/baskets_agregator.h similarity index 100% rename from src/statistics/prediction/baskets_agregator.h rename to src/prediction/baskets_agregator.h diff --git a/src/statistics/prediction/event.cpp b/src/prediction/event.cpp similarity index 100% rename from src/statistics/prediction/event.cpp rename to src/prediction/event.cpp diff --git a/src/statistics/prediction/event.h b/src/prediction/event.h similarity index 100% rename from src/statistics/prediction/event.h rename to src/prediction/event.h diff --git a/src/statistics/prediction/event_set.h b/src/prediction/event_set.h similarity index 100% rename from src/statistics/prediction/event_set.h rename to src/prediction/event_set.h diff --git a/src/statistics/prediction/i_item_id_filter.h b/src/prediction/i_item_id_filter.h similarity index 100% rename from src/statistics/prediction/i_item_id_filter.h rename to src/prediction/i_item_id_filter.h diff --git a/src/statistics/prediction/interval.cpp b/src/prediction/interval.cpp similarity index 100% rename from src/statistics/prediction/interval.cpp rename to src/prediction/interval.cpp diff --git a/src/statistics/prediction/interval.h b/src/prediction/interval.h similarity index 100% rename from src/statistics/prediction/interval.h rename to src/prediction/interval.h diff --git a/src/statistics/prediction/item.cpp b/src/prediction/item.cpp similarity index 100% rename from src/statistics/prediction/item.cpp rename to src/prediction/item.cpp diff --git a/src/statistics/prediction/item.h b/src/prediction/item.h similarity index 100% rename from src/statistics/prediction/item.h rename to src/prediction/item.h diff --git a/src/statistics/prediction/item_catalogue.cpp b/src/prediction/item_catalogue.cpp similarity index 100% rename from src/statistics/prediction/item_catalogue.cpp rename to src/prediction/item_catalogue.cpp diff --git a/src/statistics/prediction/item_catalogue.h b/src/prediction/item_catalogue.h similarity index 100% rename from src/statistics/prediction/item_catalogue.h rename to src/prediction/item_catalogue.h diff --git a/src/statistics/prediction/item_id_set.h b/src/prediction/item_id_set.h similarity index 100% rename from src/statistics/prediction/item_id_set.h rename to src/prediction/item_id_set.h diff --git a/src/statistics/prediction/item_set.cpp b/src/prediction/item_set.cpp similarity index 100% rename from src/statistics/prediction/item_set.cpp rename to src/prediction/item_set.cpp diff --git a/src/statistics/prediction/item_set.h b/src/prediction/item_set.h similarity index 100% rename from src/statistics/prediction/item_set.h rename to src/prediction/item_set.h diff --git a/src/statistics/prediction/item_string_converter.cpp b/src/prediction/item_string_converter.cpp similarity index 100% rename from src/statistics/prediction/item_string_converter.cpp rename to src/prediction/item_string_converter.cpp diff --git a/src/statistics/prediction/item_string_converter.h b/src/prediction/item_string_converter.h similarity index 100% rename from src/statistics/prediction/item_string_converter.h rename to src/prediction/item_string_converter.h diff --git a/src/statistics/prediction/single_category_item_id_filter.cpp b/src/prediction/single_category_item_id_filter.cpp similarity index 100% rename from src/statistics/prediction/single_category_item_id_filter.cpp rename to src/prediction/single_category_item_id_filter.cpp diff --git a/src/statistics/prediction/single_category_item_id_filter.h b/src/prediction/single_category_item_id_filter.h similarity index 100% rename from src/statistics/prediction/single_category_item_id_filter.h rename to src/prediction/single_category_item_id_filter.h diff --git a/src/statistics/prediction/weight_apriori.cpp b/src/prediction/weight_apriori.cpp similarity index 100% rename from src/statistics/prediction/weight_apriori.cpp rename to src/prediction/weight_apriori.cpp diff --git a/src/statistics/prediction/weight_apriori.h b/src/prediction/weight_apriori.h similarity index 100% rename from src/statistics/prediction/weight_apriori.h rename to src/prediction/weight_apriori.h diff --git a/src/statistics/shared/CommonTypes.h b/src/shared/CommonTypes.h similarity index 100% rename from src/statistics/shared/CommonTypes.h rename to src/shared/CommonTypes.h diff --git a/src/statistics/shared/DbHandleBase.cpp b/src/shared/DbHandleBase.cpp similarity index 100% rename from src/statistics/shared/DbHandleBase.cpp rename to src/shared/DbHandleBase.cpp diff --git a/src/statistics/shared/DbHandleBase.h b/src/shared/DbHandleBase.h similarity index 100% rename from src/statistics/shared/DbHandleBase.h rename to src/shared/DbHandleBase.h diff --git a/src/device/DeviceContextProvider.cpp b/src/shared/DeviceContextProvider.cpp similarity index 58% rename from src/device/DeviceContextProvider.cpp rename to src/shared/DeviceContextProvider.cpp index 332efdc..5ff533d 100644 --- a/src/device/DeviceContextProvider.cpp +++ b/src/shared/DeviceContextProvider.cpp @@ -14,43 +14,25 @@ * limitations under the License. */ -#include -#include +#include #include -#include "system/SystemTypes.h" -#include "social/SocialTypes.h" -#include "activity/ActivityTypes.h" - -#include "system/Alarm.h" -#include "system/Time.h" +#include "../time/Alarm.h" +#include "../time/Time.h" +#include "../activity/Activity.h" +#include "../headphone/Headphone.h" +#include "../system/Battery.h" +#include "../system/Charger.h" +#include "../system/Gps.h" +#include "../system/Psmode.h" +#include "../system/Usb.h" +#include "../wifi/Wifi.h" #ifdef _MOBILE_ -#include "system/runtime_info/Charger.h" -#include "system/runtime_info/Gps.h" -#include "system/runtime_info/Usb.h" -#include "system/Wifi.h" -#include "system/Headphone.h" -#include "system/Battery.h" -#include "system/Psmode.h" -#include "social/Call.h" -#include "social/Email.h" -#include "social/Message.h" -#include "social/Contacts.h" -#include "activity/Activity.h" -#endif - -#ifdef _WEARABLE_ -#include "system/runtime_info/Charger.h" -#include "system/runtime_info/Gps.h" -#include "system/runtime_info/Usb.h" -#include "system/Wifi.h" -#include "system/Headphone.h" -#include "system/Battery.h" -#include "system/Psmode.h" -#include "social/Call.h" -#include "social/Message.h" -#include "activity/Activity.h" +#include "../call/Call.h" +#include "../contacts/Contacts.h" +#include "../email/Email.h" +#include "../message/Message.h" #endif #define PRIV_NETWORK "network.get" @@ -78,7 +60,6 @@ SO_EXPORT bool ctx::initDeviceContextProvider() registerProvider(DEVICE_ST_SUBJ_ALARM, NULL); registerProvider(DEVICE_ST_SUBJ_TIME, NULL); -#ifdef _MOBILE_ registerProvider(DEVICE_ST_SUBJ_WIFI, PRIV_NETWORK); registerProvider(DEVICE_ST_SUBJ_HEADPHONE, NULL); @@ -88,16 +69,17 @@ SO_EXPORT bool ctx::initDeviceContextProvider() registerProvider(DEVICE_ST_SUBJ_BATTERY, NULL); registerProvider(DEVICE_ST_SUBJ_PSMODE, NULL); - registerProvider(SOCIAL_ST_SUBJ_CALL, PRIV_TELEPHONY); - registerProvider(SOCIAL_ST_SUBJ_EMAIL, NULL); - registerProvider(SOCIAL_ST_SUBJ_MESSAGE, PRIV_MESSAGE); - registerProvider(SOCIAL_ST_SUBJ_CONTACTS, PRIV_CONTACT); - registerProvider(USER_ACT_SUBJ_STATIONARY, NULL); registerProvider(USER_ACT_SUBJ_WALKING, NULL); registerProvider(USER_ACT_SUBJ_RUNNING, NULL); registerProvider(USER_ACT_SUBJ_IN_VEHICLE, NULL); +#ifdef _MOBILE_ + registerProvider(SOCIAL_ST_SUBJ_CALL, PRIV_TELEPHONY); + registerProvider(SOCIAL_ST_SUBJ_EMAIL, NULL); + registerProvider(SOCIAL_ST_SUBJ_MESSAGE, PRIV_MESSAGE); + registerProvider(SOCIAL_ST_SUBJ_CONTACTS, PRIV_CONTACT); + /* Create context providers, which need to be initiated before being subscribed */ /* if (DeviceStatusWifi::isSupported()) @@ -105,24 +87,5 @@ SO_EXPORT bool ctx::initDeviceContextProvider() */ #endif -#ifdef _WEARABLE_ - registerProvider(DEVICE_ST_SUBJ_WIFI, PRIV_NETWORK); - registerProvider(DEVICE_ST_SUBJ_HEADPHONE, NULL); - - registerProvider(DEVICE_ST_SUBJ_CHARGER, NULL); - registerProvider(DEVICE_ST_SUBJ_GPS, NULL); - registerProvider(DEVICE_ST_SUBJ_USB, NULL); - registerProvider(DEVICE_ST_SUBJ_BATTERY, NULL); - registerProvider(DEVICE_ST_SUBJ_PSMODE, NULL); - - registerProvider(SOCIAL_ST_SUBJ_CALL, PRIV_TELEPHONY); - registerProvider(SOCIAL_ST_SUBJ_MESSAGE, PRIV_MESSAGE); - - registerProvider(USER_ACT_SUBJ_STATIONARY, NULL); - registerProvider(USER_ACT_SUBJ_WALKING, NULL); - registerProvider(USER_ACT_SUBJ_RUNNING, NULL); - registerProvider(USER_ACT_SUBJ_IN_VEHICLE, NULL); -#endif - return true; } diff --git a/src/device/DeviceProviderBase.cpp b/src/shared/DeviceProviderBase.cpp similarity index 100% rename from src/device/DeviceProviderBase.cpp rename to src/shared/DeviceProviderBase.cpp diff --git a/src/device/DeviceProviderBase.h b/src/shared/DeviceProviderBase.h similarity index 100% rename from src/device/DeviceProviderBase.h rename to src/shared/DeviceProviderBase.h diff --git a/src/place/PlaceContextProvider.cpp b/src/shared/PlaceContextProvider.cpp similarity index 85% rename from src/place/PlaceContextProvider.cpp rename to src/shared/PlaceContextProvider.cpp index 349000a..eba5ff0 100644 --- a/src/place/PlaceContextProvider.cpp +++ b/src/shared/PlaceContextProvider.cpp @@ -14,14 +14,13 @@ * limitations under the License. */ +#include #include #include #ifdef _MOBILE_ -#include "geofence/PlaceGeofenceProvider.h" -#ifndef _DISABLE_RECOG_ENGINE_ -#include "recognition/place_recognition.h" -#endif /* _DISABLE_RECOG_ENGINE_ */ +#include "../geofence/PlaceGeofenceProvider.h" +#include "../my-place/place_recognition.h" #endif /* _MOBILE_ */ template @@ -44,9 +43,9 @@ SO_EXPORT bool ctx::initPlaceContextProvider() #ifdef _MOBILE_ registerProvider(PLACE_SUBJ_GEOFENCE, PLACE_PRIV_GEOFENCE); -#ifndef _DISABLE_RECOG_ENGINE_ + /* registerProvider(PLACE_SUBJ_RECOGNITION, PLACE_PRIV_RECOGNITION); -#endif /* _DISABLE_RECOG_ENGINE_ */ + */ #endif /* _MOBILE_ */ return true; diff --git a/src/device/social/SocialTypes.h b/src/shared/SocialTypes.h similarity index 100% rename from src/device/social/SocialTypes.h rename to src/shared/SocialTypes.h diff --git a/src/statistics/StatisticsContextProvider.cpp b/src/shared/StatisticsContextProvider.cpp similarity index 85% rename from src/statistics/StatisticsContextProvider.cpp rename to src/shared/StatisticsContextProvider.cpp index 0dba666..cfaf008 100644 --- a/src/statistics/StatisticsContextProvider.cpp +++ b/src/shared/StatisticsContextProvider.cpp @@ -13,22 +13,17 @@ * limitations under the License. */ -#include -#include +#include #include -#include "app/AppStatsProvider.h" -#include "app/AppStatsLogger.h" - -#ifndef _DISABLE_PREDICTION_ENGINE_ -// include prediction engine header files here -#endif +#include "../app-stats/AppStatsProvider.h" +#include "../app-stats/AppStatsLogger.h" #ifdef _MOBILE_ -#include "media/MediaStatsProvider.h" -#include "media/MediaStatsLogger.h" -#include "social/SocialStatsProvider.h" -#include "social/SocialStatsLogger.h" +#include "../media-stats/MediaStatsProvider.h" +#include "../media-stats/MediaStatsLogger.h" +#include "../social-stats/SocialStatsProvider.h" +#include "../social-stats/SocialStatsLogger.h" #endif template @@ -56,10 +51,6 @@ SO_EXPORT bool ctx::initStatisticsContextProvider() registerProvider(APP_SUBJ_COMMON_SETTING, APP_HISTORY_PRIV); registerProvider(APP_SUBJ_FREQUENCY, APP_HISTORY_PRIV); -#ifndef _DISABLE_PREDICTION_ENGINE_ -// initialize the prediction engine here -#endif - #ifdef _MOBILE_ registerProvider(MEDIA_SUBJ_LOGGER, MEDIA_HISTORY_PRIV); registerProvider(MEDIA_SUBJ_PEAK_TIME_FOR_MUSIC, MEDIA_HISTORY_PRIV); diff --git a/src/statistics/shared/SystemInfo.cpp b/src/shared/SystemInfo.cpp similarity index 100% rename from src/statistics/shared/SystemInfo.cpp rename to src/shared/SystemInfo.cpp diff --git a/src/statistics/shared/SystemInfo.h b/src/shared/SystemInfo.h similarity index 100% rename from src/statistics/shared/SystemInfo.h rename to src/shared/SystemInfo.h diff --git a/src/device/system/SystemTypes.h b/src/shared/SystemTypes.h similarity index 100% rename from src/device/system/SystemTypes.h rename to src/shared/SystemTypes.h diff --git a/src/statistics/social/DbHandle.cpp b/src/social-stats/DbHandle.cpp similarity index 100% rename from src/statistics/social/DbHandle.cpp rename to src/social-stats/DbHandle.cpp diff --git a/src/statistics/social/DbHandle.h b/src/social-stats/DbHandle.h similarity index 100% rename from src/statistics/social/DbHandle.h rename to src/social-stats/DbHandle.h diff --git a/src/statistics/social/LogAggregator.cpp b/src/social-stats/LogAggregator.cpp similarity index 100% rename from src/statistics/social/LogAggregator.cpp rename to src/social-stats/LogAggregator.cpp diff --git a/src/statistics/social/LogAggregator.h b/src/social-stats/LogAggregator.h similarity index 100% rename from src/statistics/social/LogAggregator.h rename to src/social-stats/LogAggregator.h diff --git a/src/statistics/social/SocialStatisticsTypes.h b/src/social-stats/SocialStatisticsTypes.h similarity index 100% rename from src/statistics/social/SocialStatisticsTypes.h rename to src/social-stats/SocialStatisticsTypes.h diff --git a/src/statistics/social/SocialStatsLogger.cpp b/src/social-stats/SocialStatsLogger.cpp similarity index 100% rename from src/statistics/social/SocialStatsLogger.cpp rename to src/social-stats/SocialStatsLogger.cpp diff --git a/src/statistics/social/SocialStatsLogger.h b/src/social-stats/SocialStatsLogger.h similarity index 100% rename from src/statistics/social/SocialStatsLogger.h rename to src/social-stats/SocialStatsLogger.h diff --git a/src/statistics/social/SocialStatsProvider.cpp b/src/social-stats/SocialStatsProvider.cpp similarity index 100% rename from src/statistics/social/SocialStatsProvider.cpp rename to src/social-stats/SocialStatsProvider.cpp diff --git a/src/statistics/social/SocialStatsProvider.h b/src/social-stats/SocialStatsProvider.h similarity index 100% rename from src/statistics/social/SocialStatsProvider.h rename to src/social-stats/SocialStatsProvider.h diff --git a/src/statistics/CMakeLists.txt b/src/statistics/CMakeLists.txt deleted file mode 100644 index 6b35770..0000000 --- a/src/statistics/CMakeLists.txt +++ /dev/null @@ -1,31 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) -# prvd_cdef, prvd_deps, and prvd_srcs need to be set properly - -# Build flag for the prediction engine. -# Set this to "yes" to enable the engine. -SET(enable_prediction_engine "no") - -# Common Profile -FILE(GLOB prvd_srcs ./*.cpp) -FILE(GLOB prvd_srcs ${prvd_srcs} shared/*.cpp) -FILE(GLOB prvd_srcs ${prvd_srcs} app/*.cpp) -IF("${enable_prediction_engine}" STREQUAL "yes") - FILE(GLOB prvd_srcs ${prvd_srcs} prediction/*.cpp) -ELSE("${enable_prediction_engine}" STREQUAL "yes") - SET(prvd_cdef ${prvd_cdef} _DISABLE_PREDICTION_ENGINE_) -ENDIF("${enable_prediction_engine}" STREQUAL "yes") - -SET(prvd_deps capi-system-runtime-info pkgmgr pkgmgr-info capi-appfw-package-manager) -SET(prvd_deps ${prvd_deps} capi-appfw-application capi-appfw-app-manager) -SET(prvd_deps ${prvd_deps} capi-media-sound-manager) - -# Mobile Profile -IF("${PROFILE}" STREQUAL "mobile") - FILE(GLOB prvd_srcs ${prvd_srcs} media/*.cpp) - FILE(GLOB prvd_srcs ${prvd_srcs} social/*.cpp) - SET(prvd_deps ${prvd_deps} contacts-service2 capi-content-media-content) -ENDIF("${PROFILE}" STREQUAL "mobile") - -# Wearable Profile -#IF("${PROFILE}" STREQUAL "wearable") -#ENDIF("${PROFILE}" STREQUAL "wearable") diff --git a/src/device/system/Battery.cpp b/src/system/Battery.cpp similarity index 99% rename from src/device/system/Battery.cpp rename to src/system/Battery.cpp index 94c3d58..69b1ecd 100644 --- a/src/device/system/Battery.cpp +++ b/src/system/Battery.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "SystemTypes.h" #include "Battery.h" using namespace ctx; diff --git a/src/device/system/Battery.h b/src/system/Battery.h similarity index 94% rename from src/device/system/Battery.h rename to src/system/Battery.h index d016798..34482b4 100644 --- a/src/device/system/Battery.h +++ b/src/system/Battery.h @@ -19,7 +19,8 @@ #include #include -#include "../DeviceProviderBase.h" +#include "../shared/SystemTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/device/system/runtime_info/Charger.cpp b/src/system/Charger.cpp similarity index 98% rename from src/device/system/runtime_info/Charger.cpp rename to src/system/Charger.cpp index 8cdf40a..5703747 100644 --- a/src/device/system/runtime_info/Charger.cpp +++ b/src/system/Charger.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "../SystemTypes.h" #include "Charger.h" using namespace ctx; diff --git a/src/device/system/runtime_info/Charger.h b/src/system/Charger.h similarity index 100% rename from src/device/system/runtime_info/Charger.h rename to src/system/Charger.h diff --git a/src/device/system/runtime_info/Gps.cpp b/src/system/Gps.cpp similarity index 98% rename from src/device/system/runtime_info/Gps.cpp rename to src/system/Gps.cpp index d2bc301..9b6d083 100644 --- a/src/device/system/runtime_info/Gps.cpp +++ b/src/system/Gps.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "../SystemTypes.h" #include "Gps.h" using namespace ctx; diff --git a/src/device/system/runtime_info/Gps.h b/src/system/Gps.h similarity index 100% rename from src/device/system/runtime_info/Gps.h rename to src/system/Gps.h diff --git a/src/device/system/Psmode.cpp b/src/system/Psmode.cpp similarity index 98% rename from src/device/system/Psmode.cpp rename to src/system/Psmode.cpp index c52b176..c7d61d7 100644 --- a/src/device/system/Psmode.cpp +++ b/src/system/Psmode.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "SystemTypes.h" #include "Psmode.h" using namespace ctx; diff --git a/src/device/system/Psmode.h b/src/system/Psmode.h similarity index 93% rename from src/device/system/Psmode.h rename to src/system/Psmode.h index d324ac3..0cbe3cb 100644 --- a/src/device/system/Psmode.h +++ b/src/system/Psmode.h @@ -18,7 +18,8 @@ #define _DEVICE_SYSTEM_STATUS_POWER_SAVING_MODE_H_ #include -#include "../DeviceProviderBase.h" +#include "../shared/SystemTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/device/system/runtime_info/RuntimeInfoBase.cpp b/src/system/RuntimeInfoBase.cpp similarity index 100% rename from src/device/system/runtime_info/RuntimeInfoBase.cpp rename to src/system/RuntimeInfoBase.cpp diff --git a/src/device/system/runtime_info/RuntimeInfoBase.h b/src/system/RuntimeInfoBase.h similarity index 94% rename from src/device/system/runtime_info/RuntimeInfoBase.h rename to src/system/RuntimeInfoBase.h index a2e4a88..7d8f6ee 100644 --- a/src/device/system/runtime_info/RuntimeInfoBase.h +++ b/src/system/RuntimeInfoBase.h @@ -18,7 +18,8 @@ #define _DEVICE_SYSTEM_STATUS_RUNTIME_INFO_BASE_H_ #include -#include "../../DeviceProviderBase.h" +#include "../shared/SystemTypes.h" +#include "../shared/DeviceProviderBase.h" namespace ctx { diff --git a/src/device/system/runtime_info/Usb.cpp b/src/system/Usb.cpp similarity index 98% rename from src/device/system/runtime_info/Usb.cpp rename to src/system/Usb.cpp index e0aa6af..c94edf7 100644 --- a/src/device/system/runtime_info/Usb.cpp +++ b/src/system/Usb.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "../SystemTypes.h" #include "Usb.h" using namespace ctx; diff --git a/src/device/system/runtime_info/Usb.h b/src/system/Usb.h similarity index 100% rename from src/device/system/runtime_info/Usb.h rename to src/system/Usb.h diff --git a/src/device/system/Alarm.cpp b/src/time/Alarm.cpp similarity index 99% rename from src/device/system/Alarm.cpp rename to src/time/Alarm.cpp index edc7bad..26bac0b 100644 --- a/src/device/system/Alarm.cpp +++ b/src/time/Alarm.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "SystemTypes.h" #include "Alarm.h" using namespace ctx; diff --git a/src/device/system/Alarm.h b/src/time/Alarm.h similarity index 98% rename from src/device/system/Alarm.h rename to src/time/Alarm.h index 5535e5c..797e62f 100644 --- a/src/device/system/Alarm.h +++ b/src/time/Alarm.h @@ -21,6 +21,7 @@ #include #include #include +#include "../shared/SystemTypes.h" namespace ctx { diff --git a/src/device/system/Time.cpp b/src/time/Time.cpp similarity index 98% rename from src/device/system/Time.cpp rename to src/time/Time.cpp index 6fa0c81..73f3f37 100644 --- a/src/device/system/Time.cpp +++ b/src/time/Time.cpp @@ -15,7 +15,6 @@ */ #include -#include "SystemTypes.h" #include "Time.h" using namespace ctx; diff --git a/src/device/system/Time.h b/src/time/Time.h similarity index 92% rename from src/device/system/Time.h rename to src/time/Time.h index e5e1112..48e2202 100644 --- a/src/device/system/Time.h +++ b/src/time/Time.h @@ -17,7 +17,8 @@ #ifndef _DEVICE_SYSTEM_STATUS_TIME_H_ #define _DEVICE_SYSTEM_STATUS_TIME_H_ -#include "../DeviceProviderBase.h" +#include "../shared/DeviceProviderBase.h" +#include "../shared/SystemTypes.h" namespace ctx { diff --git a/src/device/system/Wifi.cpp b/src/wifi/Wifi.cpp similarity index 99% rename from src/device/system/Wifi.cpp rename to src/wifi/Wifi.cpp index 5f6cca7..8de9fa4 100644 --- a/src/device/system/Wifi.cpp +++ b/src/wifi/Wifi.cpp @@ -15,7 +15,6 @@ */ #include -#include "SystemTypes.h" #include "Wifi.h" using namespace ctx; diff --git a/src/device/system/Wifi.h b/src/wifi/Wifi.h similarity index 95% rename from src/device/system/Wifi.h rename to src/wifi/Wifi.h index 82cebb2..2c5cee6 100644 --- a/src/device/system/Wifi.h +++ b/src/wifi/Wifi.h @@ -19,7 +19,8 @@ #include #include -#include "../DeviceProviderBase.h" +#include "../shared/DeviceProviderBase.h" +#include "../shared/SystemTypes.h" namespace ctx { -- 2.34.1