Commit 0928169c authored by Ivan Romanov's avatar Ivan Romanov Committed by Simon McVittie

Use iface instead of interface in function parameters

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66493Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
parent 82d37b93
......@@ -1259,7 +1259,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()
......@@ -1267,7 +1267,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;
......@@ -1277,8 +1277,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 ();
......@@ -1288,7 +1288,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;
......@@ -1351,22 +1351,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 ();
......@@ -1376,7 +1376,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;
......@@ -3126,23 +3126,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);
}
/**
......@@ -3177,28 +3177,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;
......@@ -3490,13 +3490,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)
......@@ -3512,7 +3512,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;
}
......@@ -3528,18 +3528,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
......@@ -3547,7 +3547,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);
}
/**
......@@ -3556,18 +3556,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
......@@ -3575,7 +3575,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);
}
/**
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment