From 664dba1111394e17bd11aa139bf3e4940d5f912d Mon Sep 17 00:00:00 2001 From: hyunho Date: Thu, 12 Mar 2020 10:26:37 +0900 Subject: [PATCH] Add block update capi for sharable_watch Change-Id: Ibf31642540d724b79cd478ed9b9adc75843fa8c4 Signed-off-by: hyunho --- watch-holder/api/sharable_watch.cc | 5 +++++ watch-holder/api/sharable_watch.h | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/watch-holder/api/sharable_watch.cc b/watch-holder/api/sharable_watch.cc index 92270e4b..c3a12910 100644 --- a/watch-holder/api/sharable_watch.cc +++ b/watch-holder/api/sharable_watch.cc @@ -67,3 +67,8 @@ C_EXPORT int sharable_watch_is_faulted(sharable_watch_h watch, bool *faulted) { watch_h w = reinterpret_cast(watch); return watch_is_faulted(w, faulted); } + +C_EXPORT int sharable_watch_block_update(sharable_watch_h watch, bool enable) { + watch_h w = reinterpret_cast(watch); + return watch_block_update(w, enable); +} diff --git a/watch-holder/api/sharable_watch.h b/watch-holder/api/sharable_watch.h index 40466444..4f8c3a94 100644 --- a/watch-holder/api/sharable_watch.h +++ b/watch-holder/api/sharable_watch.h @@ -122,6 +122,17 @@ int sharable_watch_is_bound(sharable_watch_h watch, bool *bound); */ int sharable_watch_is_faulted(sharable_watch_h watch, bool *faulted); +/** + * @brief Blocks watch buffer update. + * @remarks This function only for internal applications. + * @param[in] watch The sharable watch handle + * @param[in] enable Whether the watch buffer update is blocked or not + * @return #WATCH_HOLDER_ERROR_NONE on success, otherwise a negative error value + * @retval #WATCH_HOLDER_ERROR_NONE Success + * @retval #WATCH_HOLDER_ERROR_INVALID_PARAMETER Invalid parameter + */ +int sharable_watch_block_update(sharable_watch_h watch, bool enable); + #ifdef __cplusplus } #endif -- 2.34.1