D-Bus 1.15.2
1/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2/* dbus-types.h types such as dbus_bool_t
3 *
4 * Copyright (C) 2002 Red Hat Inc.
5 *
6 * Licensed under the Academic Free License version 2.1
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 *
22 */
23#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
24#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
27#ifndef DBUS_TYPES_H
28#define DBUS_TYPES_H
30#include <stddef.h>
31#include <dbus/dbus-arch-deps.h>
33typedef dbus_uint32_t dbus_unichar_t;
34/* boolean size must be fixed at 4 bytes due to wire protocol! */
37/* Normally docs are in .c files, but there isn't a .c file for this. */
142typedef struct
158typedef union
160 unsigned char bytes[8];
169 double dbl;
170 unsigned char byt;
171 char *str;
172 int fd;
177#endif /* DBUS_TYPES_H */
_DBUS_GNUC_EXTENSION typedef unsigned long dbus_uint64_t
A 64-bit unsigned integer.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
Definition: dbus-types.h:35
short dbus_int16_t
A 16-bit signed integer on all platforms.
unsigned short dbus_uint16_t
A 16-bit unsigned integer on all platforms.
int dbus_int32_t
A 32-bit signed integer on all platforms.
_DBUS_GNUC_EXTENSION typedef long dbus_int64_t
A 64-bit signed integer.
unsigned int dbus_uint32_t
A 32-bit unsigned integer on all platforms.
An 8-byte struct you could use to access int64 without having int64 support.
Definition: dbus-types.h:143
dbus_uint32_t second32
second 32 bits in the 8 bytes (beware endian issues)
Definition: dbus-types.h:145
dbus_uint32_t first32
first 32 bits in the 8 bytes (beware endian issues)
Definition: dbus-types.h:144
A simple value union that lets you access bytes as if they were various types; useful when dealing wi...
Definition: dbus-types.h:159
dbus_int32_t i32
as int32
Definition: dbus-types.h:163
dbus_int64_t i64
as int64
Definition: dbus-types.h:166
dbus_uint32_t u32
as int32
Definition: dbus-types.h:164
dbus_uint64_t u64
as int64
Definition: dbus-types.h:167
double dbl
as double
Definition: dbus-types.h:169
int fd
as Unix file descriptor
Definition: dbus-types.h:172
DBus8ByteStruct eight
as 8-byte struct
Definition: dbus-types.h:168
dbus_uint16_t u16
as int16
Definition: dbus-types.h:162
unsigned char byt
as byte
Definition: dbus-types.h:170
dbus_int16_t i16
as int16
Definition: dbus-types.h:161
char * str
as char* (string, object path or signature)
Definition: dbus-types.h:171
dbus_bool_t bool_val
as boolean
Definition: dbus-types.h:165