From c21511c01ab56d75f3aa4643761e9fd096a7f8be Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 19 Feb 2003 03:53:24 +0000 Subject: 2003-02-19 Havoc Pennington Throughout: mop up all the Doxygen warnings and undocumented stuff. * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want to search any paths. * dbus/dbus-threads.c: move global mutex initializers to dbus-internals.h, multiple prototypes was confusing doxygen besides being kind of ugly * Doxyfile (PREDEFINED): have Doxygen define DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS (do not abuse the feature! it's for stuff like the autogenerated macros in dbus-md5.c, not just for things you don't feel like documenting...) --- dbus/dbus-message.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'dbus/dbus-message.c') diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index e6c51784..203f0a6c 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -1001,7 +1001,7 @@ dbus_message_get_service (DBusMessage *message) * with 0. * * @param message the message - * @param first_argument_type type of the first argument + * @param first_arg_type type of the first argument * @param ... value of first argument, list of additional type-value pairs * @returns #TRUE on success */ @@ -1735,12 +1735,27 @@ dbus_message_get_sender (DBusMessage *message) return get_string_field (message, FIELD_SENDER, NULL); } +/** + * Checks whether the message has the given name. + * If the message has no name or has a different + * name, returns #FALSE. + * + * @param message the message + * @param name the name to check (must not be #NULL) + * + * @returns #TRUE if the message has the given name + */ dbus_bool_t dbus_message_name_is (DBusMessage *message, const char *name) { - if (dbus_message_get_name (message) && - strcmp (dbus_message_get_name (message), name) == 0) + const char *n; + + _dbus_assert (name != NULL); + + n = dbus_message_get_name (message); + + if (n && strcmp (n, name) == 0) return TRUE; else return FALSE; -- cgit