edbus: unexport edbus_message_signal_new()
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 18 Dec 2012 21:38:49 +0000 (21:38 +0000)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 18 Dec 2012 21:38:49 +0000 (21:38 +0000)
Signals need to be sent with edbus_service_signal_emit() -- for basic
messages -- or edbus_service_signal_new() + edbus_service_signal_send --
for complex messages.  Otherwise it's possible to send signals that are
not in the service introspection or that have different signatures by
mistake/typo.

SVN revision: 81311

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

index 73aee23..211bc67 100644 (file)
@@ -57,16 +57,6 @@ EAPI EDBus_Message        *edbus_message_error_new(const EDBus_Message *reply, c
  */
 EAPI EDBus_Message        *edbus_message_method_return_new(const EDBus_Message *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 
-/**
- * @brief Constructs a new message representing a signal emission.
- *
- * @param path of the object that was emiting the signal
- * @param interface
- * @param name
- *
- * @return new EDBus_Message, free with edbus_message_unref()
- */
-EAPI EDBus_Message        *edbus_message_signal_new(const char *path, const char *interface, const char *name) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
 
 /**
  * @brief If EDBus_Message is a message error return EINA_TRUE and fills
index d87cc95..dcffbf1 100644 (file)
@@ -79,6 +79,7 @@ void                   edbus_connection_name_ref(EDBus_Connection_Name *cn);
 void                   edbus_connection_name_unref(EDBus_Connection *conn, EDBus_Connection_Name *cn);
 EDBus_Signal_Handler  *_edbus_signal_handler_add(EDBus_Connection *conn, const char *sender, const char *path, const char *interface, const char *member, EDBus_Signal_Cb cb, const void *cb_data);
 
+EDBus_Message         *edbus_message_signal_new(const char *path, const char *interface, const char *name) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
 
 #ifdef HAVE_VA_LIST_AS_ARRAY
 #define MAKE_PTR_FROM_VA_LIST(arg) ((va_list *)(arg))
index 13eaad2..a526f1e 100644 (file)
@@ -1256,7 +1256,7 @@ edbus_service_signal_send(const EDBus_Service_Interface *iface, EDBus_Message *s
    EDBUS_SERVICE_INTERFACE_CHECK_RETVAL(iface, EINA_FALSE);
    EINA_SAFETY_ON_NULL_RETURN_VAL(signal_msg, EINA_FALSE);
    _edbus_connection_send(iface->obj->conn, signal_msg, NULL, NULL, -1);
-   edbus_message_unref(sig);
+   edbus_message_unref(signal_msg);
    return EINA_TRUE;
 }