SD_BUS_MESSAGE_GET_TYPE - Online Linux Manual PageSection : 3
Updated :
Source : systemd 250
Note : sd_bus_message_get_type

NAMEsd_bus_message_get_type, sd_bus_message_get_error, sd_bus_message_get_errno, sd_bus_message_get_creds, sd_bus_message_is_signal, sd_bus_message_is_method_call, sd_bus_message_is_method_error − Query bus message addressing/credentials metadata

SYNOPSIS#include <systemd/sd−bus​.h>int sd_bus_message_get_type(sd_bus_message *m, uint8_t *type); sd_bus_error* sd_bus_message_get_error(sd_bus_message *m); int sd_bus_message_get_errno(sd_bus_message *m); sd_bus_creds* sd_bus_message_get_creds(sd_bus_message *m); int sd_bus_message_is_signal(sd_bus_message *m, const char *interface, const char *member); int sd_bus_message_is_method_call(sd_bus_message *m, const char *interface, const char *member); int sd_bus_message_is_method_error(sd_bus_message *m, const char *name);

DESCRIPTIONsd_bus_message_get_type() returns the type of a message in the output parameter type, one of SD_BUS_MESSAGE_METHOD_CALL, SD_BUS_MESSAGE_METHOD_RETURN, SD_BUS_MESSAGE_METHOD_ERROR, SD_BUS_MESSAGE_SIGNAL​. This type is either specified as a parameter when the message is created using sd_bus_message_new(3), or is set automatically when the message is created using sd_bus_message_new_signal(3), sd_bus_message_new_method_call(3), sd_bus_message_new_method_error(3) and similar functions​. sd_bus_message_get_error() returns the error stored in the message m, if there is any​. Otherwise, it returns NULL​. sd_bus_message_get_errno() returns the error stored in the message m as a positive errno−style value, if there is any​. Otherwise, it returns zero​. Errors are mapped to errno values according to the default and any additional registered error mappings​. See sd-bus-errors(3) and sd_bus_error_add_map(3)​. sd_bus_message_get_creds() returns the message credentials attached to the message m​. If no credentials are attached to the message, it returns NULL​. Ownership of the credentials instance is not transferred to the caller and hence should not be freed​. sd_bus_message_is_signal() checks if message m is a signal message​. If interface is non−null, it also checks if the message has the same interface set​. If member is non−null, it also checks if the message has the same member set​. Also see sd_bus_message_new_signal(3)​. It returns true when all checks pass​. sd_bus_message_is_method_call() checks if message m is a method call message​. If interface is non−null, it also checks if the message has the same interface set​. If member is non−null, it also checks if the message has the same member set​. Also see sd_bus_message_new_method_call(3)​. It returns true when all checks pass​. sd_bus_message_is_method_error() checks if message m is an error reply message​. If name is non−null, it also checks if the message has the same error identifier set​. Also see sd_bus_message_new_method_error(3)​. It returns true when all checks pass​.

RETURN VALUEOn success, these functions (except sd_bus_message_get_error() and sd_bus_message_get_creds()) return a non−negative integer​. On failure, they return a negative errno−style error code​. sd_bus_message_get_errno() always returns a non−negative integer, even on failure​.

ErrorsReturned errors may indicate the following problems: −EINVAL The message parameter m or an output parameter is NULL​.

NOTESThese APIs are implemented as a shared library, which can be compiled and linked to with the libsystemd ​pkg-config(1) file​.

SEE ALSOsystemd(1), sd-bus(3), sd_bus_message_new(3), sd_bus_message_set_destination(3), sd-bus-errors(3), sd_bus_error_add_map(3)
0
Johanes Gumabo
Data Size   :   14,664 byte
man-sd_bus_message_is_signal.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 182,463
Visitor ID   :     :  
Visitor IP   :   3.15.1.23   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.