diff options
author | mk5004.lee <mk5004.lee@samsung.com> | 2019-09-04 10:10:36 +0900 |
---|---|---|
committer | mk5004.lee <mk5004.lee@samsung.com> | 2019-09-04 10:10:36 +0900 |
commit | 453ceebf568b2530c56173adbb519088d8842b36 (patch) | |
tree | 14d9f8622d084bc2130a8cbd0fdec85bacd7ba20 /notification-ex/stub.cc | |
parent | a995c0cc242e726bbae1463577e5700af19e9e8f (diff) | |
download | notification-453ceebf568b2530c56173adbb519088d8842b36.tar.gz notification-453ceebf568b2530c56173adbb519088d8842b36.tar.bz2 notification-453ceebf568b2530c56173adbb519088d8842b36.zip |
Restore the checkbox_is_checked api
Change-Id: I206aa28633a04356c56a7a5feabafbfb6fbe405b
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
Diffstat (limited to 'notification-ex/stub.cc')
-rw-r--r-- | notification-ex/stub.cc | 17 |
1 files changed, 17 insertions, 0 deletions
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*>(handle); + if (!h->IsValidType(AbstractItem::CheckBox)) { + LOGE("Invalid handle type"); + return NOTI_EX_ERROR_INVALID_PARAMETER; + } + CheckBoxItem* p = static_cast<CheckBoxItem*>(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) { |