: parent_(parent), provider_id_(provider_id),
gdbus_(std::unique_ptr<IGDBus>(ComplicationConnector::GetInst(mock).CreateGDBus(mock))),
mock_(mock) {
+ int ret = util::CheckPrivilege(PRIVILEGE_DATASHARING);
subscribe_id_ = gdbus_.get()->SubscribeSignal(
IGDBus::Complication, provider_id_, -1, this);
std::list<std::string> privilege_list;
required_privileges_.push_back(std::string(PRIVILEGE_DATASHARING));
- int ret = DBManager::GetSupportTypes(provider_id_, &supported_types_);
+ ret = DBManager::GetSupportTypes(provider_id_, &supported_types_);
if (ret != WATCHFACE_COMPLICATION_ERROR_NONE) {
LOGE("fail to get support types");
THROW(ret);
/**
* @brief Adds the callback function to be executed when the update requested.
* @since_tizen 5.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/datasharing
+ * @remarks Since 5.5, %http://tizen.org/privilege/datasharing is required.
* @param[in] provider_id The id of the provider
* @param[in] callback The callback function
* @param[in] user_data The user data passed from the callback function
* @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
* @retval #WATCHFACE_COMPLICATION_ERROR_DB Database error
* @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #WATCHFACE_COMPLICATION_ERROR_PERMISSION_DENIED Permission denied
* @see watchface_complication_provider_remove_update_requested_cb()
* @par Sample code:
* @code