D-Bus: Basic types

D-Bus 1.16.2

Data Structures | Macros | Typedefs | Variables
Basic types
D-Bus low-level public API

dbus_bool_t, dbus_int32_t, etc. More...

## Data Structures
struct | DBus8ByteStruct
| An 8-byte struct you could use to access int64 without having int64 support. More...
union | DBusBasicValue
| A simple value union that lets you access bytes as if they were various types; useful when dealing with basic types via void pointers and varargs. More...

## Macros
#define | DBUS_HAVE_INT64 1
| Always defined.
#define | DBUS_INT64_CONSTANT(val)
| Declare a 64-bit signed integer constant.
#define | DBUS_UINT64_CONSTANT(val)
| Declare a 64-bit unsigned integer constant.
#define | DBUS_INT64_MODIFIER "I64"
| A string literal for a length modifier that is appropriate to print the dbus_int64_t and dbus_uint64_t types.

## Typedefs
typedef dbus_uint32_t | dbus_bool_t
| A boolean, valid values are TRUE and FALSE.
typedef unsigned int | dbus_uint32_t
| A 32-bit unsigned integer on all platforms.
typedef int | dbus_int32_t
| A 32-bit signed integer on all platforms.
typedef unsigned short | dbus_uint16_t
| A 16-bit unsigned integer on all platforms.
typedef short | dbus_int16_t
| A 16-bit signed integer on all platforms.

## Variables
_DBUS_GNUC_EXTENSION typedef unsigned long long | dbus_uint64_t
| A 64-bit unsigned integer.
_DBUS_GNUC_EXTENSION typedef long long | dbus_int64_t
| A 64-bit signed integer.

## Detailed Description

dbus_bool_t, dbus_int32_t, etc.

Typedefs for common primitive types.

## Macro Definition Documentation

## ◆ DBUS_HAVE_INT64

#define DBUS_HAVE_INT64 1

Always defined.

In older libdbus versions, this would be undefined if there was no 64-bit integer type on that platform. libdbus no longer supports such platforms.

Definition at line 36 of file dbus-arch-deps.h.

## ◆ DBUS_INT64_CONSTANT

#define DBUS_INT64_CONSTANT | ( |  | val | ) |

Value:
(_DBUS_GNUC_EXTENSION (val##LL))
_DBUS_GNUC_EXTENSION
#define _DBUS_GNUC_EXTENSION
Tells gcc not to warn about extensions to the C standard in the following expression,...
Definition dbus-macros.h:66

Declare a 64-bit signed integer constant.

The macro adds the necessary "LL" or whatever after the integer, giving a literal such as "325145246765LL"

Definition at line 41 of file dbus-arch-deps.h.

Referenced by _dbus_get_real_time(), and _dbus_stat().

## ◆ DBUS_INT64_MODIFIER

#define DBUS_INT64_MODIFIER "I64"

A string literal for a length modifier that is appropriate to print the dbus_int64_t and dbus_uint64_t types.

For example, it might be an empty string, "l", "ll", or "I64".

This modifier needs to be concatenated with a literal "%" and a conversion specifier that can print signed or unsigned integers, for example:

dbus_int64_t i = -123;
dbus_uint64_t u = 456;
printf ("signed: %" DBUS_INT64_MODIFIER "d\n", i);
printf ("unsigned decimal: %" DBUS_INT64_MODIFIER "u\n", u);
printf ("unsigned hex: 0x%" DBUS_INT64_MODIFIER "x\n", x);
DBUS_INT64_MODIFIER
#define DBUS_INT64_MODIFIER
A string literal for a length modifier that is appropriate to print the dbus_int64_t and dbus_uint64_...
Definition dbus-arch-deps.h:39
dbus_uint64_t
_DBUS_GNUC_EXTENSION typedef unsigned long long dbus_uint64_t
A 64-bit unsigned integer.
Definition dbus-arch-deps.h:38
dbus_int64_t
_DBUS_GNUC_EXTENSION typedef long long dbus_int64_t
A 64-bit signed integer.
Definition dbus-arch-deps.h:37

Definition at line 39 of file dbus-arch-deps.h.

Referenced by _dbus_connection_block_pending_call(), and _dbus_verbose_bytes().

## ◆ DBUS_UINT64_CONSTANT

#define DBUS_UINT64_CONSTANT | ( |  | val | ) |

Value:
(_DBUS_GNUC_EXTENSION (val##ULL))

Declare a 64-bit unsigned integer constant.

The macro adds the necessary "ULL" or whatever after the integer, giving a literal such as "325145246765ULL"

Definition at line 42 of file dbus-arch-deps.h.

## Typedef Documentation

## ◆ dbus_bool_t

typedef dbus_uint32_t dbus_bool_t

A boolean, valid values are TRUE and FALSE.

Definition at line 37 of file dbus-types.h.

## ◆ dbus_int16_t

typedef short dbus_int16_t

A 16-bit signed integer on all platforms.

Definition at line 47 of file dbus-arch-deps.h.

## ◆ dbus_int32_t

typedef int dbus_int32_t

A 32-bit signed integer on all platforms.

Definition at line 44 of file dbus-arch-deps.h.

## ◆ dbus_uint16_t

typedef unsigned short dbus_uint16_t

A 16-bit unsigned integer on all platforms.

Definition at line 48 of file dbus-arch-deps.h.

## ◆ dbus_uint32_t

typedef unsigned int dbus_uint32_t

A 32-bit unsigned integer on all platforms.

Definition at line 45 of file dbus-arch-deps.h.

## Variable Documentation

## ◆ dbus_int64_t

_DBUS_GNUC_EXTENSION typedef long long dbus_int64_t

A 64-bit signed integer.

Definition at line 37 of file dbus-arch-deps.h.

Referenced by _dbus_connection_block_pending_call(), _dbus_generate_uuid(), _dbus_get_monotonic_time(), _dbus_get_real_time(), _dbus_stat(), and _dbus_string_parse_int64().

## ◆ dbus_uint64_t

_DBUS_GNUC_EXTENSION typedef unsigned long long dbus_uint64_t

A 64-bit unsigned integer.

Definition at line 38 of file dbus-arch-deps.h.

Referenced by _dbus_get_real_time(), _dbus_marshal_read_basic(), _dbus_marshal_set_basic(), _dbus_marshal_write_basic(), _dbus_marshal_write_fixed_multi(), _dbus_swap_array(), and _dbus_verbose_bytes().