From: mk5004.lee Date: Wed, 4 Sep 2019 01:10:36 +0000 (+0900) Subject: Restore the checkbox_is_checked api X-Git-Tag: accepted/tizen/unified/20190904.110652~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=453ceebf568b2530c56173adbb519088d8842b36;p=platform%2Fcore%2Fapi%2Fnotification.git Restore the checkbox_is_checked api Change-Id: I206aa28633a04356c56a7a5feabafbfb6fbe405b Signed-off-by: mk5004.lee --- diff --git a/notification-ex/api/notification_ex_checkbox.h b/notification-ex/api/notification_ex_checkbox.h index 780a41e..469be38 100644 --- a/notification-ex/api/notification_ex_checkbox.h +++ b/notification-ex/api/notification_ex_checkbox.h @@ -161,6 +161,8 @@ int noti_ex_item_checkbox_set_check_state(noti_ex_item_h handle, bool checked); */ int noti_ex_item_checkbox_set_multi_language(noti_ex_item_h handle, noti_ex_multi_lang_h lang); +int noti_ex_item_checkbox_is_checked(noti_ex_item_h handle, bool *checked); + /** * @} */ diff --git a/notification-ex/stub.cc b/notification-ex/stub.cc index afce06f..5e5de9a 100644 --- a/notification-ex/stub.cc +++ b/notification-ex/stub.cc @@ -545,6 +545,23 @@ extern "C" EXPORT_API int noti_ex_item_checkbox_get_title(noti_ex_item_h handle, return NOTI_EX_ERROR_NONE; } +extern "C" EXPORT_API int noti_ex_item_checkbox_is_checked( + noti_ex_item_h handle, bool *checked) { + if (handle == nullptr || checked == nullptr) { + LOGE("Invalid parameter"); + return NOTI_EX_ERROR_INVALID_PARAMETER; + } + Handle* h = static_cast(handle); + if (!h->IsValidType(AbstractItem::CheckBox)) { + LOGE("Invalid handle type"); + return NOTI_EX_ERROR_INVALID_PARAMETER; + } + CheckBoxItem* p = static_cast(h->Get()); + *checked = p->IsChecked(); + + return NOTI_EX_ERROR_NONE; +} + extern "C" EXPORT_API int noti_ex_item_checkbox_get_check_state( noti_ex_item_h handle, bool *checked) { if (handle == nullptr || checked == nullptr) {