From: José Roberto de Souza Date: Tue, 11 Dec 2012 19:51:02 +0000 (+0000) Subject: edbus: Change some function parameters to const X-Git-Tag: submit/devel/efl/20131022.203902~2920 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a4cbf1e4ca7a320524160ef3b8bfb78fdf801cb;p=platform%2Fupstream%2Fefl.git edbus: Change some function parameters to const Patch by: José Roberto de Souza SVN revision: 80699 --- diff --git a/legacy/edbus/src/lib/edbus_service.c b/legacy/edbus/src/lib/edbus_service.c index 42a56ae..0eeee8c 100644 --- a/legacy/edbus/src/lib/edbus_service.c +++ b/legacy/edbus/src/lib/edbus_service.c @@ -1208,7 +1208,7 @@ edbus_service_object_path_get(const EDBus_Service_Interface *iface) } EAPI EDBus_Message * -edbus_service_signal_new(EDBus_Service_Interface *iface, unsigned int signal_id) +edbus_service_signal_new(const EDBus_Service_Interface *iface, unsigned int signal_id) { unsigned size; EDBUS_SERVICE_INTERFACE_CHECK_RETVAL(iface, EINA_FALSE); @@ -1220,7 +1220,7 @@ edbus_service_signal_new(EDBus_Service_Interface *iface, unsigned int signal_id) } EAPI Eina_Bool -edbus_service_signal_emit(EDBus_Service_Interface *iface, unsigned int signal_id, ...) +edbus_service_signal_emit(const EDBus_Service_Interface *iface, unsigned int signal_id, ...) { EDBus_Message *sig; va_list ap; @@ -1247,7 +1247,7 @@ edbus_service_signal_emit(EDBus_Service_Interface *iface, unsigned int signal_id } EAPI Eina_Bool -edbus_service_signal_send(EDBus_Service_Interface *iface, EDBus_Message *signal_msg) +edbus_service_signal_send(const EDBus_Service_Interface *iface, EDBus_Message *signal_msg) { EDBUS_SERVICE_INTERFACE_CHECK_RETVAL(iface, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(signal_msg, EINA_FALSE); @@ -1377,9 +1377,10 @@ error: } EAPI Eina_Bool -edbus_service_property_changed(EDBus_Service_Interface *iface, const char *name) +edbus_service_property_changed(const EDBus_Service_Interface *interface, const char *name) { Property *prop; + EDBus_Service_Interface *iface = (EDBus_Service_Interface *)interface; EDBUS_SERVICE_INTERFACE_CHECK_RETVAL(iface, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); @@ -1395,9 +1396,10 @@ edbus_service_property_changed(EDBus_Service_Interface *iface, const char *name) } EAPI Eina_Bool -edbus_service_property_invalidate_set(EDBus_Service_Interface *iface, const char *name, Eina_Bool is_invalidate) +edbus_service_property_invalidate_set(const EDBus_Service_Interface *interface, const char *name, Eina_Bool is_invalidate) { Property *prop; + EDBus_Service_Interface *iface = (EDBus_Service_Interface *) interface; EDBUS_SERVICE_INTERFACE_CHECK_RETVAL(iface, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); diff --git a/legacy/edbus/src/lib/edbus_service.h b/legacy/edbus/src/lib/edbus_service.h index 68c098a..da3e6c1 100644 --- a/legacy/edbus/src/lib/edbus_service.h +++ b/legacy/edbus/src/lib/edbus_service.h @@ -130,7 +130,7 @@ EAPI const char *edbus_service_object_path_get(const EDBus_Service_Interface *if * @param signal_id id of signal * @param ... values that will be send on signal */ -EAPI Eina_Bool edbus_service_signal_emit(EDBus_Service_Interface *iface, unsigned int signal_id, ...) EINA_ARG_NONNULL(1); +EAPI Eina_Bool edbus_service_signal_emit(const EDBus_Service_Interface *iface, unsigned int signal_id, ...) EINA_ARG_NONNULL(1); /** * @brief Create signal message. * Each signal handler have a internal id, the first signal handler of @@ -140,11 +140,11 @@ EAPI Eina_Bool edbus_service_signal_emit(EDBus_Service_Interface *iface, unsigne * @param iface interface of the signal * @param signal_id id of signal */ -EAPI EDBus_Message *edbus_service_signal_new(EDBus_Service_Interface *iface, unsigned int signal_id) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; +EAPI EDBus_Message *edbus_service_signal_new(const EDBus_Service_Interface *iface, unsigned int signal_id) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT; /** * @brief Send a signal message. */ -EAPI Eina_Bool edbus_service_signal_send(EDBus_Service_Interface *iface, EDBus_Message *signal_msg) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool edbus_service_signal_send(const EDBus_Service_Interface *iface, EDBus_Message *signal_msg) EINA_ARG_NONNULL(1, 2); /** * @brief Store data at object path, this data can be obtained from all interfaces * of the same object. @@ -179,9 +179,9 @@ EAPI void *edbus_service_object_data_del(EDBus_Service_Interface *iface, const c * A PropertiesChanged signal will be send on next idler iteration with all * properties in changed list. */ -EAPI Eina_Bool edbus_service_property_changed(EDBus_Service_Interface *iface, const char *name) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool edbus_service_property_changed(const EDBus_Service_Interface *iface, const char *name) EINA_ARG_NONNULL(1, 2); -EAPI Eina_Bool edbus_service_property_invalidate_set(EDBus_Service_Interface *iface, const char *name, Eina_Bool is_invalidate) EINA_ARG_NONNULL(1, 2); +EAPI Eina_Bool edbus_service_property_invalidate_set(const EDBus_Service_Interface *iface, const char *name, Eina_Bool is_invalidate) EINA_ARG_NONNULL(1, 2); /** * Attach ObjectManager interface.