int context_history_filter_set_string(context_history_filter_h filter, context_history_filter_e filter_type, const char* value) TIZEN_DEPRECATED_API;
/**
+ * @brief Checks whether a history data type is supported in the current device.
+ * @since_tizen 4.0
+ *
+ * @param[in] data_type Type of history data
+ * @param[out] supported If supported, @c true; Otherwise, @c false
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CONTEXT_TRIGGER_ERROR_NONE Successful
+ * @retval #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED Operation failed
+ */
+int context_history_is_supported(context_history_data_e data_type, bool* supported);
+
+/**
* @brief Reads context statistics or patterns.
* @details Retrieves a given type of context statistics or patterns list.
* See the programming guide to find available filter type #context_history_filter_e@n
return CONTEXT_HISTORY_ERROR_NONE;
}
+EXPORT_API int context_history_is_supported(context_history_data_e data_type, bool* supported)
+{
+ ASSERT_NOT_NULL(supported);
+
+ if (history_is_deprecated(data_type)) {
+ _W(HISTORY_DEPRECATED_DATA);
+ }
+
+ std::string data_type_str = convert_data_to_string(data_type);
+ if (data_type_str.empty()) {
+ return CONTEXT_HISTORY_ERROR_INVALID_PARAMETER;
+ }
+
+ return ctx_history_is_supported(data_type_str.c_str(), supported);
+}
+
EXPORT_API int context_history_get_list(context_history_h handle, context_history_data_e data_type, context_history_filter_h filter, context_history_list_h* list)
{
ASSERT_NOT_NULL(handle);