From: Ivan Romanov Date: Thu, 22 Aug 2013 18:11:23 +0000 (+0100) Subject: Use iface instead of interface in function parameters X-Git-Tag: dbus-1.6.18~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50b64a0c79a35f2c4673152dc2be2280551d18f2;p=platform%2Fupstream%2Fdbus.git Use iface instead of interface in function parameters Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66493 Reviewed-by: Simon McVittie (cherry picked from commit 0928169cf80bf767f7246ecaa52cc01e198bb15a) --- diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 71bcee6..a34ea1d 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -1246,7 +1246,7 @@ dbus_message_new (int message_type) * * @param destination name that the message should be sent to or #NULL * @param path object path the message should be sent to - * @param interface interface to invoke method on, or #NULL + * @param iface interface to invoke method on, or #NULL * @param method method to invoke * * @returns a new DBusMessage, free with dbus_message_unref() @@ -1254,7 +1254,7 @@ dbus_message_new (int message_type) DBusMessage* dbus_message_new_method_call (const char *destination, const char *path, - const char *interface, + const char *iface, const char *method) { DBusMessage *message; @@ -1264,8 +1264,8 @@ dbus_message_new_method_call (const char *destination, _dbus_return_val_if_fail (destination == NULL || _dbus_check_is_valid_bus_name (destination), NULL); _dbus_return_val_if_fail (_dbus_check_is_valid_path (path), NULL); - _dbus_return_val_if_fail (interface == NULL || - _dbus_check_is_valid_interface (interface), NULL); + _dbus_return_val_if_fail (iface == NULL || + _dbus_check_is_valid_interface (iface), NULL); _dbus_return_val_if_fail (_dbus_check_is_valid_member (method), NULL); message = dbus_message_new_empty_header (); @@ -1275,7 +1275,7 @@ dbus_message_new_method_call (const char *destination, if (!_dbus_header_create (&message->header, DBUS_COMPILER_BYTE_ORDER, DBUS_MESSAGE_TYPE_METHOD_CALL, - destination, path, interface, method, NULL)) + destination, path, iface, method, NULL)) { dbus_message_unref (message); return NULL; @@ -1338,22 +1338,22 @@ dbus_message_new_method_return (DBusMessage *method_call) * specification defines the syntax of these fields). * * @param path the path to the object emitting the signal - * @param interface the interface the signal is emitted from + * @param iface the interface the signal is emitted from * @param name name of the signal * @returns a new DBusMessage, free with dbus_message_unref() */ DBusMessage* dbus_message_new_signal (const char *path, - const char *interface, + const char *iface, const char *name) { DBusMessage *message; _dbus_return_val_if_fail (path != NULL, NULL); - _dbus_return_val_if_fail (interface != NULL, NULL); + _dbus_return_val_if_fail (iface != NULL, NULL); _dbus_return_val_if_fail (name != NULL, NULL); _dbus_return_val_if_fail (_dbus_check_is_valid_path (path), NULL); - _dbus_return_val_if_fail (_dbus_check_is_valid_interface (interface), NULL); + _dbus_return_val_if_fail (_dbus_check_is_valid_interface (iface), NULL); _dbus_return_val_if_fail (_dbus_check_is_valid_member (name), NULL); message = dbus_message_new_empty_header (); @@ -1363,7 +1363,7 @@ dbus_message_new_signal (const char *path, if (!_dbus_header_create (&message->header, DBUS_COMPILER_BYTE_ORDER, DBUS_MESSAGE_TYPE_SIGNAL, - NULL, path, interface, name, NULL)) + NULL, path, iface, name, NULL)) { dbus_message_unref (message); return NULL; @@ -3113,23 +3113,23 @@ dbus_message_get_path_decomposed (DBusMessage *message, * in the D-Bus specification. * * @param message the message - * @param interface the interface or #NULL to unset + * @param iface the interface or #NULL to unset * @returns #FALSE if not enough memory */ dbus_bool_t dbus_message_set_interface (DBusMessage *message, - const char *interface) + const char *iface) { _dbus_return_val_if_fail (message != NULL, FALSE); _dbus_return_val_if_fail (!message->locked, FALSE); - _dbus_return_val_if_fail (interface == NULL || - _dbus_check_is_valid_interface (interface), + _dbus_return_val_if_fail (iface == NULL || + _dbus_check_is_valid_interface (iface), FALSE); return set_or_delete_string_field (message, DBUS_HEADER_FIELD_INTERFACE, DBUS_TYPE_STRING, - interface); + iface); } /** @@ -3164,28 +3164,28 @@ dbus_message_get_interface (DBusMessage *message) * Checks if the message has an interface * * @param message the message - * @param interface the interface name + * @param iface the interface name * @returns #TRUE if the interface field in the header matches */ dbus_bool_t dbus_message_has_interface (DBusMessage *message, - const char *interface) + const char *iface) { const char *msg_interface; msg_interface = dbus_message_get_interface (message); if (msg_interface == NULL) { - if (interface == NULL) + if (iface == NULL) return TRUE; else return FALSE; } - if (interface == NULL) + if (iface == NULL) return FALSE; - if (strcmp (msg_interface, interface) == 0) + if (strcmp (msg_interface, iface) == 0) return TRUE; return FALSE; @@ -3477,13 +3477,13 @@ dbus_message_get_signature (DBusMessage *message) static dbus_bool_t _dbus_message_has_type_interface_member (DBusMessage *message, int type, - const char *interface, + const char *iface, const char *member) { const char *n; _dbus_assert (message != NULL); - _dbus_assert (interface != NULL); + _dbus_assert (iface != NULL); _dbus_assert (member != NULL); if (dbus_message_get_type (message) != type) @@ -3499,7 +3499,7 @@ _dbus_message_has_type_interface_member (DBusMessage *message, { n = dbus_message_get_interface (message); - if (n == NULL || strcmp (n, interface) == 0) + if (n == NULL || strcmp (n, iface) == 0) return TRUE; } @@ -3515,18 +3515,18 @@ _dbus_message_has_type_interface_member (DBusMessage *message, * protocol allows method callers to leave out the interface name. * * @param message the message - * @param interface the name to check (must not be #NULL) + * @param iface the name to check (must not be #NULL) * @param method the name to check (must not be #NULL) * * @returns #TRUE if the message is the specified method call */ dbus_bool_t dbus_message_is_method_call (DBusMessage *message, - const char *interface, + const char *iface, const char *method) { _dbus_return_val_if_fail (message != NULL, FALSE); - _dbus_return_val_if_fail (interface != NULL, FALSE); + _dbus_return_val_if_fail (iface != NULL, FALSE); _dbus_return_val_if_fail (method != NULL, FALSE); /* don't check that interface/method are valid since it would be * expensive, and not catch many common errors @@ -3534,7 +3534,7 @@ dbus_message_is_method_call (DBusMessage *message, return _dbus_message_has_type_interface_member (message, DBUS_MESSAGE_TYPE_METHOD_CALL, - interface, method); + iface, method); } /** @@ -3543,18 +3543,18 @@ dbus_message_is_method_call (DBusMessage *message, * has a different interface or member field, returns #FALSE. * * @param message the message - * @param interface the name to check (must not be #NULL) + * @param iface the name to check (must not be #NULL) * @param signal_name the name to check (must not be #NULL) * * @returns #TRUE if the message is the specified signal */ dbus_bool_t dbus_message_is_signal (DBusMessage *message, - const char *interface, + const char *iface, const char *signal_name) { _dbus_return_val_if_fail (message != NULL, FALSE); - _dbus_return_val_if_fail (interface != NULL, FALSE); + _dbus_return_val_if_fail (iface != NULL, FALSE); _dbus_return_val_if_fail (signal_name != NULL, FALSE); /* don't check that interface/name are valid since it would be * expensive, and not catch many common errors @@ -3562,7 +3562,7 @@ dbus_message_is_signal (DBusMessage *message, return _dbus_message_has_type_interface_member (message, DBUS_MESSAGE_TYPE_SIGNAL, - interface, signal_name); + iface, signal_name); } /** diff --git a/dbus/dbus-message.h b/dbus/dbus-message.h index 5500492..4fd44da 100644 --- a/dbus/dbus-message.h +++ b/dbus/dbus-message.h @@ -71,13 +71,13 @@ DBusMessage* dbus_message_new (int message_type); DBUS_EXPORT DBusMessage* dbus_message_new_method_call (const char *bus_name, const char *path, - const char *interface, + const char *iface, const char *method); DBUS_EXPORT DBusMessage* dbus_message_new_method_return (DBusMessage *method_call); DBUS_EXPORT DBusMessage* dbus_message_new_signal (const char *path, - const char *interface, + const char *iface, const char *name); DBUS_EXPORT DBusMessage* dbus_message_new_error (DBusMessage *reply_to, @@ -108,12 +108,12 @@ dbus_bool_t dbus_message_has_path (DBusMessage *message, const char *object_path); DBUS_EXPORT dbus_bool_t dbus_message_set_interface (DBusMessage *message, - const char *interface); + const char *iface); DBUS_EXPORT const char* dbus_message_get_interface (DBusMessage *message); DBUS_EXPORT dbus_bool_t dbus_message_has_interface (DBusMessage *message, - const char *interface); + const char *iface); DBUS_EXPORT dbus_bool_t dbus_message_set_member (DBusMessage *message, const char *member); @@ -146,11 +146,11 @@ DBUS_EXPORT dbus_bool_t dbus_message_get_no_reply (DBusMessage *message); DBUS_EXPORT dbus_bool_t dbus_message_is_method_call (DBusMessage *message, - const char *interface, + const char *iface, const char *method); DBUS_EXPORT dbus_bool_t dbus_message_is_signal (DBusMessage *message, - const char *interface, + const char *iface, const char *signal_name); DBUS_EXPORT dbus_bool_t dbus_message_is_error (DBusMessage *message,