From ff004b5cb8defeaa4cae63baa8f6b117e315a2bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 11 Dec 2012 19:51:02 +0000 Subject: [PATCH] edbus: Change some function parameters to const MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Patch by: José Roberto de Souza SVN revision: 80699 --- src/lib/edbus_service.c | 12 +++++++----- src/lib/edbus_service.h | 10 +++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/lib/edbus_service.c b/src/lib/edbus_service.c index 42a56ae..0eeee8c 100644 --- a/src/lib/edbus_service.c +++ b/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/src/lib/edbus_service.h b/src/lib/edbus_service.h index 68c098a..da3e6c1 100644 --- a/src/lib/edbus_service.h +++ b/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. -- 2.7.4