From: Junkyeong Kim Date: Fri, 7 Oct 2022 05:03:44 +0000 (+0900) Subject: dpms: remove function parameters ds_ prefix X-Git-Tag: accepted/tizen/unified/20230106.165108~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e488b35d5f5796a7cf0c0a65b281f2c50d58699b;p=platform%2Fcore%2Fuifw%2Flibds-tizen.git dpms: remove function parameters ds_ prefix Change-Id: I147a59d8e0824cccd94cec022838a8e5c8dc2be6 Signed-off-by: Junkyeong Kim --- diff --git a/include/libds-tizen/dpms.h b/include/libds-tizen/dpms.h index ea873b4..af2ce93 100644 --- a/include/libds-tizen/dpms.h +++ b/include/libds-tizen/dpms.h @@ -51,11 +51,11 @@ ds_tizen_dpms_add_get_dpms_listener(struct ds_tizen_dpms *dpms, void ds_tizen_dpms_send_set_result(struct ds_tizen_dpms *dpms, - enum ds_tizen_dpms_mode ds_mode, enum ds_tizen_dpms_error ds_error); + enum ds_tizen_dpms_mode mode, enum ds_tizen_dpms_error error); void ds_tizen_dpms_send_get_result(struct ds_tizen_dpms *dpms, - enum ds_tizen_dpms_mode ds_mode, enum ds_tizen_dpms_error ds_error); + enum ds_tizen_dpms_mode mode, enum ds_tizen_dpms_error error); #ifdef __cplusplus } diff --git a/src/dpms/dpms.c b/src/dpms/dpms.c index e352317..c63f175 100644 --- a/src/dpms/dpms.c +++ b/src/dpms/dpms.c @@ -44,28 +44,28 @@ _ds_tizen_dpms_get_ds_dpms_mode(uint32_t mode) } static uint32_t -_ds_tizen_dpms_get_tizen_dpms_mode(enum ds_tizen_dpms_mode ds_mode) +_ds_tizen_dpms_get_tizen_dpms_mode(enum ds_tizen_dpms_mode mode) { - if (ds_mode == DS_TIZEN_DPMS_MODE_ON) + if (mode == DS_TIZEN_DPMS_MODE_ON) return TIZEN_DPMS_MANAGER_MODE_ON; - else if (ds_mode == DS_TIZEN_DPMS_MODE_STANDBY) + else if (mode == DS_TIZEN_DPMS_MODE_STANDBY) return TIZEN_DPMS_MANAGER_MODE_STANDBY; - else if (ds_mode == DS_TIZEN_DPMS_MODE_SUSPEND) + else if (mode == DS_TIZEN_DPMS_MODE_SUSPEND) return TIZEN_DPMS_MANAGER_MODE_SUSPEND; else //DS_TIZEN_DPMS_MODE_OFF return TIZEN_DPMS_MANAGER_MODE_OFF; } static uint32_t -_ds_tizen_dpms_get_tizen_dpms_error(enum ds_tizen_dpms_error ds_error) +_ds_tizen_dpms_get_tizen_dpms_error(enum ds_tizen_dpms_error error) { - if (ds_error == DS_TIZEN_DPMS_ERROR_NONE) + if (error == DS_TIZEN_DPMS_ERROR_NONE) return TIZEN_DPMS_MANAGER_ERROR_NONE; - else if (ds_error == DS_TIZEN_DPMS_ERROR_INVALID_PERMISSION) + else if (error == DS_TIZEN_DPMS_ERROR_INVALID_PERMISSION) return TIZEN_DPMS_MANAGER_ERROR_INVALID_PERMISSION; - else if (ds_error == DS_TIZEN_DPMS_ERROR_INVALID_PARAMETER) + else if (error == DS_TIZEN_DPMS_ERROR_INVALID_PARAMETER) return TIZEN_DPMS_MANAGER_ERROR_INVALID_PARAMETER; - else if (ds_error == DS_TIZEN_DPMS_ERROR_NOT_SUPPORTED) + else if (error == DS_TIZEN_DPMS_ERROR_NOT_SUPPORTED) return TIZEN_DPMS_MANAGER_ERROR_NOT_SUPPORTED; else //DS_TIZEN_DPMS_ERROR_ALREADY_DONE return TIZEN_DPMS_MANAGER_ERROR_ALREADY_DONE; @@ -125,36 +125,36 @@ ds_tizen_dpms_add_get_dpms_listener(struct ds_tizen_dpms *dpms, WL_EXPORT void ds_tizen_dpms_send_set_result(struct ds_tizen_dpms *dpms, - enum ds_tizen_dpms_mode ds_mode, enum ds_tizen_dpms_error ds_error) + enum ds_tizen_dpms_mode mode, enum ds_tizen_dpms_error error) { - uint32_t mode; - uint32_t error; + uint32_t tizen_dpms_mode; + uint32_t tizen_dpms_error; - if (ds_mode > DS_TIZEN_DPMS_MODE_OFF || ds_error > DS_TIZEN_DPMS_ERROR_ALREADY_DONE) { + if (mode > DS_TIZEN_DPMS_MODE_OFF || error > DS_TIZEN_DPMS_ERROR_ALREADY_DONE) { ds_err("dpms send set result error invalid parameter"); return; } - mode = _ds_tizen_dpms_get_tizen_dpms_mode(ds_mode); - error = _ds_tizen_dpms_get_tizen_dpms_error(ds_error); - ds_dbg("dpms send set result : mode(%d), error(%d)", mode, error); - tizen_dpms_manager_send_set_state(dpms->res, mode, error); + tizen_dpms_mode = _ds_tizen_dpms_get_tizen_dpms_mode(mode); + tizen_dpms_error = _ds_tizen_dpms_get_tizen_dpms_error(error); + ds_dbg("dpms send set result : mode(%d), error(%d)", tizen_dpms_mode, tizen_dpms_error); + tizen_dpms_manager_send_set_state(dpms->res, tizen_dpms_mode, tizen_dpms_error); } WL_EXPORT void ds_tizen_dpms_send_get_result(struct ds_tizen_dpms *dpms, - enum ds_tizen_dpms_mode ds_mode, enum ds_tizen_dpms_error ds_error) + enum ds_tizen_dpms_mode mode, enum ds_tizen_dpms_error error) { - uint32_t mode; - uint32_t error; + uint32_t tizen_dpms_mode; + uint32_t tizen_dpms_error; - if (ds_mode > DS_TIZEN_DPMS_MODE_OFF || ds_error > DS_TIZEN_DPMS_ERROR_ALREADY_DONE) { + if (mode > DS_TIZEN_DPMS_MODE_OFF || error > DS_TIZEN_DPMS_ERROR_ALREADY_DONE) { ds_err("dpms send get result error invalid parameter"); return; } - mode = _ds_tizen_dpms_get_tizen_dpms_mode(ds_mode); - error = _ds_tizen_dpms_get_tizen_dpms_error(ds_error); - ds_dbg("dpms send get result : mode(%d), error(%d)", mode, error); - tizen_dpms_manager_send_get_state(dpms->res, mode, error); + tizen_dpms_mode = _ds_tizen_dpms_get_tizen_dpms_mode(mode); + tizen_dpms_error = _ds_tizen_dpms_get_tizen_dpms_error(error); + ds_dbg("dpms send get result : mode(%d), error(%d)", tizen_dpms_mode, tizen_dpms_error); + tizen_dpms_manager_send_get_state(dpms->res, tizen_dpms_mode, tizen_dpms_error); } static void