# Dependencies (Base)
SET(provider_deps "context-common vconf capi-system-info capi-system-device capi-system-runtime-info")
-SET(provider_deps "${provider_deps} capi-network-bluetooth capi-network-wifi")
# Mobile profile
IF("${PROFILE}" STREQUAL "mobile")
ADD_DEFINITIONS("-D_MOBILE_")
+ SET(provider_deps "${provider_deps} capi-network-bluetooth capi-network-wifi")
SET(provider_deps "${provider_deps} capi-telephony tapi msg-service capi-messaging-email motion")
FILE(GLOB_RECURSE SRCS ${SRCS} src/activity/*.cpp)
FILE(GLOB_RECURSE SRCS ${SRCS} src/device_status/*.cpp)
# Wearable profile
IF("${PROFILE}" STREQUAL "wearable")
ADD_DEFINITIONS("-D_WEARABLE_")
+ SET(provider_deps "${provider_deps} capi-network-bluetooth capi-network-wifi")
SET(provider_deps "${provider_deps} capi-telephony tapi msg-service motion")
FILE(GLOB_RECURSE SRCS ${SRCS} src/activity/*.cpp)
FILE(GLOB_RECURSE SRCS ${SRCS} src/device_status/*.cpp)
# TV profile
IF("${PROFILE}" STREQUAL "tv")
ADD_DEFINITIONS("-D_TV_")
+ SET(provider_deps "${provider_deps} capi-network-bluetooth capi-network-wifi")
SET(SRCS
${SRCS}
src/device_status/headphone.cpp
BuildRequires: pkgconfig(capi-system-device)
BuildRequires: pkgconfig(capi-system-runtime-info)
+%if "%{?BUILD_PROFILE}" == "mobile"
BuildRequires: pkgconfig(capi-network-bluetooth)
BuildRequires: pkgconfig(capi-network-wifi)
-
-%if "%{?BUILD_PROFILE}" == "mobile"
BuildRequires: pkgconfig(capi-telephony)
BuildRequires: pkgconfig(tapi)
BuildRequires: pkgconfig(msg-service)
%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)
+%endif
+
%description
Device Context Provider
#include "social_status/social_status_types.h"
#include "activity/activity_types.h"
-#include "device_status/wifi.h"
-#include "device_status/headphone.h"
-
#ifdef _MOBILE_
#include "device_status/runtime-info/charger.h"
#include "device_status/runtime-info/gps.h"
#include "device_status/runtime-info/usb.h"
+#include "device_status/wifi.h"
+#include "device_status/headphone.h"
#include "device_status/battery.h"
#include "device_status/psmode.h"
#include "social_status/call.h"
#include "device_status/runtime-info/charger.h"
#include "device_status/runtime-info/gps.h"
#include "device_status/runtime-info/usb.h"
+#include "device_status/wifi.h"
+#include "device_status/headphone.h"
#include "device_status/battery.h"
#include "device_status/psmode.h"
#include "social_status/call.h"
#include "activity/activity.h"
#endif
+#ifdef _TV_
+#include "device_status/wifi.h"
+#include "device_status/headphone.h"
+#endif
+
#define PRIV_NETWORK "network.get"
#define PRIV_TELEPHONY "telephony"
#define PRIV_MESSAGE "message.read"
EXTAPI bool ctx::init_device_context_provider()
{
+#ifdef _MOBILE_
register_provider<device_status_wifi>(DEVICE_ST_SUBJ_WIFI, PRIV_NETWORK);
register_provider<device_status_headphone>(DEVICE_ST_SUBJ_HEADPHONE, NULL);
-#ifdef _MOBILE_
register_provider<device_status_charger>(DEVICE_ST_SUBJ_CHARGER, NULL);
register_provider<device_status_gps>(DEVICE_ST_SUBJ_GPS, NULL);
register_provider<device_status_usb>(DEVICE_ST_SUBJ_USB, NULL);
register_provider<user_activity_walking>(USER_ACT_SUBJ_WALKING, NULL);
register_provider<user_activity_running>(USER_ACT_SUBJ_RUNNING, NULL);
register_provider<user_activity_in_vehicle>(USER_ACT_SUBJ_IN_VEHICLE, NULL);
+
+ /* Create context providers, which need to be initiated before being subscribed */
+ if (device_status_wifi::is_supported())
+ device_status_wifi::create(NULL);
#endif
#ifdef _WEARABLE_
+ register_provider<device_status_wifi>(DEVICE_ST_SUBJ_WIFI, PRIV_NETWORK);
+ register_provider<device_status_headphone>(DEVICE_ST_SUBJ_HEADPHONE, NULL);
+
register_provider<device_status_charger>(DEVICE_ST_SUBJ_CHARGER, NULL);
register_provider<device_status_gps>(DEVICE_ST_SUBJ_GPS, NULL);
register_provider<device_status_usb>(DEVICE_ST_SUBJ_USB, NULL);
register_provider<user_activity_walking>(USER_ACT_SUBJ_WALKING, NULL);
register_provider<user_activity_running>(USER_ACT_SUBJ_RUNNING, NULL);
register_provider<user_activity_in_vehicle>(USER_ACT_SUBJ_IN_VEHICLE, NULL);
+
+ /* Create context providers, which need to be initiated before being subscribed */
+ if (device_status_wifi::is_supported())
+ device_status_wifi::create(NULL);
#endif
+#ifdef _TV_
+ register_provider<device_status_wifi>(DEVICE_ST_SUBJ_WIFI, PRIV_NETWORK);
+ register_provider<device_status_headphone>(DEVICE_ST_SUBJ_HEADPHONE, NULL);
+
/* Create context providers, which need to be initiated before being subscribed */
if (device_status_wifi::is_supported())
device_status_wifi::create(NULL);
+#endif
return true;
}