#include <glib.h>
#include <dlog.h>
+#include <system_info.h>
#ifdef LOG_TAG
#undef LOG_TAG
/* Used by both accounts and gtme. However as of now, gtme does not have any dependency on account, so duplicating the same */
#define MAX_SYS_CONTEXT_SIZE 1024
+#define ACCOUNT_FEATURE "http://tizen.org/feature/account"
+
+#define CHECK_ACCOUNT_SUPPORTED(feature_name) \
+do { \
+ bool is_supported = false; \
+ if (!system_info_get_platform_bool(feature_name, &is_supported)) { \
+ if (is_supported == false) { \
+ LOGE("[%s] feature is disabled", feature_name); \
+ return ACCOUNT_ERROR_NOT_SUPPORTED; \
+ } \
+ } else { \
+ LOGE("Error - Feature getting from System Info"); \
+ return ACCOUNT_ERROR_OPERATION_FAIL; \
+ } \
+} while (0)
+
+
#ifdef __cplusplus
}
#endif
Name: account-common
Summary: Account common library
-Version: 0.1.12
+Version: 0.1.13
Release: 1
Group: Social & Content/API
License: Apache-2.0
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(glib-2.0) >= 2.26
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(db-util)