edbus: Change some function parameters to const
authorJosé Roberto de Souza <zehortigoza@profusion.mobi>
Tue, 11 Dec 2012 19:51:02 +0000 (19:51 +0000)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 11 Dec 2012 19:51:02 +0000 (19:51 +0000)
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 80699

legacy/edbus/src/lib/edbus_service.c
legacy/edbus/src/lib/edbus_service.h

index 42a56ae..0eeee8c 100644 (file)
@@ -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);
index 68c098a..da3e6c1 100644 (file)
@@ -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.