edbus: unexport edbus_message_signal_new()

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
This commit is contained in:
Lucas De Marchi 2012-12-18 21:38:49 +00:00
parent 7b2ff200f8
commit 6038eeaf47
3 changed files with 2 additions and 11 deletions

View 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

View 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))

View 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;
}